ubuntu18.04搭建SC-A-LOAM环境并运行

介绍: 本文主要记录在ubuntu1804系统下搭建SC-A-LOAM环境,然后借助数据集进行运行,对环境搭建和运行过程出现的问题和解决思路进行记录和总结,其中对于各个步骤中的路径需要自己进行调整。

1搭建A-LOAM环境

  1. 安装ROS
    安装ubuntu1804对应的版本
  2. 安装Ceres Solver
    官网链接:http://ceres-solver.org/installation.html
# 下载ceres安装包
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev libgflags-dev
# Use ATLAS for BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse and CXSparse (optional)
sudo apt-get install libsuitesparse-dev
tar zxf ceres-solver-2.1.0.tar.gz
mkdir ceres-bin
cd ceres-bin
cmake ../ceres-solver-2.1.0
make -j3
make test
# Optionally install Ceres, it can also be exported using CMake which
# allows Ceres to be used without requiring installation, see the documentation
# for the EXPORT_BUILD_DIR option for more information.
# 最后一步将make install 改为 sudo make install
sudo make install
  1. 安装pcl
sudo apt install libpcl-dev
  1. 安装gtsam
    参考链接:https://blog.csdn.net/qq_41690864/article/details/118711743
wget -O ~/Downloads/gtsam.zip https://ghproxy.com/https://github.com/borglab/gtsam/archive/4.0.2.zip
cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
cd ~/Downloads/gtsam-4.0.2/
mkdir build && cd build
cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..
sudo make install -j8

2 编译SC-A-LOAM

参考链接:https://github.com/gisbi-kim/SC-A-LOAM

mkdir -p ~/catkin_scaloam_ws/src
cd ~/catkin_scaloam_ws/src
git clone https://github.com/gisbi-kim/SC-A-LOAM.git
cd ../
catkin_make
source ~/catkin_scaloam_ws/devel/setup.bash
roslaunch aloam_velodyne aloam_mulran.launch # for MulRan dataset setting 

3 运行SC-A-LOAM

3.1播放bag包运行

roslaunch aloam_velodyne aloam_velodyne_VLP_16.launch
rosbag play YOUR_DATASET_FOLDER/nsh_indoor_outdoor.bag

3.2运行报错

  1. 报错提示找不到动态库libmetis.so
    ubuntu18.04搭建SC-A-LOAM环境并运行_第1张图片
    解决办法:
sudo cp /usr/local/lib/libmetis.so /usr/lib
  1. rm: cannot remove '/Scans/': No such file or directory,mkdir: cannot create directory ‘/Scans/’: Permission denied
    在这里插入图片描述
    解决办法:在aloam_velodyne_VLP_16.launch加一行路径信息,自己创建一下相应的目录,或者直接运行程序,让系统自动生成,然后重新运行一下
    在这里插入图片描述

3.3运行结果

ubuntu18.04搭建SC-A-LOAM环境并运行_第2张图片

你可能感兴趣的:(SLAM,计算机视觉,自动驾驶)