gazebosim / gz-usd

Command line tools to convert SDFormat to USD and viceversa
Apache License 2.0
22 stars 5 forks source link

Error message in sdf2usd wile using .stl geometry together with <world> tag #15

Open robinvetsch opened 1 year ago

robinvetsch commented 1 year ago

I'm really new to the field of robotics....I would like to convert a .sdf file which contains out of several model tags (basically a simple simulation environment of a building and some other stuff which are available as .stl or .dae files) to an .usd file.

For test reason, I have reduced the file:

<?xml version="1.0" ?>
<sdf version="1.8">
    <world name="ConstructionSite">

  <!-- hallways -->
    <model name='hallway'>
    <static>1</static>
    <pose>-2 0 0 0 0 1.5707963267948966</pose>
    <link name='link'>
      <collision name='collision'>
        <geometry>
          <mesh>
            <scale>0.01 0.01 0.01</scale>
            <uri>model://hallway/meshes/Hallway.stl</uri>
          </mesh>
        </geometry>
      </collision>
      <visual name='visual'>
        <geometry>
          <mesh>
            <scale>0.01 0.01 0.01</scale>
            <uri>model://hallway/meshes/Hallway.stl</uri>
          </mesh>
        </geometry>
        <material>
          <ambient>0.7 0.7 0.7 1</ambient>
          <diffuse>0.8 0.8 0.8 1</diffuse>
          <specular>0.01 0.01 0.01 1</specular>
        </material>
      </visual>
      <self_collide>0</self_collide>
      <kinematic>0</kinematic>
      <gravity>1</gravity>
    </link>
  </model>

</world>
</sdf>

The .sdf file above return the following errors:

image

If I remove the tag at the beginning and the end, then it works, but then I can only apply one model. Do I something wrong?

I used the sdf12 branch for the installation of the tool.

Many thanks for your help....

ahcorde commented 1 year ago

Check this PR https://github.com/gazebosim/gz-usd/pull/10