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.
If not sensors are specified in the settings json, the the following sensors are enabled by default based on the simmode.
- Imu
- Magnetometer
- Gps
- Barometer
- Gps
- None
Please see 'createDefaultSensorSettings' method in AirSimSettings.hpp
A default sensor list can be configured in settings json. e.g.,
"DefaultSensors": {
"Barometer": {
"SensorType": 1,
"Enabled" : true
},
"Gps": {
"SensorType": 1,
"Enabled" : true
},
"Lidar1": {
"SensorType": 6,
"Enabled" : true,
"NumberOfChannels": 16,
"PointsPerSecond": 10000
},
"Lidar2": {
"SensorType": 6,
"Enabled" : false,
"NumberOfChannels": 4,
"PointsPerSecond": 10000
}
},
A vehicle specific sensor list can be specified in the vehicle settings part of the json. e.g.,
"Vehicles": {
"Drone1": {
"VehicleType": "simpleflight",
"AutoCreate": true,
...
"Sensors": {
"MyLidar1": {
"SensorType": 6,
"Enabled" : true,
"NumberOfChannels": 16,
"PointsPerSecond": 10000,
"X": 0, "Y": 0, "Z": -1,
"DrawDebugPoints": true
},
"MyLidar2": {
"SensorType": 6,
"Enabled" : true,
"NumberOfChannels": 4,
"PointsPerSecond": 10000,
"X": 0, "Y": 0, "Z": -1,
"DrawDebugPoints": true
}
}
}
}
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.
There are two shared settings:
- SensorType An integer representing the sensor-type SensorBase.hpp
enum class SensorType : uint {
Barometer = 1,
Imu = 2,
Gps = 3,
Magnetometer = 4,
Distance = 5,
Lidar = 6
};
- Enabled Boolean
Each sensor-type has its own set of settings as well. Please see lidar for example of Lidar specific settings.
Each sensor-type has its own set of APIs currently. Please see lidar for example of Lidar specific APIs.