Create a new car instance.
Unique vehicle name
Type of vehicle, default = PhysXCar
Vehicle blueprint path, when undefined uses the default blueprint for cars, PhysXCar
The low-level AirSim api and network connection.
Readonly
controllerReadonly
nameReadonly
pawnStatic
DEFAULT_Access the default controller (e.g., flight controller) of the vehicle.
Experimental - Rotate a camera to point towards a target position.
A Promise
The name or id of the camera to move.
The position to point camera towards.
Set True when camera is mounting looking towards the rear of the vehicle, default = false.
Experimental - Rotate a camera to point towards a target position.
A Promise
The name or id of the camera to move.
The position to point camera towards.
Set True when camera is mounting looking towards the rear of the vehicle, default = false.
Terminate the current task execution.
Promise
Clear a detection search
A Promise
Disables API control.
A Promise
Enables API control.
A Promise
Find the detections in the camera field of view defined by the search details
Array of object detections
Access the data from an barometer sensor.
The barometer sensor data
Name of barometer to get data from, specified in settings.json
Get details about the vehicle camera.
Note if the cameraName is unknown to airsim, the server may crash.
A CameraInfo promise
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
Get the vehicle's collision state.
The collision state info.
Get the current car control settings.
Promise
Get the names of the default cameras.
A Promise<string[]> of camera names.
Access distance sensor data.
The distance data
Name of distance sensor to get data from, specified in settings.json
Get ground truth environment state The position inside the returned EnvironmentState is in the frame of the vehicle's starting point
Ground truth environment state
Get ground-truth kinematics of the vehicle The position inside the returned KinematicsState is in the frame of the vehicle's starting point
Ground truth of the vehicle
Get the Home NED-frame location (north, east, down) of the vehicle.
The Home location of the vehicle
Get a single image in compressed PNG format.
Promise
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
Type of image
Get multiple images
for details and examples
The ImageResponse(s)
Images required
Access the data from an IMU sensor.
The IMU sensor data
Name of IMU to get data from, specified in settings.json
Access the data from a LIDAR sensor.
The LIDAR sensor data
Name of IMU to get data from, specified in settings.json
Access the data from an magnetometer sensor.
The magnetometer sensor data
Name of Magnetometer to get data from, specified in settings.json
Access the vehicle's Pose
The vehicle pose.
Get the car's state
Promise
Returns true if API control is established.
Promise
Control the field of view of a selected camera
A Promise
Name of the camera to be controlled
Value of field of view in degrees
Control the pose of a selected camera
A void promise to await on.
Name of the camera to be controlled
Pose representing the desired position and orientation of the camera
Command the car with a new set of control settings.
A Promise
The new settings.
Set the kinematics state of the vehicle If you don't want to change position (or orientation) then just set components of position (or orientation) to floating point nan values
Desired Pose pf the vehicle
Whether to ignore any collision or not
Set the pose of the vehicle.
A Promise
The new pose.
Whether to ignore any collision or not
Modify the color and thickness of the line when tracing is enabled.
Tracing can be enabled by pressing T in the Editor or
setting EnableTrace
to True
in the Vehicle Settings
A Promise
the RGBA tuple or CSS color name.
Thickness of the line
Configure a camera to perform a computer vision search and detection of specific mesh object(s).
A Promise
Example for detecting all instances named "Car_*"
startDetectionSearch(
{
camera: 'front_center',
image_type: ImageType.Scene,
meshName: 'Car_*'
}
);
The search details
Returns whether the target point is visible from the perspective of the vehicle
Promise
Target point
Wait on the current task being executed.
Promise
seconds to wait for task completion.
The AirSim Car vehicle. Provides access to car state and control api.