gazebosim / gz-tools

Command line tools for the Gazebo libraries.
https://gazebosim.org
Apache License 2.0
15 stars 18 forks source link

gz sdf always print "Error: SDF parsing the xml failed" #105

Closed huweiATgithub closed 2 years ago

huweiATgithub commented 2 years ago

Environment

Description

Steps to reproduce

  1. Prepare an SDF file, model.sdf,
    <?xml version="1.0"?>
    <sdf version="1.5">
    <model name="a_simple_box">
    <static>false</static>
    <link name="link">
      <pose>0 0 1 0 0 0</pose>
      <collision name="collision">
        <geometry>
          <box>
            <size>.3 .2 .5</size>
          </box>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <box>
            <size>.3 .2 .5</size>
          </box>
        </geometry>
      </visual>
    </link>
    </model>
    </sdf>

    to get mentioned error message.

  2. Run gz sdf --verbose -k model.sdf
  3. Run cp model.sdf modelv.sdf &&gz sdf --verbose -k modelv.sdf` to get "Check complete".
azeey commented 2 years ago

Thanks for the issue @huweiATgithub. Since this is an SDFormat issue, would you mind creating the same issue at https://github.com/gazebosim/sdformat?

azeey commented 2 years ago

Duplicate of https://github.com/gazebosim/sdformat/issues/1172