[ODE] dSpaceCollide error, very clean example for study

Keith Wiley kwiley at cs.unm.edu
Sat Nov 12 13:09:56 MST 2005


I have put a file in my web account space where you can clearly see  
the collision detection error I am referring to:

http://www.cs.unm.edu/~kwiley/test_crash_with_trebuchet.cpp

Even though it's the same filename I referred to last night, I have  
updated the file to more clearly illustrate the error.  When you run  
the simulation, you will see a closeup view of the trebuchet cup  
being pushed to and resting on the ground (give it a moment to come  
to rest).  Then, hit the '7' key to release a canonball right above  
the cup and observe the simulation carefully.  To reset and watch it  
again hit 'r'.  Sometimes the canonball gets kicked out of the cup  
and sometimes it falls through the pendulum arm (depending on whether  
the impending collision is finally detected above or below the  
pendulum arm.

The canonball is green it is not involved in a collision and red when  
it is involved in a collision.  Contact points for the canonball are  
also illustrated.  Notice that the simulation fails to find the  
contact point on the pendulum arm when there is a contact point on  
the cup at the same time.  I have established the the nearCallback  
given to dSpaceCollide is not called for the pendulum arm if a cup  
contact is detected.  I have also noticed that the nearCallback is  
called for the cup prior to the arm.  So dSpaceCollide triggers  
nearCallback for the cup first.  If a contact is found using  
dCollide, then later in dSpaceCollide's processing, it fails to call  
nearCallback for the arm.  That's the error.

I believe the error is most likely in dxHashSpace::collide, but I  
can't figure out how it works because I'm not intimately involved in  
ODE...yet.  Alternatively, it is posisble dxHashSpace::collide works  
properly, but the dxHashSpace is not properly handing bodies that  
consist of multiple geoms, in some way that later down the pipe  
breaks dxHashSpace::collide's process.

I would appreciate any help available in finding this bug.  You can  
clearly see it occurring in the example I have provided.

Likewise, I am open to the possibility that I am so new to ODE that I  
am using it incorrectly somehow.  The example provided has a function  
called makeTrebuchet, which constructs the trebuchet as two bodies  
consisting of grouped geoms (look for method 2, not method 1, which  
keeps the various geoms in separate bodies and joins them with fixed  
joints).  Method 2 is the one I'm interested in.  If I am clearly  
constructing my grouped geom bodies incorrectly, I would appreciate  
having it pointed out to me, but I doubt this is the case.  I think  
there is a bug in ODE.  No offense.

Thanks for your time.

Cheers!

________________________________________________________________________
Keith Wiley         kwiley at cs.unm.edu         http://www.unm.edu/~keithw

"I do not feel obliged to believe that the same God who has endowed us
with sense, reason, and intellect has intended us to forgo their use."
                                            --  Galileo Galilei
________________________________________________________________________




More information about the ODE mailing list