小觅双目摄像头运行ORB_SLAM2例程

0x00 前提

已经安装好SDK,安装好ROS kinetic ,ubuntu16.04 arm64

0x01 编译按照ORB_SLAM2 demo

1、下载demo到本地

1
git clone https://github.com/slightech/MYNT-EYE-ORB-SLAM2-Sample.git

2、编译安装orb-slam2

1
2
cd ./MYNT-EYE-ORB-SLAM2-Sample 
./build.sh

坑一

编译报错如下

1
2
3
4
5
6
Build type: Release
-- Using flag -std=c++11.
-- No preference for use of exported glog CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported glog CMake configuration if available.
-- Failed to find installed glog CMake configuration, searching for glog build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for glog, will perform search for installed glog components.

解决 安装glog

1
2
git clone https://github.com/boboxxd/glog.git
./autogen.sh && ./configure && make && sudo make install

顺便按照gflags

1
2
3
4
5
6
git clone https://github.com/gflags/gflags
sudo apt-get install autoconf automake libtool
#进入源码目录(即gflags文件夹)
cmake .
make -j 24
sudo make install

0x02 运行

1
cd ./MYNT-EYE-ORB-SLAM2-Sample/Examples/Stereo 

进入demo目录
把vocabulary目录下的txt文件拷贝过来,也可以根据readme直接填写相对路径

1
./stereo_mynteye ORBvoc.txt cam_stereo.yaml 0