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

# AirGenQuad

## AirGenQuad

Inherits from: [`Quadruped`](/robot-api/reference/base/robot/quadruped/Quadruped)

AirGen simulation quadruped implementation.

This class provides an interface to control simulated quadruped robots in AirGen
using the CVMoverClient from the pyairgen library.

### Inherited methods

* From [`Quadruped`](/robot-api/reference/base/robot/quadruped/Quadruped): `setDefaultJointAngles`, `setDefaultJointVelocities`
* From [`Robot`](/robot-api/reference/base/robot/robot/Robot): `addSensor`

### **init**

```python theme={null}
AirGenQuad.__init__(ip: str = '127.0.0.1', port: int = 41481, timeout_value: int = 3600, robot_name: str = '')
```

Initialize a simulated AirGen quadruped client.

<ResponseField name="Arguments">
  <ParamField query="ip (str)" type="str">
    IP address of the AirGen server. (default: "127.0.0.1")
  </ParamField>

  <ParamField query="port (int)" type="int">
    Port number for the AirGen server. (default: 41481)
  </ParamField>

  <ParamField query="timeout_value (int)" type="int">
    Timeout value for the connection in seconds. (default: 3600)
  </ParamField>

  <ParamField query="robot_name (str)" type="str">
    Name of the robot in the simulation. (default: "")
  </ParamField>
</ResponseField>

### standUp

```python theme={null}
AirGenQuad.standUp() -> None
```

Command the robot to stand up.

This is typically handled automatically when the robot starts moving.
For explicit gait control, use the underlying CVMoverClient methods.

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### lieDown

```python theme={null}
AirGenQuad.lieDown() -> None
```

Command the robot to lie down.

CVMoverClient doesn't have an explicit lieDown command. Users can stop the
robot and it will settle into a stable pose.

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### getState

```python theme={null}
AirGenQuad.getState() -> dict
```

Get the current state of the quadruped.

<ResponseField name="Returns">
  <ResponseField name="dict" type="dict">
    Current state including position, orientation, and velocity.
  </ResponseField>
</ResponseField>

### getPosition

```python theme={null}
AirGenQuad.getPosition() -> Optional[Position]
```

Get the position of the quadruped in the world frame.

<ResponseField name="Returns">
  <ResponseField name="Optional[Position]" type="Optional[Position]">
    Current position of the quadruped in world coordinates.
  </ResponseField>
</ResponseField>

### getOrientation

```python theme={null}
AirGenQuad.getOrientation() -> Optional[Orientation]
```

Get the orientation of the quadruped in the world frame.

<ResponseField name="Returns">
  <ResponseField name="Optional[Orientation]" type="Optional[Orientation]">
    Current orientation as a quaternion (x, y, z, w).
  </ResponseField>
</ResponseField>

### moveByVelocity

```python theme={null}
AirGenQuad.moveByVelocity(linear_velocity: Velocity, angular_velocity: Velocity, frame: str = 'body', orient_to_movement: bool = True) -> None
```

Move the quadruped with a velocity command in m/s.

<ResponseField name="Arguments">
  <ParamField query="linear_velocity (Velocity)" type="Velocity" required>
    Linear velocity in m/s (x, y, z).
  </ParamField>

  <ParamField query="angular_velocity (Velocity)" type="Velocity" required>
    Angular velocity in rad/s (z\_vel used as direction angle).
  </ParamField>

  <ParamField query="frame (str)" type="str">
    Reference frame for velocity ("body" or "world"). (default: "body")
  </ParamField>

  <ParamField query="orient_to_movement (bool)" type="bool">
    Whether to orient the robot into the direction of movement. (default: True)
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### getJointAngles

```python theme={null}
AirGenQuad.getJointAngles() -> list[float]
```

Get current joint angles in radians.

CVMoverClient doesn't provide direct joint angle access in the standard API.
This would require accessing lower-level state information.

<ResponseField name="Returns">
  <ResponseField name="list[float]" type="list[float]">
    Current joint angles in radians.
  </ResponseField>
</ResponseField>

### setJointAngles

```python theme={null}
AirGenQuad.setJointAngles(angles: list, blocking: bool = True, moving_time: Optional[float] = None, accel_time: Optional[float] = None) -> None
```

Set joint angles in radians.

CVMoverClient doesn't provide direct joint angle control in the standard API.
The robot is controlled via velocity and position commands at a higher level.

<ResponseField name="Arguments">
  <ParamField query="angles (list)" type="list" required>
    List of target joint angles in radians.
  </ParamField>

  <ParamField query="blocking (bool)" type="bool">
    Wait for movement to complete. (default: True)
  </ParamField>

  <ParamField query="moving_time (Optional[float])" type="Optional[float]">
    Time to complete the movement in seconds.
  </ParamField>

  <ParamField query="accel_time (Optional[float])" type="Optional[float]">
    Time to accelerate/decelerate in seconds.
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### stop

```python theme={null}
AirGenQuad.stop() -> None
```

Soft e-stop for the robot.

Stops the robot from moving gracefully by sending zero velocity commands.
The API control is toggled off and on to reset the robot's internal
controller state and ensure all movement commands are cleared.

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### cleanup

```python theme={null}
AirGenQuad.cleanup() -> None
```

Clean up resources and disable API control.

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### getImage

```python theme={null}
AirGenQuad.getImage(camera_name: str = 'front_center', image_type: str = 'rgb') -> Image
```

Get an image from the specified camera.

<ResponseField name="Arguments">
  <ParamField query="camera_name (str)" type="str">
    Name of the camera in the AirGen scene. (default: "front\_center")
  </ParamField>

  <ParamField query="image_type (str)" type="str">
    Image type, one of ("rgb"|"depth"). (default: "rgb")
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="Image" type="Image">
    Captured image wrapped in the project's Image type.
  </ResponseField>
</ResponseField>
