Recommended setup: MuJoCo 3.8.1+, Python 3.10+. Drift can clone Menagerie for you on the first run if it isn’t on disk yet.
The prompt
- Clones
mujoco_menagerieto a path you confirm if it isn’t on your system already, or asks where it lives if it is - Composes
go2_scene.xmlthat<include>s the Menagerie Go2 model and adds the floor + 3-step staircase - Spawns the Go2 at the Menagerie keyframe so the feet rest on the ground
- Writes a
run_sim.pythat loads the keyframe, applies PD control on all 12 joints, steps the sim for 5 seconds, and logs sensors at 100 Hz - Runs the sim, prints the final base pose and any contact issues
- Drops a
DRIFT.mdsummarising the scene, the controller, and what to tune next
What ends up on disk
go2_scene.xml is intentionally short — most of the model is referenced from Menagerie:
What the viewer shows
Open it interactively:Iterating from here
Each follow-up triggers only what’s needed — no full rebuilds:Honest scope
Things this guide does:- Compose the scene around the Menagerie Go2 model
- Write a PD hold-pose controller
- Wire IMU + contact + joint sensors and log them
- Open the viewer / run headless
- Learned locomotion (trot, gallop, recovery from a push) — those are policies you train; Drift can scaffold the training environment but not the policy itself
- Real-world deployment to a physical Go2 — Drift focuses on simulation
- Reactive contact-aware planning — the controller here is pose-hold, not a footstep planner
.pt or .onnx form, ask Drift to wire it in:
Common gotchas
Tell Drift where Menagerie lives once
Tell Drift where Menagerie lives once
Drift doesn’t assume a fixed Menagerie path. Easiest pattern: tell it the path once and pin it in Future prompts now resolve
DRIFT.md so every future prompt uses the same one.DRIFT.md ends up with:mujoco_menagerie to that absolute path without you re-stating it.Robot tips over on first step
Robot tips over on first step
The default keyframe in Menagerie is calibrated for a flat ground spawn. If you put the Go2 on top of a staircase step rather than at its base, the static pose isn’t stable. Either:
- Spawn position at
(0, 0, 0.30)(in front of the stairs) — what this guide does - Or ask Drift to compute a per-step stable stance for the staircase case
"the Go2 tips backward in the first 200ms" — it’ll walk the diagnosis.Foot contact forces are zero
Foot contact forces are zero
Two usual causes — Drift will check both:
- Contact between Go2 feet and the floor is excluded by a
<contact><exclude.../></contact>block somewhere — common when including a Menagerie scene file rather than the bare model. - The contact sensor names changed between Menagerie revisions. Pin a version in
DRIFT.mdto avoid surprises.
Next steps
Dual-arm Aloha
Tabletop bimanual demo
Humanoid H1
Standing pose demo with PD control on 19 joints
Building a MuJoCo Scene
The base MuJoCo guide — useful background for everything in Showcase
Project Context
Pin your Menagerie path and conventions so every prompt is consistent