ubuntu16系统下编译ORB-SLAM3

1,在github上下载ORB-SLAM3.(或者在码云上下载)

git clone https://github.com/UZ-SLAMLab/ORB_SLAM3.git

2,此时可以在ORB-SLAM3文件夹中打开README.md

# 2. Prerequisites
We have tested the library in **Ubuntu 16.04** and **18.04**, but it should be easy to compile in other platforms. A powerful computer (e.g. i7) will ensure real-time performance and provide more stable and accurate results.
.
.
.
.
## Python
Required to calculate the alignment of the trajectory with the ground truth. **Required Numpy module**.

* (win) http://www.python.org/downloads/windows
* (deb) `sudo apt install libpython2.7-dev`
* (mac) preinstalled with osx

在整个的系统的前提条件(#2)中可以看到系统包含的第三方库:Pangolin,OpenCV,Eigen3,Python,DBoW2 and g2o

其中DBoW2 and g2o在系统的Thirdparty中已经存在,所以不需要另外下载,eigen和python已经集成在ubuntu中只需在终端中下载就可以了。此时,需要下载Pangolin和Opencv。

3,编译环境

     (1 ) Pangolin:本质上是图形界面,展示系统的运行状态

git clone https://github.com/stevenlovegrove/Pangolin.git
sudo apt install libglew-dev cmake libpython2.7-dev pkg-config libegl1-mesa-dev libwayland-dev libxkbcommon-dev wayland-protocols
cd Pangolin
mkdir build
cd build
cmake ..
make -j4
sudo make install

    (2) Opencv的安装可以参考我的上一篇文章

    (3) Eigen3是一个矩阵处理库,ORB-SLAM3中要求Eigen的版本在3.1.0以上,在ubuntu16使用apt安装满足条件。

sudo apt-get install libeigen3-dev

    (4) python的支持,其中主要是为了ORB-SLAM3中满足数据处理和运行结果展示。

sudo apt install libpython2.7-dev

至此需要安装的第三方库安装完成。

4,编译ORB-SLAM3(非ROS版)

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

其中出现错误:在cmakelists.txt文件中报错,找不到eigen 3.1.0 。这是因为在文件的47行处为“find_package(Eigen3  3.1.0 REQUIRED) ”,在ubuntu16上安装的是3.4.9版本,所以不同,在此处可以将3.1.0删除就可以修复错误。之后,编译g2o时也会出现同样的错误,也是采用同样的方式解决问题。

完成后再运行./build.sh。出现错误:error: openssl/md5.h: No such file or directory

 解决方法是:

sudo apt-get install libssl-dev

此时重新编译就可以得到编译结果了。

 

        

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值