Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect URDF to SDF conversion of gravity and self_collide tags #71

Open
osrf-migration opened this issue Sep 19, 2014 · 13 comments
Open
Labels
bug Something isn't working major URDF URDF parsing

Comments

@osrf-migration
Copy link

Original report (archived issue) by Nate Koenig (Bitbucket: Nathan Koenig).

The original report had attachments: test_urdf.sdf, test_urdf.urdf, test_urdf.xacro


Here is the source, and the specific part of the question:

gravity, selfCollide and self_collide (gazebo tag for links)

Adding one of the tags above for a link, an additional tag is added to the resulting sdf file, i.e. there are then two gravity tags for the same link in the sdf file where the first is always set to true (1) and the second sdf tag holds the value set in the urdf. I assume that when gazebo parses the sdf file, it always finds the first tag using their value, thus always neglecting what has been set in the urdf.

and

kp, kd (gazebo tag for joint)

Not converted into sdf. Why?

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • Edited issue description

@osrf-migration
Copy link
Author

Original comment by Allison Thackston (Bitbucket: athackst).


I'm seeing something similar with colors. It seems to be related to how gzsdf is parsing the link names. For example if I have a link named "link_slot1" and "link_slot1_switch" with two different materials tagged in it, "link_slot1_switch" will have both materials in the sdf. If there I add another link, "link_slot1_switch_cover" the pattern continues with the third link having 3 different materials tagged in it.

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Can you post your example URDF?

@osrf-migration
Copy link
Author

Original comment by Allison Thackston (Bitbucket: athackst).


  • set attachment to "test_urdf.xacro"

Attached is the original .xacro file, the generated .urdf file from xacro.py, and the generated .sdf file from gzsdf

@osrf-migration
Copy link
Author

Original comment by Felix Messmer (Bitbucket: ipa_fxm).


Has there been any progress in this?
Or where there any changes in the urdfdom or sdfdom respectively?
Because - at least - the selfCollide tag seams to work both in hydro and indigo (again?)
Or did I do something wrong when I reported the issue on gazebo answers?
I'm doubting myself...;-)

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


The URDF converter looks for "turnGravityOff", "selfCollide", and others. The list is [here](https://github.com/osrf/sdformat/blob/2bd71144659c09c3a9bb4768fdfab12a87b39283/src/parser_urdf.cc#L1194

Setting those values in a <gazebo> extension should work for you.

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


Allison,

I didn't see any reference to selfCollide, turnGravityOff in test_urdf.xacro or test_urdf.urdf that you posted. Should there have been one?

@osrf-migration
Copy link
Author

Original comment by Allison Thackston (Bitbucket: athackst).


No, I was proposing a possible root cause, but it should probably be a separate issue.

@osrf-migration
Copy link
Author

Original comment by Felix Messmer (Bitbucket: ipa_fxm).


Ok, I was still able to reproduce the same behavior that was reported on gazebo_answers (playing around with turnGravityOff/gravity, selfCollide/self_collide).

You can find my experiments on gist

It seems that the "old" tags selfCollide and turnGravityOff work ok, but the "new" tags self_collide and gravity do not work....

Hope this helps debugging

I guess the main confusion is because it is not clear, which tags are to be used for which gazebo-/sdf-/sdformat- version!
Documentation/Tutorials are mixing up gazebo-extension-tags (e.g. turnGravityOff) and sdf-native-tags (e.g. gravity) (see here where "new" gravity is used, but "old" selfCollide ). Also the tags differ between the sdf-versions (i.e. sdformat-1.4.11-1 which is used with gazebo2.2.3-1 and sdformat-2.3.0-1 which is used with latest(?) gazebo4(?))

BTW, can sdformat2 be used with gazebo2.2.3?

@osrf-migration
Copy link
Author

Original comment by Allison Thackston (Bitbucket: athackst).


I created a separate issue (#86) for the material parsing problem

@osrf-migration
Copy link
Author

Original comment by Jeremy Morgan (Bitbucket: JeremySMorgan).


Has there been any update on this? With gazebo7, ros kinetic i'm still experiencing this bug. Thanks

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


We haven't made progress on this issue yet. Don't let that stop you from making a pull request to resolve this issue.

@osrf-migration osrf-migration added major bug Something isn't working labels Apr 11, 2020
@scpeters
Copy link
Member

<gravity> tags for links were fixed in #628

there may still be other affected tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major URDF URDF parsing
Projects
None yet
Development

No branches or pull requests

3 participants