[ODE] Collision Detection ... again

Jon Watte hplus-ode at mindcontrol.org
Mon Jun 21 12:57:09 MST 2004


> collision detection code in ODE (I could be wrong.) The reason I say this is
> that even with zero velocity, the contact constraints should move
> inter-penetrating objects (like the cylinder and plane) away from each
> other, even if they where stationary. Clearly this is not occurring here.

I've had a few problems similar to this.

- Very small penetrations or velocities can cause division by denormals, 
  which lead to NaN or Inf values, which means certain collisions don't happen 
  the way they should.

- Different colliders generate different contact strengths. With enough force 
  (such as gravity) you can sometimes push through certain colliders, while 
  other colliders seem solid.

- Contact filtering and merging is tricky. You don't want too many, because 
  they will cancel out. But you don't want too few, and you want them to be 
  spread out, because otherwise, a contact at the end of an object will 
  cause the object to rotate around its center of gravity, putting another 
  part of the object in contact next time; this causes swimming, and may even 
  cause spontaneous explosion (especially with non-fixed time steps) .

It's not clear to me that the objects swim along the axes where the contacts 
cancel out -- contacts basically end up generating forces, right? Thus, 
wouldn't the case be that the contacts DON'T cancel out, and thus net motion 
is induced?


Anyway, the example movie that you posted has nothing to do with this. The 
example movie you posted shows that you don't render the cylinder in the 
same orientation that the collision geometry is oriented. This could be that 
you use a broken conversion routine (the one that's supposedly "left handed" 
is especially broken; the routines are the same for left- vs right-handed), 
or you're applying the inverse of the geometry transform wrong, or you're 
forgetting that an ODE quaternion STARTS with the "w" element, or you just 
have a differing order of operations in your math than you should have. 
All of these are easy mistakes to make (in fact, I made 'em all, which is 
how I can list them :-)

Your movie example doesn't run long enough at all to come to quiescence or 
settling, where the issues we've discussed would start mattering.


Cheers,

			/ h+




More information about the ODE mailing list