进入工程目录,我们发现有两个sh文件,一个是build.sh另一个是build_ros.sh

这两个都可以进行ORB_SLAM2的安装,我们先来看一下build.sh

 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

我们通过查看orb_slam的代码框架可以知道,有2个lib库需要我们编译。一个是DBoW2,另一个是g2o,按照上面的指示可以分别将lib库编译完成。

解压ORBvoc.txt.tar.gz,然后在工程目录下建立build,然后编译,便可以成功。

但是第一次编译,由于没有安装一些依赖,可能会出现以下问题:

 //若第一次编译,可能得到以下错误
CMake Error at CMakeLists.txt: (find_package):
By not providing "FindPangolin.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Pangolin",
but CMake did not find one. Could not find a package configuration file provided by "Pangolin" with any
of the following names: PangolinConfig.cmake
pangolin-config.cmake Add the installation prefix of "Pangolin" to CMAKE_PREFIX_PATH or set
"Pangolin_DIR" to a directory containing one of the above files. If
"Pangolin" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "/home/leonsun/backup/orb_slam2/ORB_SLAM2/build/CMakeFiles/CMakeOutput.log".
//没有安装Pangolin

解决方法如下:

 //到home目录
mkdir Software
cd Software
//下载Pangolin并且编译
git https://github.com/stevenlovegrove/Pangolin.git
//右键提取到此处解压Pangolin文件
cd Pangolin
mkdir build
cd build
cmake ..

但是得到以下错误

 -- The C compiler identification is GNU 5.4.
-- The CXX compiler identification is GNU 5.4.
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type not set (defaults to release)
-DCMAKE_BUILD_TYPE=Debug for debug
CMake Error at CMakeModules/FindGLEW.cmake: (MESSAGE):
Could not find GLEW
Call Stack (most recent call first):
src/CMakeLists.txt: (find_package)

没有安装GLEW,利用apt-get进行安装

sudo apt-get install libglew-dev

重新编译Pangolin,成功。然后按照上部分提供的官网教程进行编译

接着我们来看一下build_ros.sh

 echo "Building ROS nodes"

 cd Examples/ROS/ORB_SLAM2
mkdir build
cd build
cmake .. -DROS_BUILD_TYPE=Release
make -j

官方给的教程就是运行这个文件进行编译。也可以进行成功编译。


ORB_SLAM2安装的更多相关文章

  1. 软件篇-02-基于ZED 2和ORB_SLAM2的SLAM实践

    时隔两周,我又回来了. ​ 本期内容如题,ZED 2的SDK功能还是挺多的,包括轨迹跟踪,实时建图等等.虽然由于是商业产品,我看不到他们的源代码,但是根据使用情况来看,ZED 2内部是采用了IMU和光 ...

  2. ORB_SLAM2之Pangolin的安装与问题处理

    前言 本篇博客中,我们主要介绍了在安装ORB_SLAM2所需的第三方库Pangolin的过程中遇到的一些问题及解决方法. 1.Pangolin是什么? Pangolin是一个用于OpenGL显示/交互 ...

  3. 编译 ORB_SLAM2 (一)

    之前有记录关于ORB_SLAM的第一个版本的编译,每次就是要编译程序,都会遇到很多问题,并不是所谓的按照教程来就一定能编译成功,所以这一次编译也遇到了很多问题.百度的时候也看到网上有很多相似的问题,但 ...

  4. ORB-SLAM2的安装和运行流程

    一.ORB-SLAM2安装 1.在https://github.com/raulmur/ORB_SLAM2上git clone到当前文件夹内,若想下载到指定文件夹内,就需要cd进入指定文件内,然后再g ...

  5. ORB-SLAM2(3) ROS下实时跑ORB_SLAM2

    Step1 : 运行内核 roscore Step2 : 启动相机 cd catkin_ws/src/usb_cam/launch #进入usb_cam驱动的安装目录 roslaunch my_cam ...

  6. SLAM学习笔记 - ORB_SLAM2源码运行及分析

    参考资料: DBow2的理解 单目跑TUM数据集的运行和函数调用过程 跑数据集不需要ros和相机标定,进入ORB_SLAM目录,执行以下命令: ./Examples/Monocluar/mono_tu ...

  7. Ubuntu16.04下编译安装及运行单目ORBSLAM2

    官网有源代码和配置教程,地址是 https://github.com/raulmur/ORB_SLAM2 1 安装必要工具 首先,有两个工具是需要提前安装的.即cmake和Git. sudo apt- ...

  8. ubuntu16.04下用笔记本摄像头和ROS编译运行ORB_SLAM2的单目AR例程

    要编译ORB_SLAM2的ROS例程首先需要安装ROS,以及在ROS下安装usb_cam驱动并调用,最后搭建ORB_SLAM2. 1.ROS的安装 我的电脑安装的是ubuntu16.04系统,所以我安 ...

  9. ORB-SLAM2 初体验 —— 配置安装

    转载请注明出处,谢谢 原创作者:MingruiYU 原创链接:https://www.cnblogs.com/MingruiYu/p/12286752.html ORB-SLAM2作为目前应用最广泛的 ...

随机推荐

  1. 6种纯css实现loading效果

    1. <div id="loadingWrap1"> <span></span> <span></span> <s ...

  2. dubbo服务暴露

    想熟悉dubbo源码,首先要知道dubbo extensionLoader,而dubbo的这种扩展机制,是根据java spi衍生而来. 这是基础,但是我放在后面说明. 一:dubbo demo pr ...

  3. spring中的AOP实验(二)

    软件151  王帅 1.目标对象的接口:IStudent.java  package  com.dragon.study;   public   interface  IStudent  {      ...

  4. 【翻译】Open ID Connect---OIDC 是什么东西?

    Welcome to OpenID Connect What is OpenID Connect? OpenID Connect 1.0 is a simple identity layer on t ...

  5. 安装SQl Server 报错 "需要 Microsoft.NET Framework 3.5 ServicePack 1" 解决方法

    前言 之前装Sql Server都没遇到过这样的问题, 昨天重装了系统之后, 然后安装SQl Server 报错,提示 "需要 Microsoft.NET Framework 3.5 Ser ...

  6. python笔记24-os模块

    import osprint(os.getcwd())#取当前工作目录#os.chmod('/usr/local',7)#给文件目录加权限,7是最高权限print(os.chdir(r"e: ...

  7. Dictionary集合运用

    Dictionary基础定义: 从一组键(key)到一组值(value)的映射,每一个添加项都是由一个值及其相关联的键组成: 任何键都必须是唯一的: 键不能为空引用的null(VB中的Nothing) ...

  8. 类 Arrays StringBuilder 跟 StringBuffer 的异同 SimpleDateFormat

    类 String 同:起连接字符串类型作用 异: StringBuffer    //线程安全  效率慢 StringBuilder   //线程不安全  效率快 类 Arrays copyOf  ( ...

  9. MyBatis-day1

    Tips: 1, SQLSession通过SQLSessionFactory获得, SqlSessionFactory 的实例可以通过 SqlSessionFactoryBuilder 获得.有两种配 ...

  10. JDBC-day1

    package cn.gzsxt.test; import java.sql.Connection;import java.sql.DatabaseMetaData;import java.sql.D ...