一直觉得LIO-SAM还是一个比较不错的激光雷达惯性里程计框架,最近在使用自己的数据进行测试过程中出现了很多坑,花费了一周多的时间才填平,在此记录一下。
前言
- Ouster-128激光雷达数据
- Ouster内部IMU(六轴100Hz)/ Xsens MTi 3(九轴100Hz)/ Xsens MTi-G-700(九轴400Hz)
- 手持平台,正常行走速度,相对于无人车来说晃动较大
- 室内、室外均进行了测试
问题
在测试过程中无人车平台以及无人机平台(飞行较稳)的状态下,能够使用LIO-SAM成功建图。但是使用手持平台会出现:行走直线或者较为缓慢的转弯正常,急转弯失败。
推测原因
时间同步
IMU与Lidar没有时间同步:对于 Ouster-128使用其内部IMU,1)尝试修改其驱动为电脑时间rostime::Now(),2)尝试修改为激光雷达内部时间(上电计时)。两种方式修改时间后,均能排除时间的问题。但是,在转弯出处仍然容易出现失败。
修改参考链接:
Ouster官方驱动中的ISSUE
六轴/九轴/IMU数据质量
尝试更换为外部的Xsens MTi 3(九轴100Hz)IMU进行使用,仍未解决。
IMU与激光雷达外参
作者使用的Microstrain 3DM-GX5-25 型号的IMU中,其加速度计与陀螺仪坐标系相同,但是磁力计的数据与另外两者的坐标轴不一致。所以作者在参数文件中定义了两个不同的旋转矩阵:extrinsicRot(加速度计、陀螺仪),extrinsicRPY(磁力计)。注意:如果你使用的IMU三者在同一个坐标系中,则extrinsicRot与extrinsicRPY的参数设置应该是一样的。
IMU alignment. LIO-SAM transforms IMU raw data from the IMU frame to the Lidar frame, which follows the ROS REP-105 convention (x - forward, y - left, z - upward). To make the system function properly, the correct extrinsic transformation needs to be provided in “params.yaml” file. The reason why there are two extrinsics is that my IMU (Microstrain 3DM-GX5-25) acceleration and attitude have different cooridinates. Depend on your IMU manufacturer, the two extrinsics for your IMU may or may not be the same. Using our setup as an example:
- we need to set the readings of x-z acceleration and gyro negative to transform the IMU data in the lidar frame, which is indicated by “extrinsicRot” in “params.yaml.”
- The transformation of attitude readings might be slightly different. IMU’s attitude measurement q_wb usually means the rotation of points in the IMU coordinate system to the world coordinate system (e.g. ENU). However, the algorithm requires q_wl, the rotation from lidar to world. So we need a rotation from lidar to IMU q_bl, where q_wl = q_wb * q_bl. For convenience, the user only needs to provide q_lb as “extrinsicRPY” in “params.yaml” (same as the “extrinsicRot” if acceleration and attitude have the same coordinate).
我在实验过程中已经注意到这个问题,并进行了相应的修改,但是仍然出现转弯处失败的问题。
IMU数据频率
更换为外部的/Xsens MTi-G-700(九轴400Hz)成功解决。
作者建议最低使用200Hz的IMU。当然六轴IMU也是可以使用的,只不过要换成对应的六轴版本,Ouster内部的IMU最大的问题其实不是六轴,而是只有100Hz。
The performance of the system largely depends on the quality of the IMU measurements. The higher the IMU data rate, the better the system accuracy. We use Microstrain 3DM-GX5-25, which outputs data at 500Hz. We recommend using an IMU that gives at least a 200Hz output rate. Note that the internal IMU of Ouster lidar is an 6-axis IMU.
取消imageProjection.cpp文件中的注释,能够查看IMU数据是否与传感器的移动相对应。(检验外参是否标定成功)
IMU debug. It’s strongly recommended that the user uncomment the debug lines in “imuHandler()” of “imageProjection.cpp” and test the output of the transformed IMU data. The user can rotate the sensor suite to check whether the readings correspond to the sensor’s movement. A YouTube video that shows the corrected IMU data can be found here (link to YouTube).
LIO-SAM中需要注意的地方
总结
LIO-SAM预积分部分还是比较敏感的,针对无人车平台,行驶速度较慢,平台稳定,晃动幅度小,IMU频率可以设置的较低一些。但是,针对晃动较大的平台,还是要使用较高频率的IMU数据,否则容易在角度变化较大的时刻给出一个错误的IMU姿态数据,这个错误的数据进而引发Lidar点云的错误匹配。整个系统就直接飘飞了。
有几个Issue写的很详细,供大家参考:
https://github.com/TixiaoShan/LIO-SAM/issues/94
https://github.com/TixiaoShan/LIO-SAM/issues/209
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)