ubuntu20.04安装lio-sam

1、依赖功能包安装

        sudo apt install ros-noetic-robot-state-publisher

        sudo apt-get install ros-noetic-robot-localization libmetis-dev

2、boost版本

        boost版本查看:cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION"

        boost版本为1.78,为1.71时编译报错,报错内容为:

        error: missing binary operator before token "("    60 | #if PTHREAD_STACK_MIN > 0

        boost官方链接:Version 1.78.0

boost安装:

        ./bootstrap.sh

        sudo ./b2 install

        执行以上两步骤即可。

3、GTSAM安装

        sudo add-apt-repository ppa:borglab/gtsam-develop
        sudo apt update
        sudo apt install libgtsam-dev libgtsam-unstable-dev 

        版本查看:dpkg -s libgtsam-dev  | grep Version

        保证版本不低于4.03

4、修改CmakeList.txt

        set(CMAKE_CXX_FLAGS "-std=c++11")更改为set(CMAKE_CXX_STANDARD 14)

5、修改include utility.h

        #include <opencv2/opencv.hpp>替换#include <opencv/cv.h>

        并且该头文件在pcl的头文件下面

6、数据集链接

https://drive.google.com/drive/folders/1gJHwfdHCRdjP7vuT556pv8atqrCJPbUq

7、运行

roslaunch lio_sam run.launch

rosbag play ***.bag

上一篇:【代码随想录——图论——岛屿问题】-2.岛屿的最大面积


下一篇:E4.【C语言】练习:while和getchar的理解