Incorrect URDF to SDF conversion of gravity and self_collide tags

Issue #71 new
Nate Koenig
created an issue

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?

Comments (12)

  1. Allison Thackston

    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.

  2. Felix Messmer

    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...;-)

  3. Felix Messmer

    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?

  4. Log in to comment