gazebosim / gz-usd

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

usd2sdf: visual elements are not exported #42

Open scpeters opened 1 month ago

scpeters commented 1 month ago

Environment

Description

Steps to reproduce

  1. Build gz-usd
  2. Download the shapes.sdf test world into the gz-usd build folder as simple_shapes.sdf
  3. From the gz-usd build folder, convert to USD with the following command:
./bin/sdf2usd simple_shapes.sdf simple_shapes.usda
  1. Verify that the simple shapes have been converted to USD. Each pair corresponds to a collision and visual. Note that the last pair of def Sphere calls have a scaling parameter set and are for the ellipsoidal collision and visual.
$ grep geometry simple_shapes.usda
                def Cube "geometry"
                def Cube "geometry" (
                def Cylinder "geometry"
                def Cylinder "geometry" (
                def Sphere "geometry"
                def Sphere "geometry" (
                def Capsule "geometry"
                def Capsule "geometry" (
                def Sphere "geometry"
                def Sphere "geometry" (
  1. Convert simple_shapes.usda back to SDFormat
./bin/usd2sdf simple_shapes.usda simple_shapes_round_trip.sdf
  1. Check for <visual in the round-trip SDFormat file
$ grep '<visual' simple_shapes_round_trip.sdf

Output