基于Ubuntu的ORB-SLAM2项目环境搭建过程

时间:2019-07-30 14:10:44   收藏:0   阅读:142

关于ORB-SLAM2

环境搭建

已有环境

创建环境

新建项目目录

安装Pangolin

  // under the directory of SLAM (the dir of my project)
  cd Pangolin
  mkdir build
  cd build
  cmake ..
  cmake --build .
  sudo make install     # can not find in the Readme.md of Pangolin GitHub, but it is necessary to install in /usr/local/bin/

安装OpenCV 3.2

安装Eigen

  1. 官网下载3.3.7版本到项目SLAM目录下
  2. 解压 tar -jxvf [filename.tar.bz2]
  3. CMake & Make,同上面几个几乎一样的步骤
cd [eigen] # file name of eigen dir
mkdir build
cd build 
cmake ..
make
sudo make install 
sudo apt-get update
sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev

技术分享图片

DBoW2 and g2o (Included in Thirdparty folder)

尝试运行

  1. 在项目目录SLAM下 cd ORB_SLAM2-master/
  2. 一系列cmake & make:给权限 chomd +x build.sh,运行 ./build.sh
echo "Configuring and building Thirdparty/DBoW2 ..."

cd Thirdparty/DBoW2
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j

cd ../../g2o

echo "Configuring and building Thirdparty/g2o ..."

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j

cd ../../../

echo "Uncompress vocabulary ..."

cd Vocabulary
tar -xf ORBvoc.txt.tar.gz
cd ..

echo "Configuring and building ORB_SLAM2 ..."

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j
  1. Debug(回忆起了OS vim 干de bug的心酸经历...不过目前碰到的几个bug相对课上任务来说非常容易)
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

测试环境搭建是否成功

尝试数据集

成功运行双目数据集

技术分享图片

下一步


yzy

于大二结束后的暑假

原文:https://www.cnblogs.com/yzy11235/p/11269537.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!