LeGO-LOAM
这个资源库包含了用于ROS兼容的UGVs的轻量级和地面优化的激光雷达测距和绘图(LeGO-LOAM)系统的代码。该系统采用Velodyne VLP-16激光雷达的点云(水平放置)和可选的IMU数据作为输入。它实时输出6D姿态估计。该系统的演示可以在这里找到 ->www.youtube.com/watch?v=O3t…
激光雷达-惯性测向
一个更新的激光雷达初始测距包,LIO-SAM,已经开源并可用于测试。
依赖性
-
ROS(用indigo、kinetic和melodic测试)。
-
gtsam(佐治亚理工学院平滑和绘图库,4.0.0-alpha2)
wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.0-alpha2.zip cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/ cd ~/Downloads/gtsam-4.0.0-alpha2/ mkdir build && cd build cmake .. sudo make install
编译
你可以使用以下命令来下载和编译该软件包。
cd ~/catkin_ws/src
git clone https://github.com/RobustFieldAutonomyLab/LeGO-LOAM.git
cd ..
catkin_make -j1
当你第一次编译代码时,你需要在 "catkin_make "后面添加"-j1 "以生成一些消息类型。以后的编译就不需要"-j1 "了。
新激光雷达
使代码适应新的传感器的关键是确保点云可以正确地投射到一个范围图像上,并且可以正确地检测到地面。例如,VLP-16的角度分辨率为0.2°,沿两个方向为2°。它有16个光束。底部光束的角度为-15°。因此,"utility.h "中的参数被列举如下。当你实现新的传感器时,请确保ground_cloud有足够的点进行匹配。在你发表任何问题之前,请阅读这个。
extern const int N_SCAN = 16;
extern const int Horizon_SCAN = 1800;
extern const float ang_res_x = 0.2;
extern const float ang_res_y = 2.0;
extern const float ang_bottom = 15.0;
extern const int groundScanInd = 7;
另一个Velodyne HDL-32e范围图像投影的例子。
extern const int N_SCAN = 32;
extern const int Horizon_SCAN = 1800;
extern const float ang_res_x = 360.0/Horizon_SCAN;
extern const float ang_res_y = 41.333/float(N_Scan-1);
extern const float ang_bottom = 30.666666;
extern const int groundScanInd = 20;
新内容:增加了一个新的useCloudRing标志,以帮助点云投影(即VLP-32C、VLS-128)。Velodyne点云有 "环 "通道,直接给出测距图像中的点行ID。其他激光雷达可能有相同类型的通道,即Ouster的 "r"。如果你使用的是非Velodyne激光雷达,但它有一个类似的 "环 "通道,你可以改变utility.h中的PointXYZIR定义和imageProjection.cpp中的相应代码。
对于KITTI用户,如果你想用HDL-64e使用我们的算法,你需要为这种投影写出自己的实现。如果点云的投影不正确,你会失去很多点和性能。
如果你的激光雷达与IMU一起使用,确保你的IMU与激光雷达正确对齐。该算法使用IMU数据来纠正由传感器运动引起的点云失真。如果IMU没有正确对齐,使用IMU数据会使结果恶化。该软件包不支持Ouster激光雷达IMU,因为LeGO-LOAM需要一个9方位的IMU。
运行软件包
- 运行发射文件。
roslaunch lego_loam run.launch
注意。参数"/use_sim_time "设置为 "true "用于模拟,"false "用于真实机器人使用。
- 播放现有的包文件。
rosbag play *.bag --clock --topic /velodyne_points /imu/data
注意:虽然"/imu/data "是可选的,但它也是"/imu/data"。虽然/imu/data是可选的,但如果提供的话,可以极大地提高估计的准确性。一些样本包可以从这里下载。
新数据集
这个数据集,即史蒂文斯数据集,是用Velodyne VLP-16拍摄的,它被安装在史蒂文斯理工学院校园内的UGV--Clearpath Jackal。VLP-16的旋转速率被设置为10Hz。这个数据集有超过2万次的扫描和许多循环闭合。
引用LeGO-LOAM
如果您使用此代码,感谢您引用我们的LeGO-LOAM论文。
@inproceedings{legoloam2018,
title={LeGO-LOAM: Lightweight and Ground-Optimized Lidar Odometry and Mapping on Variable Terrain},
author={Shan, Tixiao and Englot, Brendan},
booktitle={IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
pages={4758-4765},
year={2018},
organization={IEEE}
}
循环闭合
本软件包中实现的闭环方法是一种基于ICP的天真方法。当测距仪漂移过大时,它往往会失败。对于更高级的闭环方法,有一个叫SC-LeGO-LOAM的软件包,它的特点是利用点云描述符。
速度优化
LeGO-LOAM的优化版本可以在这里找到。所有功劳归于@facontidavide。本目录中的改进包括但不限于:。
+ To improve the quality of the code, making it more readable, consistent and easier to understand and modify.
+ To remove hard-coded values and use proper configuration files to describe the hardware.
+ To improve performance, in terms of amount of CPU used to calculate the same result.
+ To convert a multi-process application into a single-process / multi-threading one; this makes the algorithm more deterministic and slightly faster.
+ To make it easier and faster to work with rosbags: processing a rosbag should be done at maximum speed allowed by the CPU and in a deterministic way.
+ As a consequence of the previous point, creating unit and regression tests will be easier.