airsim-lidar使用


airsim-lidar使用

  • Enable lidar
  • API
【airsim-lidar使用】
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坐标系,以米为单位)

    推荐阅读