SLAM 算法复现记录:ct_lio
ct_lio:采用高翔《自动驾驶》书中的误差卡尔曼滤波融合了ct-icp的配准方法和imu的里程计
1. 项目基本信息
- 系统:Ubuntu 20.04
- ROS 版本:Noetic
- 项目地址:https://github.com/chengwei0427/ct-lio
- 这是我的复现过程记录,并非教程,因此会有一些不必要的操作
2. 算法复现
cmake/package.cmake 中的有些依赖是作者本地的依赖,需要进行修改。
查看一些电脑安装的版本
Eigen3,pkg-config –modversion eigen3 ,3.3.7
sophus 可以通过cmake --find-package -DNAME=Sophus -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST 命令查询是否安装,报错没安装,手动安装:参考网址: https://github.com/strasdat/Sophus
glog 没安装,采用vcpkg安装:https://google.github.io/glog/stable/packages/
csparse 没安装,sudo apt install libsuitesparse-dev
cholmod 没安装,sudo apt install libsuitesparse-dev
pcl find /usr/include -type f -name "pcl_config.h" /usr/include/pcl-1.10/pcl/pcl_config.h是1.10版本
opencv 安装过了
ceres 看作者写的似乎需要2.10版本,安装参考http://ceres-solver.org/installation.html
G2O 作者是20201223这个版本
yaml-cpp sudo apt-get install libyaml-cpp-dev
遇到找不到livox_ros_driver的头文件的错误
解决办法:在 cmake/package.cmake 的前面的 include_directories 中加入 ${catkin_INCLUDE_DIRS} ,为
include_directories(${CMAKE_SOURCE_DIR}/../devel/include# 引用ros生成的msg header
${catkin_INCLUDE_DIRS} )
报错:

修改cmakelists中的c++版本,将14改为17
顺便修改一下 ./apps/main_eskf_rosbag.cpp 大概189行的 std::string bag_path_ = "/home/sd101t/Downloads/backups/datasets/ct_lio/2022-08-30-20-33-52_0.bag"; 数据集路径,然后进行编译
运行节点时报错:

修改launch文件,调用调试模式

未安装xterm,安装:sudo apt-get install xterm
未安装gdb,安装 sudo apt-get install gdb
运行节点再次报错:

解决: sudo apt update && sudo apt install ros-noetic-jsk-rviz-plugins
复现成功,上面图中的的报错是因为yaml配置文件的问题
3. 可视化
