Sleeping dominos (mujoco.org)
Many contacts
One tilted domino starts a wave through 96 sleeping dominoes; each row wakes as it arrives.
steel preset (the default), recordedon an NVIDIA RTX PRO 6000 Blackwell, sped up 2× (the readout shows sim time).Run it
cd examples# the default preset (steel), then the othersuv run shelf play mjorg_sleeping_dominos# change solver settings liveuv run shelf tune mjorg_sleeping_dominosSource: examples/shelf/02_many_contacts/mjorg_sleeping_dominos/ · ported from google-deepmind/mujoco model/sleep/dominos.xml (MuJoCo 4.0 tour on mujoco.org)
Presets
| Preset | Solver | Status | Checked |
|---|---|---|---|
steeldefault | steel | works | 2026-11-10, newton f6fc82a8b, NVIDIA RTX PRO 6000 Blackwell Server Edition |
Solvers with no row are untested on this example. The full settings are inpresets.toml.
Code
# SPDX-FileCopyrightText: Copyright (c) 2026 Skild AI and the Steel contributors# SPDX-License-Identifier: Apache-2.0
############################################################################ Example mujoco.org sleeping dominos## 96 dominoes in five rows joined by U-turns. One tilted domino starts the wave; the rest# sleep until it reaches them, and fall back asleep once they have toppled.## Replicates the "Island Sleeping" scene of the MuJoCo 4.0 tour on mujoco.org from its# MJCF (scene.xml, flattened from google-deepmind/mujoco model/sleep/dominos.xml), with# Steel's island sleeping. See README.md for the gaps.## Command: python -m shelf run mjorg_sleeping_dominos############################################################################
from pathlib import Path
import numpy as np
import newtonimport newton.examplesfrom common.steel_scenes import SceneExample
# A domino has toppled when its long axis leans this far from vertical [deg].TOPPLED_TILT_DEG = 45.0
class Example(SceneExample): file = __file__ # MuJoCo's free camera for the scene: azimuth 60, elevation -25 around the statistic centre camera = {"eye": (-0.34, -2.66, 1.43), "target": (1.2, 0.0, 0.0)}
def build(self): builder = newton.ModelBuilder() self.preset.apply_model(builder) builder.add_mjcf(str(Path(__file__).with_name("scene.xml"))) return builder, {}
def check(self): """Every domino has toppled.""" self.solver.check_constraint_capacity() # dropped contact rows invalidate the run q = self.state_0.body_q.numpy() x, y = q[:, 3], q[:, 4] tilt = np.degrees(np.arccos(np.clip(1.0 - 2.0 * (x * x + y * y), -1.0, 1.0))) standing = np.flatnonzero(tilt < TOPPLED_TILT_DEG) assert len(standing) == 0, f"{len(standing)} of {len(q)} dominoes still stand: bodies {standing.tolist()}"
if __name__ == "__main__": parser = Example.create_parser() viewer, args = newton.examples.init(parser) newton.examples.run(Example(viewer, args), args)example = "mjorg_sleeping_dominos"source = "google-deepmind/mujoco model/sleep/dominos.xml (MuJoCo 4.0 tour on mujoco.org)"license = "Apache-2.0"default = "steel"
[check]# Arguments `python -m shelf check` passes in test mode.args = ["--num-frames", "900"]
[gallery]short = "One tilted domino starts a wave through 96 sleeping dominoes; each row wakes as it arrives."title = "Sleeping dominos (mujoco.org)"frame = 240
[xpbd]status = "untested"
[vbd]status = "untested"
[mujoco]status = "untested"
[featherstone]status = "untested"
[semi_implicit]status = "untested"
[feather_pgs]status = "untested"
[steel]status = "works"# MuJoCo's 4.0 sleep flag maps to Steel's island sleeping. The fallen chain needs about 2100 rows; at the# default row budget the dropped rows stall the wave or launch dominoes.sim = { fps = 60, substeps = 4 }model = { rigid_gap = 0.01 }solver = { solve_mode = "colored", iterations = 12, articulated_contact_response = "propagation", enable_sleeping = true, free_body_constraint_max = 4096, propagation_constraint_max = 4096 }checked = "2026-11-10, newton f6fc82a8b, NVIDIA RTX PRO 6000 Blackwell Server Edition"
[kamino]status = "untested"
[implicit_mpm]status = "untested"
[style3d]status = "untested"README
Steel replica of “Island Sleeping” from the MuJoCo 4.0 tour on mujoco.org. 96 dominoes stand in five rows joined by U-turns. One tilted domino starts a wave; the dominoes ahead of it sleep until it reaches them, and the fallen ones go back to sleep.
- Source:
google-deepmind/mujocomodel/sleep/dominos.xml, Apache-2.0 (text inLICENSE).scene.xmlis that file compiled with MuJoCo 3.17 and re-emitted flat (itsreplicateblocks expanded), without the 4.0sleepflag andsleep_tolerance. Steel’senable_sleepingreplaces them. - Check: after 15 s every domino leans more than 45 degrees from vertical. In Steel the wave reaches all 96 by 8 s, as it does in MuJoCo 3.17 on the same file, and 96 of 96 are asleep by 9.5 s.
Known gaps:
- Steel’s sleep thresholds (body speed 0.05 m/s, 0.15 rad/s for 0.5 s) differ from MuJoCo’s
sleep_tolerance. - The shelf viewer does not mark sleeping bodies; the tour colours them.
- Rendering uses the shelf viewer, not MuJoCo’s Filament renderer.
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.