Mapping body IDs after using multiple newton model builders compositionally #3108
Unanswered
StoneT2000
asked this question in
Q&A
Replies: 1 comment
-
|
My own workaround at the moment is to use this value as the body ID immediately after adding a builder to my root scene model builder self.body = len(self.scene.body_q) - 1not sure if this is how newton is intended to be used, but going off of the newton tutorials/examples alone I didn't figure this out until some trial and error later. Definitely like the compositional aspect of the model builders though! I imagine if I am adding a complex articulation I would need to count the DOFs to get the correct body ids and map them accordingly, which might get more untuitive. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use newton model builders in a compositional manner by having a scene level model builder followed by model builders for each robot, individual asset etc.
However when I make free floating objects like a floating box in the code below, after creating a robot arm builder, the body ID returned to me is
0which is incorrect, since the body ID should already be incrementing due to creating the robot arm already.is there a easy way to map the builders/bodies we make to the actual body ids we need once we run the simulation and want to fetch data from
state0.body_q[body_id]?Beta Was this translation helpful? Give feedback.
All reactions