ubuntu20.04 编译ALOAM LIO-SAM

ubuntu20.04跑A-LOAM代码实测_songjuc的博客-CSDN博客

参考了该博主,感谢

1、修改源代码

将四个.cpp文件中的/camera_init修改为camera_init
将scanRegistration.cpp中的 #include 修改为#include
修改kittiHelper.cpp中 CV_LOAD_IMAGE_GRAYSCALE为 cv::IMREAD_GRAYSCALE

2、修改Cmakelists.txt 

set( CMAKE_CXX_STANDARD 14)

然后就OK了

LIO-SAM

1 安装 TBB

            sudo apt-get install libtbb-dev

2   安装 MKL 这一步要用到 root 权限,步骤如下 

       

    1. sudo bash

    2. cd /Downloads
 
    3. wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
 
    4. apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
 
    5. rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
 
    6. exit

         sudo wget https://apt.repos.intel.com/setup/intelproducts.list -O /etc/apt/sources.list.d/intelproducts.list
 
         sudo wget https://apt.repos.intel.com/setup/intelproducts.list -O /etc/apt/sources.list.d/intelproducts.list

           sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'

         sudo apt-get update

         sudo apt-get install intel-mkl-2020.4-912

3 安装GTSAM(4.0.3) 

     cd gtsam

     mkdir build

      cd build

      cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..

      make check

      sudo make install

4  修改相关文件

在 LIO-SAM-master/include/utility.h 中修改 #include 为 #include

在 LIO-SAM-master/CMakeList.txt 中将 set(CMAKE_CXX_FLAGS "-std=c++11") 修改为set(CMAKE_CXX_STANDARD 14)
 

你可能感兴趣的:(ros,opencv,c++)