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

# Mobile base

> A wheeled base driven by velocity: a differential drive or a car.

> [!NOTE]
>
> **Class** `simple_mobile_base` · **Parts** `base` (differential drive), or `drive` and `steering` (car) · **Env** `wheeled`

The agent never sets a position. It sets velocities, and the base ramps between them. A robot only exposes what it can physically do: a differential drive has no sideways velocity.

## What `move` takes

| Robot | Part | Space | Dimensions and range |
| - | - | - | - |
| Differential drive | `base` | `base_vel` | `vx` ±0.22 m/s, `wz` ±163 deg/s |
| Car | `drive` | `base_vel` | `vx` ±3.3 m/s |
| Car | `steering` | `joint_abs` | `steer` ±33 deg |

## Example spec

The differential drive, then the car:

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

from rua.direct import Dim, Part, RobotSpec

DEG = math.pi / 180

DIFF_DRIVE = RobotSpec(
    "simple_mobile_base",
    "base_vel",
    (
        Part(
            "base",
            "base_vel",
            (
                Dim("vx", "m/s", -0.22, 0.22, max_accel=2.5),
                Dim("wz", "rad/s", -2.84, 2.84, max_accel=680 * DEG),
            ),
        ),
    ),
)

CAR = RobotSpec(
    "simple_mobile_base",
    "drive + steering",
    (
        Part("drive", "base_vel", (Dim("vx", "m/s", -3.3, 3.3, max_accel=3.0),)),
        Part(
            "steering",
            "joint_abs",
            (Dim("steer", "rad", -33 * DEG, 33 * DEG, max_speed=360 * DEG),),
        ),
    ),
)

SPEC = DIFF_DRIVE
```

## Example calls

Differential drive: speed up to 0.2 m/s, hold, then stop.

```json move theme={"dark"}
{
  "keyframes": [
    {"t": 1.0, "base": {"vx": 0.2}},
    {"t": 2.0, "base": {"vx": 0.2}},
    {"t": 2.2, "base": {"vx": 0.0}}
  ]
}
```

Car: steer and drive in one keyframe, then stop. This is a call for the `CAR` spec.

```json move car theme={"dark"}
{
  "keyframes": [
    {"t": 0.4, "drive": {"vx": 0.3}, "steering": {"steer": 30}},
    {"t": 2.4, "drive": {"vx": 0.3}, "steering": {"steer": 30}},
    {"t": 2.6, "drive": {"vx": 0.0}}
  ]
}
```

```json done theme={"dark"}
{"reason": "The base is parked on the target."}
```

## What comes back

The measured velocity (or steering angle), the base pose in the odom frame (`x`, `y` in metres from the start, `yaw` in degrees), and the front and top cameras.

## Limits

* Velocities ramp linearly between keyframes and hold the last keyframe's value after the call, so a base keeps moving between calls until a later call changes it. To stop, command zero. A call that leaves `base` out keeps its last velocity.
* Vetoes only acceleration: 2.5 m/s² and 680 deg/s² (differential drive), 3.0 m/s² (car). The reply gives the minimum feasible time.
* No collision check. The sim decides what a box does to the robot.


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