Skip to main content

__init__

RobotClient.__init__( ip="", port=41451, timeout_value=3600, run_in_background: bool = False, )
Initializes the RobotClient
Arguments
ip
str, optional
IP address of the server, defaults to localhost
port
int, optional
Port number of the server, defaults to 41451
timeout_value
int, optional
Timeout value for the connection, defaults to 3600
run_in_background
bool, optional
Whether to run the client in background, defaults to False. When true, this client does not print info unless necessary.
Unless otherwise noted, methods accept an optional robot_name argument. If left blank, AirGen targets the first robot defined in the session settings (alphabetical order).

reset

RobotClient.reset()
Reset the robot to its original starting stateNote that you must call enableApiControl and armDisarm again after the call to reset

ping

RobotClient.ping()
If connection is established then this call will return true otherwise it will be blocked until timeout
Returns
bool
bool
bool

getClientVersion

RobotClient.getClientVersion()
No description provided!

getServerVersion

RobotClient.getServerVersion()
No description provided!

getMinRequiredServerVersion

RobotClient.getMinRequiredServerVersion()
No description provided!

getMinRequiredClientVersion

RobotClient.getMinRequiredClientVersion()
No description provided!

enableApiControl

RobotClient.enableApiControl(is_enabled, robot_name="")
Enables or disables API control for robot corresponding to robot_name
Arguments
is_enabled
bool
True to enable, False to disable API control
robot_name
str, optional
Name of the robot to send this command to

isApiControlEnabled

RobotClient.isApiControlEnabled(robot_name="")
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.
Arguments
robot_name
str, optional
Name of the robot
Returns
bool
bool
If API control is enabled

armDisarm

RobotClient.armDisarm(arm, robot_name="")
Arms or disarms robot
Arguments
arm
bool
True to arm, False to disarm the robot
robot_name
str, optional
Name of the robot to send this command to
Returns
bool
bool
Success

simPause

RobotClient.simPause(is_paused)
Pauses simulation
Arguments
is_paused
bool
True to pause the simulation, False to release

simIsPause

RobotClient.simIsPause()
Returns true if the simulation is paused
Returns
bool
bool
If the simulation is paused

simContinueForTime

RobotClient.simContinueForTime(seconds)
Continue the simulation for the specified number of seconds
Arguments
seconds
float
Time to run the simulation for

simContinueForFrames

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

getHomeGeoPoint

RobotClient.getHomeGeoPoint(robot_name="")
Get the Home location of the robot
Arguments
robot_name
str, optional
Name of robot to get home location of
Returns
GeoPoint
GeoPoint
Home location of the robot

confirmConnection

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

simSwapTextures

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

simSetObjectMaterial

RobotClient.simSetObjectMaterial(object_name, material_name, component_id=0)
Runtime Swap Texture API
Arguments
object_name
str
name of object to set material for
material_name
str
name of material to set for object
Returns
bool
bool
True if material was set

simSetObjectMaterialFromTexture

RobotClient.simSetObjectMaterialFromTexture( object_name, texture_path, component_id=0 )
Runtime Swap Texture API
Arguments
object_name
str
name of object to set material for
texture_path
str
path to texture to set for object
Returns
bool
bool
True if material was set

simSetObjectMaterialFromTextureURL

RobotClient.simSetObjectMaterialFromTextureURL( object_name, url, component_id=0 )
Runtime Swap Texture API
Arguments
object_name
str
name of object to set material for
url
str
url for texture to set for object
Returns
bool
bool
True if material was set

simSetTimeOfDay

RobotClient.simSetTimeOfDay( is_enabled, start_datetime="", is_start_datetime_dst=False, celestial_clock_speed=1, update_interval_secs=60, move_sun=True, )
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
Arguments
is_enabled
bool
True to enable time-of-day effect, False to reset the position to original
start_datetime
str, optional
Date & Time in %Y-%m-%d %H:%M:%S format, e.g. 2018-02-12 15:20:00
is_start_datetime_dst
bool, optional
True to adjust for Daylight Savings Time
celestial_clock_speed
float, optional
Run celestial clock faster or slower than simulation clock
update_interval_secs
float, optional
Interval to update the Sun’s position
move_sun
bool, optional
Whether or not to move the Sun

simEnableWeather

RobotClient.simEnableWeather(enable: bool)
Enable/Disable Weather effects.
Arguments
enable
bool
True to enable, False to disable

simResetToAuthoredWeather

RobotClient.simResetToAuthoredWeather()
Reset all weather parameters to their original values as defined during scene authoring.

simSetWeatherParameter

RobotClient.simSetWeatherParameter(param:WeatherParameter, val:float)
Set intensity for various weather effects
Arguments
param
int
The weather effect to control.
val
float
Intensity of the effect, Range 0-1

simGetImage

RobotClient.simGetImage(camera_name, image_type, robot_name="", external=False, capture_3d=False, cubemap=False)
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
Arguments
camera_name
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
image_type
ImageType
ImageType: Type of image required
robot_name
str, optional
Name of the robot with the camera
external
bool, optional
Whether the camera is an External Camera
capture_3d
bool, optional
Whether to capture 3D images (default: False).
cubemap
bool, optional
Whether to capture cubemap images otherwise equirectangular (default: False).
Returns
Binary
Binary
string literal of compressed png image

getImages

RobotClient.getImages( camera_name, image_types: List[ImageType], robot_name="", capture_3d=False, cubemap=False )
Get multiple images
Arguments
image_types
list[ImageType]
list[ImageType]: Images required
robot_name
str, optional
Name of robot associated with the camera
capture_3d
bool, optional
Whether to capture 3D images (default: False).
cubemap
bool, optional
Whether to capture cubemap images otherwise equirectangular (default: False).
Returns
list[ImageResponse]
list[ImageResponse]
list[ImageResponse]

simGetImages

RobotClient.simGetImages( requests: ImageRequest, robot_name="", external=False, capture_3d=False, cubemap=False )
Get multiple images
Arguments
requests
list[ImageRequest]
list[ImageRequest]: Images required
robot_name
str, optional
Name of robot associated with the camera
external
bool, optional
Whether the camera is an External Camera
capture_3d
bool, optional
Whether to capture 3D images (default: False).
cubemap
bool, optional
Whether to capture cubemap images otherwise equirectangular (default: False).
Returns
list[ImageResponse]
list[ImageResponse]

simGetImagesAlongTrajectory

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

simGetPresetLensSettings

RobotClient.simGetPresetLensSettings( camera_name: str, robot_name: str = "", external: bool = False )
Get the preset lens settings for the camera
Arguments
camera_name
str
camera name
robot_name
str, optional
vechile name. Defaults to "".
external
bool, optional
Whether the camera is an External Camera. Defaults to False.
Returns
_type_
_type_
description

simGetLensSettings

RobotClient.simGetLensSettings( camera_name: str, robot_name: str = "", external=False )
Get the lens settings for the camera
Arguments
camera_name
str
camera name
robot_name
str, optional
vechile name. Defaults to "".
external
bool, optional
Whether the camera is an External Camera. Defaults to False.

simSetPresetLensSettings

RobotClient.simSetPresetLensSettings( preset_lens_settings, camera_name: str, robot_name: str = "", external=False, )
No description provided!

simGetPresetFilmbackSettings

RobotClient.simGetPresetFilmbackSettings( camera_name, robot_name="", external=False )
No description provided!

simSetPresetFilmbackSettings

RobotClient.simSetPresetFilmbackSettings( preset_filmback_settings, camera_name, robot_name="", external=False )
No description provided!

simGetFilmbackSettings

RobotClient.simGetFilmbackSettings(camera_name, robot_name="", external=False)
No description provided!

simSetFilmbackSettings

RobotClient.simSetFilmbackSettings( sensor_width, sensor_height, camera_name, robot_name="", external=False )
No description provided!

simGetFocalLength

RobotClient.simGetFocalLength(camera_name, robot_name="", external=False)
No description provided!

simSetFocalLength

RobotClient.simSetFocalLength( focal_length, camera_name, robot_name="", external=False )
No description provided!

simEnableManualFocus

RobotClient.simEnableManualFocus( enable, camera_name, robot_name="", external=False )
No description provided!

simGetFocusDistance

RobotClient.simGetFocusDistance(camera_name, robot_name="", external=False)
No description provided!

simSetFocusDistance

RobotClient.simSetFocusDistance( focus_distance, camera_name, robot_name="", external=False )
No description provided!

simGetFocusAperture

RobotClient.simGetFocusAperture(camera_name, robot_name="", external=False)
No description provided!

simSetFocusAperture

RobotClient.simSetFocusAperture( focus_aperture, camera_name, robot_name="", external=False )
No description provided!

simEnableFocusPlane

RobotClient.simEnableFocusPlane(enable, camera_name, robot_name="", external=False)
No description provided!

simGetCurrentFieldOfView

RobotClient.simGetCurrentFieldOfView(camera_name, robot_name="", external=False)
No description provided!

simTestLineOfSightToPoint

RobotClient.simTestLineOfSightToPoint(point, robot_name="")
Returns whether the target point is visible from the perspective of the inputted robot
Arguments
point
GeoPoint
target point
robot_name
str, optional
Name of robot
Returns
bool
bool
Success

simTestLineOfSightBetweenPoints

RobotClient.simTestLineOfSightBetweenPoints(point1, point2)
Returns whether the target point is visible from the perspective of the source point
Arguments
point1
GeoPoint
source point
point2
GeoPoint
target point
Returns
bool
bool
Success

simGetWorldExtents

RobotClient.simGetWorldExtents()
Returns a list of GeoPoints representing the minimum and maximum extents of the world
Returns
list[GeoPoint]
list[GeoPoint]
list[GeoPoint]

simRunConsoleCommand

RobotClient.simRunConsoleCommand(command)
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!
Arguments
command
[string]
Desired Unreal Engine Console command to run
Returns
bool
bool
Success

simGetMeshPositionVertexBuffers

RobotClient.simGetMeshPositionVertexBuffers()
Returns the static meshes that make up the scene
Returns
list[MeshPositionVertexBuffersResponse]
list[MeshPositionVertexBuffersResponse]
list[MeshPositionVertexBuffersResponse]

simGetCollisionInfo

RobotClient.simGetCollisionInfo(robot_name="")
No description provided!
Arguments
robot_name
str, optional
Name of the Robot to get the info of. This call will also reset the collision info (state of the robot) to False.
Returns
CollisionInfo
CollisionInfo
Data structure containing collision details for the specified robot.

simSetRobotPose

RobotClient.simSetRobotPose(pose:Pose, ignore_collision=True, sweep=False, robot_name="", bounds_trim=Vector3r(0.05, 0.05, 0.05), world_space=False, on_ground=False, ground_trace_range_up=GROUND_TRACE_RANGE_DEFAULT, ground_trace_range_down=GROUND_TRACE_RANGE_DEFAULT, timeout_sec=10)
Set the pose of the robotNote: When world_space is False (default), the pose is specified relative to the robot’s local coordinate frame, established at its initial position.
Arguments
pose
Pose
Desired Pose of the robot.
ignore_collision
bool, optional
Whether to ignore collision at the target pose.
sweep
bool, optional
Whether to sweep for collisions from the current pose to the target pose.
robot_name
str, optional
Name of the robot.
bounds_trim
Vector3r, optional
Amount to shrink the robot’s collision bounds when ignore_collision is False. Useful for fine-tuning collision detection and avoiding false positives at the edges.
world_space
bool, optional
Whether the input pose is in world coordinate frame.
on_ground
bool, optional
Whether to set the robot’s altitude to ground level while setting its position.
ground_trace_range_up
float, optional
From what distance above the Robot’s current altitude do we start looking for the ground (default is 13 KM).
ground_trace_range_down
float, optional
How much distance below the Robot’s current altitude do we stop looking for the ground (default is 13 KM).
timeout_sec
int, optional
Timeout to find ground location (if on_ground is True).
Returns
msgpackrpc.future.Future
msgpackrpc.future.Future
A future object that resolves to a bool, indicating whether the operation succeeded (True) or failed (False).
Call
Call
.join() to wait until the operation completes.

simSetRobotGeoPose

RobotClient.simSetRobotGeoPose(geopose:GeoPose, ignore_collision:bool, sweep=False, robot_name="", bounds_trim=Vector3r(0.05, 0.05, 0.05), on_ground=False, ground_trace_range_up=GROUND_TRACE_RANGE_DEFAULT, ground_trace_range_down=GROUND_TRACE_RANGE_DEFAULT, timeout_sec=10)
Set the Geodetic pose of the robot
Arguments
geopose
GeoPose
Desired Geodetic Pose of the robot
ignore_collision
bool
Whether to ignore collision at the target pose
sweep
bool, optional
Whether to sweep for collisions from the current pose to the target pose
robot_name
str, optional
Name of the robot
bounds_trim
Vector3r, optional
Amount to shrink the robot’s collision bounds when ignore_collision is False. Useful for fine-tuning collision detection and avoiding false positives at the edges.
on_ground
bool, optional
Whether to set the robot’s altitude to ground level while setting its position
ground_trace_range_up
float, optional
From what distance above the Robot’s current altitude do we start looking for the ground (default is 13 KM)
ground_trace_range_down
float, optional
How much distance below the Robot’s current altitude do we stop looking for the ground (default is 13 KM)
timeout_sec
int, optional
Timeout to find ground location (if on_ground is True)
Returns
msgpackrpc.future.Future
msgpackrpc.future.Future
A future object that resolves to a bool, indicating whether the operation succeeded (True) or failed (False).
Call
Call
.join() to wait until the operation completes.

simSetGeoReference

RobotClient.simSetGeoReference(geopoint:GeoPoint)
Updates the geo-reference of the simulation world (relevant for Georeferenced scenes only). Also updates the home geo-point of all robots in the simulation to match the new geo-reference.
Arguments
geopoint
GeoPoint
Desired Georeference

simGetGeoReference

RobotClient.simGetGeoReference()
Gets the current geo-reference of the simulation world (relevant for Georeferenced scenes only)
Returns
geopoint
geopoint
(GeoPoint): Georeference point

simGetRobotPose

RobotClient.simGetRobotPose(world_space=False, robot_name="")
Returns the Pose of the robotNote: When world_space is False (default), the returned pose is relative to the robot’s local coordinate frame, established at its initial position.
Arguments
world_space
bool, optional
Whether to return the pose in world coordinate frame
robot_name
str, optional
Name of the robot to get the Pose of
Returns
Pose
Pose
pose (position and orientation) of the robot

simSetTraceLine

RobotClient.simSetTraceLine(color_rgba, thickness=1.0, robot_name="")
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 Settings for the robot
Arguments
color_rgba
list
desired RGBA values from 0.0 to 1.0
thickness
float, optional
Thickness of the line
robot_name
string, optional
Name of the robot to set Trace line values for

simGetObjectPose

RobotClient.simGetObjectPose(object_name)
The position inside the returned Pose is in the world frame
Arguments
object_name
str
Object to get the Pose of
Returns
Pose
Pose
pose (position and orientation) of the object

simSetObjectPose

RobotClient.simSetObjectPose(object_name, pose, teleport=True)
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
Arguments
object_name
str
Name of the object(actor) to move
pose
Pose
Desired Pose of the object
teleport
bool, optional
Whether to move the object immediately without affecting their velocity
Returns
bool
bool
If the move was successful

simSetObjectGeoPose

RobotClient.simSetObjectGeoPose(object_name, geopose, teleport=True)
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
Arguments
object_name
str
Name of the object(actor) to move
pose
Pose
Desired Pose of the object
teleport
bool, optional
Whether to move the object immediately without affecting their velocity
Returns
bool
bool
If the move was successful

simGetObjectScale

RobotClient.simGetObjectScale(object_name)
Gets scale of an object in the world
Arguments
object_name
str
Object to get the scale of
Returns
airgen.Vector3r
airgen.Vector3r
Scale

simSetObjectScale

RobotClient.simSetObjectScale(object_name, scale_vector)
Sets scale of an object in the world
Arguments
object_name
str
Object to set the scale of
scale_vector
airgen.Vector3r
Desired scale of object
Returns
bool
bool
True if scale change was successful

simGetObjectDimensions

RobotClient.simGetObjectDimensions(object_name)
Gets bounds of an object in the world
Arguments
object_name
str
Object to get the bounds of
Returns
airgen.Vector3r
airgen.Vector3r
Extents in X, Y, Z

simGetObjectCenter

RobotClient.simGetObjectCenter(object_name)
Gets the center of an object in the world
Arguments
object_name
str
Object to get the center of
Returns
airgen.Vector3r
airgen.Vector3r
Center position

simListSceneObjects

RobotClient.simListSceneObjects(name_regex=".*")
Lists the objects present in the simulation environmentNote: Default behaviour is to list all objects, regex can be used to return smaller list of matching objects. Will return an empty list, if name_regex is empty.
Arguments
name_regex
str, optional
String to match object names against, e.g. “Cylinder.*”
Returns
list[str]
list[str]
List containing all the object names matching the regex

simListSceneObjectsByTag

RobotClient.simListSceneObjectsByTag(tag_regex=".*")
Lists the objects present in the environment matching the input tag regexNote: Default behaviour is to list all objects with atleast one tag, regex can be used to return a specific list of objects with matching tags. Will return an empty list, if tag_regex is empty.
Arguments
tag_regex
str
Tag to match object tags against, e.g. “ShinyRedBall” or ”.*Ball” or ”.Red.
Returns
list[str]
list[str]
List containing names of all objects with matching tags

simLoadLevel

RobotClient.simLoadLevel(level_name)
Loads a level specified by its name
Arguments
level_name
str
Name of the level to load
Returns
bool
bool
True if the level was successfully loaded

simListAssets

RobotClient.simListAssets(filter=".*")
Retrieves a list of asset names from the Asset Registry, optionally filtered by a regex pattern.Note: Default behaviour is to list all assets, regex can be used to return smaller list of matching assets. Will return an empty list, if filter is empty.
Arguments
filter
str, optional
Regex string to match asset names against, e.g. “Cylinder.*”
Returns
list[str]
list[str]
Names of all the assets

simSpawnObject

RobotClient.simSpawnObject( object_name, asset_name, object_tags=[], pose:Pose = Pose.ZERO, scale:Vector3r = Vector3r.ONE, physics_enabled:bool = False, )
Spawns an object in the world using an existing asset
Arguments
object_name
str
Desired name of new object
asset_name
str
Name of asset(mesh) in the project database
object_tags
list[String], optional
List of tags to assign the object
pose
airgen.Pose, optional
Desired pose of object in world space
scale
airgen.Vector3r, optional
Desired scale of object
physics_enabled
bool, optional
Whether to enable physics for the object (default is False)
Returns
str
str
Name of spawned object if Success, empty string on Failure

simSpawnObjectFromPath

RobotClient.simSpawnObjectFromPath(object_name, path, object_tags=[], pose:Pose = Pose.ZERO, scale:Vector3r = Vector3r.ONE, is_unlit:bool = False, physics_enabled:bool = False, complex_collision:bool = False, nav_enabled:bool = False )
Spawns an object in the sim using a glTF/glb file path
Arguments
object_name
str
Desired name of new object
path
str
Path to the desired glTF or glb asset
object_tags
list[String], optional
List of tags to assign the object
pose
airgen.Pose, optional
Desired pose of object in world space
scale
airgen.Vector3r, optional
Desired scale of object
is_unlit
bool, optional
Whether the object should be unlit (default is False)
physics_enabled
bool, optional
Whether to enable physics for the object (default is False)
complex_collision
bool, optional
Whether to use the mesh polygons for collision detection (default is False)
nav_enabled
bool, optional
Whether the object should have navigation enabled (default is False)
Returns
str
str
Name of spawned object if Success, empty string on Failure

simSpawnObjectFromURL

RobotClient.simSpawnObjectFromURL(object_name, url, object_tags=[], pose:Pose = Pose.ZERO, scale:Vector3r = Vector3r.ONE, is_unlit:bool = False, physics_enabled:bool = False, complex_collision:bool = False, nav_enabled:bool = False )
Spawns an object in the sim using a glb asset url
Arguments
object_name
str
Desired name of new object
url
str
URL address of the desired glb asset
object_tags
list[String], optional
List of tags to assign the object
pose
airgen.Pose, optional
Desired pose of object in world space
scale
airgen.Vector3r, optional
Desired scale of object
is_unlit
bool, optional
Whether the object should be unlit (default is False)
physics_enabled
bool, optional
Whether to enable physics for the object (default is False)
complex_collision
bool, optional
Whether to use the mesh polygons for collision detection (default is False)
nav_enabled
bool, optional
Whether the object should have navigation enabled (default is False)
Returns
str
str
Name of spawned object if Success, empty string on Failure

simSpawnLight

RobotClient.simSpawnLight( name, properties:LightProperties, mobility=RenderingMobility.Dynamic_Stationary, tags=[], pose:Pose = Pose.ZERO, )
Spawns a light in the world with the specified properties
Arguments
name
str
Desired name of the new light object
properties
LightProperties
Light properties to set (see LightProperties)
mobility
int, optional
Rendering mobility type (default is Dynamic_Stationary, see RenderingMobility)
tags
list[str], optional
List of tags to assign the object
pose
airgen.Pose, optional
Desired pose of light in world space
Returns
str
str
Name of spawned light if Success, empty string on Failure

simSetLightProperties

RobotClient.simSetLightProperties(light_name, properties:LightProperties)
Change properties of named light
Arguments
light_name
str
Name of light to change
properties
LightProperties
New LightProperties to apply to the light
Returns
bool
bool
True if successful, otherwise False

simSetLightEnabled

RobotClient.simSetLightEnabled(light_name, value:bool)
Enable or disable the specified light
Arguments
light_name
str
Name of light to enable/disable
value
bool
True to enable, False to disable
Returns
bool
bool
True if successful, otherwise False

simSetLightIntensity

RobotClient.simSetLightIntensity(light_name, value, unit:LightIntensityUnit = LightIntensityUnit.NoChange, indirect_scaling=-1.0)
Change ONLY the intensity value of the named light
Arguments
light_name
str
Name of light to change
value
float
New intensity value
unit
LightIntensityUnit, optional
Intensity unit. Defaults to LightIntensityUnit.NoChange.
indirect_scaling
float, optional
Scale factor for indirect lighting contribution. Defaults to -1.0.
Returns
bool
bool
True if successful, otherwise False

simDestroyObject

RobotClient.simDestroyObject(object_name)
Removes selected object from the world
Arguments
object_name
str
Name of object to be removed
Returns
bool
bool
True if object is queued up for removal

simSetSegmentationObjectID

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

simSetSegmentationInstanceID

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

simGetSegmentationObjectID

RobotClient.simGetSegmentationObjectID(mesh_name)
Returns Object ID for the given mesh name (case-sensitive)
Arguments
mesh_name
str
Name of the mesh to get the ID of
Returns
int
int
Object ID of the mesh

simAddDetectionFilterMeshName

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

simSetDetectionFilterRadius

RobotClient.simSetDetectionFilterRadius( camera_name, image_type, radius_cm, robot_name="", external=False )
Set detection radius for all cameras
Arguments
camera_name
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
image_type
ImageType
ImageType: Type of image required
radius_cm
int
Radius in [cm]
robot_name
str, optional
Robot which the camera is associated with
external
bool, optional
Whether the camera is an External Camera

simClearDetectionMeshNames

RobotClient.simClearDetectionMeshNames( camera_name, image_type, robot_name="", external=False )
Clear all mesh names from detection filter
Arguments
camera_name
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
image_type
ImageType
ImageType: Type of image required
robot_name
str, optional
Robot which the camera is associated with
external
bool, optional
Whether the camera is an External Camera

simGetDetections

RobotClient.simGetDetections( camera_name, image_type, robot_name="", external=False )
Get current detections
Arguments
camera_name
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
image_type
ImageType
ImageType: Type of image required
robot_name
str, optional
Robot which the camera is associated with
external
bool, optional
Whether the camera is an External Camera
Returns
list[DetectionInfo]
list[DetectionInfo]
List of detections

simPrintLogMessage

RobotClient.simPrintLogMessage(message, message_param="", severity=0)
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.
Arguments
message
str
Message to be printed
message_param
str, optional
Parameter to be printed next to the message
severity
int, optional
Range 0-3, inclusive, corresponding to the severity of the message

simGetCameraInfo

RobotClient.simGetCameraInfo(camera_name, robot_name="", external=False)
Get details about the camera
Arguments
camera_name
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
robot_name
str, optional
Robot which the camera is associated with
external
bool, optional
Whether the camera is an External Camera
Returns
CameraInfo
CameraInfo
camera info

simGetDistortionParams

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

simSetDistortionParams

RobotClient.simSetDistortionParams( camera_name, distortion_params, robot_name="", external=False )
Set camera distortion parameters
Arguments
camera_name
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
distortion_params
dict
Dictionary of distortion param names and corresponding values
robot_name
str, optional
Robot which the camera is associated with
external
bool, optional
Whether the camera is an External Camera

simSetDistortionParam

RobotClient.simSetDistortionParam( camera_name, param_name, value, robot_name="", external=False )
Set single camera distortion parameter
Arguments
camera_name
str
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
param_name
str
Name of distortion parameter
value
float
Value of distortion parameter
robot_name
str, optional
Robot which the camera is associated with
external
bool, optional
Whether the camera is an External Camera

simSetCameraPose

RobotClient.simSetCameraPose(camera_name, pose, robot_name="", external=False)
  • Control the pose of a selected camera
Arguments
camera_name
str
Name of the camera to be controlled
pose
Pose
Pose representing the desired position and orientation of the camera
robot_name
str, optional
Name of robot which the camera corresponds to
external
bool, optional
Whether the camera is an External Camera

simSetCameraFov

RobotClient.simSetCameraFov( camera_name, fov_degrees, robot_name="", external=False )
  • Control the field of view of a selected camera
Arguments
camera_name
str
Name of the camera to be controlled
fov_degrees
float
Value of field of view in degrees
robot_name
str, optional
Name of robot which the camera corresponds to
external
bool, optional
Whether the camera is an External Camera

simCameraLookAt

RobotClient.simCameraLookAt(camera_name, pose, robot_name="")
  • Control the pose of a selected camera
Arguments
camera_name
str
Name of the camera to be controlled
pose
Pose
Pose representing the desired position the camera has to observe
robot_name
str, optional
Name of robot which the camera corresponds to
external
bool, optional
Whether the camera is an External Camera

simGetGroundTruthKinematics

RobotClient.simGetGroundTruthKinematics(robot_name="")
Get Ground truth kinematics of the robotThe position inside the returned KinematicsState is in the frame of the robot’s starting point
Arguments
robot_name
str, optional
Name of the robot
Returns
KinematicsState
KinematicsState
Ground truth of the robot

simSetKinematics

RobotClient.simSetKinematics(state, ignore_collision, robot_name="")
Set the kinematics state of the robotIf you don’t want to change position (or orientation) then just set components of position (or orientation) to floating point nan values
Arguments
state
KinematicsState
Desired Kinematics State
ignore_collision
bool
Whether to ignore any collision or not
robot_name
str, optional
Name of the robot

simGetGroundTruthEnvironment

RobotClient.simGetGroundTruthEnvironment(robot_name="")
Get ground truth environment stateThe position inside the returned EnvironmentState is in the frame of the robot’s starting point
Arguments
robot_name
str, optional
Name of the robot
Returns
EnvironmentState
EnvironmentState
Ground truth environment state

getImuData

RobotClient.getImuData(imu_name="", robot_name="")
No description provided!
Arguments
imu_name
str, optional
Name of IMU to get data from, specified in settings.json
robot_name
str, optional
Name of robot to which the sensor corresponds to
Returns
ImuData
ImuData
IMU data

getBarometerData

RobotClient.getBarometerData(barometer_name="", robot_name="")
No description provided!
Arguments
barometer_name
str, optional
Name of Barometer to get data from, specified in settings.json
robot_name
str, optional
Name of robot to which the sensor corresponds to
Returns
BarometerData
BarometerData
Barometer data

getMagnetometerData

RobotClient.getMagnetometerData( magnetometer_name="", robot_name="" )
No description provided!
Arguments
magnetometer_name
str, optional
Name of Magnetometer to get data from, specified in settings.json
robot_name
str, optional
Name of robot to which the sensor corresponds to
Returns
MagnetometerData
MagnetometerData
Magnetometer data

getGpsData

RobotClient.getGpsData(gps_name="", robot_name="")
No description provided!
Arguments
gps_name
str, optional
Name of GPS to get data from, specified in settings.json
robot_name
str, optional
Name of robot to which the sensor corresponds to
Returns
GpsData
GpsData
GPS data

getDistanceSensorData

RobotClient.getDistanceSensorData( distance_sensor_name="", robot_name="" )
No description provided!
Arguments
distance_sensor_name
str, optional
Name of Distance Sensor to get data from, specified in settings.json
robot_name
str, optional
Name of robot to which the sensor corresponds to
Returns
DistanceSensorData
DistanceSensorData
Distance sensor data

getLidarData

RobotClient.getLidarData(lidar_name="", robot_name="")
No description provided!
Arguments
lidar_name
str, optional
Name of Lidar to get data from, specified in settings.json
robot_name
str, optional
Name of robot to which the sensor corresponds to
Returns
LidarData
LidarData
LiDAR data

simGetLidarSegmentation

RobotClient.simGetLidarSegmentation(lidar_name="", robot_name="")
NOTE: Deprecated API, use getLidarData() API instead Returns Segmentation ID of each point’s collided object in the last Lidar update
Arguments
lidar_name
str, optional
Name of Lidar sensor
robot_name
str, optional
Name of the robot wth the sensor
Returns
list[int]
list[int]
Segmentation IDs of the objects

simFlushPersistentMarkers

RobotClient.simFlushPersistentMarkers()
Clear any persistent markers - those plotted with setting is_persistent=True in the APIs below

simPlotPoints

RobotClient.simPlotPoints( points, color_rgba=[1.0, 0.0, 0.0, 1.0], size=10.0, duration=-1.0, is_persistent=False, )
Plot a list of 3D points in World NED frame
Arguments
points
list[Vector3r]
List of Vector3r objects
color_rgba
list, optional
desired RGBA values from 0.0 to 1.0
size
float, optional
Size of plotted point
duration
float, optional
Duration (seconds) to plot for
is_persistent
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotLineStrip

RobotClient.simPlotLineStrip( points, color_rgba=[1.0, 0.0, 0.0, 1.0], thickness=5.0, duration=-1.0, is_persistent=False, )
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]
Arguments
points
list[Vector3r]
List of 3D locations of line start and end points, specified as Vector3r objects
color_rgba
list, optional
desired RGBA values from 0.0 to 1.0
thickness
float, optional
Thickness of line
duration
float, optional
Duration (seconds) to plot for
is_persistent
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotLineList

RobotClient.simPlotLineList( points, color_rgba=[1.0, 0.0, 0.0, 1.0], thickness=5.0, duration=-1.0, is_persistent=False, )
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]
Arguments
points
list[Vector3r]
List of 3D locations of line start and end points, specified as Vector3r objects. Must be even
color_rgba
list, optional
desired RGBA values from 0.0 to 1.0
thickness
float, optional
Thickness of line
duration
float, optional
Duration (seconds) to plot for
is_persistent
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotArrows

RobotClient.simPlotArrows( points_start, points_end, color_rgba=[1.0, 0.0, 0.0, 1.0], thickness=5.0, arrow_size=2.0, duration=-1.0, is_persistent=False, )
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]
Arguments
points_start
list[Vector3r]
List of 3D start positions of arrow start positions, specified as Vector3r objects
points_end
list[Vector3r]
List of 3D end positions of arrow start positions, specified as Vector3r objects
color_rgba
list, optional
desired RGBA values from 0.0 to 1.0
thickness
float, optional
Thickness of line
arrow_size
float, optional
Size of arrow head
duration
float, optional
Duration (seconds) to plot for
is_persistent
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotStrings

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

simPlotTransforms

RobotClient.simPlotTransforms( poses, scale=5.0, thickness=5.0, duration=-1.0, is_persistent=False )
Plots a list of transforms in World NED frame.
Arguments
poses
list[Pose]
List of Pose objects representing the transforms to plot
scale
float, optional
Length of transforms’ axes
thickness
float, optional
Thickness of transforms’ axes
duration
float, optional
Duration (seconds) to plot for
is_persistent
bool, optional
If set to True, the desired object will be plotted for infinite time.

simPlotTransformsWithNames

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

startRecording

RobotClient.startRecording()
Start RecordingRecording will be done according to the settings

stopRecording

RobotClient.stopRecording()
Stop Recording

isRecording

RobotClient.isRecording()
Whether Recording is running or not
Returns
bool
bool
True if Recording, else False

simSetWind

RobotClient.simSetWind(wind)
Set simulated wind, in World frame, NED direction, m/s
Arguments
wind
Vector3r
Wind, in World frame, NED direction, in m/s

simCreateVoxelGrid

RobotClient.simCreateVoxelGrid(position, x, y, z, res, of)
Construct and save a binvox-formatted voxel grid of environment
Arguments
position
Vector3r
Position around which voxel grid is centered in m
res
float
Resolution of voxel grid in m
of
str
Name of output file to save voxel grid as
Returns
bool
bool
True if output written to file successfully, else False

simBuildSDF

RobotClient.simBuildSDF(position, x, y, z, res)
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.
Arguments
position
Vector3r
Global position around which field is centered in m
res
float
Resolution of distance field in m

simCheckOccupancy

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

simGetSignedDistance

RobotClient.simGetSignedDistance(position)
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.
Arguments
position
Vector3r
Global position at which distance is to be computed (m)
Returns
dist
dist
(float): Signed distance at the position

simGetSignedDistances

RobotClient.simGetSignedDistances(positions)
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.
Arguments
positions
list
List of global positions at which distance is to be computed (m)
Returns
dists
dists
(list[float]): Signed distances at the positions

simGetSDFGradient

RobotClient.simGetSDFGradient(position)
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.
Arguments
position
Vector3r
Global position at which gradient is to be computed (m)
Returns
gradient
gradient
(Vector3r): SDF gradient at the position

simCheckInVolume

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

simProjectToFreeSpace

RobotClient.simProjectToFreeSpace(position, mindist)
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.
Arguments
position
Vector3r
Global position to project (m)
mindist
float
Minimum distance from objects to satisfy when finding the free point
Returns
free_pt
free_pt
(Vector3r): Projected position in free space

simSaveSDF

RobotClient.simSaveSDF(filepath)
Save the constructed signed distance field to a file.
Arguments
filepath
str
Filename to save the SDF to

simLoadSDF

RobotClient.simLoadSDF(filepath)
Load a saved signed distance field.
Arguments
filepath
str
Filename to load the SDF from

simGetRandomFreePoint

RobotClient.simGetRandomFreePoint(search_radius, robot_name="")
Return a random free (unoccupied) point (local space) within a radius around the robot.
Arguments
search_radius
float
Radius around the robot to search for a free point in m
robot_name
str
Name of the robot
Returns
Vector3r
Vector3r
/None: Free/unoccupied point (local NED) coordinates if successful, else None

simPlanPathToRandomFreePoint

RobotClient.simPlanPathToRandomFreePoint(search_radius:float, smooth_path:bool = False, draw_path:bool = False, robot_name:str ="")
Plan a collision-free path to a random point within a radius around the robot and return the intermediate waypoints (local space).
Arguments
search_radius
float
Radius around the robot to search for a free point (meters)
smooth_path
bool, optional
Returns a smooth spline if True, else returns a list of coarse waypoints
draw_path
bool, optional
Draws the path in the simulation environment if True
robot_name
str, optional
Name of the robot
Returns
list[Vector3r]
list[Vector3r]
List of waypoints (local NED) if successful, else empty list

simPlanPathToRandomizeGoal

RobotClient.simPlanPathToRandomizeGoal( start: Vector3r, goal: Vector3r, search_radius: float, num_trials: int, smooth_path: bool = False, draw_path: bool = False, start_is_local: bool = True, goal_is_local: bool = True, robot_name: str = "" )
Plans a collision-free path from the specified start position to a randomly selected free point within a given radius around the goal position. The function attempts up to num_trials random samples to find a valid, collision-free goal, and returns the intermediate waypoints (local space) of the planned path.
Arguments
start
Vector3r
Start position.
goal
Vector3r
Center position around which to randomize the goal.
search_radius
float
Radius (in meters) around the goal to search for a free point.
num_trials
int
Number of random samples to attempt for finding a free goal point.
smooth_path
bool, optional
If True, returns a smooth spline path; otherwise, returns a list of coarse waypoints. Defaults to False.
draw_path
bool, optional
If True, visualizes the path in the environment. Defaults to False.
robot_name
str, optional
Name of the robot. Defaults to "".
start_is_local
bool, optional
If True, the start position is in the robot’s local frame; otherwise, in the world/global frame. Defaults to True.
goal_is_local
bool, optional
If True, the goal position is in the robot’s local frame; otherwise, in the world/global frame. Defaults to True.
Returns
list[Vector3r]
list[Vector3r]
List of waypoints (local NED) representing the planned path if successful; otherwise, an empty list.

simPlanPath

RobotClient.simPlanPath( start: Vector3r, goal: Vector3r, smooth_path: bool = False, draw_path: bool = False, start_is_local: bool = True, goal_is_local: bool = True, robot_name: str = "" )
Plans a collision-free path between the specified start and goal points, returning the intermediate waypoints (local space).
Arguments
start
Vector3r
Start position
goal
Vector3r
Goal position
smooth_path
bool, optional
If True, returns a smooth spline; otherwise, returns a list of coarse waypoints. Defaults to False.
draw_path
bool, optional
If True, draws the path. Defaults to False.
robot_name
str, optional
Name of the robot. Defaults to "".
start_is_local
bool, optional
If True, start position is in the robot’s local frame; if False, in world/global frame. Defaults to True.
goal_is_local
bool, optional
If True, goal position is in the robot’s local frame; if False, in world/global frame. Defaults to True.
Returns
list[Vector3r]
list[Vector3r]
List of waypoints (local NED) if successful; otherwise, an empty list.

simPlanPathGeo

RobotClient.simPlanPathGeo( start: GeoPoint, goal: GeoPoint, smooth_path: bool = False, draw_path: bool = False, robot_name: str = "" )
Plans a collision-free path between the specified start and goal geodetic locations (LLA), returning the intermediate waypoints (local NED).
Arguments
start
GeoPoint
Start Geodetic Location (LLA)
goal
GeoPoint
Goal Geodetic Location (LLA)
smooth_path
bool, optional
If True, returns a smooth spline; otherwise, returns a list of coarse waypoints. Defaults to False.
draw_path
bool, optional
If True, draws the path. Defaults to False.
robot_name
str, optional
Name of the robot. Defaults to "".
Returns
list[Vector3r]
list[Vector3r]
List of waypoints (local NED) if successful; otherwise, an empty list.

getNavMeshInfo

RobotClient.getNavMeshInfo(robot_name="")
Get NavMesh information, as an array of XYZ center, min and max values in global NED coordinates
Arguments
robot_name
str
Name of the robot
Returns
list[Vector3r]
list[Vector3r]
List of values if successful, else empty list

isPointInCollision

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

isAnyPointInCollisionBatch

RobotClient.isAnyPointInCollisionBatch(points)
Get Collision information about an array of points. Returns True if any of the points is in collision, else False
Arguments
points
list[Vector3r]
List of points to be checked in World coordinates
Returns
bool
bool
True if any of the points is in collision, else False

simAddRobot

RobotClient.simAddRobot(robot_name, robot_type, robot_model, pose, radius_override=-1, height_override=-1)
Add a robot to the simulation with the specified name, type, model, and initial pose.
Arguments
robot_name
str
Unique name for the robot (e.g., “Drone5”).
robot_type
str
Type of robot to add (e.g., “simpleflight”, “cvmover”).
robot_model
str
Model name of the robot (e.g., “astro”, “ghostv60”).
pose
Pose
The initial pose (position and orientation) of the robot in world coordinates.
radius_override
float, optional
If > 0, overrides the robot’s default collision radius (meters). Defaults to -1 (no override).
height_override
float, optional
If > 0, overrides the robot’s default collision height (meters). Defaults to -1 (no override).
Returns
bool
bool
True if the robot was added successfully, False otherwise.

listRobots

RobotClient.listRobots()
Lists the names of all the robots in the simulation world
Returns
list[str]
list[str]
List containing names of all the robots

getSettingsString

RobotClient.getSettingsString()
Fetch the settings text being used by airgen
Returns
str
str
Settings text in JSON format

simCreateWaypoint

RobotClient.simCreateWaypoint(context = "", robot_name = "")
Creates a waypoint using the robot 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.
Arguments
robot_name
str, optional
Name of the robot
context
str, optional
Name of the associated waypoints-context

simCreateWaypointFromPose

RobotClient.simCreateWaypointFromPose(pose, context = "")
Creates a waypoint using the robot 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.
Arguments
robot_name
str, optional
Name of the robot
context
str, optional
Name of the associated waypoints-context

simDeleteWaypoints

RobotClient.simDeleteWaypoints(context = "", only_recent = True, keep_context_alive = True)
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.
Arguments
context
str, optional
Name of the associated waypoints-context
only_recent
bool, optional
Whether to delete only the youngest waypoint or all of them, for a context
keep_context_alive
bool, optional
If this is False, the context and all its associated waypoints will be deleted

simDeleteAllWaypoints

RobotClient.simDeleteAllWaypoints()
Deletes all waypoints and all waypoint-contexts

simGetWaypointDataAsCsv

RobotClient.simGetWaypointDataAsCsv(context = "")
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.
Arguments
context
str, optional
Name of the waypoints-context
Returns
waypoint_data
waypoint_data
(str): Waypoint data as a CSV formatted string

simGetWaypointDataAsJson

RobotClient.simGetWaypointDataAsJson(context = "")
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.
Arguments
context
str, optional
Name of the waypoints-context
Returns
waypoint_data
waypoint_data
(str): Waypoint data as a JSON formatted string

simSetWaypointColor

RobotClient.simSetWaypointColor(color_rgb, index, context = "")
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.
Arguments
color_rgb
list
desired RGB values from 0.0 to 1.0. e.g. [1, 1, 1]
index
int
The index of the Waypoint. The index of the first waypoint is 0.
context
str, optional
Name of the waypoints-context.
Returns
success
success
(bool): True if the color change was a success, false otherwise.

simResetWaypointColor

RobotClient.simResetWaypointColor(index, context = "")
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.
Arguments
index
int
The index of the Waypoint. The index of the first waypoint is 0.
context
str, optional
Name of the waypoints-context.
Returns
success
success
(bool): True if the color reset was a success, false otherwise.

cancelLastTask

RobotClient.cancelLastTask(robot_name="")
Cancel previous Async task
Arguments
robot_name
str, optional
Name of the robot

simSetGroundTraceParams

RobotClient.simSetGroundTraceParams(enabled, range_up=GROUND_TRACE_RANGE_DEFAULT, range_down=GROUND_TRACE_RANGE_DEFAULT)
Sets the various Ground Trace parameters. This affects the “reset” behavior, and the “simAddRobot” behavior.
Arguments
enabled
bool
Enable or Disable Ground Trace.
range_up
float, optional
From what distance above the robot’s current altitude do we start looking for the ground (default is 13 KM)
range_down
float, optional
How much distance below the robot’s current altitude do we stop looking for the ground (default is 13 KM)

simGetAllPhysicsControlNames

RobotClient.simGetAllPhysicsControlNames(robot_name="")
Retrieves the names of all the available physics controls for a robot.
Arguments
robot_name
str
Name of the robot.
Returns
list
list
List of strings representing the names of Physics Controls.

simSetPhysicsControlTargetPose

RobotClient.simSetPhysicsControlTargetPose(name, pose, velocity_delta_time=0.0, robot_name="")
Sets the target pose for a specific physics control of a robot.
Arguments
name
str
Name of the Physics Control.
pose
Pose
Target Pose.
velocity_delta_time
float, optional
If this is non-zero, the target velocity will be calculated using the current target position. But if this is zero, the target velocity will be set to zero.
robot_name
str, optional
Name of the robot.

simSetPhysicsControlTargetPoses

RobotClient.simSetPhysicsControlTargetPoses(names, poses, velocity_delta_time=0.0, robot_name="")
Sets the target poses for multiple physics controls of a robot. The length of ‘poses’ and ‘names’ must be the same.
Arguments
names
list
List of Physics Control names.
poses
list
List of Target Poses.
velocity_delta_time
float, optional
If this is non-zero, the target velocity will be calculated using the current target position. But if this is zero, the target velocity will be set to zero.
robot_name
str, optional
Name of the robot.

simSetPhysicsControlMultiplier

RobotClient.simSetPhysicsControlMultiplier( name, linear_strength=Vector3r.one(), linear_damping_ratio=Vector3r.one(), linear_extra_damping=Vector3r.one(), max_force=Vector3r.one(), angular_strength=1.0, angular_damping_ratio=1.0, angular_extra_damping=1.0, max_torque=1.0, robot_name="" )
Multiplies a physics control’s properties with the input scaling factors
Arguments
name
str
Name of the physics control
linear_strength
Vector3r, optional
Scaling factor for linear strength (default: Vector3r(1, 1, 1)).
linear_damping_ratio
Vector3r, optional
Scaling factor for linear damping ratio (default: Vector3r(1, 1, 1)).
linear_extra_damping
Vector3r, optional
Scaling factor for linear extra damping (default: Vector3r(1, 1, 1)).
max_force
Vector3r, optional
Scaling factor for maximum force (default: Vector3r(1, 1, 1)).
angular_strength
float, optional
Scaling factor for angular strength (default: 1.0).
angular_damping_ratio
float, optional
Scaling factor for angular damping ratio (default: 1.0).
angular_extra_damping
float, optional
Scaling factor for angular extra damping (default: 1.0).
max_torque
float, optional
Scaling factor for maximum torque (default: 1.0).
robot_name
str, optional
Name of the robot

simSetHero

RobotClient.simSetHero(robot_name="")
Sets the specified robot as the ‘hero’ in the simulation.
Arguments
robot_name
str, optional
Name of the robot to set as hero. If not specified, the default robot is used.

simApplyGravityScaling

RobotClient.simApplyGravityScaling(scale)
Applies a scaling factor to the gravity in the simulation.
Arguments
scale
float
The scaling factor to apply to gravity.