ODE sample integration

Post Reply
Den
Posts: 2
Joined: Tue Jul 26, 2005 7:47 am

ODE sample integration

Post by Den »

Hi,

First of all, thanks for the good work. Having arbitrary convex meshes will definitely improve the usefulness of ODE. :)
I've been compiled and playing around with the BulletBoxStack demo, and it's really promising. Two issues i've realized:

- it has problems with large geoms; i've created a larger ground box (1000*1000*1m in size), and the bullet objects started penetrating and jumping; they miss collisions until the moving geom penetrates deep enough (this can even be about 0.5), and then realizes the deep penetration correctly, but drops it again as soon as the penetration decreases a bit... As i've debugged the code, it seems the main problem is in MinkowskiPenetrationDepthSolver::CalcPenDepth. I guess using EPA instead could cure this. What do you think?

- rolling cylinders gain torque, just like they would have a 'negative rolling resistance', because the contact points go 'late'; they are generated a bit behind the correct position.

Thanks,
Denes
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post by Erwin Coumans »

Hi,

very well spotted :)

- regarding objects of large size differences, the penetration depth solver is indeed very experimental. However even commercial physics engines have difficulties with large scale ratios. It is recommended to add a PlaneShape to the primitives. This will then project the other primitive to the plane, and then perform collision detection. I will add this PlaneShape.

- the contact points are cached, and the PersistenceManifold updates them for a little while. This causes a torque indeed. There are a few solutions, one of them is to refresh all the contacts for a cylinder every frame. Another is to damp this cylinder a bit more (notice there is some damping added in the demo already).

Thanks for the feedback !
Erwin
Den
Posts: 2
Joined: Tue Jul 26, 2005 7:47 am

Thanks for the quick reply,

Post by Den »

Yes, meanwhile i've also realized the cached points. Fortunately ODE's solver applies much smaller reaction forces on those, but as the new (current) contact point with the large normal force is just at the 'neutral' point, it still can't prevent the old ones accelerating the cylinder with their small forces.

:idea: I've already been thinking about implementing some sort of rolling resistance into ODE, as many others have been asked about the infinitely rolling spherical bodies; what about 'extrapolating' the rotation matrix for the collision detection? That way the contact points would be generated a bit _ahead_, thus creating a realistic and even physically corrent rolling resistance. (Althought this idea can be applied to ODE's contact generation in general, not just for Bullet geoms)

Denes
Post Reply