> ## 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.

# Deploy

> Push actions from the SDK to a physical Go1 / G1: DDS, SSH, or a live bridge.

The same `Step` list you simulate can run on hardware. The robot controllers
expose three transports, each suited to a different setup.

```mermaid theme={null}
flowchart TD
    SEQ["Step[] / actions"] --> CHOICE{transport}
    CHOICE -->|on-robot, low latency| DDS["deploy() · DDS"]
    CHOICE -->|fire-and-forget script| SSH["deploy_ssh() · SSH"]
    CHOICE -->|host-side model in the loop| BRIDGE["deploy_ssh_bridge() · bridge"]
    DDS --> ROBOT[(Unitree Go1 / G1)]
    SSH --> ROBOT
    BRIDGE <-->|actions ↔ telemetry| ROBOT
```

<Warning>
  Deploying drives a real robot. Start on a stand or with clearance, keep an
  emergency stop reachable, and test in [simulation](/sdk/robots) first. SSH
  transports need the `deploy` extra: `pip install "cadenza-lab[deploy]"`.
</Warning>

## DDS: run directly on the robot

Best when your code runs **on the robot's onboard computer**. Lowest latency.

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

go1 = cadenza.go1()
go1.deploy([
    go1.stand(),
    go1.walk_forward(speed=0.5),
    go1.jump(),
], domain_id=0)          # 0 = real robot, 1 = simulation
```

```python theme={null}
go1.deploy(sequence, domain_id=0, network_interface=None)
```

## SSH: upload and run a script

Best when your code runs on a **laptop** and you want to push a self-contained
script to the robot and let it execute there.

```python theme={null}
go1 = cadenza.go1()
go1.deploy_ssh("my_demo.py", host="192.168.123.15", key="~/.ssh/go1_rsa")
```

```python theme={null}
go1.deploy_ssh(script, host="192.168.123.15", user="unitree",
               key=None, password=None, setup=True, background=False)
```

A lower-level connection helper is also available:

```python theme={null}
conn = go1.ssh("192.168.123.15", key="~/.ssh/go1_rsa")   # -> SSHDeploy
conn.deploy_and_run("my_demo.py")
```

## Bridge: host model, live control

Best when your **VLA / policy runs on your host PC** and needs real-time control
of the physical robot. Starts a bridge on the robot and returns a live handle.

```python theme={null}
go1 = cadenza.go1()
bridge = go1.deploy_ssh_bridge(host="192.168.123.15", key="~/.ssh/go1_rsa")

bridge.send_action("stand")
bridge.send_action("walk_forward", speed=0.5)
print(bridge.telemetry)     # live joint positions
bridge.estop()              # emergency stop
```

## G1 humanoid

The G1 controller mirrors the API (default IP `192.168.123.164`):

```python theme={null}
g1 = cadenza.g1()
g1.deploy([g1.stand(), g1.walk_forward(distance_m=1.0)])         # DDS
g1.deploy_ssh("g1_demo.py", host="192.168.123.164", key="~/.ssh/g1_rsa")
```

## Choosing a transport

| Transport             | Code runs on   | Latency     | Use when                                          |
| --------------------- | -------------- | ----------- | ------------------------------------------------- |
| `deploy()` (DDS)      | the robot      | lowest      | Onboard autonomy, no laptop in the loop.          |
| `deploy_ssh()`        | laptop → robot | n/a (batch) | Ship a fixed routine and let the robot run it.    |
| `deploy_ssh_bridge()` | laptop (live)  | network RTT | A model on your PC steers the robot in real time. |

<Tip>
  Build and validate the exact `Step` sequence in the
  [viewer](/sdk/robots#demo-a-full-go1-routine) first, then switch `go1.run(...)`
  to `go1.deploy(...)`. The action list is identical.
</Tip>
