You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sensors.md
+44-8
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Behind the scenes, `createDefaultSensorSettings` method in [AirSimSettings.hpp](
35
35
36
36
The default sensor list can be configured in settings json:
37
37
38
-
```JSON
38
+
```json
39
39
"DefaultSensors": {
40
40
"Barometer": {
41
41
"SensorType": 1,
@@ -72,7 +72,7 @@ If a vehicle provides its sensor list, it **must** provide the whole list. Selec
72
72
A vehicle specific sensor list can be specified in the vehicle settings part of the json.
73
73
e.g.,
74
74
75
-
```
75
+
```json
76
76
"Vehicles": {
77
77
78
78
"Drone1": {
@@ -105,6 +105,42 @@ e.g.,
105
105
Each sensor-type has its own set of settings as well.
106
106
Please see [lidar](lidar.md) for example of Lidar specific settings.
107
107
108
+
#### Distance Sensor
109
+
110
+
By default, Distance Sensor points to the front of the vehicle. It can be pointed in any direction by modifying the settings
111
+
112
+
Configurable Parameters -
113
+
114
+
Parameter | Description
115
+
-----------------|------------
116
+
X Y Z | Position of the sensor relative to the vehicle (in NED, in meters) (Default (0,0,0))
117
+
Yaw Pitch Roll | Orientation of the sensor relative to the vehicle (degrees) (Default (0,0,0))
118
+
MinDistance | Minimum distance measured by distance sensor (metres, only used to fill Mavlink message for PX4) (Default 0.2m)
119
+
MaxDistance | Maximum distance measured by distance sensor (metres) (Default 40.0m)
120
+
121
+
For example, to make the sensor point towards the ground (for altitude measurement similar to barometer), the orientation can be modified as follows -
122
+
123
+
```json
124
+
"Distance": {
125
+
"SensorType": 5,
126
+
"Enabled" : true,
127
+
"Yaw": 0, "Pitch": -90, "Roll": 0
128
+
}
129
+
```
130
+
131
+
##### Server side visualization for debugging
132
+
133
+
Be default, the points hit by distance sensor are not drawn on the viewport. To enable the drawing of hit points on the viewport, please enable setting `DrawDebugPoints` via settings json. E.g. -
134
+
135
+
```json
136
+
"Distance": {
137
+
"SensorType": 5,
138
+
"Enabled" : true,
139
+
...
140
+
"DrawDebugPoints": true
141
+
}
142
+
```
143
+
108
144
## Sensor APIs
109
145
Jump straight to [`hello_drone.py`](https://github.com/Microsoft/AirSim/blob/master/PythonClient/multirotor/hello_drone.py) or [`hello_drone.cpp`](https://github.com/Microsoft/AirSim/blob/master/HelloDrone/main.cpp) for example usage, or see follow below for the full API.
110
146
@@ -117,7 +153,7 @@ Jump straight to [`hello_drone.py`](https://github.com/Microsoft/AirSim/blob/mas
0 commit comments