gz-usd icon indicating copy to clipboard operation
gz-usd copied to clipboard

usd2sdf: visual elements are not exported

Open scpeters opened this issue 5 months ago • 0 comments

Environment

  • OS Version: macOS 14.7 (Sonoma)
  • Source or binary build? source build of main branch (178e136c388187aa2f7b24e72858a96d42366bfb) with Gazebo Ionic

Description

  • Expected behavior: if an input file contains link visuals, the converted output should as well
  • Actual behavior: link visuals are not converted

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

scpeters avatar Oct 03 '24 19:10 scpeters