[ODE] solving penetrations "statically"

Geoff Carlton gcarlton at iinet.net.au
Thu Jun 8 18:46:20 MST 2006

Erin Catto wrote:
> Right, ODE uses a Baumgarte style position correction by feeding back the
> position error into the velocity constraint. This works well for getting
> closer to the right position by the end of the step. However, the Baumgarte
> term affects the momentum and that can be undesirable. The propagated
> velocity should not involve position feedback. Rather than solve two LCPs
> (one in velocity and one in position), one can cheat and solve the two LCPs
> simultaneously using the PGS algorithm. The first LCP is the one already
> used by ODE (with position correction). The second LCP is the pure velocity
> problem.

The main problem I find with the ODE solver is, as you have stated, the 
correction velocity adds momentum.  The most obvious example is this:  
Drop a sphere with bounce 0 from a large height.  It will still bounce.  
Worse, the bounce varies depending on how much interpentration occurs at 
the end of the time-step.  The joint code shows this very clearly: 
target_vel = max(bounce, correcting_vel).  It can be minimised, but only 
by slowing down how much objects are pushed apart, so its a trade-off.

I'll have a look through the thesis link you posted.  I don't know if 
you are familiar with ODE's solver code, but if you are, would you like 
to comment on how difficult you would see it for somebody to retrofit 
PGS into the solver?  Would it be on par with rewriting a new one, or is 
it really only a few small additions somewhere?

The last time this issue came up, Adam Moss posted a patch with a 
different approach.  The solver still uses velocities, but then it tries 
to cancel most of it out at the end of each step.  Can anybody comment 
on whether this idea is good in principle or in practice?



More information about the ODE mailing list