cartographer 前端兩種匹配

2021-09-03 07:34:03 字數 1543 閱讀 1290

目錄

1.相關性掃瞄匹配:

1.1 輸入 : 

1.2 步驟:

2.ceres 優化:

2.1 輸入 :   

2.2 步驟:

3.輸入資料的座標關係

cartographer 前端  相關性掃瞄匹配  和  ceres 優化兩種

double realtimecorrelativescanmatcher2d::match(

const transform::rigid2d& initial_pose_estimate,

const sensor::pointcloud& point_cloud, const grid2d& grid,

transform::rigid2d* pose_estimate)

預計位姿(推算位子)    

點雲資料 

概率柵格地圖   

估計位姿(引用輸出)

返回:   最佳得分

// 初始位姿的角度

/將雷射轉到初始位姿的角度  (x,y)0 點雲開始為:baselink座標系

//確定查詢視窗  角度+空間平面

//得到旋轉的點雲     查詢角度範圍 ×2 /角度解析度    點雲 對各個角度旋轉

//將點雲轉到當前位姿下  平移

/生成平移的候選值, 只記錄 x,y的偏移,未進行 實際點雲平移

//求取得分  遍歷候選值,  再遍歷雷射點,遍歷雷射點時將xy的偏移量傳入

//取得分最大的候選值的 偏移量

//輸入的初始位子 + 偏移量

void ceresscanmatcher2d::match(const eigen::vector2d& target_translation,

const transform::rigid2d& initial_pose_estimate,

const sensor::pointcloud& point_cloud,

const grid2d& grid,

transform::rigid2d* const pose_estimate,

ceres::solver::summary* const summary)

預計位姿(推算位子)   

scanmatch匹配后位姿

點雲資料 

概率柵格地圖

優化后位姿(輸出引用)

ceres 優化器

構建觀測殘差     柵格不連續,三次卷積插值 使其連續可導

構建平移變化量殘差

構建旋轉變化量殘差

ceres 求解,得pose+cost

返回:   最佳得分

預計位姿    點雲資料  在重力座標系下

cartographer 安裝編譯

ubuntu16.04 環境依賴 sudo apt get install y clang g git google mock libboost all dev libcairo2 dev libcurl4 openssl dev libeigen3 dev libgflags dev libgoo...

cartographer執行步驟

先驅動雷達 roslaunch rslidar pointcloud rs lidar 16.launch 再執行pointcloud to laserscan節點將三維資料轉化成二維 roslaunch pointcloud to laserscan point to scan.launch 最後...

cartographer 安裝問題

這裡只說安裝過程中遇到的問題,ceres solver 與 eigen3 版本不相容問題,我是17年10月進行的測試,現在的eigen3 已經更新了,已經不是16年的 eigen3。cd ceres solver 1.13.0 mkdir build cd build cmake make j4 s...