Skip to main content
Every robot has a fixed library of named base actions. These are the building blocks for ActionCall, Sim.run, CLI group actions, and policy outputs.

How an action becomes motion

An ActionSpec is either gait-based (a continuous locomotion command run by the gait engine) or phase-based (a timed sequence of joint targets with per-joint PD gains and motor schedules). The simulator dispatches on spec.is_gait / spec.is_phase.

Look up actions

ActionLibrary

ActionSpec

The full description of one action. Key fields:
Supporting dataclasses: GaitAction (gait command), ActionPhase (one timed phase), JointTarget (12/16-DOF targets + kp/kd), and MotorSchedule (per-joint velocity/torque caps and delays).

Action catalog

The arm’s library is Cartesian, not gait/phase: move_to, pick, and place take an (x, y, z) target instead of a GaitAction or ActionPhase schedule, and cadenza.get_library("arm") returns an ArmActionLibrary (it duck-types list_actions / get / describe). See the Arm controller.
Action availability is per-robot, so always confirm with cadenza.list_actions(robot) rather than assuming a name exists on both robots.

Parameterize with ActionCall

Wrap an action name with parameters to execute it (see Gym adapter):

Natural-language parsing

CommandParser turns a natural-language command into a list[ActionCall], the same parser the one-liner cadenza.run(...) and the CLI’s scripted driver use.
The parser lives at cadenza.parser (the real module), not cadenza_lab.parser. Import it as shown below.

Demo: explore the library