kamiradi
kamiradi

Reputation: 25

How do you visualise your ROS URDF on the Drake visualizer?

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

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

Upvotes: 0

Views: 285

Answers (1)

Rufus
Rufus

Reputation: 5566

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

Upvotes: 1

Related Questions