Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for configuration settings for Sensors. #1479

Merged
merged 2 commits into from
Oct 23, 2018

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

AirLib/include/common/AirSimSettings.hpp Outdated Show resolved Hide resolved
AirLib/include/common/AirSimSettings.hpp Outdated Show resolved Hide resolved
AirLib/include/common/AirSimSettings.hpp Show resolved Hide resolved
AirLib/include/common/AirSimSettings.hpp Show resolved Hide resolved
AirLib/include/common/AirSimSettings.hpp Outdated Show resolved Hide resolved
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