i’m having an issue. I’m trying to simulate a stack of wood logs on a pallet but there constantly moving using ODE. What i’d like is when a log is placed then it won’t move but still interact with the rest of the logs that will be placed. Does any of you have an idea on how to do that ?
Hmm… I don’t know about ODE specifically, not having used myself (that I recall), but physics systems sometimes have a “sleep threshold” of some sort–a way of disabling an object when its movement goes below a certain magnitude. Perhaps search around to determine whether ODE has such a feature?
In other words, how can you create a body that doesn’t move, but that interacts with other bodies? The answer is to create a geom only, without the corresponding rigid body object. The geom is associated with a rigid body ID of zero. Then in the contact callback when you detect a collision between two geoms with a nonzero body ID and a zero body ID, you can simply pass those two IDs to the dJointAttach function as normal. This will create a contact between the rigid body and the static environment.
Don’t try to get the same effect by setting a very high mass/inertia on the “motionless” body and then resetting it’s position/orientation on each time step. This can cause unexpected simulation errors.
But i don’t know how to do that. Cause when i don’t set a body to the geom then it doesn’t interact with the environment (no collision)
For the record, you can do this in Panda by creating an OdeJoint and passing None as one of the parameters to the attach() call, attaching it to the environment.