Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Converting URDF to SDF: <preservefixedjoint> not working

I am trying to convert a robot specified in URDF into SDF by using the URDF parser from Gazebo (gz sdf -p in.urdf > out.sdf).

By default, links connected by fixed joints in URDF get lumped together into single link, as SDF apparently didn't support fixed links in the past:[1]

By adding the tag <disableFixedJointLumping> this lumping is deactivated, and a fixed joint in SDF is approximated by a revolute joint with minPos=maxPos=0. This however doesn't work for me as the joint still allows minimal oscillations.

As I read here [2], a new tag <preserveFixedJoint> has supposedly been added that will make the SDF file have a true fixed joint. However, upon using the tag, the URDF parser throws the following warning:

Warning [parser.cc:778] XML Element[preserveFixedJoint], child of element[joint] not defined in SDF. Ignoring[preserveFixedJoint]. You may have an incorrect SDF file, or an sdformat version that doesn't support this element.

Is this tag not part of the final build yet, or can i somehow update my SDFormat to get access to it? I am using Gazebo 7.0.0

[1] https://bitbucket.org/osrf/sdformat/issues/131/disabling-lumping-on-a-fixed-joint-in-a

[2] https://bitbucket.org/osrf/sdformat/pull-requests/352/add-preservefixedjoint-option-to-the-urdf/diff

Converting URDF to SDF: <preservefixedjoint> not working

I am trying to convert a robot specified in URDF into SDF by using the URDF parser from Gazebo (gz sdf -p in.urdf > out.sdf).

By default, links connected by fixed joints in URDF get lumped together into single link, as SDF apparently didn't support fixed links in the past:[1]

By adding the tag <disableFixedJointLumping> this lumping is deactivated, and a fixed joint in SDF is approximated by a revolute joint with minPos=maxPos=0. This however doesn't work for me as the joint still allows minimal oscillations.

As I read here [2], a new tag <preserveFixedJoint> has supposedly been added that will make the SDF file have a true fixed joint. However, upon using the tag, the URDF parser throws the following warning:

Warning [parser.cc:778] XML Element[preserveFixedJoint], child of element[joint] not defined in SDF. Ignoring[preserveFixedJoint]. You may have an incorrect SDF file, or an sdformat version that doesn't support this element.

Is this tag not part of the final build yet, or can i somehow update my SDFormat to get access to it? I am using Gazebo 7.0.0

[1] https://bitbucket.org/osrf/sdformat/issues/131/disabling-lumping-on-a-fixed-joint-in-a

[2] https://bitbucket.org/osrf/sdformat/pull-requests/352/add-preservefixedjoint-option-to-the-urdf/diff

Example URDF:

<robot name="robot">

<link name="base">
  <inertial>
    <mass value="1"/>
    <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
  </inertial>
</link>
<joint name="base_to_link" type="fixed">
  <parent link="base"/>
  <child link="link"/>
</joint>
<link name="link">
  <inertial>
    <mass value="1"/>
    <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
  </inertial>
</link>
<gazebo reference="base_to_link">
  <disableFixedJointLumping>true</disableFixedJointLumping> 
  <preserveFixedJoint>true</preserveFixedJoint>
</gazebo>

</robot>

Gets converted to:

 ...
 <joint name='base_to_link' type='revolute'>
  <child>link</child>
  <parent>base</parent>
  <axis>
    <limit>
      <lower>0</lower>
      <upper>0</upper>
    </limit>
  </axis>
    ...
 </joint>
 ...