搭建ORB-SLAM2运行环境
作者:互联网
1、依赖包安装
a、CMake:
$ sudo apt-get install cmake
b、Pangolin:
$ git clone https://github.com/stevenlovegrove/Pangolin.git
$ cd Pangolin
$ mkdir build && cd build
$ cmake …
$ cmake --build .
c、OpenCV:
1)依赖库:
$ sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff5-dev libjasper-dev libopenexr-dev libtbb-dev python-numpy python-matplotlib libxvidcore-dev libx264-dev libboost-all-dev libflann1.8 libflann-dev libopenni2-dev
2)进入页面下载opencv-3.4.11.zip ,完成下载后打开所在文件夹进行解压:
$ unzip opencv-3.4.11.zip
3)依次执行以下命令:
$ cd opencv-3.4.11
$ mkdir build && cd build
$ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local …
$ make -j4
$ sudo make install
d、Eigen3:
$ sudo apt-get install libeigen3-dev
e、PCL:
$ sudo apt install libpcl-dev
($ git clone https://github.com/PointCloudLibrary/pcl.git
$ cd pcl
$ mkdir build && cd build
$ cmake …; make
$ sudo make install)
f、VTK6:
$ sudo apt-get install libvtk6-dev libvtk6.2
g、octomap:
$ git clone https://github.com/OctoMap/octomap
$ mkdir build; cd build
$ cmake …; make -j4
$ sudo make install
h、qt5:
1)下载文件qt-opensource-linux-x64-5.12.9.run: https://download.qt.io/official_releases/qt/
2)安装依赖库:
$ sudo apt-get install build-essential
$ sudo apt-get install libx11-dev libxext-dev libxtst-dev
$ sudo apt-get install xlibmesa-gl-dev libglu1-mesa-dev
3)安装qt,一路next即可:
$ chmod +x qt-opensource-linux-x64-5.12.9.run
$ ./qt-opensource-linux-x64-5.12.9.run
2、编译安装ORB-SLAM2
a、下载修改版ORB-SLAM2:
$ git clone https://github.com/Quitino/IndoorMapping
b、编译g2o:
$ cd IndoorMapping/Thirdparty/g2o
$ mkdir build && cd build
$ cmake …; make
c、编译DBoW2:
$ cd …/…/DBoW2
$ mkdir build && cd build
$ cmake …; make
d、编译整个工程:
$ cd …/…/…
$ mkdir build && cd build
$ cmake … //可能出现VTK文件找不到的问题
$ make
3、下载fr1_desk数据集,并移动到工程根目录下的Dataset目录
4、使用工程根目录下的脚本测试运行:
$ ./fr1_desk.sh
标签:cmake,sudo,dev,cd,SLAM2,build,install,ORB,搭建 来源: https://blog.csdn.net/renmengqisheng/article/details/120650393