一起學RGBDSLAM系列_問題及解決

一起學RGBDSLAM系列_問題及解決


  本博客主要介紹的是跟人在學習高翔博士“一起學RGBDSLAM系列”中遇到的問題和解決方法。vslam入門系列見高博士blog主頁:http://www.cnblogs.com/gaoxiang12/


1  part4 :cloudviewer 未定義引用


解決方法:# 增加PCL庫的依賴添加 visualization

FIND_PACKAGE( PCL REQUIRED COMPONENTS common io visualization )

2 文件或圖片沒找到導致的一系列錯誤


解決方法:寫上正確的文件路徑

  ParameterReader( string filename="../parameters.txt")

3  part5:Eigen 出錯


解決方法:在slamBase.h中將Eigen庫放到OpenCV庫之前,即

// Eigen
#include <Eigen/Core>
#include <Eigen/Geometry>
// OpenCV
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/nonfree/nonfree.hpp>
#include <opencv2/core/eigen.hpp>

4 part4 and part5:

 函數joinPointCloud()中代碼爲

  pcl::transformPointCloud( *original, *output, T.matrix() );
  *newCloud += *output;

運算過程爲:

output = T * original;
*newCloud += *output;

original在每次更新中都會疊加增大,運算量每次都會增多。可改爲             

output =  inv(T)* newCloud;
*original += *output;

不行,因爲 inv(T)* newCloud只能得到在上一幀座標系下的點雲,並不是第一幀的點雲,疊加後會出錯

問題 5 part6 and part7

    圖優化中邊是什麼?

    Pnp 計算的T又是那兩個座標系的轉移矩陣

   edge->setMeasurement( T.inverse() );

回答: Pnp 計算的T是那兩個座標系P1 P2的轉移矩陣,關係爲 P2=T * P1 即T爲P1在P2下的位姿

所以  P1 =inv(T) * P2, inv(T)爲P2在P1下的位姿, edge->setMeasurement( T.inverse() );

pnp from OpenCV docutmentation:

rvec– Output rotation vector (see Rodrigues() ) that, together with tvec, brings points from the model coordinate system to the camera coordinatesystem


問題6 par6 linux 14.04無法安裝libqglviewer-qt4-dev

解決方法,如圖




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章