Hello all,
I am working on a rigid body simulator based on Guendelman (2003) paper. I am basically following all his steps except the rolling and spinning friction. But it is not working correctly under some scenarios.
Here I will describe what happens in my simulation. All scenes below contain one stack which has one or more boxes and a ground plane. The plane is modelled as immovable. The restituation coefficient is 0 for all bodies. There is friction between boxes, and box and plane. All simulations use 5 collision and 10 contact iterations. If one sweep of shock propagation is used,
contact resolution is reduced to 9 iters.
Here is what is happening.
S1. one box resting on the plane. The box appears stationary, i.e., "resting" on the plane. But if you monitor its velocity, it is not zero up to the round-off error. Both linear and angular velocity have some small magnitudes which certainly exceed the round-off.
My question is ,for a sequential impulse solver, can the box be absolutely static (resting)? Or it just appears so?
S2. drop one box onto the plane from some height. The box will touch the ground with its four vertices of the bottom face. The box hits the plane and wiggles a little bit and then rests. The extent of wiggling depends on how high the box is at the start. Actually if it was high enough, the box will flip over after hitting tthe ground.
My question is if this is a physically correct behavior. Since the restituation coefficient is 0, I'd expect the box will lose momentum immediately and no flip over or wiggling should occur. I am modeling friction with static and kinematic collision impulse laws as in the paper. If I switch to frictionless impulse, the box hits the ground and then stops suddenly. No wiggling or flip-over occurs no matter how high it was at the beginning.
S3. a stack of 2 boxes resting on the plane. The result is almost the same as S1. No moving of boxes, at least not noticeable.
S4. a stack of 5 boxes resting on the plane. The boxes higher in the stack wiggle a lot, such that the whole stack appears "dancing". If the stack gets higher (more boxes, e.g. 10), the one at the very top will fall due to strong wiggling. I should mention this happened when I use shock propagation. If I switch shock off, after a while, a few boxes at the bottom will sink into each other and the ground, and the stack will fall to one side.
S5. drop 5 boxes from some height., and there is gap among all boxes. The boxes hit the ground and stop individually. However, their sides are not aligning to each other, as in the beginning. After all boxes stop and form the stack, the top ones start wiggling as in S4.
Thanks in adance for your comments.
Bin