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

# Dexterous hand on an arm

> A Franka Panda with a LEAP hand: the hand as one grip number, or all 16 finger joints.

> [!NOTE]
>
> **Class** `dexterous_arm` · **Parts** `arm`, `hand` · **Env** `dexhand` (Panda with a right LEAP hand, lift a ball 10 cm)

The arm is commanded by hand pose. The hand is fixed for the run to one of two references.

## What `move` takes

| Part | Space | Dimensions |
| - | - | - |
| `arm` | `ee_abs` | `x` 0.20 to 0.85 m, `y` ±0.60 m, `z` 0 to 0.90 m, `roll`, `pitch`, `yaw` |
| `hand` (default) | `grip` | a bare number, 0 open to 1 closed, along a straight blend of finger poses |
| `hand` (alternative) | `joint_abs` | 16 finger joints in degrees, Shadow Hand names: `FFJ1` to `FFJ4` (index), `MFJ`, `RFJ`, `THJ1` to `THJ4` (thumb). `J1` is the tip. LEAP has no little finger |

## Example spec

The `grip` reference. With `joint_abs` the `hand` part holds the 16 finger joints in place of `grip`.

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

from rua.direct import Dim, Part, RobotSpec

HAND_SPEED_M_S = 0.9
WRIST_SPEED_RAD_S = 2.5
GRIP_SPEED_PER_S = 6.5

SPEC = RobotSpec(
    "dexterous_arm",
    "ee_abs + hand grip",
    (
        Part(
            "arm",
            "ee_abs",
            (
                Dim("x", "m", 0.20, 0.85, HAND_SPEED_M_S),
                Dim("y", "m", -0.60, 0.60, HAND_SPEED_M_S),
                Dim("z", "m", 0.00, 0.90, HAND_SPEED_M_S),
                Dim("roll", "rad", -math.pi, math.pi, WRIST_SPEED_RAD_S, wraps=True),
                Dim("pitch", "rad", -math.pi, math.pi, WRIST_SPEED_RAD_S, wraps=True),
                Dim("yaw", "rad", -math.pi, math.pi, WRIST_SPEED_RAD_S, wraps=True),
            ),
        ),
        Part("hand", "grip", (Dim("grip", "1", 0.0, 1.0, GRIP_SPEED_PER_S),)),
    ),
)
```

## Example calls

Hover palm down over the ball, close on it, then lift with the arm alone:

```json move theme={"dark"}
{
  "keyframes": [
    {"t": 2.0, "arm": {"x": 0.45, "y": 0.0, "z": 0.12, "roll": 180, "pitch": 0, "yaw": 0}},
    {"t": 3.0, "hand": 0.95},
    {"t": 4.5, "arm": {"z": 0.27}}
  ],
  "note": "Close on the ball, then lift."
}
```

With the `joint_abs` reference the same hand is named joint by joint:

```json move joints theme={"dark"}
{
  "keyframes": [
    {"t": 1.5, "arm": {"x": 0.5, "z": 0.15}, "hand": {"THJ2": 40, "FFJ3": 20}},
    {"t": 2.5, "arm": {"z": 0.10}, "hand": {"FFJ3": 60, "FFJ2": 50}}
  ]
}
```

```json done theme={"dark"}
{"reason": "The ball is lifted 10 cm."}
```

## What comes back

The `arm` pose, the `hand` value (`grip` or its joints), the gap for each named part, and the front and wrist cameras.

## Limits

* Vetoes an unreachable pose, an arm joint past its limit, a self-collision (a finger against a finger counts), and an arm joint over its speed limit.
* Agents are much better with `grip` than with raw finger joints: in the env's runs the `joints` reference solved far fewer episodes. Choose the reference to match what you want to measure.
* A part left out holds its last command, so a lift that names only the arm keeps the hand closed.


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