Closed joshuacv closed 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.
USD: Note: USD support is only available when building sdformat from source. USD requires CMAKE 3.12 this package is available from Ubuntu 20.0.
Clone the USD repository
git clone --depth 1 -b v21.11 https://github.com/PixarAnimationStudios/USD.git
Note: Only v21.11 is supported currently
Install dependencies not managed by the build script
sudo apt install libpyside2-dev python3-opengl cmake libglu1-mesa-dev freeglut3-dev mesa-common-dev
Use the build script to compile USD. In order to speed up compilation, it is recommended to disable unneeded components.
cd USD
python3 build_scripts/build_usd.py --build-variant release --no-tests --no-examples --no-tutorials --no-docs --no-python <install_dir>
For more information regarding the build options, see the USD docs at https://github.com/PixarAnimationStudios/USD/tree/v21.11#getting-and-building-the-code.
Add USD to system paths (replace
export PATH=<install_dir>/bin:$PATH
export LD_LIBRARY_PATH=<install_dir>/lib:$LD_LIBRARY_PATH
export CMAKE_PREFIX_PATH=<install_dir>:$CMAKE_PREFIX_PATH
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
. The steps below follow a traditional cmake build, butgz-usd
git clone https://github.com/gazebosim/gz-usdOutput
/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 2Other details