Sleeping
With enable_sleeping=True, articulations in contact are joined into islands each step. Static geometry supports an island without joining it; a fixed-base robot with moving joints joins the island of everything it touches. A supported island whose bodies stay below sleep_linear_threshold (0.05 m/s) and sleep_angular_threshold (0.15 rad/s) for sleep_quiet_time (0.5 s) falls asleep: its published state is frozen and, with sleep_skip_constraints=True, its rows and dynamics are skipped. Collision keeps running, so a contact with an awake or moving body wakes it.
Step through the schematic; the chart is the awake-body count Steel recorded for the same scene. Tutorial: Sleeping islands
- Other wake events: nonzero or non-finite
body_forjoint_f, a changed state or gravity, lost support or row capacity,resetof its world,notify_model_changedfor its properties. - Driven articulations (nonzero drive gains) and articulations with passive springs stay awake.
- Sleeping is rejected with
contact_warmstart,velocity_iterations, models without articulations, and serial propagation. With colored propagation on CUDA, a captured step in which everything that can sleep is asleep skips the propagation solve where conditional graph nodes are supported. - Contacts of sleeping islands report zero in
contact_fwhile their rows are skipped. Passsleep_skip_constraints=Falseif force consumers read them.
Replicated worlds. The default collision pipeline can write the same contacts in a different order on each call, depending on GPU scheduling, and sleeping rules out warm start, so each step’s cold-started sweep leaves a slightly different residual. Resting bodies keep a small jitter whose fast tail reaches the default sleep_angular_threshold. An island must stay under the thresholds on every step of sleep_quiet_time, so whether it sleeps is very sensitive to that tail: in 16 to 128 copies of the tower scene from the tutorial, most bodies stayed awake after 6 s, and the outcome varied between runs and did not change monotonically with the world count. Nothing couples the worlds. CollisionPipeline(deterministic=True) sorts the contacts; in these tower measurements that roughly halved the jitter and every island slept within one or two seconds; a larger sleep_angular_threshold, such as 0.3 rad/s, also works. Check body_awake in batched runs before counting on the saving. Solver documentation of this is in review in skild-ai/newton#25.
Steel docs and tutorials are licensed under Apache-2.0. Third-party notices. "Skild", "Skild AI" and the Skild logo are trademarks of Skild AI and are not licensed under Apache-2.0.