Skip to main content
This walks through a complete project end to end: a Go1 navigates a scene with obstacles to a target waypoint and sits when it arrives, driven by your own world model through the inference stack. Every snippet is copy-paste runnable and headless (no display needed), so it works in CI too. The captured output at the bottom is from running these exact files.

0. Set up

1. The world model (policy.py)

The model turns each observation into a named action. Proximity is a modality that injects target_dist into every observation. HeadingPolicy reads it, turns toward the target, walks, and sits when within 0.6 m.
policy.py
Two rules the stack enforces: the first parameter of propose_actions must be named observation (it’s passed by keyword), and you must return an AdapterReply with done=True to end the loop. ProposedAction.name must be a real action. Check with cadenza.list_actions("go1").

2. The mission (run_patrol.py)

Build a Scene, compile it to an XML the stack can load via xml_path, then run the loop.
run_patrol.py

3. Run it

Output:
The robot walked from the origin to ≈ (-2.78, 0.22), within the 0.6 m arrival radius of the (-3.0, 0.0) target, and sat.

4. Watch it (optional)

Everything above is headless. To see the same scene in the MuJoCo viewer, drop this beside run_patrol.py (needs a display):
watch.py

Where to take it next

Swap in a real VLA

Replace HeadingPolicy.propose_actions with calls into your trained model.

Add perception

Add a vision/depth Modality and reason over observation['camera'].

Harder terrain

Add slopes, a snake of boxes, or dynamic (fixed=False) objects.

Ship to hardware

Drive the physical Go1 with the same action vocabulary.