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

# Single arm

> One arm with a gripper: the base case, in hand pose or joints.

> [!NOTE]
>
> **Class** `single_arm` · **Parts** `arm`, `gripper` · **Ships in rua** `ContractEmbodiment` · **Env** `libero` (Franka Panda)

One arm and a gripper on a table. The run fixes how the arm is commanded, and the agent never switches: hand pose (`ee_abs`, or `ee_delta`) or joints (`joint_abs`). The gripper is always `grip`.

## What `move` takes

| Part | Space | Dimensions |
| - | - | - |
| `arm` | `ee_abs` | `x`, `y`, `z` in metres, `roll`, `pitch`, `yaw` in degrees, in the base frame |
| `arm` (alternative) | `joint_abs` | `j1` to `jN` in degrees, base to wrist (six or seven, as the arm has) |
| `gripper` | `grip` | a bare number, 0 open to 1 closed |

## Example spec

The spec of one arm in hand pose. Angles are radians in a spec and degrees in a call.

```python Spec theme={"dark"}
import math

from rua.direct import Dim, Part, RobotSpec

SPEC = RobotSpec(
    "single_arm",
    "ee_abs",
    (
        Part(
            "arm",
            "ee_abs",
            (
                Dim("x", "m", -0.6, 0.6, max_speed=0.5),
                Dim("y", "m", -0.6, 0.6, max_speed=0.5),
                Dim("z", "m", 0.0, 0.8, max_speed=0.5),
                Dim("roll", "rad", -math.pi, math.pi, max_speed=math.pi, wraps=True),
                Dim("pitch", "rad", -math.pi, math.pi, max_speed=math.pi, wraps=True),
                Dim("yaw", "rad", -math.pi, math.pi, max_speed=math.pi, wraps=True),
            ),
        ),
        Part("gripper", "grip", (Dim("grip", "1", 0.0, 1.0, max_speed=2.0),)),
    ),
)
```

Serve an arm from its contract, with the interface settings you want:

```python theme={"dark"}
from rua.direct import DirectControl, read_settings
from rua.embodiments.contract import ContractEmbodiment

embodiment = ContractEmbodiment(
    CONTRACT, gripper=(0.0, 1.0), max_speed={"position": 0.5, "rotation": 3.0, "grip": 2.0}
)
control = DirectControl(embodiment, settings=read_settings({"notes": True}))
```

## Example calls

```json move theme={"dark"}
{
  "keyframes": [
    {"t": 2.0, "arm": {"x": 0.45, "z": 0.20, "yaw": 90}},
    {"t": 3.0, "arm": {"z": 0.12}, "gripper": 1.0}
  ],
  "note": "Move over the cube, then lower and close."
}
```

```json done theme={"dark"}
{"reason": "The cube is in the box."}
```

## What comes back

The measured `arm` pose and joints, the `gripper` value, the gap to the target for each part the call named, and every camera.

## Limits

> [card] Any arm from a contract
>
> Checks only the controller's bounds and the speeds you give it. It cannot veto an unreachable pose or a self-collision. One end effector only.

> [card] An arm with a model
>
> An env that has a model of its arm can write its own embodiment, and veto an unreachable pose, a joint past its limit or a self-collision. [`examples/yam`](https://github.com/hud-evals/rua/tree/main/examples/yam) does this for one MuJoCo arm.

* A hand pose does not fix the elbow. Use `joint_abs` to set posture.
* Neither checks the table or objects. The simulator decides contact.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.