[ODE] box stacking instability

Nate W coding at natew.com
Thu Oct 17 23:25:02 2002


On Fri, 18 Oct 2002, Peter Amstutz wrote:

> If one box comes to rest on another, while it doesn't pop up (as in
> this other demo) it does appear to vibrate and will move about -- I
> presume this is due to impulses correcting for penetration of the top
> box into the lower box.
> I'm talked to a professor who knows something about dynamics systems, and
> his understanding is that the impulse-based method in inherently
> unstable in this configuration [...]

As Russ said, the real problem is that the box-box collision detection
code is not yet finished.

If you search the mailing list archives, you'll find that this is a known
problem, it is a solvable problem, and it will be fixed.

> It seems that ODE handles the case of stability on a plane quite well,
> but that is rather limited use compared to the general case :-(

Yes, boxes can rest on planes in a perfectly stable manner.  When a box
lies flat on a plane, the box-plane collision code generates three contact
constraints, so the box is held in place.  

In my own application, I had the same problem with box-plane contact - not
because of a problem with ODE, but because of a mistake on my part.  My
code was only keeping the first of up to three contact constraints that
would be generated when a box contacted a plane.  The result was identical
to the behavior that you see now with box-box collision detection.  When I
fixed my code to use all three contacts, the 'boiling' effect went away
completely.

I have no doubt that boxes will rest on other boxes when the box-box
collision code returns three contact constraints when boxes are touching
in a face-to-face configuration.  It works for boxes on planes now, it
will work for boxes on boxes eventually.

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com