0

Drake noob here. I tried running the drake_visualizer and geometry_inspector with my own ROS generated URDF that depicts and experimental setup with two UR10s. This throws two errors

  • PackageMap is not able to resolve certain mesh files of extension *.STL and *.DAE. This has been well catalogued in this link.
  • And ROS paths of the sort package://blah/blah do not seem to be resolved as well. I know this because the console throws the following error
Couldn't find package 'blah' in the supplied packagepath: PackageMap:
 [EMPTY!]

In another stack question, one of the authors of the Drake repo suggested we can transform the .stl files during build time. I tried searching for how you can exactly do this but couldn't find anything. I have the feeling that I am missing something fundamental here. Any help would be appreciated.

Thanks in Advance

kzernobog
  • 5
  • 4
  • To be clear -- is the error coming from the `geometry_inspector` instance or the `drake_visualizer` instance? For the `geometry_inspector`, you can using the `PackageMap` class to add additional paths. https://drake.mit.edu/doxygen_cxx/classdrake_1_1multibody_1_1_package_map.html – Russ Tedrake Apr 04 '21 at 22:41

1 Answers1

0

Using Russ's comment, what you need to do is the following

parser = Parser(plant)
parser.package_map().PopulateFromFolder("path/to/folder/containing/package.xml")
parser.AddModelFromFile("your.urdf")

There are many ways to populate the package map, as linked in Russ's comment

Rufus
  • 5,111
  • 4
  • 28
  • 45