tall cylinders in ccdphysics demo

Post Reply
Proctoid
Posts: 18
Joined: Fri Apr 21, 2006 3:04 pm
Location: uk

tall cylinders in ccdphysics demo

Post by Proctoid »

Hi,
i have added a 5th shape to the array of shapes in the appccdphysicsdemo which is a cylinder 1x7x1 in size and replaced the brick wall with an x row of this new shape. when they fall over they do not seem to be correct... whatever 'topple over' angle they are at if they are spinning on their base they do not fall for ages they simply roam around the world. i have been told this is not happening but i swear it is. i have wasted ages on this problem and it is driving me mad - could someone please make the simple change and test on their system and see if it looks correct to them.
Regards
PP
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Post by Dirk Gregorius »

This is because Bullet ignores the gyroscopic (like most engines) term for the update of the velocity. Simply add this to your external force and you will be fine. Note that this term on the other hand can lead to instabilities and make the system explode...
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post by Erwin Coumans »

I just checked this long-cylinder case, and the effect is easy to replicate. I compared it by running the ODE quickstep solver, and it behaves the same, if you disable the 'rotational force'. But as Dirk mentioned, adding the velocity-dependent/gyroscopic/rotational force helps a bit, but adds instability.

Increasing the friction seems to be one workaround to reduce the effect, because it reduces the angular velocity naturally. Perhaps some damping on the angular velocity might help too.

Thanks for pointing this out,
Erwin

PS: In the next Bullet release you can toggle the Bullet SequentialImpulse constraint solver with ODE quickstep solver to compare results. During the recent refactoring this comparison functionality got lost.

Hi,
i have added a 5th shape to the array of shapes in the appccdphysicsdemo which is a cylinder 1x7x1 in size and replaced the brick wall with an x row of this new shape. when they fall over they do not seem to be correct... whatever 'topple over' angle they are at if they are spinning on their base they do not fall for ages they simply roam around the world. i have been told this is not happening but i swear it is. i have wasted ages on this problem and it is driving me mad - could someone please make the simple change and test on their system and see if it looks correct to them.
Post Reply