Page 1 of 1

On the problem of elastic collision of rigid bodies

Posted: Wed Jun 23, 2021 8:22 am
by raynor
I am a new user of Pybullet and I want to build an elastic collision system.However, the model I loaded is not elastic in the simulation environment (for example, the ball does not bounce when it falls on the table). I would like to know how to achieve my goal. Do I need to modify the underlying code?If there's a simple way to do it can you give me a simple example?I can't find a suitable example in the official provided routine.I may have some problems with my English. If you don't understand my question, please reply to me.

Re: On the problem of elastic collision of rigid bodies

Posted: Wed Jun 23, 2021 1:48 pm
by drleviathan
(1) For pybullet questions you will get more replies if you post in the PyBullet Support and Feedback forum. This general forum is more focused on Bullet's C++ code.

(2) For more elastic collisions use changeDynamics to set the restitution of all bouncy bodies to 1.0. You might also want to change the restitutionVelocityThreshold of the world simulation to a small number: it is the speed at which collisions experience zero restitution (bounce).

(3) I don't think Bullet allows the true restitution to be set to 1.0. It probably limits it to a lower value of 0.99 or something. The reason would be: to try to prevent unbounded energy from being accidentally pumped into the simulation.

Re: On the problem of elastic collision of rigid bodies

Posted: Thu Jun 24, 2021 10:52 am
by raynor
Thank you very much for your answer. I will ask questions again in the Pybullet section. Your answer is very helpful to me.