[ODE] cyl plane bug fixed

Bram Stolk bram at sara.nl
Wed Sep 20 04:14:34 MST 2006


Thanks for test case.

I've finally found the culprits:

bug 1 (from your test_cyl case):
For the 'top' disc of the cylinder, the contacts were
invalid, because contact normal did not point into g1,
but away from it.

bug 2 (from the test_boxstack case):
If the cyl falls nearly 'face down', the center
of the disc can penetrate the plane, which means
that most of the disc is inside the plane.
In this case, the generated contact pos was above
the plane.

Before I found the bugs, I rewrote the contact generation,
and added many assert. I'll keep the new version, because
it is cleaner, and should be more robust.

I've committed to SVN, and tested it with double precision.

  Bram



LR wrote:
>  Hy,
> 
> This is the latest version of test cyl. Witch shows cylinder bug
> 
> I added a plane and moved cylinder and box to down on the plane instead of
> mesh. 
> Without the rotation ->cylinder stay on floor, with rotation the cylinder
> falls
> 
> LR
> 
> -----Message d'origine-----
> De : Bram Stolk [mailto:bram at sara.nl] 
> Envoyé : mercredi 20 septembre 2006 10:22
> À : Geoff Carlton
> Cc : LR; ode at q12.org
> Objet : Re: [ODE] cylinder plane bug
> 
> Geoff Carlton wrote:
>> LR wrote:
>>>  I don't know if it can help but :
>>>
>>> - cylinder/plane is ok when encapsulated in a transform geom ...
>>>
>>>   
>> I don't think geom offsets are the culprit here.  In your last 
>> example, you can get the same "drop through floor" failure if you just 
>> set the rotation of the cyl upside down in reset_state:
>>   dMatrix3 mat;
>>   dRFromAxisAndAngle(mat,1.0f,0.0f,0.0f,M_PI);
>>   dGeomSetRotation(cylgeom,mat);
> 
> Your talking about test_cyl, right?
> 
> If I add these 3 lines to reset_state() in test_cyl, test_cyl works just
> fine for me.
> (both single and double precision on linux, svn trunk)
> 
> Note that test_cyl does no cyl/plane isects, only cyl and box vs trimesh.
> 
> About cyl/plane isects: I think I'll redo the depth calculation, which may
> fix the test_boxstack problem.
> 
>   Bram
> 


-- 
Bram Stolk, VR Engineer SARA, Amsterdam.   tel +31 20 592 3000

"Windows is a 32-bit extension to a 16-bit graphical shell for an 8-bit 
 operating system originally coded for a 4-bit microprocessor by a 2-bit 
 company that can't stand 1 bit of competition."


More information about the ODE mailing list