Gazebo | Ignition | Community
Ask Your Question

Using_A_URDF_In_Gazebo: package:// URIs not described

asked 2014-06-17 07:32:20 -0500

peci1 gravatar image

updated 2014-06-17 07:33:28 -0500

When I read through the tutorials Using A URDF In Gazebo and Using roslaunch files to Spawn Models I have the impression that it is possible to run Gazebo with ROS without using Gazebo's model database.

To explain, I need to work with some models from ROS using Gazebo. In my view, adding the models to a local database doesn't make sense, because the users of my code just want to git clone and catkin_make and that's all.

So I searched for a way to specify paths to mesh files from my URDF relatively to the package they are contained in. Using the file:// protocol doesn't seem to be a good option, since its resolution is dependent on the working directory.

Somewhere I've found that a package:// protocol can be used, and it actually works in my models. However, there doesn't seem to be any documentation for that. Do you know of docs page that would explain the details and prerequisites for using that?

I've thought about another way to use my models without the need to install them locally. I could just add the package path to GAZEBO_RESOURCE_PATH. But where to do this? Should I use <env> tag in the launch file? Do you have any experience with that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-06-17 14:19:26 -0500


you can use the export statement in your package.xml to pass this variables to gazebo_ros





This works fine for out projects

This is mentioned in one of the last ros integration tutorials but not really explained...


edit flag offensive delete link more


@evilBiber thanks for your tip! Where did you get to know about that? And how does it work? The plugin tag only references the shared library file, which IMO doesn't have any link to the package.xml of its original package. Or does it?

peci1 gravatar imagepeci1 ( 2014-06-24 10:24:39 -0500 )edit

What is the value of ${prefix} here? @evilBiber

winston gravatar imagewinston ( 2015-03-13 23:01:30 -0500 )edit

${prefix} is always the path of the package.xml itself/

evilBiber gravatar imageevilBiber ( 2015-06-10 02:45:48 -0500 )edit

This doesn't work for me, because I still have to manually set the GAZEBO_MODEL_PATH in my bash file. Do I have to add something special to the CMake file?

Lyndwyrm gravatar imageLyndwyrm ( 2016-10-18 00:35:49 -0500 )edit

check that your package.xml file has: <run_depend>gazebo_ros</run_depend>

Oscar Lima gravatar imageOscar Lima ( 2017-09-06 16:33:10 -0500 )edit

Now it's <exec_depend> instead of <run_depend>

Airuno2L gravatar imageAiruno2L ( 2018-02-09 14:07:52 -0500 )edit

exec_depend instead of run_depend now

Airuno2L gravatar imageAiruno2L ( 2018-02-09 14:08:52 -0500 )edit

Question Tools



Asked: 2014-06-17 07:32:20 -0500

Seen: 6,381 times

Last updated: Jun 17 '14