I’ve been following the Gazebo development closely and came across references to an autosleep feature that appears to have a significant impact on simulation performance.
However, after searching through the official documentation, SDFormat spec, and GitHub repos, I couldn’t find any clear guidance on:
How to enable autosleep — Is it a compile-time flag, a runtime parameter, an SDF/World property, or something configured in the Physics system?
Where the official documentation lives — If it exists, could someone point me to the right page or tutorial?
This seems like a very impactful feature for large-scale simulations, so I’d love to understand how to use it properly. Any pointers would be greatly appreciated!
The autosleep feature is provided by the underlying physics engine if available and it is enabled by default. Currently, the only supported engine that provides this is bullet-featherstone. The feature was recently added to upstream DART recently, but you’ll need to build DART and possibly gz-physics from source to take advantage of that on Ubuntu. If you’re on macOS, the homebrew package has the latest version.
MuJoCo also supports this feature, but the work to integrate MuJoCo into Gazebo is still on going.
Hi, just to confirm my understanding:
Autosleep targets dynamic bodies, not static ones, autosleep is an optimization mechanism for dynamic bodies.
Wake-up happens on collision, external force, or joint activation, correct?
And enabling it is via <allow_auto_disable>true</allow_auto_disable> in model SDF, but joint-connected bodies ignore this — is that right?
Thanks for confirming!
Yes, your understanding is correct. autosleep/autodisable is meant for dynamic bodies that have come to be at rest. And wake up does happen if new contacts occur or external forces are applied.
The <allow_auto_disable> tag is currently not implemented in Gazebo even though it’s in the SDFormat spec. It is enabled by default and there’s no way to disable it.
It’s unfortunate that there are a few of these tags in SDFormat that are still not implemented in Gazebo. The SDFormat spec is meant to be simulator agnostic, so some parts of the spec may not be implemented in Gazebo. However, documentation is lacking on the parts of the spec that are implemented. We really need help on this so if you or anyone else reading this can contribute, that would be awesome.
We’d welcome a PR to enable the <allow_auto_disable> tag.