Advertisement

What Brings About Linear Complementarity Problem In Rigid Body Dynamics?

Started by July 21, 2016 05:15 PM
11 comments, last by Ivan Reinaldo 8 years, 1 month ago

update.. I was reading issues in computing contact forces for non penetrating rigid bodies

I "think" I got what I was looking for.

[attachment=32698:this.PNG]

Author use relative acceleration and force instead of relative velocity and impulse. But I guess the form won't change even if we use relative velocity and impulse

I just can't seem to understand the underlying LCP problem, the math things I mentioned above.

Assume you have a 1d LCP of the form: w = a * z - b >= 0 and z >= 0 and w * z = 0

From the complimentary condition w * z = follows that either w or z must be zero (a product is zero if any of its factors is zero). Let' start with w = 0

w = a * z - b = 0 <=> z = b / a >= 0

We know that a (the effective mass) is larger zero so z is larger zero if b is larger zero. b = -J*v which is positive if the relative velocity is negative (which is the case if the two bodies are approaching each other). If we cannot find a w = 0 and z >= 0 we test the other complimentary condition z = 0:

w = a * 0 - b <=> w = -b >= 0

Again we know that b = -J*v . If the the relative velocity is larger zero than the impulse/force z must be zero. Otherwise we would create a sticky contact.

For the LCP it really doesn't matter whether you solve for impulses/velocities or forces/accelerations. What is important is how contacts work. You need to look at the problem momentarily. At some instance in time two objects are overlapping and creating a geometric contact (contact points and normals). If the objects are approaching each other the contact impulse/force kicks in and prevents this by removing all relative velocity towards each other. If the objects are overlapping but separating then no contact impulse/force is activated as the objects are already separating. This is the correct physical behavior obviously since there is no resistance if you pick some object up from the ground for example.

In order to understand these things you don't need to read more (this can be often more confusing than helpful), but you need to write down a simple 1d example and put in some feasible numbers and examine what the results mean. Best by hand, second best in the debugger.

Advertisement

Hi Dirk, sorry for late reply

I was just done doing what you suggested. I tried setting up a matrix for 1d case like Erin's stacking ball with 2 contacts (so I don't have to deal with rotation)

I think it works fine. At least in case of 1d, I know what to put at those matrix equation and tried checking if my J put into which contact works.

I guess I'm gonna go ahead to make sure I understand this in 2d

I'll edit this when I'm done

Thank you for helping me everyone, I really appreciate it ^_^

edit: allright, everything works, I'm so happy hahaha :D

This topic is closed to new replies.

Advertisement