Sensors in AirSim

AirSim currently supports the following sensors:

  • Camera
  • Imu
  • Magnetometer
  • Gps
  • Barometer
  • Distance
  • Lidar

The cameras are currently configured a bit differently than other sensors. The camera configuration and apis are covered in other documents, e.g., general settings and image API.

This document focuses on the configuration of other sensors.

Default sensors

If not sensors are specified in the settings json, the the following sensors are enabled by default based on the simmode.

Multirotor

  • Imu
  • Magnetometer
  • Gps
  • Barometer ### Car
  • Gps ### ComputerVision
  • None

Please see ‘createDefaultSensorSettings’ method in AirSimSettings.hpp

Configuration of Default Sensor list

A default sensor list can be configured in settings json. e.g.,

Configuration of vehicle specific sensor settings

A vehicle specific sensor list can be specified in the vehicle settings part of the json. e.g.,

If a vehicle provides its sensor list, it must provide the whole list. Selective add/remove/update of the default sensor list is NOT supported.

Configuration of sensor settings

Shared settings

There are two shared settings:

  • SensorType .. code-block:

    An integer representing the sensor-type [SensorBase.hpp](../AirLib/include/sensors/)
    
  • Enabled

    Boolean

Sensor specific settings

Each sensor-type has its own set of settings as well. Please see lidar for example of Lidar specific settings.

Sensor APIs

Each sensor-type has its own set of APIs currently. Please see lidar for example of Lidar specific APIs.