Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

IGN_GAZEBO_RESOURCE_PATH doesn't find files if there is more than one path

I've just started using gazebo with ignition but am having issues setting up resource paths correctly. I have existing world and model files which have been previously used with gazebo_ros.

Models and world files exist in subdirectories worlds and models of the test directory.

The world file ( I am working with looks like:

<?xml version="1.0" ?>
<sdf version="1.4">
  <world name="default">
      <pose>0.5 0 0 0 0 0</pose>

With no change to the IGN_GAZEBO_RESOURCE_PATH, running ign gazebo -v4 does nothing, as of course the file cannot be found.

Now, I add the location of the world file to the resource path:

$ export IGN_GAZEBO_RESOURCE_PATH=/home/user/robots/test/worlds
$ ign gazebo -v4
[Msg] Ignition Gazebo Server v2.16.0
[Msg] Ignition Gazebo GUI    v2.16.0
[Msg] Loading SDF world file[/home/user/robots/test/worlds/].
[Err] [] Error Code 11 Msg: Unable to find uri[model://ground_plane]
[Err] [] Error Code 11 Msg: Unable to find uri[model://test/models/block_field]
[Dbg] [] Shutting down ign-gazebo-server
[Dbg] [] Initializing application.
[GUI] [Dbg] [] Create main window
[GUI] [Dbg] [] GUI requesting list of world names. The server may be busy downloading resources. Please be patient.
[GUI] [Dbg] [] Received signal[2].
[GUI] [Dbg] [] Received signal[2].
[GUI] [Dbg] [] Terminating application.

Now it finds the location of the test file but cannot find the models. So, I add the paths to the models::

$ export IGN_GAZEBO_RESOURCE_PATH=${IGN_GAZEBO_RESOURCE_PATH}:/home/user/robots/test/models:/usr/share/gazebo-9/models
$ ign gazebo -v4
Unable to find file

And for some reason it cannot find the world file anymore.

If I go to ~/robots/test/worlds and run ign gazebo -v4, I get the same result as before, where it cannot find the models.

What am I doing wrong?