【LIV-SLAM】8种3D激光SLAM环境配置与运行(Fast_lio,Faster-lio,point_lio,dlo,lego_loam,a_loam,lio_sam,lvi_sam
0. 参考工程
ubuntu20.04 ros version:noetic
这里标注一下:如果您有缘你刷到这篇blog,需要配置好得工程请在评论区留言,我会将配置好得工程分享给小伙伴,遇到解决不了得问题,也可以在评论区留言,我看到后会第一时间回复!
1. data prepare
HKU_MB_2020-09-20-13-34-51.bag
2. environment prepare
在ubuntu20.04下环境配置
install ros noetic:
reference:SLAM-application
config/avia.yaml中修改话题,将lid_topic和imu_topic修改为自己雷达的话题,雷达话题通过rosbag info xxx.bag 查看.
3. project prepare
3.1 Fast_lio 编译与运行
- Livox-sdk安装
git clone https://github.com/Livox-SDK/Livox-SDK.git
cd Livox-SDK
cd build && cmake ..
make
sudo make install
- Livox_ros_driver安装
# 将livox_ros_driver clone 到 ws_livox/src 下
git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src
- 修改config话题
cd ~/livo_ws/src
$ git clone https://github.com/gaoxiang12/faster-lio.git
$ cd faster-lio/thirdparty
$ tar -xvf tbb2018_20170726oss_lin.tgz
libmetis
$ cd ~/livo_ws
$ catkin build -DCUSTOM_TBB_DIR=$(pwd)/src/faster-lio/thirdparty/tbb2018_20170726oss -DCMAKE_BUILD_TYPE=Release
在/home/guqoiang/livo_ws/src/faster-lio/config/avia.yaml中修改话题
- how to run
在启动mapping_velodyne.launch or mapping_avia.yaml文件之前,务必需要先确认一下avia/velodyne雷达配置文件中的 topic 与 bag文件中数据的topic是否一致。
roslaunch fast_lio mapping_avia.launch
roslaunch fast_lio mapping_velodyne.launch
rosbag play HKU_MB_2020-09-20-13-34-51.bag
- result
3.2 Faster-LIO编译与运行
- install and configure
cd ~/livo_ws/src
git clone https://github.com/gaoxiang12/faster-lio.git
cd faster-lio/thirdparty
tar -xvf tbb2018_20170726oss_lin.tgz
cd ../../../ #cd ~/livo_ws
catkin build -DCUSTOM_TBB_DIR=/home/sun/livo_ws/src/faster-lio/thirdparty/tbb2018_20170726oss -DCMAKE_BUILD_TYPE=Release
在/home/guoqiang/livo_ws/src/faster-lio/config/avia.yaml中修改话题
- how to run
在启动mapping_velodyne.launch or mapping_avia.yaml文件之前,务必需要先确认一下avia/velodyne雷达配置文件中的 topic 与 bag文件中数据的topic是否一致。
roslaunch faster_lio mapping_avia.launch
rosbag play HKU_MB_2020-09-20-13-34-51.bag
- result
3.3 Point-LIO编译与运行
- 编译与运行
cd ~/livo_ws/src
git clone https://github.com/Livox-SDK/livox_ros_driver.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
cd ~/livo_ws/src
git clone --recursive https://github.com/hku-mars/Point-LIO.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
- how to run
在启动mapping_velodyne.launch or mapping_avia.yaml文件之前,务必需要先确认一下avia/velodyne雷达配置文件中的 topic 与 bag文件中数据的topic是否一致。
roslaunch point_lio mapping_avia.launch
rosbag play HKU_MB_2020-09-20-13-34-51.bag
- result
3.4 DLO编译与运行
- 编译与运行
Test Data :For your convenience, we provide example test data here (9 minutes, ~4.2GB). To run, first launch DLO (with default point cloud and IMU topics) via:
sudo apt install libomp-dev libpcl-dev libeigen3-dev
cd ~/livo_ws/src
git clone https://github.com/vectr-ucla/direct_lidar_odometry.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
- how to run
在启动mapping_velodyne.launch or mapping_avia.yaml文件之前,务必需要先确认一下avia/velodyne雷达配置文件中的 topic 与 bag文件中数据的topic是否一致。
在~/guoqiang/livo_ws/src/direct_lidar_odometry/ dlo.launch中修改话题
roslaunch direct_lidar_odometry dlo.launch
rosbag play dlo_test.bag
- result
3.5 lego_loam编译与运行
- 编译与运行
wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.3.zip
cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
cd ~/Downloads/gtsam-4.0.3/
mkdir build && cd build
cmake ..
https://blog.csdn.net/qq_74861634/article/details/132601967
cd ~/livo_ws/src
git clone https://github.com/RobustFieldAutonomyLab/LeGO-LOAM.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
error1:
CMakeFiles/mapOptmization.dir/src/mapOptmization.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:458: CMakeFiles/mapOptmization.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:323: CMakeFiles/imageProjection.dir/all] Error 2
In file included from /home/guoqiang/livo_ws/src/LeGO-LOAM/LeGO-LOAM/src/featureAssociation.cpp:35:
/home/guoqiang/livo_ws/src/LeGO-LOAM/LeGO-LOAM/include/utility.h:13:10: fatal error: opencv/cv.h: No such file or directory
13 | #include <opencv/cv.h>
| ^~~~~~~~~~~~~
compilation terminated.
In file included from /home/guoqiang/livo_ws/src/LeGO-LOAM/LeGO-LOAM/src/transformFusion.cpp:33:
/home/guoqiang/livo_ws/src/LeGO-LOAM/LeGO-LOAM/include/utility.h:13:10: fatal error: opencv/cv.h: No such file or directory
13 | #include <opencv/cv.h>
how to fixed?
#include "opencv2/imgproc/imgproc.hpp"
#It is still possible to use #include <cv.h> etc. but the recommended notation is:
CMakeLists add :
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
dataset
datasets :
Stevens-VLP16-Dataset -
how to run
在启动mapping_velodyne.launch or mapping_avia.yaml文件之前,务必需要先确认一下avia/velodyne雷达配置文件中的 topic 与 bag文件中数据的topic是否一致。
在~/guoqiang/livo_ws/src/direct_lidar_odometry/ dlo.launch中修改话题
#roslaunch lego_loam run.launch
roslaunch lego_loam run.launch
rosbag play *.bag --clock --topic /velodyne_points /imu/data
- result
3.6 A-LOAM编译与运行
- 编译与运行
cd ~/livo_ws/src
git clone https://github.com/Livox-SDK/livox_ros_driver.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
cd ~/livo_ws/src
git clone https://github.com/HKUST-Aerial-Robotics/A-LOAM.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
- how to run
在启动mapping_velodyne.launch or mapping_avia.yaml文件之前,务必需要先确认一下avia/velodyne雷达配置文件中的 topic 与 bag文件中数据的topic是否一致。
# Velodyne VLP-16 Example
# Download NSH indoor outdoor to YOUR_DATASET_FOLDER.
roslaunch aloam_velodyne aloam_velodyne_VLP_16.launch
rosbag play YOUR_DATASET_FOLDER/nsh_indoor_outdoor.bag
roslaunch aloam_velodyne aloam_velodyne_HDL_64.launch
roslaunch aloam_velodyne kitti_helper.launch
- result
3.7 LVI-SAM编译与运行
- 编译与运行
cd ~/livo_ws/src
git clone https://github.com/Livox-SDK/livox_ros_driver.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
cd ~/livo_ws/src
git clone https://github.com/TixiaoShan/LVI-SAM.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
- how to run
在启动run.launch文件之前,务必需要先确认一下avia/run.launch雷达配置文件中的 topic 与 bag文件中数据的topic是否一致。
roslaunch lvi_sam run.launch
rosbag play handheld.bag
- result
3.8 LVIO-SAM编译与运行
cd ~/livo_ws/src
git clone https://github.com/Livox-SDK/livox_ros_driver.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
cd ~/livo_ws/src
git clone https://github.com/TurtleZhong/LVIO-SAM.git
cd ..
catkin build -DCMAKE_BUILD_TYPE=Release
- how to run
在启动run.launch文件之前,务必需要先确认一下avia/run.launch雷达配置文件中的 topic 与 bag文件中数据的topic是否一致。
rosbag play kitti_2011_09_30_drive_0027_synced.bag --pause --clock #for kitti dataset.
rosbag play 2021-08-04-09-49-56.bag --pause --clock #for sim dataset.
- result