Home | Tutorials | Wiki | Issues
Ask Your Question
1

Problem after adding properties to SDF description of collision objects

asked 2015-02-28 09:14:39 -0500

faichele gravatar image

updated 2015-03-03 16:28:16 -0500

Hello!

I'm facing a small problem with properties I added to the SDF description for collision objects. The parsing of the modified SDF file as well as querying the added properties does not cause any warnings or errors, and works as intended.

However, the visual description of a model definition fails to get parsed correctly if my added properties are present in a model definition. A temporary workaround is to move the visual SDF description in front of the collision SDF description: If I do that, there's no problem with parsing the SDF file.

To summarize, an example model definition including my added properties: http://pastebin.com/BCiCXniq

Without my new properties, the model file is parsed correctly.

Since the mentioned workaround (swapping the order of "visual" and "collision") is not causing any issues, I'm currently out of ideas for what could cause this problem, and what I could do to fix this another way than manually swapping the order of "visual" and "collision" descriptions in each model I'd like to add my new properties to, and I'd appreciate any hints or tips.

UPDATE: I used the gz command line utility to check if there are parsing errors with the added tags, as suggested by scpeters (thank you for the tip). There were no error or warning messages with the new SDF properties I added, however I could reproduce the issue with swapped order of "visual" and "collision" tag groups.

Output of gz sdf --print pathtomodel/model.sdf http://pastebin.com/eEVxF7ad

I have no plausible explanation why the presence of new SDF properties in the "collision" tag group might cause the "visual" tag group to miss.

Thank you very much!

With best regards, Fabian Aichele

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-03-01 04:15:31 -0500

scpeters gravatar image

Currently there are no errors given when sdf parsing fails; it just stops (see gazebo issue 185). So I'm guessing there are parsing errors in your collision element. Can you try gz sdf --print model.sdf to see if it gives any errors? I think sdformat will complain about unrecognized elements, such as the bullet soft_contact parameters.

edit flag offensive delete link more

Comments

We are making a pull request to allow unknown elements, by the way.

scpeters gravatar imagescpeters ( 2015-03-02 03:54:42 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2015-02-28 09:14:39 -0500

Seen: 666 times

Last updated: Mar 03 '15