# [ODE] dSolveLCP question.

Nguyen Binh ngbinh at gmail.com
Thu May 4 10:13:06 MST 2006

```As I had answered in Bullet forum, I've mixed instaneous acceleration-based
constraint approach with velocity time stepping method.
Forget what you've seen in those papers. Search for Kenny Erlerben PhD
thesis. That's the most rigorous and "easy" to follow literature
that describe methods currently being used in most physics engines.

On 5/4/06, Steven Haggerty <steve at rubiconmobile.com> wrote:
>
>  Hi all,
>
>                 This is my first post to the ODE mailing list.
>
>
>
> You may have seen this message in a slightly different form on the Bullet
> Physics forum. I've since realized my problems are more with my
> understanding than ODE specifics, but please bare with me.
>
>
>
> I'm using the ODE LCP solver (dSolveLCP) as part of my own physics engine,
> which is a learning exersize I'm enjoying, greatly but finding very
> challenging. The maths involved is right on my limit.
>
>
>
> I'm getting some unexpected results coming back from the dSolveLCP
> routine.
>
>
>
> I'm using the solver to compute the constraints on an object's
> acceleration and I'm not convinced (but I'm fairly sure!) I'm passing the
> solver correct values. The values I pass to dSolveLCP are the Matrix M and
> the scalar array B. I set the high array to dInfinity and the low array to
> 0, the nub = 0 and findex = NULL.
>
>
>
> (I'm basing the M and B values on the Baraff code in the Physically Based
> Modelling paper (http://www.pixar.com/companyinfo/research/pbm2001/).
>
> I'm resting a ball of mass 10, on a plane of infinite mass. This means
> just 1 contact point. This should be easy to debug. The A matrix boils down
> to invmass (0.1) and the B vector = force (10 * -9.8) / mass = -9.8.
>
> Plugging the 2 values (Matrix A = 0.1, B = -9.8) into the solver gives me
> an X value of 0 and a W of 9.8. This is not what I expected. As this
> signifies the objects are accelerating away from each other which is not the
> case with the negative value in B. I'm after a force (x) to counteract the
> downwards acceleration. I then multiply this force by the contact normal to
> get the force direction and simply add this to the external force and torque
> (which should then be cancelled out).
>
> I've even tried using David Eberly's code in the Game Physics book for
> compute the M and B values, this yields the same results, an acceleration,
> not a force. I was expecting an X of 98 and W of 0.
>
>
>
> Can anyone shed any light on this? I'm really stuck. Have I over
> simplified / misunderstood  things?
>
> Thanks,
>
> Steve.
>
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
>

--
--------------------------------------------------
Binh Nguyen
Computer Science Department
Rensselaer Polytechnic Institute
Troy, NY, 12180
--------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060504/5a2a7dd5/attachment.htm
```