__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
getClientVersion
No description provided!
getServerVersion
No description provided!
getMinRequiredServerVersion
No description provided!
getMinRequiredClientVersion
No description provided!
enableApiControl
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.
armDisarm
simPause
simIsPause
simContinueForTime
simContinueForFrames
getHomeGeoPoint
confirmConnection
Checks state of connection every 1 sec and reports it in Console so user can see the progress for connection.
simSetLightIntensity
simSwapTextures
Runtime Swap Texture API
simSetObjectMaterial
simSetObjectMaterialFromTexture
simSetObjectMaterialFromTextureURL
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 usedbool
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:00bool, 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
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 arraystr
Name of the camera, for backwards compatibility, ID numbers such as 0,1,etc. can also be used
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).
getImages
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]
list[ImageResponse]
simGetImagesAlongTrajectory
Get images along a trajectory (specified by position and pose) when
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]
list[ImageResponse]
simGetPresetLensSettings
simGetLensSettings
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
simTestLineOfSightBetweenPoints
simGetWorldExtents
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!
simGetMeshPositionVertexBuffers
simGetCollisionInfo
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
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)
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
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)
simSetGeoReference
simGetVehiclePose
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 SettingssimGetObjectPose
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
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
simGetObjectScale
simSetObjectScale
simGetObjectDimensions
simGetObjectCenter
simListSceneObjects
simListObjectsWithTag
simLoadLevel
simListAssets
simSpawnObject
Spawned selected object in the world
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)
Whether the object should have navigation enabled (default is False)
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)
Whether the object should have navigation enabled (default is False)
simDestroyObject
simSetSegmentationObjectID
simSetSegmentationInstanceID
Set segmentation ID for specific instances
simGetSegmentationObjectID
simAddDetectionFilterMeshName
Add mesh name to detect in wild card formatFor example: simAddDetectionFilterMeshName(“Car_”) will detect all instance named “Car_”
simSetDetectionFilterRadius
Set detection radius for all cameras
simClearDetectionMeshNames
simGetDetections
Get current 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.simGetCameraInfo
simGetDistortionParams
Get camera distortion parameters
simSetDistortionParams
Set camera distortion parameters
simSetDistortionParam
Set single camera distortion parameter
simSetCameraPose
simSetCameraFov
simCameraLookAt
simGetGroundTruthKinematics
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
getImuData
getBarometerData
getMagnetometerData
getGpsData
getDistanceSensorData
getLidarData
simGetLidarSegmentation
simFlushPersistentMarkers
Clear any persistent markers - those plotted with setting
is_persistent=True in the APIs belowsimPlotPoints
Plot a list of 3D points in World NED frame
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.
simPlotTransformsWithNames
Plots a list of transforms with their names in World NED frame.
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
simSetWind
simCreateVoxelGrid
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.
simCheckOccupancy
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.
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.
simGetSDFGradient
simCheckInVolume
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.
simSaveSDF
simLoadSDF
simGetRandomFreePoint
simPlanPathToRandomFreePoint
Plan a collision-free path to a random point within a radius around the vehicle and return the intermediate waypoints.
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.
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
simPlanPath
Plan a collision-free path between start and goal points and return the intermediate waypoints.
getNavMeshInfo
isPointInCollision
isAnyPointInCollisionBatch
simAddVehicle
listVehicles
getSettingsString
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.
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.
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.
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.
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.
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.
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.