手把手搭建UBUNTU版ORB—SLAM

对于视觉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/目录下

猜你喜欢

转载自www.cnblogs.com/jimchen1218/p/12556182.html