Skip to main content

AirGenCar

Inherits from: WheeledRobot A wheeled robot implementation for the AirGen simulator. This class provides an interface to control a simulated car in the AirGen environment. It inherits from WheeledRobot and implements the necessary methods for movement, sensor data collection, and state management. The AirGenCar connects to the AirGen simulator and provides methods to:
  • Control the car’s movement through velocity commands
  • Get sensor data like camera images
  • Track and manage the car’s state
  • Reset and undo actions
To access the underlying AirGen API, use the AirGenCar.client field.

AirGenCar

Initialize the AirGenCar agent. Connects to the AirGen simulator, confirms the connection, enables API control, and initializes state tracking.

reset

setCarControls

Control the car using throttle, steering, brake
required
-1 to 1
required
0 to 1
required
0 to 1

setCarTargetSpeed

Set the target speed for the car
required
desired speed of the car

rotate

Rotate the car in place by applying handbrake and steering
required
Throttle rate to apply during rotation. Positive rotates right, negative rotates left
required
How long to rotate in seconds

getCarState

Get the current state of the car

getCarControls

Get the current control values of the car

getPosition

Get the current position of the car with respect to the world coordinate.

getOrientation

Return the current orientation of the car in radians

getImage

Return the image of camera (camera_name) with image type (image_type)
required
name of the camera, one of front_center or bottom_center
required
supported image types,
Imagerequested image

getVelocity

Get the velocity of the car

moveByVelocity (inherited)

Move the robot by setting linear and angular velocity.
required
VelocityLinear velocity object containing x_vel component
required
VelocityAngular velocity object containing z_vel component
defaults to None. Optional duration in seconds to move for before stopping. Defaults to None.