[ODE] Box/Trimesh contact filtering and oblong geoms

Julien LOLLIVIER julien.lollivier at quiris.com
Tue Apr 26 22:43:10 MST 2005


I've noticed something strange between vanilla ODE 0.5 and "recent" CVS snapshots : small oblong geoms (my rockets, for example) are totally unstable, and tends to explode with CVS version, but are very stable with ODE 0.5.

After a long digging, i think the problem comes from GenerateContact (ode/src/collision_trimesh_box.cpp). This function tries to detect duplicate contacts, searching for unique position and normal, doing this:

// same position?
for (int j=0; j<3; j++)
   diff[j] = in_ContactPos[j] - Contact->pos[j];
if (dDOT(diff, diff) < 0.01) 
   { ... }

Is this 0.01 empirical ? With this value, 75% of my contacts were deleted.

A good value for my applications is ... 0 :
if (dDOT(diff, diff) == 0)
   { ... }
... removing only few contacts, and allowing stable rockets and boxes.

What about changing this value (or providing a way to change it at configure time) ?

Additional infos:
today (2005-04-26) CVS version,
single precision, release mode, under Linux,
rocket sizes : (0.279062,0.058227,0.053364)

Julien 'Xfennec' Lollivier,
CQFD Corp. - Quiris

More information about the ODE mailing list