FASTER_LIO_SAM是将Fast-lio/Faster-lio/LIO-SAM集成,完成一个IEKF(Fast_lio)+IVox(Faster_Lio)+GTSAM(LIO-SAM)的SLAM方法,目前只运行了MID 70激光雷达。项目链接:faster_lio_sam ;也可以下载修改编译文件后的版本:faster_lio_sam_ws
################################LIVOX激光雷达操作步骤############################
Livox SDK 依赖于 cmake 。你可以通过 apt 工具安装这些依赖包 :
sudo apt install cmake
在 Livox SDK 目录中,执行以下指令编译工程:
git clone https://github.com/Livox-SDK/Livox-SDK.git
cd Livox-SDK
cd build && cmake ..
make
sudo make install
下载&&编译
cd ws_livox
catkin_make
注意写道bashrc下面:
gedit ~/.bashrc
source xx/ws_livox/devel/setup.bash
下载后解压放置于xx/FAST_LIO-main/include/ikd-Tree/下
cd ~/$A_ROS_DIR$/src
git clone https://github.com/hku-mars/FAST_LIO.git
cd FAST_LIO
git submodule update --init
cd ../..
catkin_make
source devel/setup.bash
安装依赖参照:在ubuntu18.04上安装以及运行Faster-lio
参照:Robosense在LIOSAM中的使用和关于LIO-SAM编译时出现错误 /usr/bin/ld: 找不到 -lBoost::timer
下载后进入工作空间
cd faster_lio_sam_ws
catkin_make
问题一:/usr/bin/ld: 找不到 -lBoost::timer
参照:关于LIO-SAM编译时出现错误 /usr/bin/ld: 找不到 -lBoost::timer
问题二:C++17编译问题
/home/test/faster_lio_sam_ws/src/faster_lio_sam-main/include/ivox3d/eigen_types.h:78:16: error: the type ‘const faster_lio::<lambda(const Vec2i&, const Vec2i&)>’ of ‘constexpr’ variable ‘faster_lio::less_vec2i’ is not literal
78 | constexpr auto less_vec2i = [](const Vec2i& v1, const Vec2i& v2) {
| ^~~~~~~~~~
/home/test/faster_lio_sam_ws/src/faster_lio_sam-main/include/ivox3d/eigen_types.h:78:30: note: ‘faster_lio::<lambda(const Vec2i&, const Vec2i&)>’ is not literal because:
78 | constexpr auto less_vec2i = [](const Vec2i& v1, const Vec2i& v2) {
| ^
cc1plus: note: ‘faster_lio::<lambda(const Vec2i&, const Vec2i&)>’ is a closure type, which is only literal in C++17 and later
参照:faster_lio_sam_ws在CMakeList.txt文件的头部中添加:
ADD_COMPILE_OPTIONS(-std=c++17 )
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
可以使用香港大学的包:链接: https://pan.baidu.com/s/161QcTk4NWxPhClutooIZoA?pwd=cpr7 提取码: cpr7 。
查看frame_id:
播放bag:
rosbag play hku_campus_seq_00.bag
查看frame_id命令:
rostopic echo /livox/lidar |grep frame_id
ros:
pointCloudTopic: "/livox/lidar" # Point cloud data
imuTopic: "/livox/imu" # IMU data
odomTopic: "odometry"
lidarFrame: "camera_init"
baselinkFrame: "camera_init"
odometryFrame: "odom"
mapFrame: "map"
通过以下命令启动:
rosbag play hku_campus_seq_00.bag
roslaunch faster_lio_sam run.launch