-
Notifications
You must be signed in to change notification settings - Fork 41
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
Slow rate when multiple objects are in constant collision #284
Comments
Researching more about this, it seems that the main difference between Bullet and DART is in how the dynamics are computed. While DART uses a reduced coordinates approach (which is more precise), Bullet uses maximal coordinates (which is faster). However, Bullet does let the user define multibody entities that use reduced coordinates for its dynamics. The main question is: If Bullet can, at least in theory, provide the precision and speed by supporting both maximal and reduced coordinates, are there any advantages of using DART as the default engine? |
The two things I can think of off the top of my head are
|
Hi @azeey,
I tried PGS solver, and it actually made the sim slower, to 17% instead of 25%.
I tried tweaking those values, up to x100, resulting in no noticeable impact. |
Just a curiosity, where did you find that maximal coordinates are faster? For system with a lot of joints (so different from your use case) reduced coordinates need to integrate a lot less variable and have much less explicit constraint that could lead to faster simulation as well, even if in practice which method is actually faster depend a lot on the system being simulated and the actual code implementation. |
I completely agree. My statement was mostly about this specific use case. |
One possible explanation for the difference is that Bullet is a physics engine meant for video game development, and I believe it's common practice for such engines to skip simulating the physics for objects that have come to rest, until they get perturbed or acted upon by a moving object. If Bullet is using that simulation shortcut, that could easily explain the significant difference, since right now DART does not use any such shortcut. |
As a reference, on SDF that's toggled by the http://sdformat.org/spec?ver=1.8&elem=model#model_allow_auto_disable That flag is not supported on Ignition Physics right now, but it's possible that this is the default behaviour for Bullet, I haven't checked. |
Yes, I have seen this behavior impacting significantly the RTF of some simulation instances. However, in this specific example, sleeping is disabled: https://github.com/ignitionrobotics/ign-physics/blob/77a6826f7756cd5f9aba150eaa321e9e17e8a04f/bullet/src/SDFFeatures.cc#L180 |
Is there a fundamental reason why allow-auto-disable can't be implemented? Also struggling when dealing with a large number of entity collisions, however almost all of them should be static 95% of the time so allow_auto_disable would be a big help for us. If there is no obstacle in the way to implementing it I would be happy to have a look. |
Hi all,
I have a use case in which multiple objects are in constant collision with each other, e.g. a stack of boxes. The default DART physics engine seems to struggle with this case, slowing down the sim rate (RTF) to 25% on my machine. In contrast, when using the Bullet physics engine (#208), the simulation seems to run smoothly at a ~97% rate. Check links to images below:
DART
Bullet
What's interesting is that when using DART physics engine but selecting
dart::collision::BulletCollisionDetector
as the collision detector, the sim still runs slow at a 25% rate. Can anyone provide an explanation, or give some intuition regarding this phenomenon? I would much rather keep using DART with an improved collision detector than completely switch the physics engine.The text was updated successfully, but these errors were encountered: