Page 1 of 1

ODE's LCP Solver, need a little help

Posted: Thu Jul 13, 2006 12:55 pm
by thomas-jung
Hi guys!

Want to use the dSolveLCP routine from ODE to solve my own lcp system. Until now i implemented just equality constraints, which work fine - not surprisingly, so far there isn't an lcp at all..

Now i implemented a first inequality constraint for a contact - no friction, no error correction so far. I just insert the contact normal into the Jacobean. The model is just two balls colliding in one contact.

As long as i leave it as an equality constraint, the result looks nice - except the contact pushes _AND_ pulls the bodies, as it is expected to be. Now please correct me, if i am wrong. To get an inequality constraint, i set the number of unbounded variables in this special model to (n-1) and the corresponding entry in the lo-vector to zero.

But now the system doesn't solve correctly, the routine runs into the "step size < 0" error.

What mistake do i make?

Thanks for any suggestions,
best regards
- Thomas

Solved...

Posted: Fri Jul 14, 2006 7:21 am
by thomas-jung
Okay, i got that. The mistake was: Wrong signs.

dSolveLCP expects an LCP of the form: Ax = b+w. Mine was of the form:
w - Ax = b --> Ax = b-w

so the line:
A *= -1.0;

saved my weekend ;)

Thanks anyway!