drake
drake copied to clipboard
Parse Universal Scene Description (USD) format
There is considerable momentum behind Pixar's USD format: it's used it omniverse, and you can even view in Preview on mac. It should be sufficient for parsing into multibodyplant / scenegraph, and even for rendering.
Let's use this issue so that we can track progress / intentions towards properly supporting it.
Sub-issues:
- [ ] #20898
- [ ] Parsing for primitive shapes
- [ ] Parsing for meshes
- [ ] Disable TBB threading unless and until
Parallelismis being passed to the parser - [ ] Docs / tutorials
- [ ] Enable by default in binary releases
FYI https://github.com/gazebosim/gz-usd might be interesting here as a stop-gap. It offers a usd2sdf command-line tool. (I haven't tried out how well it works.)
For adding Drake support for USD directly, my guess it that long-term we'd want use a native parser instead of a conversion tool, but in case users have usd files already that tool might help bridge the gap.
Presuming that Drake would use https://github.com/PixarAnimationStudios/OpenUSD to parse *.usd files, one question will be the build system side of that library and its dependencies. I've filed #20898 to help collate information on that front. We can keep this issue focused on the big-picture feature.
In the meantime, hermetic build system integration is not necessarily a blocker for exploring parsing integration. As a temporary measure, prototype code can just set e.g. linkopts = [...] manually to link against a hand-built version of OpenUSD.
In terms of the USD parser itself, a good starting point would be to look at the existing parsers. The TLDR is that they all implement class ParserInterface, with ParserInterface::AddAllModels being the primary entry point. When given a filename to parse, it's the job of that function to make API calls on class MultibodyPlant and class SceneGraph to populate the scene.