Scene

For any given simulation scenario, the scene is a composition of several non-agent objects, along with other assets such as lighting, weather etc.

Geospatial scenery

AirGen contains support for both synthetic and geospatial scenes. The synthetic scenes are generated using Unreal Engine, whereas the geospatial data is loaded through the Cesium platform.

Within a geospatial scene, the starting location of the drone can be set through the OriginGeoPoint field in the configuration settings (in order to access this setting, you need to start a custom session instead of a sample scenario). The default latitude and longitude in this section correspond to Seattle, USA.

Alternatively, you can also use the setGeoReference() function in the Python API.

When using a geospatial scene, the Python client needs to be initialized with the geo=True flag. For example: client = airgen.MultirotorClient(geo=True).

AirGen provides the following API functionality that is specific to geospatial scenes/scenarios:

  1. simSetVehicleGeoPose: Set the GPS location and an orientation of the drone.

  2. simSetObjectGeoPose: Set the GPS location and an orientation of an object.

  3. simSetGeoReference: Set the GPS location of the origin of the scene (the vehicle will also be teleported when this function is used).

  4. moveToGPSAsync: Move the drone to a GPS location with specified velocity, yaw behavior.

  5. getGPSData: Get the GPS location of the drone.

Scene Ground Truth

Voxel Grid: AirGen allows for on-demand generation and output of a voxel grid representation of the scene. A voxel grid is a representation of the occupancy of a given world/map, by discretizing into cells of a certain size; and recording a voxel if that particular location is occupied.

client = airgen.MultirotorClient()
center_position = airgen.Vector3r(0, 0, 0) # Center position of the voxel grid
bounds = 10 # Extent in meters
resolution = 0.1 # Resolution in meters
output_file = "map.binvox" # Output file
voxel_grid = client.simCreateVoxelGrid(center_position, bounds, resolution, output_file)