码迷,mamicode.com
首页 > 系统相关 > 详细

手把手搭建UBUNTU版ORB—SLAM

时间:2020-03-24 00:55:29      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:nis   uda   code   support   get   ror   ESS   usr   map   

对于视觉SLAM来说,目前主流的开源框架使用较贫的莫过于ORB-SLAM

接下来就从零开始搭建开发环境,在UBUNTU上运行ORB-SLAM需要一些支持包:

1、git

    sudo apt-get install git

2、cmake

   sudo apt-get install cmake

3、Pangolin

sudo apt-get install libglew-dev libpython2.7-dev
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cmake ..
make
sudo make install

4、Opencv   2.4.11

sudo apt-get install build-essential
apt-get install cmake git libgtk2.0-dev pkg-config lib
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev 
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev 
cd opencv-2.4.11
mkdir build
cd build
sudo cmake .. -D CMAKE_BUILD_TYPE=Release -DCUDA_nppi_LIBRARY=true =DWITH_CUDA=OFF -DBUILD_TIFF=ON
make 
sudo make install

5、Eigen3

  sudo apt-get install libeigen3-dev

6、DBoW2

7、g2o

 

8、ORB_SLAM

   git clone https://github.com/raulmur/ORB_SLAM2.git ORB_SLAM2

   cd ORB_SLAM2

   chmod +x build.sh

   ./build.sh

编译中遇到问题:

1、error:linux/videodev.h : no such file or directory

sudo apt-get install libv4l-dev

sudo ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h

2、/home/jim/beantechs/VSLAM/opencv-2.4.11/modules/contrib/src/rgbdodometry.cpp:65:47: fatal error: unsupported/Eigen/MatrixFunctions: No such file or directory
 #  include <unsupported/Eigen/MatrixFunctions>
找到Eigen3的目录,搜索MatrixFunctions,拷贝整个unsupported目录到/home/jim/beantechs/VSLAM/opencv-2.4.11/modules/contrib/src/目录下

 

或是将对应的文件夹复制到/usr/include/下,举例Eigen安装到了/usr/include/eigen3/,则执行:

 

$ cd /usr/include/eigen3/
$ sudo cp -r unsupported/ ..
$ sudo cp -r Eigen/ ..

3、ORB_SLAM2/src/LocalMapping.cc:108:20: error: ‘usleep’ was not declared in this scope
         usleep(3000)

打开相应的代码,在头文件里面添加usleep 的头文件unistd.h

 

 

手把手搭建UBUNTU版ORB—SLAM

标签:nis   uda   code   support   get   ror   ESS   usr   map   

原文地址:https://www.cnblogs.com/jimchen1218/p/12556182.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!