Skip to main content
This page gets you from pip install to a moving robot, then points at the feature-by-feature guides for everything else.

Install

pip install cadenza-lab
import cadenza_lab as cadenza
The PyPI distribution is cadenza-lab. The importable module is cadenza. import cadenza_lab as cadenza works and is recommended. A few internal submodules (e.g. the parser) are reached as cadenza.parser, not cadenza_lab.parser.

1. One-liner rollout

run executes one or more natural-language / action commands on a robot in the MuJoCo viewer.
import cadenza_lab as cadenza

cadenza.run("walk forward 2 meters then turn left then jump", robot="go1")

# a list of action names, with a terrain disturbance applied
cadenza.run(["trot_forward", "turn_left", "sit"], robot="go1", disturbance=0.5)
run(commands: str | list[str], robot: str = "go1",
    disturbance: float | None = None, **kwargs)
ParamDescription
commandsA command string (auto-split on then / and) or a list of commands/action names.
robot"go1" (default) or "g1".
disturbanceOptional terrain/perturbation level (0.01.0).

2. Just watch a robot

cadenza.view(robot="go1")                       # viewer, holding a stand
cadenza.view(robot="g1", distance=4.0, azimuth=120.0)
view(robot="go1", scene=None, *, xml_path=None, distance=6.0,
     elevation=-20.0, azimuth=270.0, lookat=(-3.0, 0.0, 0.2), hold_stand=True)

3. Script a sequence with the robot API

go1 = cadenza.go1()
go1.run([
    go1.stand(),
    go1.walk_forward(speed=1.5, distance_m=2.0),
    [go1.turn_left(), go1.walk_forward()],   # nested list = concurrent
    go1.jump(speed=2.0, extension=1.2),
])
See Robots for every action method, speed/extension scaling, and concurrency.

4. Step a Gym loop (headless / CI-safe)

from cadenza_lab import ActionCall

env = cadenza.GymAdapter(robot="go1", headless=True)
obs = env.reset()
for _ in range(5):
    obs, info = env.step(ActionCall("walk_forward", distance_m=0.5))
    print(info["moved_m"], obs.body_height)
    if not env.is_open:
        break
env.close()
is_open is a property, not a method. Write env.is_open, not env.is_open().

5. Inspect the action library

cadenza.list_actions("go1")
# ['stand', 'walk_forward', 'trot_forward', 'turn_left', 'climb_step', 'jump', ...]

spec = cadenza.get_action("go1", "walk_forward")   # -> ActionSpec
spec.is_gait, spec.distance_m, spec.speed_ms        # (True, 1.0, 0.15)
The viewer-based examples (run, view, go1.run([...])) open a MuJoCo window and need a display. The GymAdapter(headless=True) and stack examples run with no window, so use those in CI.

Where to next

Robots

go1 / g1 controllers, Step, sequences, concurrency.

Actions

The action catalog, ActionSpec, and NL parsing.

Simulation & scenes

Build worlds with Sim and Scene.

Gym adapter

Step a robot through a reset() / step() loop.

Inference orchestration

Sequential / ChainOfThought think-and-act strategies.

Inference stack

Plug in your own world model / VLA.

Deploy

Push actions to a physical Go1 / G1.

Full project

A complete, runnable mission, start to finish.