[ODE] Negative penetration depths
Russ Smith
russ at q12.org
Wed Sep 4 14:07:01 2002
> Russ, can you chime in on this, if you haven't fallen into a volcano?
fortunately i was faster that the lava.
> My understanding doesn't involve a differential equation. Basically,
> there are two parts to a constraint. One says "the velocity of this point
> on the object needs to be at least this much in this direction." The
> other is a direction that the joint/contact can apply force to make this
> happen. The two directions are often (always?) the same. These are then
> translated into equivalent statements about the center of mass. In other
> words:
in ODE the two directions are the same. the precise statement of the joint
constraints is:
J*v = c
force = J' * lambda
v is a vector of body velocities, J is a matrix that describes the joints,
force is a vector of forces applied to the bodies, and lambda is the
vector that the ODE solver figures out. the J's in the two equations are
the same, which i think is what you meant by the two directions being the
same. note that they don't *have* to be the same - but allowing them to be
different results in a potentially non-positive-definite system matrix
which makes the factorizer slower and the LCP solver way more complex.
just to be clear (as mud): the differential equation describes how the
bodies move in response to forces. the constraint equations (which are
formulated as a linear complementarity problem (LCP)) describe
how the joint forces will be produced to satisfy the constraints.
> > It is further my understanding that in the case of ODE, adding a
> > contact constraint adds both a hard constraints - preventing
> > interpenetration becoming any worse, and a penalty method - pushing
> > the objects apart and hence making the penetration better.
contact constraints will add a force to try and reduce the penetration
depth. this is not really a 'penalty force' however. this is a terminology
thing - penatly forces are usually produced by some kind of spring and
damper equation, and can result in hard-to-tune semi-stable systems. the
ODE forces are exactly calculated to reduce the penetration depth along
an exponential profile. this force can only be positive, not negative,
which means that a contact will push bodies apart but never suck them
together. hope that helps.
russ.
--
Russ Smith
http://www.q12.org