Understanding add_body, and add_shape_mesh #840
-
When adding a mesh through the builder to a scene, the typical way to do this seems to be that you first add a body to the builder and then add a shape to that. What exactly is a body in this sense? How should I think about it? (My own guess is that a body can have several shapes attached to it, though I don't quite understand what that actually means during the simulation. More concrete, This is exactly the same as pos and rot takes in add_shape_mesh. (pos takes a vec3, and rot takes a quat) So when adding a mesh to a scene should I use the origin, or the pos,rot to specify where my mesh actually is? (I guess they are the same when you only add one shape?) Finally, Is there any good reason why in add_body pos,rot are grouped together in origin while they are kept separate in the add_shape? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @tueboesen, A (rigid) body is a dynamical object that holds inertia information in order to be simulated by the different integrators (we call them solvers now in Newton). Each body can have multiple shapes attached which are used to visualize the body and for collision handling. We have cleaned up the API in Newton (the spiritual successor to warp.sim) so |
Beta Was this translation helpful? Give feedback.
Hi @tueboesen,
A (rigid) body is a dynamical object that holds inertia information in order to be simulated by the different integrators (we call them solvers now in Newton). Each body can have multiple shapes attached which are used to visualize the body and for collision handling.
Bodies are also used as links in articulations where joints are defined between a parent body (which may be -1 to indicate the static world frame) and a child body. Each shape has a shape transform which is relative to the frame of the body to which this shape is attached to.
We have cleaned up the API in Newton (the spiritual successor to warp.sim) so
ModelBuilder.add_body()
andModelBuilder.add_shape_...()
b…