gazebosim / gz-usd

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

Error while building 'UsdGeomMesh’ has no member named ‘CreatePrimvar’ #6

Closed joshuacv closed 2 years ago

joshuacv commented 2 years ago

Following the sdf instructions here (http://sdformat.org/tutorials?tut=install), I tried to build the sdf2usd convertor and failed and then found the readme in the sdformat github and through that found this github page.

Environment

Description

Steps to reproduce

/gz-usd/src/sdf_parser/Geometry.cc:376:34: error: ‘class pxrInternal_v0_22pxrReserved::UsdGeomMesh’ has no member named ‘CreatePrimvar’ 376 | auto coordinates = usdMesh.CreatePrimvar( | ^~~~~ make[2]: [src/CMakeFiles/ignition-usd0.dir/build.make:102: src/CMakeFiles/ignition-usd0.dir/sdf_parser/Geometry.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:1456: src/CMakeFiles/ignition-usd0.dir/all] Error 2 make: *** [Makefile:163: all] Error 2

Other details

joshuacv commented 2 years ago

Found out that this is because USD support is only for a particular branch. You have to clone the correct branch and build it otherwise gz-usd wont build. This is NOT documented. I will make a pull request in gz-usd.