Passing small epsilon values to the LCP?

Please don't post Bullet support questions here, use the above forums instead.
steveh
Posts: 22
Joined: Mon Dec 19, 2005 3:15 pm

Passing small epsilon values to the LCP?

Post by steveh »

Hi,
I've implemented a physics engine that uses the ODE LCP solver (the optimised Dantzig one). I'm using this to restrain the acceleration of a ball on a flat plane (for example). The LCP seems to restrain the acceleration of my ball perfectly, the resulting force is equal and opposite to the acceleration of the ball.
Unfortunately the ball still sinks slowly into the plane due to the fact that I'm using a small tollerance value to indicate if the ball was resting or not (relative normal velocity < EPS). This small value is not being considered by the LCP solver, so the ball slowly sinks. The question is, should this value be somehow added to the list of scalars (B) or the Matrix (M) used by the solver? Or should I simply add this on after the acceleration has been constrained? I'm using the method outlined in Physically Based Modeling by Baraff to compute B and M.
The paper does seem to consider relative normal velocity, but this is multiplied by nDot, which is zero if the ball has omega of 0.

Any help would be appretiated!

Thanks,

Steve.
ngbinh
Posts: 117
Joined: Fri Aug 12, 2005 3:47 pm
Location: Newyork, USA

Post by ngbinh »

What do your non-penetration constraint and LCP look like?
ngbinh
Posts: 117
Joined: Fri Aug 12, 2005 3:47 pm
Location: Newyork, USA

Post by ngbinh »

Oh, I see.
The problem is you're using constraint in acceleration level. Thus, you'll see drift (numerical + integration) in velocity and position.
Those paper by Baraff are now obsolete. I'd suggest you using position constraint or at least velocity constraint like the majority number of physics engine out there.

If you want to know more, search for time stepping papers by David Stewart, Jeff Trinkle (with postition constraint stabilaztion) or Mihai Anitescu, Potra (velocity level, no built-in stabilazation).