Turning Ode body to static object

Hi there,

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 ?

Thank you

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?

Thanks for the help.

I found that on the wiki :

How can an immovable body be created?

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)

I find the solution. I stop updating the wood logs that are already placed.

1 Like