Ubuntu18.04 —— 新系统从头安装ORB-SLAM3过程(2022年)

Ubuntu18.04 —— 新系统从头安装ORB-SLAM3过程(2022年)

  • 一、下载ORB-SLAM3
    • 注意(重要)
  • 二、安装支持C++11特性的编译器
  • 三、Pangolin
  • 四、openCV
  • 五、Eigen
  • 六、boost
  • 七、ORB-SLAM3
  • 八、运行结果
  • 查询指定包的详情

一、下载ORB-SLAM3

#具体安装那一版,得具体问题具体分析,我前两版都没成功
#git clone https://github.com/UZ-SLAMLab/ORB_SLAM3.git
#git clone https://github.com/UZ-SLAMLab/ORB_SLAM3/tree/v1.0-release.git
git clone https://github.com/UZ-SLAMLab/ORB_SLAM3/tree/v0.4-beta.git

注意(重要)

在用masterv1.0-release进行安装时,到最后没有运行界面的动画,只生成了CameraTrajectory.txt KeyFrameTrajectory.txt文件,可能是有什么bug,所以推荐安装v0.4-beta,这一版最终成功了!!!
现在是2022年1月2日写,说不定随时间过去作者会进行修复,具体问题具体分析!!!
(可怜我以为是我的问题,安装了好几次都不成功,白白浪费了好几天时间,大哭!!!)
Ubuntu18.04 —— 新系统从头安装ORB-SLAM3过程(2022年)_第1张图片

二、安装支持C++11特性的编译器

sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install git

三、Pangolin

sudo apt install libgl1-mesa-dev
sudo apt install libglew-dev
sudo apt install libpython2.7-dev
sudo apt install pkg-config
sudo apt install libegl1-mesa-dev libwayland-dev libxkbcommon-dev wayland-protocols
git clone https://github.com/stevenlovegrove/Pangolin/tree/v0.5.git    # v-0.5
cd Pangolin
mkdir build
cd build
cmake ..         #有的地方写 cmake -DCPP11_NO_BOOSR=1 .. 也可以,#待验证区别
cmake --build .  #有的地方写 make 也是一样的
sudo make install      (这个也是需要的,网上很多教程没有这个命令)

四、openCV

#查询指定包的详情
apt-cache show libopencv-dev   #version 3.2.0
sudo apt install libopencv-dev --fix-missing
#opencv版本检测
pkg-config --modversion opencv

五、Eigen

apt-cache show libeigen3-dev  #Version: 3.3.4-4
sudo apt install libeigen3-dev --fix-missing

六、boost

sudo apt-get install  libboost-system-dev
或者
sudo apt install libboost-all-dev
sudo apt-get install openssl 
sudo apt-get install libssl-dev

七、ORB-SLAM3

cd ORB_SLAM3
chmod +x build.sh
./build.sh

八、运行结果

$ ./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUM1.yaml ./dataset/rgbd_dataset_freiburg1_xyz

ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: Monocular

Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!


Camera Parameters: 
- fx: 517.306
- fy: 516.469
- cx: 318.643
- cy: 255.314
- k1: 0.262383
- k2: -0.953104
- k3: 1.16331
- p1: -0.005358
- p2: 0.002628
- fps: 30
- color order: RGB (ignored if grayscale)

ORB Extractor Parameters: 
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7

-------
Start processing sequence ...
Images in the sequence: 798

Framebuffer with requested attributes not available. Using available framebuffer. You may see visual artifacts.New Map created with 89 points
Wrong initialization, reseting...
System Reseting
Reseting Local Mapper... done
Reseting Loop Closing... done
Reseting Database... done
New Map created with 88 points
Wrong initialization, reseting...
System Reseting
Reseting Local Mapper... done
Reseting Loop Closing... done
Reseting Database... done
New Map created with 97 points
Wrong initialization, reseting...
System Reseting
Reseting Local Mapper... done
Reseting Loop Closing... done
Reseting Database... done
New Map created with 93 points
Wrong initialization, reseting...
System Reseting
Reseting Local Mapper... done
Reseting Loop Closing... done
Reseting Database... done
New Map created with 80 points
Wrong initialization, reseting...
System Reseting
Reseting Local Mapper... done
Reseting Loop Closing... done
Reseting Database... done
New Map created with 103 points
-------

median tracking time: 0.0215208
mean tracking time: 0.0238858

Saving keyframe trajectory to KeyFrameTrajectory.txt ...

trajectory saved!

查询指定包的详情

#查询指定包的详情
apt-cache show package

Ubuntu20.04 —— 新系统从头安装ORB-SLAM3过程(2022年)

你可能感兴趣的:(slambook2,实践复现,slam)