ORB_SLAM2之Pangolin的安裝與問題處理

來源:互聯網
上載者:User
ORB_SLAM2之Pangolin的安裝與問題處理

前言

本篇部落格中,我們主要介紹了在安裝ORB_SLAM2所需的第三方庫Pangolin的過程中遇到的一些問題及解決方案。

 

 

1.Pangolin是什麼。

Pangolin是一個用於OpenGL顯示/互動以及視頻輸入的一個輕量級、快速開發庫,下面是Pangolin的Github網址:

https://github.com/stevenlovegrove/Pangolin

 

2.我們為什麼要用Pangolin。在哪裡可以用到Pangolin。

ORB_SLAM2中需要有Pangolin的支援。

 

3.安裝過程。

按照Github上面的教程走即可,非常簡單(https://github.com/stevenlovegrove/Pangolin)。

(1)安裝一些必要的庫:

Glew:   

sudo apt-get install libglew-dev

CMake:

sudo apt-get install cmake

Boost:

sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev

Python2 / Python3:

sudo apt-get install libpython2.7-dev

 

(2)在安裝完上述依賴後,就可以開始安裝Pangolin了,安裝過程十分簡單:

git clone https://github.com/stevenlovegrove/Pangolin.gitcd Pangolinmkdir buildcd buildcmake -DCPP11_NO_BOOST=1 ..make -j

 

(3)這時,你可能會遇到如下問題:

看得很頭大是吧。沒關係,只要看到錯誤資訊中關鍵的內容就好了。

提示的錯誤大部分是跟openni.h和XnCppWrapper.h有關的。

而我們這裡編譯Pangolin時,並不需要用到OpenNI,可以在編譯時間將其屏蔽:

cd Pangolin/srcvim CMakeLists.txt (這裡選擇你自己喜歡的編輯器)

看到這裡的OpenNI和OpenNI2的部分了吧,將其全部注釋掉即可。

 

之後,重新編譯Pangolin:

make -j

當你看到下面這個畫面時,恭喜你,Pangolin已經安裝成功了。


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.