[ODE] Box/Trimesh contact filtering and oblong geoms

John Miles jmiles at pop.net
Tue Apr 26 14:27:11 MST 2005


No one value of "epsilon" is suitable for all comparisons.  This is a pretty
bogus piece of code regardless of what value you use.

Christer Ericson has a good set of foils on the subject:
http://realtimecollisiondetection.net/pubs/GDC05_Ericson_Numerical_Robustnes
s_for_Geometric_Calculations.ppt

-- jm

> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
> Rodrigo Hernandez
> Sent: Tuesday, April 26, 2005 2:17 PM
> To: ode at q12.org
> Subject: Re: [ODE] Box/Trimesh contact filtering and oblong geoms
>
>
>
> That sounds like it should be changed to EPSILON, either FLT_EPSILON,
> DBL_EPISILON or an aproximation if float.h is not available.
> There is no check for EPSILON on the configure script, but I could
> easily add it to autotools, could you try changing your test 0 for an
> EPSILON and see what happens then?
>
> Thanks.
>
> Julien LOLLIVIER wrote:
>
> >Hi,
> >
> >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
> >http://raydium.cqfd-corp.org/
> >_______________________________________________
> >ODE mailing list
> >ODE at q12.org
> >http://q12.org/mailman/listinfo/ode
> >
> >
> >
> >
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list