airsim-lidar使用
- Enable lidar
- API
Enable lidar 需要在settings.json中设置,包括sensor type(6)和enabled(true)等等,例如:
{
"SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings_json.md",
"SettingsVersion": 1.2,"SimMode": "Multirotor", "Vehicles": {
"Drone1": {
"VehicleType": "simpleflight",
"AutoCreate": true,
"Sensors": {
"LidarSensor1": {
"SensorType": 6,
"Enabled" : true,//类似config
"NumberOfChannels": 16, //16线激光
"RotationsPerSecond": 10,
"PointsPerSecond": 100000,
"X": 0, "Y": 0, "Z": -1,
"Roll": 0, "Pitch": 0, "Yaw" : 0,//定义了位姿
"VerticalFOVUpper": -15,
"VerticalFOVLower": -25,
"HorizontalFOVStart": -20,
"HorizontalFOVEnd": 20, //定义了最下最上角度和最左最右角度
"DrawDebugPoints": true, //是否在环境中可视
"DataFrame": "SensorLocalFrame" //垂直惯性坐标系"VehicleInertialFrame" or 传感器坐标系"SensorLocalFrame"
},
"LidarSensor2": {//可定义多个雷达
"SensorType": 6,
"Enabled" : true,
"NumberOfChannels": 4,
"RotationsPerSecond": 10,
"PointsPerSecond": 10000,
"X": 0, "Y": 0, "Z": -1,
"Roll": 0, "Pitch": 0, "Yaw" : 0,
"VerticalFOVUpper": -15,
"VerticalFOVLower": -25,
"DrawDebugPoints": true,
"DataFrame": "SensorLocalFrame"
}
}
}
}
}
API getLidarData()函数返回了点云数组、时间戳和雷达位姿,其中:
点云在雷达坐标系中(NED坐标系,以米为单位)
雷达位姿在车的坐标系中(NED坐标系,以米为单位)
推荐阅读
- AirSim|AirSim 自动驾驶仿真 (5) - 图片 APIs
- AirSim|AirSim 自动驾驶仿真 (4) - 核心 APIs - C++
- AirSim|AirSim 自动驾驶仿真 (7) - AirSim 多载具
- UE4|AirSim里的那些坑
- airsim之settings解析
- Airsim仿真平台介绍
- 基于深度学习网络在Airsim中的自动驾驶
- Airsim|Airsim Python API文档整理(1.3.1版本)
- Airsim|Airsim(1.3.1版本)setting.json帮助文档解析