The experiments about the accuracy of Bullet - rebounce

Xuhai.Tang
Posts: 16
Joined: Wed Feb 23, 2011 4:54 pm

The experiments about the accuracy of Bullet - rebounce

Post by Xuhai.Tang »

I did an experiment to test the accuracy the bullet.

The experiment is:
(1) Let a ball fall from a initial height h1 without initial velocity.
(2) The ball contacti with a ground which is box, then it rebounce.
(3) I recorded the height of rebounce, h2., where the veolicity is zero.
The restitution is r.The initial energy is m1 and the energy at the highest point of rebounce is m2.

The results are
(1) When the restituion is 1.0, the results are h1> h2. Of course, it should be h1=h2 and m1= m2.
(2) When the restition is not 1,0, such as 0.2 or 0.5. The m2 is bigger than m1. Of course, it should be h1<h2 and m1=m2.

Is this error caused by the contact algorithm in Bullet.
You do not have the required permissions to view the files attached to this post.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: The experiments about the accuracy of Bullet - rebounce

Post by Erwin Coumans »

This is mainly due to the penetration correction (also known as Baumgarte/post stabilization). Furthermore the iterative constraint solver doesn't give a very accurate results at low iteration counts. As the energy is not correctly preserved, so using a low restitution is recommended.

You can enable the split of position and velocity correction impulse to reduce the artifacts due to Baumgarte.

Code: Select all

m_dynamicsWorld->getSolverInfo().m_splitImpulse = true;
Thanks,
Erwin

By the way, please use the Bullet forums and not the general discussion if it involves purely Bullet discussion.