RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.16k stars 1.24k forks source link

Implement USD Rigidbody Parser #21616

Open hong-nvidia opened 5 days ago

hong-nvidia commented 5 days ago

This PR implements a basic USD parser that is able to parse elementary geometries and rigidbodies from USD. It is the first step of the bigger effort to bring USD support to Drake, which will be used by groups such as Amazon Robotics. Since the changes made in #21405 are more than 1500 lines, this PR includes a subset of those changes (~1200 loc excluding the USD files). Please let me know if there's anything in the codebase that I can improve on.


This change is Reviewable

rpoyner-tri commented 5 days ago

tools/workspace/openusd_internal/patches/pegtl_namespace.patch line 4 at r1 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Got it, thanks. (I also just repro'd locally.) I would say here in that case the patch *should* be upstreamed (not "could"), and the missing piece of docs I was missing is that this was a bug fix -- upstream's token pasting is not just wrong when taken against Drake's settings, it's wrong for every single user of OpenUSD. Somehow I had in my mind that this wasn't broken in the default case, though in retrospect clearly it is.

In their defense, this stuff is a nest of vipers: https://gcc.gnu.org/onlinedocs/cppinternals/Macro-Expansion.html

"If you don’t have a clear mental picture of how things like nested macro expansion, stringizing and token pasting are supposed to work, damage to your sanity can quickly result."

jwnimmer-tri commented 4 days ago

+(release notes: none) since OpenUSD support is not enabled in stable releases yet.