gazebosim / sdformat

Simulation Description Format (SDFormat) parser and description files.
http://sdformat.org
Apache License 2.0
161 stars 91 forks source link

Parser does not handle URDF material gazebo extensions #132

Open osrf-migration opened 7 years ago

osrf-migration commented 7 years ago

Original report (archived issue) by Parker Lusk (Bitbucket: plusk01).

The original report had attachments: model.sdf, model.urdf


Using Gazebo 7.4.0 and ROS Kinetic, my URDF files that have gazebo extensions like

<gazebo reference="chassis">
  <material>Gazebo/DarkGrey</material>
</gazebo>

do not convert to SDF 1.6 correctly. This seems to be a bug in the parser_urdf.cc. This can be recreated by running gz sdf -p model.urdf and noting that the material tag is not present.

Perhaps related to osrf/gazebo issue #2103.

osrf-migration commented 7 years ago

Original comment by Parker Lusk (Bitbucket: plusk01).


It turns out that my visual tag in my URDF (model.urdf) had a name attribute that throws off the parser. Maybe this is still a bug, or perhaps by design:

<visual name="visual">
  <origin rpy="0 0 0" xyz="0 0 0.0825"/>
  <geometry>
    <box size="1 1 1" />
  </geometry>
</visual>

Colors work by removing the attribute:

<visual>
  <origin rpy="0 0 0" xyz="0 0 0.0825"/>
  <geometry>
    <box size="1 1 1" />
  </geometry>
</visual>