On the problem of elastic collision of rigid bodies
-
- Posts: 4
- Joined: Wed Jun 23, 2021 2:32 am
On the problem of elastic collision of rigid bodies
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.
-
- Posts: 849
- Joined: Tue Sep 30, 2014 6:03 pm
- Location: San Francisco
Re: On the problem of elastic collision of rigid bodies
(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.
(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.
-
- Posts: 4
- Joined: Wed Jun 23, 2021 2:32 am
Re: On the problem of elastic collision of rigid bodies
Thank you very much for your answer. I will ask questions again in the Pybullet section. Your answer is very helpful to me.