$npx -y skills add Hebbian-Robotics/mujoco-workbench --skill mujoco-run-debugUse this when an agent needs to run mujoco-workbench scenes, inspect Viser/Rerun behavior, render snapshots or camera grids, export videos, run mwb debug commands, or produce file-based artifacts for simulation debugging.
| 1 | # Mujoco Run Debug |
| 2 | |
| 3 | Use `uv run mwb` as the only public CLI. |
| 4 | |
| 5 | Primary scene: |
| 6 | |
| 7 | ```bash |
| 8 | examples.scenes.mobile_aloha_piper_indicator_check |
| 9 | ``` |
| 10 | |
| 11 | Run the interactive Viser scene: |
| 12 | |
| 13 | ```bash |
| 14 | uv run mwb run examples.scenes.mobile_aloha_piper_indicator_check |
| 15 | ``` |
| 16 | |
| 17 | Inspect without starting Viser: |
| 18 | |
| 19 | ```bash |
| 20 | uv run mwb run examples.scenes.mobile_aloha_piper_indicator_check --inspect |
| 21 | ``` |
| 22 | |
| 23 | Render a snapshot: |
| 24 | |
| 25 | ```bash |
| 26 | uv run mwb debug snapshot \ |
| 27 | --scene examples.scenes.mobile_aloha_piper_indicator_check \ |
| 28 | --t 22 \ |
| 29 | --camera top_d435i_cam \ |
| 30 | --out /tmp/camera.png |
| 31 | ``` |
| 32 | |
| 33 | Render a camera grid: |
| 34 | |
| 35 | ```bash |
| 36 | uv run mwb debug grid \ |
| 37 | --scene examples.scenes.mobile_aloha_piper_indicator_check \ |
| 38 | --t 22 \ |
| 39 | --out /tmp/grid.png |
| 40 | ``` |
| 41 | |
| 42 | Check timeline clearance after changing scene geometry or motion: |
| 43 | |
| 44 | ```bash |
| 45 | uv run mwb debug clearance \ |
| 46 | --scene examples.scenes.mobile_aloha_piper_indicator_check \ |
| 47 | --sample-dt 0.50 \ |
| 48 | --max-distance 0.005 \ |
| 49 | --exact-geom \ |
| 50 | --top 12 |
| 51 | ``` |
| 52 | |
| 53 | `clearance` reports the worst arm-arm, arm-static, arm-grippable, and |
| 54 | grippable-static pairs with time and active step labels. It exits 0 by default |
| 55 | because some tasks intentionally touch objects; add `--fail-below 0` when any |
| 56 | penetration should fail the run. |
| 57 | |
| 58 | Calculate placement values before hand-tuning camera/contact poses: |
| 59 | |
| 60 | ```bash |
| 61 | # Aim a MuJoCo fixed camera at a world target; output is ready for xyaxes. |
| 62 | uv run mwb debug camera-look-at \ |
| 63 | --position 5.10,0.79,1.08 \ |
| 64 | --target 5.10,1.04,1.00 |
| 65 | |
| 66 | # Pick a clearance point just outside a scene object. |
| 67 | uv run mwb debug surface-point \ |
| 68 | --scene examples.scenes.mobile_aloha_piper_indicator_check \ |
| 69 | --geom light_left_r3_s10 \ |
| 70 | --normal 0,-1,0 \ |
| 71 | --clearance 0.02 |
| 72 | |
| 73 | # Back a TCP/camera away from the target along an approach ray. |
| 74 | uv run mwb debug standoff \ |
| 75 | --target 5.10,1.04,1.00 \ |
| 76 | --direction 0,1,0 \ |
| 77 | --distance 0.25 |
| 78 | ``` |
| 79 | |
| 80 | Print the task plan: |
| 81 | |
| 82 | ```bash |
| 83 | uv run mwb debug plan --scene examples.scenes.mobile_aloha_piper_indicator_check |
| 84 | ``` |
| 85 | |
| 86 | Run phase contracts and write artifacts: |
| 87 | |
| 88 | ```bash |
| 89 | uv run mwb debug contracts \ |
| 90 | --scene examples.scenes.mobile_aloha_piper_indicator_check \ |
| 91 | --out-root results/runs |
| 92 | ``` |
| 93 | |
| 94 | Export the indicator-check multi-camera videos: |
| 95 | |
| 96 | ```bash |
| 97 | uv run mwb video-export --out-dir /tmp/pov |
| 98 | ``` |
| 99 | |
| 100 | Use `results/` for repo-local artifacts and `/tmp` for scratch renders. Avoid |
| 101 | committing generated videos, logs, caches, or run artifacts. |
| 102 | |
| 103 | Headless rendering sets `MUJOCO_GL` before importing MuJoCo: `glfw` on macOS, |
| 104 | `egl` on Linux. If rendering fails on Linux, suspect EGL/driver availability |
| 105 | before changing scene code. |