Archive for April, 2006

Contact Joint Summary

April 11, 2006

There are three DOF in the contact joint. A generic constraint equation is written as

J v = c (1)

The first DOF is in the normal direction. The LHS of Eq. (1) is

where r1 = cp – p1 and r2 = cp – p2. The RHS of Eq. (1) is

c = erp/hâ‹…depth

But c is limited by maxvel, so

if (c > maxvel) c = maxvel

Since cfm is associated with the constraint DOF, a specific cfm can be entered here. There are 3 possible cfm, which are set up by soft_cfm, slip1, and slip2, respectively.

cfm(1) = soft_cfm

The impact has a direct effect on c

pick the larger value between contact and impact

if(c_i > c) c = c_i

The lower and upper bounds are

lo(1) = 0
hi(1) = infinity

The second DOF is the first tangent direction. Let t1 and t2 be the tangent directions to normal n

c = motion1 (so motion1 and motion2 are velocities)
lo(2) = -mu (if mu=0, the friction force is practically set to zero)
hi(2) = mu
cfm(2) = slip1

The LHS of the constraint equation in the second tangent direction is

The RHS of the constraint equation is

c = motion2
lo(3) = -mu2
hi(3) = mu2
cfm(3) = slip2


Dual-space Expansion for Estimating Penetration depth

April 10, 2006

So I have been implementing Dual-space Expansion for Estimating Penetration depth (DEEP) for a while now. In the past few days I put it to work and it sucked. The amount of frustration from doing Contact Manifold & Signed Distance Map and getting Trouble With The Projection kept piling up to this point, and this DEEP blow just pushed the frustration to an astronomical level. This morning I finally had a revelation that I might just need to go back to make box-box collision work instead of finding new algorithms that add more unmanageable complexity without any realistic benefit.

But here is the twist of the story. After all, the time I have invested in this effort will not be wasted. An innocent bug was accidentally found and DEEP w/ contact manifold code finally works!! It turns out the problem is when only four Contact are used for every contact that is happenning. Somehow I still cannot duplicate the performance of test_crash, but with careful tunning of the contact parameters, the collision of the boxes will show some physically believable behaviors. To me it has been a major progress considering how many frustrating hours I have spent on coding this. For example, erp=0.8 never works and neither without using maxvel to restraint the correcting contact velocity.

Now a new problem emerges: DEEPGeom will break HashSpace …