Gazebo | Ignition | Community
Ask Your Question
1

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

asked 2020-04-16 09:08:13 -0500

heuristicus gravatar image

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 (test.world) I am working with looks like:

<?xml version="1.0" ?>
<sdf version="1.4">
  <world name="default">
    <include>
      <uri>model://ground_plane</uri>
    </include>    
    <include>
      <static>true</static>
      <pose>0.5 0 0 0 0 0</pose>
      <uri>model://test/models/block_field</uri>
    </include>
  </world>
</sdf>

With no change to the IGN_GAZEBO_RESOURCE_PATH, running ign gazebo test.world -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 test.world -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/test.world].
[Err] [Server.cc:144] Error Code 11 Msg: Unable to find uri[model://ground_plane]
[Err] [Server.cc:144] Error Code 11 Msg: Unable to find uri[model://test/models/block_field]
[Dbg] [ign.cc:279] Shutting down ign-gazebo-server
[Dbg] [Application.cc:87] Initializing application.
[GUI] [Dbg] [Application.cc:407] Create main window
[GUI] [Dbg] [ign.cc:359] GUI requesting list of world names. The server may be busy downloading resources. Please be patient.
[GUI] [Dbg] [SignalHandler.cc:141] Received signal[2].
[GUI] [Dbg] [SignalHandler.cc:141] Received signal[2].
[GUI] [Dbg] [Application.cc:130] 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
$ echo $IGN_GAZEBO_RESOURCE_PATH 
/home/user/robots/test/worlds:/home/user/robots/test/models:/usr/share/gazebo-9/models
$ ign gazebo test.world -v4
Unable to find file test.world

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

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

What am I doing wrong?

edit retag flag offensive close merge delete

Comments

Have you solve your problem? I have same problem, try different version of ignition still didn't work

ekorudiawan gravatar imageekorudiawan ( 2021-01-13 03:17:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-18 13:24:50 -0500

chapulina gravatar image

I could reproduce this issue on Ignition Blueprint (ign-gazebo 2.25.0), but not on Ignition Citadel or Dome (versions 3.5.0 and 4.0.0).

Since Blueprint is going to EOL this month, I suggest you upgrade to a newer version, because that probably won't be fixed on version 2.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-04-16 09:08:13 -0500

Seen: 1,583 times

Last updated: Dec 18 '20