Bullet simulation's erratic behavior... Help Please!

Post Reply
jcrada
Posts: 11
Joined: Thu Oct 09, 2008 10:59 pm

Bullet simulation's erratic behavior... Help Please!

Post by jcrada »

Hi, I am having problems with bullet's simulation of rigid bodies. An example of this behavior may be found at http://www.youtube.com/watch?v=fREpAAth-wc. I have created a creature of three rigid bodies and two btGeneric6DOFConstraint's. The constraint limits are:
lower=[0.75 * -M_PI ; 0.75 * -M_PI_2; 0.75 * -M_PI_2]
upper=[0.75 * M_PI; 0.75 * M_PI_2 ; 0.75 * M_PI_2 ]

In the video, the creature is not exerting forces nor torques at any time. It was created and then put into the environment.

What can I do to avoid such behavior? I have tried setting the constraints' points farther away but that did not help. If that behavior is related to interpenetration between rigid bodies, is there a way to avoid or to minimize such reactions?

I would really appreciate any help. I need to finish my thesis no later than next monday :(.

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

Re: Bullet simulation's erratic behavior... Help Please!

Post by Erwin Coumans »

There are many ways to mess up constraint setup.

Can you share your setup in a Bullet demo, for example modify the Bullet/Demos/GenericJointDemo using your setup.

Also, to prevent collision detection between attached bodies, simply pass 'true' as second argument to addConstraint:

Code: Select all

virtual void	addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false);
Hope this helps,
Erwin
jcrada
Posts: 11
Joined: Thu Oct 09, 2008 10:59 pm

Re: Bullet simulation's erratic behavior... Help Please!

Post by jcrada »

Thank you very much for your quick reply.
I will reproduce this behavior in Bullet's Demo as soon as I have the chance. For the moment, I decided to use the other constraints instead, btHingeConstraint, btPoint2PointConstraint, and btConeTwistConstraint. They will do the job in such a hurry. As soon as I finish my thesis I will open-source it and post it in the forums.

Thank you VERY much for maintaining such a great physics engine and keeping it free!

Best regards,

Juan Rada Vilela
Post Reply