--version
了~
SLAM
(我取的项目名,随意即可~)Readme
中的简介,概述可以说是加快3D可视化和UI交互的OpenGL库git clone
之后,安装Pangolin必须的依赖
sudo apt install libgl1-mesa-dev
sudo apt install libglew-dev
,也是OpenGL的库sudo apt install cmake
,CMake就要好好介绍介绍了~在openCV下载与MacOS系统下的cLion配置一文中,我已经粗浅的接触到C与C++编译环境的配置,此处又涉及而且刚刚结束的一学期OS课程中粗浅地学习了链接等知识,故而在CMake & Make——链接初探一文中看看CMake & Make~sudo apt install pkg-config
& sudo apt install pkg-config
sudo apt install ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libavdevice-dev
项目涉及硬件及软件编解码,FFMPEG也是编解码常用的平台,故下载sudo apt install libdc1394-22-dev libraw1394-dev
适用于firewire camera,项目仅涉及视频流层面,但为未涉及摄像头层面,故未下载git://github.com/ktossell/libuvc.git
项目确实采用的是UVC camera,相关介绍可见libuvc与webcam的开发(一) - UVC协议,但是我么购买的是商家集成封装好的直接USB3.0接口导出视频流的摄像机,故此处不需。sudo apt install libjpeg-dev libpng12-dev libtiff5-dev libopenexr-dev
cmake
指令在“CMake & Make——链接初探“一文中也有介绍)
Pangolin/src/display/device/display_x11.cpp
,改变第110行的GLX_DOUBLEBUFFER , glx_doublebuffer ? True : False,
为 GLX_DOUBLEBUFFER , glx_doublebuffer ? False : False,
// 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/
生成了一堆.o
可执行文件,pangolin配置完成
测试安装是否成功,可以在/usr/local/bin/include
目录下查找。
2.4.3
& 2.4.11
& 3.2
SLAM
目录下tar -zxvf [filename.tar.gz]
(Linux下的打包解压,随意搜索即得,至于tar
之后参数的意义倒是非常好奇)sudo adt-get install libgtk2.0-dev
和 pkg-config sudo apt-get install pkg-config
cd opencv-3.2.0/
mkdir build
cd build
cmake ..
make # wait for several minutes
# a lot of guidance of this instruction is `make -j4`
# but i do not find out the meaning of parameter -j4, so i give up to use it
sudo make install # after compiling, install it to /usr/local/bin, so "sudo" higher permission is needed.
pkg-config --modversion opencv
3.2.0
tar -jxvf [filename.tar.bz2]
cd [eigen] # file name of eigen dir
mkdir build
cd build
cmake ..
make
sudo make install
但在进行了第三行cmake时
Boost
BLAS
LAPACK
,一个基础库,两个和线性代数相关的库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
cmake ..
及其之后的指令操作这种方法,最终可用 /usr/local/include/eigen3/Eigen/src/Core/util$ vim Macros.h
查看版本 3.3.7
,认为安装成功
发现 sudo apt-get install libeigen3-dev
,一条指令即可完成安装,之后 cd /usr/include/eigen3/Eigen/src/Core/util/
目录下的 Macros.h
查看版本号为 3.2.92
符合版本要求
Thirdparty
中有,而且build.sh
文件里面也有想过安装,故不需要自己安装。cd ORB_SLAM2-master/
chomd +x build.sh
,运行 ./build.sh
vim build.sh
查看shell文件,发现在此文件中运行环境已经全部配置好make -j
使用多编译器,容易崩,本机运行也崩了一次,在vim中将所有 make -j
改为 make
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
error: usleep is not declared in this scope
,加入下面的头文件:#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
也思考过把这三条头文件加入某个库函数比如 system.h
但是未找到,故尚未实施
最终得到可执行的“ libORB_SLAM2.so at lib folder and the executables mono_tum, mono_kitti, rgbd_tum, stereo_kitti, mono_euroc and stereo_euroc in Examples folder."
下载Vicon Room 1 01到项目SLAM文件夹下,在ORB...文件夹下输入
/ORB_SLAM2-master$ ./Examples/Stereo/stereo_euroc Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml ../mav0/cam0/data ../mav0/cam1/data ./Examples/Stereo/EuRoC_TimeStamps/V101.txt
terminate called after throwing an instance of ‘std::runtime_error‘ what(): Pangolin X11: Unable to retrieve framebuffer options Aborted (core dumped)
/parallels/Desktop/slam/opencv-3.2.0/modules/highgui/src/window.cpp:565: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow
sudo adt-get install libgtk2.0-dev
and pkg-config sudo apt-get install pkg-config
,然后re-runyzy
于大二结束后的暑假
原文:https://www.cnblogs.com/yzy11235/p/11269537.html