[ODE] Cylinder-cylinder collison bug?

John Miles jmiles at pop.net
Sat Jan 17 14:00:09 MST 2004


Thanks, Adam.  Unfortunately, I just spotted another equally-glaring bug
right above this one, at line 1105:

dGeomCylinderGetParams(o1,&cylRadius1,&cylLength1);
dGeomCylinderGetParams(o1 /* should be o2 */,&cylRadius2,&cylLength2);

I re-ran the test_boxstack demo with this bug and the previous bug I
mentioned fixed.  It eliminated the symptom I mentioned earlier
(http://www.speakeasy.org/~jmiles1/cyl.jpg).  However, in the "fixed"
version, not only are the cylinders still unstable at rest, but they often
land in a penetrating state (http://www.speakeasy.org/~jmiles1/cyl2.jpg).

It is really hard to have any confidence in the dCylinder module with this
kind of bug in it.  These lines are in the preamble that calls the main
collision routine (dCylCyl) for cylinder intersections, and from looking at
the comments in dCylCyl(), it seems that the author hacked the math in an
attempt to work around problems that were undoubtedly caused by calling the
routine incorrectly.

I will look into writing a new dCylCyl() routine for dcylinder.cpp, or at
least fixing the old one.  No promises, though, since I'm not a math guy. :)
IMHO, until I, or somebody else, submits a patch for this code, it should be
considered horribly-broken and either removed from the distribution or
shipped with a warning note in the readme file to avoid wasting users' time.

-- jm


> Hi there, it looks to me like you're right.  I've made this
> change in CVS.
>
> Thanks,
> --Adam



More information about the ODE mailing list