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

# Robots & AirGen Client

AirGen currently supports four fundamental types of robots:

* **Aerial robots** including quadrotors and VTOL platforms.
* **Wheeled robots** including cars, forklifts, and ground rovers.
* **Quadrupeds** such as the **Ghost V60** and **Unitree Go2** platforms.
* **Computer-vision (CV) agents** for passive sensing workloads.

Even though these robot categories have different methods for control, AirGen provides a common API structure for sensors, cameras, and planning.

<Note> Which robot types are initialized in the AirGen Simulation environment depends on the configuration as selected through the [session configuration GUI](/grid/open-grid/workspace/robot-config) for OpenGRID or defined through the [session configuration file](/simulation/airgen/features/config-settings#robot-fleet-settings) for GRID Enterprise. </Note>

## AirGen Client

AirGen exposes a native Python client hierarchy that mirrors the simulator subsystems. Every robot controller inherits from `RobotClient`, which provides core capabilities such as sensor streaming, ground-truth access, weather controls, and environment queries. Form-factor specific clients extend this base:

* `MultirotorClient` controls aerial platforms and VTOL craft.
* `CarClient` drives wheeled robots, forklifts, and rovers.
* `LeggedClient` targets quadrupeds such as the Ghost V60 and Unitree Go2.

<Note>
  GRID notebooks still initialize convenience wrappers from `grid.robot` (for example, `AirGenDrone`). Those helpers delegate to the AirGen clients described here; this page focuses on the underlying simulator SDK so you can work directly with the native AirGen interfaces.
</Note>

### Instantiating Clients

Create the client that matches your robot category. The defaults connect to the session’s Commander host; override `ip`, `port`, or `timeout_value` if you are running outside a managed GRID session.

```python theme={null}
import airgen

drone = airgen.MultirotorClient()
car = airgen.CarClient()
quadruped = airgen.LeggedClient()
```

Each client shares the same pattern for enabling API control, arming motors, and issuing motion commands:

```python theme={null}
drone.enableApiControl(True)
drone.armDisarm(True)
drone.takeoffAsync().join()
```

All motion APIs accept an optional `robot_name`. When you omit it, AirGen operates on the first robot defined in the session configuration (alphabetical order), which keeps single-robot scripts concise while still supporting heterogeneous fleets.

### RobotClient Capabilities

`RobotClient` is the common base class for every robot type. It surfaces:

* Sensor retrieval (`simGetImages`, `getLidarData`, `getGpsData`, ...).
* Ground-truth queries (`simGetRobotPose`, `simGetGroundTruthKinematics`).
* Environment controls (`simSetWeatherParameter`, `simSetTimeOfDay`).
* Scene interaction helpers (object spawning, removal, tagging).

Instantiate it directly when you only need simulator-wide utilities:

```python theme={null}
sim = airgen.RobotClient()
state = sim.getImuData(robot_name="drone0")
```

### MultirotorClient Highlights

`MultirotorClient` adds 6-DoF flight primitives:

```python theme={null}
drone.takeoffAsync().join()
drone.moveByVelocityAsync(3.0, 0.0, 0.0, duration=2.0)
drone.rotateToYawAsync(90.0)
```

Use body-frame variants (`moveByVelocityBodyFrameAsync`, `moveByAngleRatesThrottleAsync`, *etc.*) when you need commands relative to the aircraft heading. VTOL nacelle control and gain tuning APIs are also available for advanced vehicles.

### CarClient Highlights

`CarClient` provides Ackermann and differential-drive commands:

```python theme={null}
from airgen import CarClient, CarControls

car = CarClient()
car.enableApiControl(True)
car.setCarControls(CarControls(throttle=0.4, steering=0.15))
car.getCarState()
```

Leverage dataset-friendly helpers such as `simPlotPath` and `simShowRoad` for autonomy workflows.

### LeggedClient Highlights

`LeggedClient` exposes step-based and Cartesian gait control for quadrupeds:

```python theme={null}
from airgen import LeggedClient

quadruped = LeggedClient()
quadruped.enableApiControl(True)
quadruped.standAsync().join()
quadruped.stepAsync(x=0.5, y=0.0, z=0.0).join()
```

Advanced APIs let you configure gait generators, body orientation targets, and joint gains, enabling precise locomotion research.

### Ground Truth

The airgen client also allows access to simulation ground truth.
For example, we can access the pose and kinematics for a specific robot via

```Python theme={null}
import airgen
client = airgen.RobotClient()
pose = client.simGetRobotPose(robot_name="drone0")
kinematics = client.simGetGroundTruthKinematics(robot_name="drone0")
```

where `simGetRobotPose` returns a [Pose object](/simulation/airgen/reference/datatypes#pose) consisting of 3D position and quaternion vectors, and `simGetGroundTruthKinematics` returns a [KinematicsState object](/simulation/airgen/reference/datatypes#kinematicsstate) made up of pose, twist, and acceleration.

### Multi-Robot Control Patterns

To coordinate multiple robots, reuse a single client instance and pass the appropriate `robot_name` per call. For example, with a multirotor fleet:

```python theme={null}
import airgen

client = airgen.MultirotorClient()

def takeoff_and_pan(client, robots):
    for name in robots:
        client.enableApiControl(True, robot_name=name)
        client.armDisarm(True, robot_name=name)
        client.takeoffAsync(robot_name=name)
    for name in robots:
        client.moveByVelocityAsync(3.0, 0.0, 0.0, 2.0, robot_name=name)
        client.rotateToYawAsync(90.0, robot_name=name)

takeoff_and_pan(client, ["drone0", "drone1"])
```

This pattern issues independent commands per robot while sharing the same connection. When you omit `robot_name` in a call, the first robot from the session settings (alphabetically sorted) is used.

### Environment

The client also provides access to the simulation environment, including object interactions, weather, time of day, *etc.* as detailed in the [Environment](/simulation/airgen/features/environment) section.

### Robot-Specific Interface

The `MultirotorClient`, `CarClient`, and `LeggedClient` classes provide additional, form-factor specific controls and functionality on top of `RobotClient`.
These additional features are described in the [MultirotorClient](/simulation/airgen/reference/multirotor-client), [CarClient](/simulation/airgen/reference/car-client), and [LeggedClient](/simulation/airgen/reference/legged-client) reference pages.
