Robotics StackExchange | Archived questions

How to add custom mesh to world from a different package

The tutorial mentions that you can add a custom mesh if it is in the same folder as the world file, but not if it is in a different folder/package. Is there a way to do this? I've tried adding the path to GAZEBO_RESOURCES_PATH, but that doesn't seem to work.

Asked by athackst on 2014-10-20 12:06:21 UTC

Comments

Answers

I found the secret sauce:

in package.xml:

<run_depend>gazebo_ros</run_depend>
...
<export>
  <gazebo_ros gazebo_media_path="${prefix}" />
</export>

then in the world file:

<geometry>
  <mesh>
    <uri>file://name_of_mesh.dae</uri>
  </mesh>
</geometry>

I had to change model:// to file:// here.

Asked by athackst on 2014-10-21 10:41:46 UTC

Comments