Skip to content

Conversation

@bmalhigh
Copy link
Contributor

@bmalhigh bmalhigh commented Oct 18, 2018

Support sensor configurations via AirSim JSON settings.

Validated on Windows and Ubuntu.

  1. The list of sensors enabled on a vehicle (multirotor or a car) can be controlled via the settings.
  2. Supports a default sensor list.
  3. Allows for sensor specific settings to be configured via JSON (currently used for Lidar).

Example of a default sensor-list specified in settings.json:

"DefaultSensors": {
	"Barometer": {
		"SensorType": 1,
                "Enabled" : true
	},
	"Gps": {
		 "SensorType": 1,
		 "Enabled" : true
        },
	"Lidar1": { 
		 "SensorType": 6,
		 "Enabled" : true,
		 "NumberOfChannels": 16,
		 "PointsPerSecond": 10000,
		 "X": 0, "Y": 0, "Z": -1,
		 "DrawDebugPoints": true
	  },
	 "Lidar2": { 
		 "SensorType": 6,
		 "Enabled" : false,
		 "NumberOfChannels": 4,
		 "PointsPerSecond": 10000,
		 "X": 0, "Y": 0, "Z": -1,
		 "DrawDebugPoints": true
	  }
},

Example of a vehicle specific sensor-list specified in settings.json:

"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
			}
		}
 }

Incorporated code-review feedback and updated doc files.
@sytelus sytelus merged commit 70e74a5 into microsoft:master Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants