Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btMultiBody simulation instability / explosion of energy #290

Closed
erwincoumans opened this issue Nov 18, 2014 · 4 comments
Closed

btMultiBody simulation instability / explosion of energy #290

erwincoumans opened this issue Nov 18, 2014 · 4 comments

Comments

@erwincoumans
Copy link
Member

In some cases the new btMultiBody simulation is unstable, and gains a lot of energy. This needs to be tracked down and fixed. See also http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=10237

@donnyward
Copy link

I've modified the MultiBodyVehicle demo to use my btMultiBody construction code. At the top of MultiBodyVehicle.cpp, you can modify two constants (FIXED_STEP, NUM_MULTIBODIES) to change the time step used, or change the number of btMultiBody in the simulation.

https://gist.github.com/donnyward/f2130d62915bd8b896cf

@erwincoumans
Copy link
Member Author

That's great, thanks for the reproduction case. I am tracking down the issue now.

@erwincoumans
Copy link
Member Author

I tracked down some causes of instability. One of them is self-collision can cause near-singular configurations where resolving the collision adds a lot of energy. We can add a fix/hack for this, but I need to figure out if that is ok to do. Another potential instability is rotational gain, probably due to coriolis forces, but it could be a bug too. Enabling some damping reduces/hides this issue. I'll post again when I find out more.

@erwincoumans
Copy link
Member Author

I fixed some issue that was leading to the self-collision 'explosion', see #295
There is still an issue of energy gain, likely due to explicit integration of coriolis forces, so damping is still needed for each multibody add:
multiBody->setLinearDamping(0.1f);
multiBody->setAngularDamping(0.9f);
Please open a new issue if there are still energy gain/explosions with btMultibody when using damping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants