> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cadenzalabs.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Install, run a robot, render a scene, and step a Gym loop in minutes.

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

## Install

```bash theme={null}
pip install cadenza-lab
```

```python theme={null}
import cadenza_lab as cadenza
```

<Note>
  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`.
</Note>

## 1. One-liner rollout

`run` executes one or more natural-language / action commands on a robot in the
MuJoCo viewer.

```python theme={null}
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)
```

```python theme={null}
run(commands: str | list[str], robot: str = "go1",
    disturbance: float | None = None, **kwargs)
```

| Param         | Description                                                                         |
| ------------- | ----------------------------------------------------------------------------------- |
| `commands`    | A command string (auto-split on `then` / `and`) or a list of commands/action names. |
| `robot`       | `"go1"` (default) or `"g1"`.                                                        |
| `disturbance` | Optional terrain/perturbation level (`0.0`–`1.0`).                                  |

## 2. Just watch a robot

```python theme={null}
cadenza.view(robot="go1")                       # viewer, holding a stand
cadenza.view(robot="g1", distance=4.0, azimuth=120.0)
```

```python theme={null}
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

<Tabs>
  <Tab title="Go1 / G1 (gaits)">
    ```python theme={null}
    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),
    ])
    ```
  </Tab>

  <Tab title="Arm (pick & place)">
    ```python theme={null}
    arm = cadenza.arm()
    arm.run([
        arm.home(),
        arm.pick((0.50, 0.00, 0.43)),   # grab the cube on the table
        arm.place((0.40, 0.22, 0.43)),  # set it down to the side
        arm.home(),
    ])
    ```
  </Tab>
</Tabs>

See [Robots](/sdk/robots) for every action method — gait `speed`/`extension`
scaling and concurrency for `go1`/`g1`, and the Cartesian `move_to`/`pick`/
`place` primitives for the `arm`.

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

```python theme={null}
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()
```

<Warning>
  `is_open` is a **property**, not a method. Write `env.is_open`, not
  `env.is_open()`.
</Warning>

## 5. Inspect the action library

```python theme={null}
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)
```

<Note>
  The viewer-based examples (`run`, `view`, `go1.run([...])`) open a MuJoCo window
  and need a display. The `GymAdapter(headless=True)` and
  [stack](/sdk/inference-stack) examples run with no window, so use those in CI.
</Note>

## Where to next

<CardGroup cols={2}>
  <Card title="Robots" icon="dog" href="/sdk/robots">
    `go1` / `g1` controllers, `Step`, sequences, concurrency.
  </Card>

  <Card title="Actions" icon="list" href="/sdk/actions">
    The action catalog, `ActionSpec`, and NL parsing.
  </Card>

  <Card title="Simulation & scenes" icon="cubes" href="/sdk/simulation-and-scenes">
    Build worlds with `Sim` and `Scene`.
  </Card>

  <Card title="Gym adapter" icon="robot" href="/sdk/gym-adapter">
    Step a robot through a `reset()` / `step()` loop.
  </Card>

  <Card title="Inference orchestration" icon="gears" href="/sdk/inference-orchestration">
    `Sequential` / `ChainOfThought` think-and-act strategies.
  </Card>

  <Card title="Inference stack" icon="brain" href="/sdk/inference-stack">
    Plug in your own world model / VLA.
  </Card>

  <Card title="Coordination" icon="network-wired" href="/sdk/coordination">
    Connect robots and split a goal over MCP.
  </Card>

  <Card title="Deploy" icon="tower-broadcast" href="/sdk/deploy">
    Push actions to a physical Go1 / G1.
  </Card>

  <Card title="Full project" icon="diagram-project" href="/sdk/full-project">
    A complete, runnable mission, start to finish.
  </Card>
</CardGroup>
