从零开始ORB_SLAM2

本文档详细介绍了ORB_SLAM2的安装过程,包括依赖库Pangolin、OpenCV、Eigen3的安装,以及在Ubuntu系统中解决构建错误的方法。还提供了构建ORB-SLAM2库和示例的步骤,以及如何在ROS环境下运行ORB_SLAM2。
摘要由CSDN通过智能技术生成

ORB_SLAM2

依赖安装

安装Pangolin

参考 https://github.com/stevenlovegrove/Pangolin

Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input. At its heart is a simple OpenGl viewport manager which can help to modularise 3D visualisation without adding to its complexity, and offers an advanced but intuitive 3D navigation handler. Pangolin also provides a mechanism for manipulating program variables through config files and ui integration, and has a flexible real-time plotter for visualising graphical data.

The ethos of Pangolin is to reduce the boilerplate code that normally gets written to visualise and interact with (typically image and 3D based) systems, without compromising performance. It also enables write-once code for a number of platforms, currently including Windows, Linux, OSX, Android and IOS

安装依赖
必须依赖
  • C++11

  • OpenGL (Desktop / ES / ES2)

    • sudo apt install libgl1-mesa-dev
  • Glew

    • sudo apt install libglew-dev
  • CMake (for build environment)

    • (deb) sudo apt install cmake
推荐依赖
  • Python2 / Python3, for drop-down interactive console

  • Wayland

    • pkg-config: sudo apt install pkg-config
    • Wayland and EGL:sudo apt install libegl1-mesa-dev libwayland-dev libxkbcommon-dev wayland-protocols
视频输入可选依赖
Building
git clone https://github.com/stevenlovegrove/Pangolin.git  
#若速度太慢可选
git clone https://gitee.com/cwwwws/Pangolin.git

cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .
sudo make install

SLAM可视化绘图库——Pangolin 的验证

参考 https://blog.csdn.net/weixin_43991178/article/details/105119610

mkdir test
gedit test.cpp
gedit CMakeLists.txt
cmake .
make
./HelloPangolin 

在这里插入图片描述

test.cpp

#include <pangolin/pangolin.h>

int main( int /*argc*/, char** /*argv*/ )
{
    // 创建名称为“Main”的GUI窗口,尺寸为640×640
    pangolin::CreateWindowAndBind("Main",640,480);
    // 启动深度测试
    glEnable(GL_D
  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值