Gazebo | Ignition | Community
Ask Your Question
0

Using Include in SDF broken after Upgrading from 1.8 to 1.9 (gzfactory seems broken)

asked 2013-08-02 12:38:16 -0500

JSenna gravatar image

updated 2013-08-16 13:27:26 -0500

The Ubuntu software update tool updated my gazebo install from 1.8 to 1.9, and it appears to have broken something regarding includes. I have a model (in a custom path) that includes a slightly modified hokuyo model (in the same custom path).

In the script I run to launch gazebo and insert the model I use an export to set the model path, and gzfactory to insert my model.

export GAZEBO_MODEL_PATH=my/custom/path/models:$GAZEBO_MODEL_PATH
then later
gzfactory spawn -f my/custom/path/models/myrobot/myrobot.sdf

I get these errors:

Error [SDF.cc:118] Tried to use callback in sdf::findFile(), but the callback is empty.  
Did you call sdf::setFindCallback()?

Error [parser.cc:520] Unable to find uri[model://Modified_Hokuyo]

Exception [Joint.cc:137] Couldn't Find Child Link[hokuyo::link]

Error [Model.cc:153] LoadJoint Failed

Heres what the include in the sdf looks like:

<include>
    <uri>model://Modified_Hokuyo</uri>
    <pose>.25 0 0.2675 0 0 0</pose>
</include>
<joint name="hokuyo_joint" type="revolute">
    <child>hokuyo::link</child>
    <parent>base_link</parent>
    <axis>
      <xyz>0 0 1</xyz>
      <limit>
        <upper>0</upper>
        <lower>0</lower>
      </limit>
    </axis>
</joint>

What is odd is that it is able to insert my custom robot, but then fails to find the hokuyo model. Was something changed from 1.8 to 1.9 about how gazebo uses model://?

Any help would be greatly appreciated, I have a demo coming up very soon and I can't find a way to downgrade to 1.8 to fix the problem temporarily.

[Edit] I tried adding a database.config file to the directory with all my custom models, but that didn't seem to work either.

[Edit 2] By adding a trailing / to the export:

export GAZEBO_MODEL_PATH=my/custom/path/models/:$GAZEBO_MODEL_PATH

I was able to have the model insert into the world, but only using the GUI. When I try and use gzfactory I still get the same errors. What is causing this??

[Edit 3] I used the topic visualization tool, and inspected the factory topic to compare the difference between the GUI and gzfactory. The GUI appears to properly expand the includes and creates a hokuyo link within the robot. Gzfactory however, seems to completely ignore the includes. I posted a screenshot to show where they differ. This looks to me like Gzfactory broke between 1.8 and 1.9.

image description

Might be related to this? https://bitbucket.org/osrf/gazebo/iss...

[Edit 4] Bump.. If there is no solution now is there a way I can submit this as a bug in gzfactory?

edit retag flag offensive close merge delete

Comments

Is there a way to submit this as a bug? I'm fairly certain at this point that it is a problem with gzfactory..

JSenna gravatar imageJSenna ( 2013-08-16 13:24:56 -0500 )edit

Did this ever get fixed? Is there a workaround? I'm having a similar problem using a local include in my local model definition.

Kurt Leucht gravatar imageKurt Leucht ( 2014-07-02 09:53:03 -0500 )edit

Are you also using gazebo_1.9? And could you please post the SDF file you're trying to spawn (in a new answer to this question)?

nkoenig gravatar imagenkoenig ( 2014-07-02 13:16:10 -0500 )edit

Sorry, operator error. Although it was an honest error. I accidentally made my model's folder name slightly different than I had intended. Plus, I thought the "model name" tag inside the SDF file was being used in the import call, but it's the model's folder name that is being used. I intended for them to be the same, but had a typo in the folder name. Easy mistake for people to make so I'm surprised it's not done incorrectly more often.

Kurt Leucht gravatar imageKurt Leucht ( 2014-07-03 13:43:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-03 13:57:58 -0500

nkoenig gravatar image

Answer in comments.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-08-02 12:38:16 -0500

Seen: 1,424 times

Last updated: Jul 03 '14