Huge impulse force on contact :(

winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

Huge impulse force on contact :(

Post by winspear »

Hi,
I am starting with the Bullet physics library. I just wrote a simple program and initialized two boxes where one falls over the other. But when I run the program, the falling box just get a huge impulse force and flies away on contact with the other box and this keeps happening. Both the boxes are dynamic and have the identical size and properties.
I tried a sphere too and same thing happens.
I use the "btSequentialImpulseConstraintSolver" for my physics instance and collision configuration is set to "btDefaultCollisionConfiguration".

i tried setting elapsed time using Queryperformance counter and also tried setting constant timestep of 1/60.0 but same results.
This happens whenever two objects come in contact.
What am I doing wrong? Any help will be appreciated.

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

Re: Huge impulse force on contact :(

Post by Erwin Coumans »

Have you compared your setup with the demos/examples?

See Bullet/Demos/BasicDemo.
Thanks,
Erwin
winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

Re: Huge impulse force on contact :(

Post by winspear »

Thanks for the reply. I think I found the problem...
When i set the activation state at the end for each rigid body that I create, then everything is ok. Now all the forces are perfectly rendered.

body->setActivationState(ACTIVE_TAG);

What does this setActivationState actually do? I dont see any description about this in the Doxygen API reference.

I also found a bunch of different tags in btCollisionObject..

#define ACTIVE_TAG 1
#define ISLAND_SLEEPING 2
#define WANTS_DEACTIVATION 3
#define DISABLE_DEACTIVATION 4
#define DISABLE_SIMULATION 5

What do these do?
absifreei
Posts: 6
Joined: Sat Oct 23, 2010 7:58 am

Re: Huge impulse force on contact :(

Post by absifreei »

winspear wrote: What does this setActivationState actually do? I dont see any description about this in the Doxygen API reference.

I also found a bunch of different tags in btCollisionObject..

#define ACTIVE_TAG 1
#define ISLAND_SLEEPING 2
#define WANTS_DEACTIVATION 3
#define DISABLE_DEACTIVATION 4
#define DISABLE_SIMULATION 5

What do these do?
yeah ,I just want to ask the same question too, for the moment i am working on the bullet RBD solver for houdini and when i set activationState to ISLAND_SLEEPING,it seems that houdini have disabled the rigid body and the rigid body dosen't move or make collision with other rigid body,but in the RBD solving process ,simulations are all done in the bullet dynamic world, houdini just get the simulation results and refresh and displlay,however in bullet demo,set activationState to ISLAND_SLEEPING seems have no such effect, so could any one tell me what's the meaning of setActivationState and how to use it correctly! thanks