Skip to main content

__init__

Initializes the VehicleClient
str, optional
IP address of the server, defaults to localhost
int, optional
Port number of the server, defaults to 41451
int, optional
Timeout value for the connection, defaults to 3600
bool, optional
Whether to run the client in background, defaults to False. When true, this client does not print info unless necessary.

reset

Reset the vehicle to its original starting stateNote that you must call enableApiControl and armDisarm again after the call to reset

ping

If connection is established then this call will return true otherwise it will be blocked until timeout
bool
bool

getClientVersion

No description provided!

getServerVersion

No description provided!

getMinRequiredServerVersion

No description provided!

getMinRequiredClientVersion

No description provided!

enableApiControl

Enables or disables API control for vehicle corresponding to vehicle_name
bool
True to enable, False to disable API control
str, optional
Name of the vehicle to send this command to

isApiControlEnabled

Returns true if API control is established.If false (which is default) then API calls would be ignored. After a successful call to enableApiControl, isApiControlEnabled should return true.
str, optional
Name of the vehicle
bool
If API control is enabled

armDisarm

Arms or disarms vehicle
bool
True to arm, False to disarm the vehicle
str, optional
Name of the vehicle to send this command to
bool
Success

simPause

Pauses simulation
bool
True to pause the simulation, False to release

simIsPause

Returns true if the simulation is paused
bool
If the simulation is paused

simContinueForTime

Continue the simulation for the specified number of seconds
float
Time to run the simulation for

simContinueForFrames

Continue (or resume if paused) the simulation for the specified number of frames, after which the simulation will be paused.
int
Frames to run the simulation for

getHomeGeoPoint

Get the Home location of the vehicle
str, optional
Name of vehicle to get home location of
GeoPoint
Home location of the vehicle

confirmConnection

Checks state of connection every 1 sec and reports it in Console so user can see the progress for connection.

simSetLightIntensity

Change intensity of named light
str
Name of light to change
float
New intensity value
bool
True if successful, otherwise False

simSwapTextures

Runtime Swap Texture API
str
string of ”,” or ”, ” delimited tags to identify on which actors to perform the swap
int, optional
indexes the array of textures assigned to each actor undergoing a swap
int, optional
component_id
int, optional
material_id
list[str]
List of objects which matched the provided tags and had the texture swap perfomed

simSetObjectMaterial

Runtime Swap Texture API
str
name of object to set material for
str
name of material to set for object
bool
True if material was set

simSetObjectMaterialFromTexture

Runtime Swap Texture API
str
name of object to set material for
str
path to texture to set for object
bool
True if material was set

simSetObjectMaterialFromTextureURL

Runtime Swap Texture API
str
name of object to set material for
str
url for texture to set for object
bool
True if material was set

simSetTimeOfDay

Control the position of Sun in the environmentSun’s position is computed using the coordinates specified in OriginGeopoint in settings for the date-time specified in the argument, else if the string is empty, current date & time is used
bool
True to enable time-of-day effect, False to reset the position to original
str, optional
Date & Time in %Y-%m-%d %H:%M:%S format, e.g. 2018-02-12 15:20:00
bool, optional
True to adjust for Daylight Savings Time
float, optional
Run celestial clock faster or slower than simulation clock
float, optional
Interval to update the Sun’s position
bool, optional
Whether or not to move the Sun

simEnableWeather

Enable Weather effects. Needs to be called before using simSetWeatherParameter API
bool
True to enable, False to disable

simSetWeatherParameter

Enable various weather effects
WeatherParameter
(WeatherParameter): Weather effect to be enabled
float
Intensity of the effect, Range 0-1

simGetImage

Get a single imageReturns bytes of png format image which can be dumped into abinary file to create .png image string_to_uint8_array() can be used to convert into Numpy unit8 array
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
ImageType
(ImageType): Type of image required
str, optional
Name of the vehicle with the camera
bool, optional
Whether the camera is an External Camera
bool, optional
Whether to capture 3D images (default: False).
bool, optional
Whether to capture cubemap images otherwise equirectangular (default: False).
Binary
string literal of compressed png image

getImages

Get multiple images
list[ImageType]
list[ImageType]: Images required
str, optional
Name of vehicle associated with the camera
bool, optional
Whether to capture 3D images (default: False).
bool, optional
Whether to capture cubemap images otherwise equirectangular (default: False).
list[ImageResponse]

simGetImages

Get multiple images
list[ImageRequest]
list[ImageRequest]: Images required
str, optional
Name of vehicle associated with the camera
bool, optional
Whether the camera is an External Camera
bool, optional
Whether to capture 3D images (default: False).
bool, optional
Whether to capture cubemap images otherwise equirectangular (default: False).
list[ImageResponse]

simGetImagesAlongTrajectory

Get images along a trajectory (specified by position and pose) when
list[Pose]
list[Pose]: A list of poses of the vehicle, at which images are to be requested
list[ImageRequest]
list[ImageRequest]: Images required
str, optional
Name of vehicle associated with the camera
bool, optional
Whether the camera is an External Camera, defaults to False
bool, optional
Whether to capture 3d images (default: False).
bool, optional
Whether to capture cubemap images otherwise equirectangular (default: False).
list[ImageResponse]

simGetPresetLensSettings

Get the preset lens settings for the camera
str
camera name
str, optional
vechile name. Defaults to "".
bool, optional
Whether the camera is an External Camera. Defaults to False.
_type_
description

simGetLensSettings

Get the lens settings for the camera
str
camera name
str, optional
vechile name. Defaults to "".
bool, optional
Whether the camera is an External Camera. Defaults to False.

simSetPresetLensSettings

No description provided!

simGetPresetFilmbackSettings

No description provided!

simSetPresetFilmbackSettings

No description provided!

simGetFilmbackSettings

No description provided!

simSetFilmbackSettings

No description provided!

simGetFocalLength

No description provided!

simSetFocalLength

No description provided!

simEnableManualFocus

No description provided!

simGetFocusDistance

No description provided!

simSetFocusDistance

No description provided!

simGetFocusAperture

No description provided!

simSetFocusAperture

No description provided!

simEnableFocusPlane

No description provided!

simGetCurrentFieldOfView

No description provided!

simTestLineOfSightToPoint

Returns whether the target point is visible from the perspective of the inputted vehicle
GeoPoint
(GeoPoint): target point
str, optional
Name of vehicle
bool
Success

simTestLineOfSightBetweenPoints

Returns whether the target point is visible from the perspective of the source point
GeoPoint
(GeoPoint): source point
GeoPoint
(GeoPoint): target point
bool
Success

simGetWorldExtents

Returns a list of GeoPoints representing the minimum and maximum extents of the world
list[GeoPoint]
list[GeoPoint]

simRunConsoleCommand

Allows the client to execute a command in Unreal’s native console, via an API. Affords access to the countless built-in commands such as “stat unit”, “stat fps”, “open [map]”, adjust any config settings, etc. etc. Allows the user to create bespoke APIs very easily, by adding a custom event to the level blueprint, and then calling the console command “ce MyEventName [args]”. No recompilation of airgen needed!
[string]
Desired Unreal Engine Console command to run
bool
Success

simGetMeshPositionVertexBuffers

Returns the static meshes that make up the scene
list[MeshPositionVertexBuffersResponse]
list[MeshPositionVertexBuffersResponse]

simGetCollisionInfo

No description provided!
str, optional
Name of the Vehicle to get the info of. This call will also reset the collision info (state of the vehicle) to False.
CollisionInfo
CollisionInfo

simSetVehiclePose

Set the pose of the vehicleIf you don’t want to change position (or orientation) then just set components of position (or orientation) to floating point nan values
Pose
(Pose): Desired Pose pf the vehicle
bool
Whether to ignore any collision or not
str, optional
Name of the vehicle to move
bool, optional
Whether to set the vehicle’s altitude to ground level while setting its position
float, optional
From what distance above the Vehicle’s current altitude do we start looking for the ground (default is 13 KM)
float, optional
How much distance below the Vehicles’s current altitude do we stop looking for the ground (default is 13 KM)
int, optional
Timeout to find ground location (if on_ground is True)
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

simSetVehicleGeoPose

Set the pose of the vehicleIf you don’t want to change position (or orientation) then just set components of position (or orientation) to floating point nan values
Pose
(Pose): Desired Pose pf the vehicle
bool
Whether to ignore any collision or not
str, optional
Name of the vehicle to move
bool, optional
Whether to set the vehicle’s altitude to ground level while setting its position
float, optional
From what distance above the Vehicle’s current altitude do we start looking for the ground (default is 13 KM)
float, optional
How much distance below the Vehicles’s current altitude do we stop looking for the ground (default is 13 KM)
int, optional
Timeout to find ground location (if on_ground is True)
msgpackrpc.future.Future
future. call .join() to wait for method to finish.

simSetGeoReference

Set the geo reference of the scene (only valid for Cesium)
GeoPoint
(GeoPoint): Desired GeoPoint of the scene

simGetVehiclePose

The position inside the returned Pose is in the frame of the vehicle’s starting point
str, optional
Name of the vehicle to get the Pose of
Pose
pose (position and quaternion) of the vehicle

simSetTraceLine

Modify the color and thickness of the line when Tracing is enabledTracing can be enabled by pressing T in the Editor or setting EnableTrace to True in the Vehicle Settings
list
desired RGBA values from 0.0 to 1.0
float, optional
Thickness of the line
string, optional
Name of the vehicle to set Trace line values for

simGetObjectPose

The position inside the returned Pose is in the world frame
str
Object to get the Pose of
Pose
pose (position and quaternion) of the object

simSetObjectPose

Set the pose of the object(actor) in the environmentThe specified actor must have Mobility set to movable, otherwise there will be undefined behaviour. See https://www.unrealengine.com/en-US/blog/moving-physical-objects for details on how to set Mobility and the effect of Teleport parameter
str
Name of the object(actor) to move
Pose
(Pose): Desired Pose of the object
bool, optional
Whether to move the object immediately without affecting their velocity
bool
If the move was successful

simSetObjectGeoPose

Set the pose of the object(actor) in the environmentThe specified actor must have Mobility set to movable, otherwise there will be undefined behaviour. See https://www.unrealengine.com/en-US/blog/moving-physical-objects for details on how to set Mobility and the effect of Teleport parameter
str
Name of the object(actor) to move
Pose
(Pose): Desired Pose of the object
bool, optional
Whether to move the object immediately without affecting their velocity
bool
If the move was successful

simGetObjectScale

Gets scale of an object in the world
str
Object to get the scale of
airgen.Vector3r
Scale

simSetObjectScale

Sets scale of an object in the world
str
Object to set the scale of
airgen.Vector3r
Desired scale of object
bool
True if scale change was successful

simGetObjectDimensions

Gets bounds of an object in the world
str
Object to get the bounds of
airgen.Vector3r
Extents in X, Y, Z

simGetObjectCenter

Gets the center of an object in the world
str
Object to get the center of
airgen.Vector3r
Center position

simListSceneObjects

Lists the objects present in the environmentDefault behaviour is to list all objects, regex can be used to return smaller list of matching objects or actors
str, optional
String to match actor names against, e.g. “Cylinder.*”
list[str]
List containing all the names

simListObjectsWithTag

Lists the objects present in the environment with the input tagRegex can be used to return a list of objects with matching tags
str
Tag to match actor tags against, e.g. “PalmTree” or ”.*Tree”
list[str]
List containing all the actor names

simLoadLevel

Loads a level specified by its name
str
Name of the level to load
bool
True if the level was successfully loaded

simListAssets

Lists all the assets present in the Asset Registry
list[str]
Names of all the assets

simSpawnObject

Spawned selected object in the world
str
Desired name of new object
str
Name of asset(mesh) in the project database
airgen.Pose
Desired pose of object
airgen.Vector3r
Desired scale of object
bool, optional
Whether to enable physics for the object
bool, optional
Whether to spawn a blueprint or an actor
str
Name of spawned object, in case it had to be modified

simSpawnObjectFromPath

Spawned selected object in the world
str
Desired name of new object
str
Name of asset(mesh) in the project database
airgen.Pose, optional
Desired pose of object, default is Pose() (no rotation or translation)
airgen.Vector3r, optional
Desired scale of object, default is Vector3r(1,1,1) (no scaling)
bool, optional
Whether the object should be unlit (default is False)
bool, optional
Whether to enable physics for the object (default is False)
bool, optional
Whether to use a complex mesh for collision detection (default is False)
bool, optional
Whether the object should have navigation enabled (default is False)
bool
True if object was spawned, False otherwise

simSpawnObjectFromURL

Spawned selected object in the world
str
Desired name of new object
str
Name of asset(mesh) in the project database
airgen.Pose, optional
Desired pose of object, default is Pose() (no rotation or translation)
airgen.Vector3r, optional
Desired scale of object, default is Vector3r(1,1,1) (no scaling)
bool, optional
Whether the object should be unlit (default is False)
bool, optional
Whether to enable physics for the object (default is False)
bool, optional
Whether to use a complex mesh for collision detection (default is False)
bool, optional
Whether the object should have navigation enabled (default is False)
bool
True if object was spawned, False otherwise

simDestroyObject

Removes selected object from the world
str
Name of object to be removed
bool
True if object is queued up for removal

simSetSegmentationObjectID

Set segmentation ID for specific objects
str
Name of the mesh to set the ID of (supports regex)
int
Object ID to be set, range 0-255.
bool, optional
Whether the mesh name is a regex. If True, all meshes matching the regex will be set to the same ID
bool
If the mesh was found

simSetSegmentationInstanceID

Set segmentation ID for specific instances
str
Name of the mesh to set the ID of (supports regex)
int
start of instance ID to be set, range 0-255. Gets incremented each time for each instance (mesh)
bool, optional
Whether the mesh name is a regex
int
number of instances (meshes) matched with mesh_id updated

simGetSegmentationObjectID

Returns Object ID for the given mesh name (case-sensitive)
str
Name of the mesh to get the ID of
int
Object ID of the mesh

simAddDetectionFilterMeshName

Add mesh name to detect in wild card formatFor example: simAddDetectionFilterMeshName(“Car_”) will detect all instance named “Car_
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
ImageType
(ImageType): Type of image required
str
mesh name in wild card format
str, optional
Vehicle which the camera is associated with
bool, optional
Whether the camera is an External Camera

simSetDetectionFilterRadius

Set detection radius for all cameras
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
ImageType
(ImageType): Type of image required
int
Radius in [cm]
str, optional
Vehicle which the camera is associated with
bool, optional
Whether the camera is an External Camera

simClearDetectionMeshNames

Clear all mesh names from detection filter
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
ImageType
(ImageType): Type of image required
str, optional
Vehicle which the camera is associated with
bool, optional
Whether the camera is an External Camera

simGetDetections

Get current detections
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
ImageType
(ImageType): Type of image required
str, optional
Vehicle which the camera is associated with
bool, optional
Whether the camera is an External Camera
list[DetectionInfo]
List of detections

simPrintLogMessage

Prints the specified message in the simulator’s window.If message_param is supplied, then it’s printed next to the message and in that case if this API is called with same message value but different message_param again then previous line is overwritten with new line (instead of API creating new line on display).For example, simPrintLogMessage("Iteration: ", to_string(i)) keeps updating same line on display when API is called with different values of i. The valid values of severity parameter is 0 to 3 inclusive that corresponds to different colors.
str
Message to be printed
str, optional
Parameter to be printed next to the message
int, optional
Range 0-3, inclusive, corresponding to the severity of the message

simGetCameraInfo

Get details about the camera
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
str, optional
Vehicle which the camera is associated with
bool, optional
Whether the camera is an External Camera
CameraInfo
camera info

simGetDistortionParams

Get camera distortion parameters
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
str, optional
Vehicle which the camera is associated with
bool, optional
Whether the camera is an External Camera
List
(float): List of distortion parameter values corresponding to K1, K2, K3, P1, P2 respectively.

simSetDistortionParams

Set camera distortion parameters
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
dict
Dictionary of distortion param names and corresponding values
str, optional
Vehicle which the camera is associated with
bool, optional
Whether the camera is an External Camera

simSetDistortionParam

Set single camera distortion parameter
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
str
Name of distortion parameter
float
Value of distortion parameter
str, optional
Vehicle which the camera is associated with
bool, optional
Whether the camera is an External Camera

simSetCameraPose

  • Control the pose of a selected camera
str
Name of the camera to be controlled
Pose
(Pose): Pose representing the desired position and orientation of the camera
str, optional
Name of vehicle which the camera corresponds to
bool, optional
Whether the camera is an External Camera

simSetCameraFov

  • Control the field of view of a selected camera
str
Name of the camera to be controlled
float
Value of field of view in degrees
str, optional
Name of vehicle which the camera corresponds to
bool, optional
Whether the camera is an External Camera

simCameraLookAt

  • Control the pose of a selected camera
str
Name of the camera to be controlled
Pose
(Pose): Pose representing the desired position the camera has to observe
str, optional
Name of vehicle which the camera corresponds to
bool, optional
Whether the camera is an External Camera

simGetGroundTruthKinematics

Get Ground truth kinematics of the vehicleThe position inside the returned KinematicsState is in the frame of the vehicle’s starting point
str, optional
Name of the vehicle
KinematicsState
Ground truth of the vehicle

simSetKinematics

Set the kinematics state of the vehicleIf you don’t want to change position (or orientation) then just set components of position (or orientation) to floating point nan values
KinematicsState
(KinematicsState): Desired Pose pf the vehicle
bool
Whether to ignore any collision or not
str, optional
Name of the vehicle to move

simGetGroundTruthEnvironment

Get ground truth environment stateThe position inside the returned EnvironmentState is in the frame of the vehicle’s starting point
str, optional
Name of the vehicle
EnvironmentState
Ground truth environment state

getImuData

No description provided!
str, optional
Name of IMU to get data from, specified in settings.json
str, optional
Name of vehicle to which the sensor corresponds to
ImuData
IMU data

getBarometerData

No description provided!
str, optional
Name of Barometer to get data from, specified in settings.json
str, optional
Name of vehicle to which the sensor corresponds to
BarometerData
Barometer data

getMagnetometerData

No description provided!
str, optional
Name of Magnetometer to get data from, specified in settings.json
str, optional
Name of vehicle to which the sensor corresponds to
MagnetometerData
Magnetometer data

getGpsData

No description provided!
str, optional
Name of GPS to get data from, specified in settings.json
str, optional
Name of vehicle to which the sensor corresponds to
GpsData
GPS data

getDistanceSensorData

No description provided!
str, optional
Name of Distance Sensor to get data from, specified in settings.json
str, optional
Name of vehicle to which the sensor corresponds to
DistanceSensorData
Distance sensor data

getLidarData

No description provided!
str, optional
Name of Lidar to get data from, specified in settings.json
str, optional
Name of vehicle to which the sensor corresponds to
LidarData
LiDAR data

simGetLidarSegmentation

NOTE: Deprecated API, use getLidarData() API instead Returns Segmentation ID of each point’s collided object in the last Lidar update
str, optional
Name of Lidar sensor
str, optional
Name of the vehicle wth the sensor
list[int]
Segmentation IDs of the objects

simFlushPersistentMarkers

Clear any persistent markers - those plotted with setting is_persistent=True in the APIs below

simPlotPoints

Plot a list of 3D points in World NED frame
list[Vector3r]
list[Vector3r]: List of Vector3r objects
list, optional
desired RGBA values from 0.0 to 1.0
float, optional
Size of plotted point
float, optional
Duration (seconds) to plot for
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotLineStrip

Plots a line strip in World NED frame, defined from points[0] to points[1], points[1] to points[2], … , points[n-2] to points[n-1]
list[Vector3r]
list[Vector3r]: List of 3D locations of line start and end points, specified as Vector3r objects
list, optional
desired RGBA values from 0.0 to 1.0
float, optional
Thickness of line
float, optional
Duration (seconds) to plot for
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotLineList

Plots a line strip in World NED frame, defined from points[0] to points[1], points[2] to points[3], … , points[n-2] to points[n-1]
list[Vector3r]
list[Vector3r]: List of 3D locations of line start and end points, specified as Vector3r objects. Must be even
list, optional
desired RGBA values from 0.0 to 1.0
float, optional
Thickness of line
float, optional
Duration (seconds) to plot for
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotArrows

Plots a list of arrows in World NED frame, defined from points_start[0] to points_end[0], points_start[1] to points_end[1], … , points_start[n-1] to points_end[n-1]
list[Vector3r]
list[Vector3r]: List of 3D start positions of arrow start positions, specified as Vector3r objects
list[Vector3r]
list[Vector3r]: List of 3D end positions of arrow start positions, specified as Vector3r objects
list, optional
desired RGBA values from 0.0 to 1.0
float, optional
Thickness of line
float, optional
Size of arrow head
float, optional
Duration (seconds) to plot for
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotStrings

Plots a list of strings at desired positions in World NED frame.
list[String], optional
List of strings to plot
list[Vector3r]
list[Vector3r]: List of positions where the strings should be plotted. Should be in one-to-one correspondence with the strings’ list
float, optional
Font scale of transform name
list, optional
desired RGBA values from 0.0 to 1.0
float, optional
Duration (seconds) to plot for

simPlotTransforms

Plots a list of transforms in World NED frame.
list[Pose]
list[Pose]: List of Pose objects representing the transforms to plot
float, optional
Length of transforms’ axes
float, optional
Thickness of transforms’ axes
float, optional
Duration (seconds) to plot for
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotTransformsWithNames

Plots a list of transforms with their names in World NED frame.
list[Pose]
list[Pose]: List of Pose objects representing the transforms to plot
list[string]
List of strings with one-to-one correspondence to list of poses
float, optional
Length of transforms’ axes
float, optional
Thickness of transforms’ axes
float, optional
Font scale of transform name
list, optional
desired RGBA values from 0.0 to 1.0 for the transform name
float, optional
Duration (seconds) to plot for

startRecording

Start RecordingRecording will be done according to the settings

stopRecording

Stop Recording

isRecording

Whether Recording is running or not
bool
True if Recording, else False

simSetWind

Set simulated wind, in World frame, NED direction, m/s
Vector3r
(Vector3r): Wind, in World frame, NED direction, in m/s

simCreateVoxelGrid

Construct and save a binvox-formatted voxel grid of environment
Vector3r
(Vector3r): Position around which voxel grid is centered in m
float
Resolution of voxel grid in m
str
Name of output file to save voxel grid as
bool
True if output written to file successfully, else False

simBuildSDF

Construct a signed distance field of the environment centered at position, and with dimensions (x, y, z). Internally, the SDF is stored as a special case of a voxel grid with floating point distances instead of boolean occupancy.
Vector3r
(Vector3r): Global position around which field is centered in m
float
Resolution of distance field in m

simCheckOccupancy

Check and return occupancy of a point. Requires signed distance field to be built beforehand.
Vector3r
(Vector3r): Global position at which occupancy is to be checked (m)

simGetSignedDistance

Get signed distance of a point (distance to the closest ‘object surface’) in the environment. Requires signed distance field to be built beforehand.Distance is positive if the point is in free space, and negative if the point is inside an object.
Vector3r
(Vector3r): Global position at which distance is to be computed (m)
dist
(float): Signed distance at the position

simGetSignedDistances

Get signed distance of a list of points (distance to the closest ‘object surface’) in the environment. Requires signed distance field to be built beforehand.Distance is positive if the point is in free space, and negative if the point is inside an object.
list
List of global positions at which distance is to be computed (m)
dists
(list[float]): Signed distances at the positions

simGetSDFGradient

Get the SDF gradient at a point (vector pointing away from the closest ‘object surface’) in the environment. Requires signed distance field to be built beforehand.
Vector3r
(Vector3r): Global position at which gradient is to be computed (m)
gradient
Vector3r: SDF gradient at the position

simCheckInVolume

Check if a point is inside a volume.
Vector3r
(Vector3r): Global position at which volume is to be checked (m)
str
Name of the volume object

simProjectToFreeSpace

Project a given point into free space using the SDF, with a specified minimum clearance from existing objects. Returns the same point if the point is already free, else follows the SDF gradient to find a free point that satisfies the minimum distance constraint.
Vector3r
(Vector3r): Global position to project (m)
float
Minimum distance from objects to satisfy when finding the free point
free_pt
Vector3r: Projected position in free space

simSaveSDF

Save the constructed signed distance field to a file.
str
Filename to save the SDF to

simLoadSDF

Load a saved signed distance field.
str
Filename to load the SDF from

simGetRandomFreePoint

Return a random free (unoccupied) point within a radius around the vehicle.
float
Radius around the vehicle to search for a free point in m
Vector3r
/None: Free/unoccupied point coordinates if successful, else None

simPlanPathToRandomFreePoint

Plan a collision-free path to a random point within a radius around the vehicle and return the intermediate waypoints.
float
Radius around the vehicle to search for a free point in m
bool
Returns a smooth spline if True, else returns a list of coarse waypoints
bool
Draws the path in the Unreal environment if True
list[Vector3r]
List of waypoints if successful, else empty list

simPlanPathToRandomizeGoal

Plan a collision-free path from the current position to a random point within a radius around the goal and return the intermediate waypoints.
Vector3r
(Vector3r): Start position in airgen coordinates
Vector3r
(Vector3r): Goal position in airgen coordinates
float
Radius around the vehicle to search for a free point in m
int
number of random points to query for a free point
bool
Returns a smooth spline if True, else returns a list of coarse waypoints
bool
Draws the path in the Unreal environment if True
list[Vector3r]
List of waypoints if successful, else empty list

simPlanPath

Plan a collision-free path between start and goal points and return the intermediate waypoints.
Vector3r
(Vector3r): Start position in airgen coordinates
Vector3r
(Vector3r): Goal position in airgen coordinates
bool
Returns a smooth spline if True, else returns a list of coarse waypoints
bool
Draws the path in the Unreal environment if True
list[Vector3r]
List of waypoints if successful, else empty list

getNavMeshInfo

Get NavMesh information, as an array of XYZ center, min and max values in global NED coordinates
list[Vector3r]
List of values if successful, else empty list

isPointInCollision

Get Collision information about a point. Returns True if point is in collision, else False
Vector3r
(Vector3r): Point to be checked in airgen coordinates
bool
True if point is in collision, else False

isAnyPointInCollisionBatch

Get Collision information about an array of points. Returns True if any of the points is in collision, else False
list[Vector3r]
list[Vector3r]: List of points to be checked in airgen coordinates
bool
True if any of the points is in collision, else False

simAddVehicle

Create vehicle at runtime
str
Name of the vehicle being created
str
Type of vehicle, e.g. “simpleflight”
Pose
(Pose): Initial pose of the vehicle
str, optional
Vehicle blueprint path, default empty wbich uses the default blueprint for the vehicle type
bool
Whether vehicle was created

listVehicles

Lists the names of current vehicles
list[str]
List containing names of all vehicles

getSettingsString

Fetch the settings text being used by airgen
str
Settings text in JSON format

simCreateWaypoint

Creates a waypoint using the vehicle transform. The created waypoint will be associated with the specified waypoints-context.If context isn’t specified, it’ll default to the last-used context. If there’s no context present and context isn’t specified, a context named ‘defaultWaypoints’ will be auto created.
str, optional
Name of the vehicle
str, optional
Name of the associated waypoints-context

simCreateWaypointFromPose

Creates a waypoint using the vehicle transform. The created waypoint will be associated with the specified waypoints-context.If context isn’t specified, it’ll default to the last-used context. If there’s no context present and context isn’t specified, a context named ‘defaultWaypoints’ will be auto created.
str, optional
Name of the vehicle
str, optional
Name of the associated waypoints-context

simDeleteWaypoints

Deletes waypoints for a specified contextIf ‘only_recent’ is True, it’ll delete the youngest waypoint of the specified waypoints-context. If ‘only_recent’ is False, it’ll delete all waypoints for the specified context.If context isn’t specified, it’ll default to the last-used context. If context isn’t specified and there’s no last-used context, it’ll throw an error.
str, optional
Name of the associated waypoints-context
bool, optional
Whether to delete only the youngest waypoint or all of them, for a context
bool, optional
If this is False, the context and all its associated waypoints will be deleted

simDeleteAllWaypoints

Deletes all waypoints and all waypoint-contexts

simGetWaypointDataAsCsv

Get the waypoints data of a waypoints-context as a CSV formatted string. If context isn’t specified, it’ll default to the last-used context. If context isn’t specified and there’s no last-used context, it’ll throw an error.
str, optional
Name of the waypoints-context
waypoint_data
(str): Waypoint data as a CSV formatted string

simGetWaypointDataAsJson

Get the waypoints data of a waypoints-context as a JSON string. If context isn’t specified, it’ll default to the last-used context. If context isn’t specified and there’s no last-used context, it’ll throw an error.
str, optional
Name of the waypoints-context
waypoint_data
(str): Waypoint data as a JSON formatted string

simSetWaypointColor

Changes the color of a given waypoint. If context isn’t specified, it’ll default to the last-used context. If context isn’t specified and there’s no last-used context, it’ll throw an error.
list
desired RGB values from 0.0 to 1.0. e.g. [1, 1, 1]
int
The index of the Waypoint. The index of the first waypoint is 0.
str, optional
Name of the waypoints-context.
success
(bool): True if the color change was a success, false otherwise.

simResetWaypointColor

Resets the color of a given waypoint to the original. If context isn’t specified, it’ll default to the last-used context. If context isn’t specified and there’s no last-used context, it’ll throw an error.
int
The index of the Waypoint. The index of the first waypoint is 0.
str, optional
Name of the waypoints-context.
success
(bool): True if the color reset was a success, false otherwise.