Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

URDF to Gazebo differs from URDF to SDF to Gazebo

I found out a strange behaviour when spawning model in Gazebo.

I have an URDF model of a humanoid robot and a launch file where it is sapwned to Gazebo through model_spawn of the gazebo_ros package using -urdf flag:

<param name="robot_description" 
       command="$(find xacro)/ '$(find my_robot_description)/urdf/my_robot.xacro'"/>
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
      args="-urdf -model my_robot -param robot_description"/>

In such a case, if I endow the URDF with a simple <gazebo> property as follows:

  <!-- robot model offset -->
  <pose>0 0 0.5 0 0 0</pose>

It doesn't affect my model in Gazebo, which generate a warning like this:

Warning [] multiple inconsistent <pose> exists due to fixed joint reduction overwriting previous value [0 0 0.5 0 0 0] with [0 0 0 0 -0 0].

However, if I convert the URDF first to SDF (using gz sdf -p my_robot.urdf) and spawn the SDF directly with the -sdf flag, this does not happen and everything works as expected.

Why does this happen? Is a problem of the URDF parser of Gazebo or I'm doing something wrong?