home archives github knives links
tags orb-slam
categories
only title title and content
orb-slam2笔记

安装

安装依赖

Pangolin

git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cmake ..
make
sudo make install

OpenCV

TODO

Eigen

编译

修改OpenCV版本

修改根CMakeLists.txt:

# find_package(OpenCV 3.0 QUIET)
set(OpenCV_DIR /home/lynx/fuck_mount/opencv/install_dir/4_1_0/lib/cmake/opencv4)
find_package(OpenCV 4.1 QUIET)

然后需要更换所有#include <opencv/cv.h>

报错及解决

  1. usleep is not declared: 在所有含usleep*.cc文件加入#include <unistd.h>

  2. static assertion failed: 修改include/LoopClosing.h(const的位置)

    typedef map<KeyFrame*,g2o::Sim3,std::less<KeyFrame*>,
    Eigen::aligned_allocator<std::pair<const KeyFrame*, g2o::Sim3> > > KeyFrameAndPose;
    typedef map<KeyFrame*,g2o::Sim3,std::less<KeyFrame*>,
    Eigen::aligned_allocator<std::pair<KeyFrame* const, g2o::Sim3> > > KeyFrameAndPose;

使用

结果