先驅動雷達
$roslaunch rslidar_pointcloud rs_lidar_16.launch
再執行pointcloud_to_laserscan節點將三維資料轉化成二維
$ roslaunch pointcloud_to_laserscan point_to_scan.launch
最後執行cartographer
~/cartographer_ws$ source install_isolated/setup.bash
$roslaunch cartographer_ros cartographer_demo_rslidar.launch
launc**件:
"> !!注意雷達資料經過轉換後這裡是scan
.lua檔案:
include "map_builder.lua"
include "trajectory_builder.lua"
options =
map_builder.use_trajectory_builder_2d = true
trajectory_builder_2d.submaps.num_range_data = 35
trajectory_builder_2d.min_range = 0.3
trajectory_builder_2d.max_range = 8.
trajectory_builder_2d.missing_data_ray_length = 1.
trajectory_builder_2d.use_imu_data = false
trajectory_builder_2d.use_online_correlative_scan_matching = true
trajectory_builder_2d.real_time_correlative_scan_matcher.linear_search_window = 0.1
trajectory_builder_2d.real_time_correlative_scan_matcher.translation_delta_cost_weight = 10.
trajectory_builder_2d.real_time_correlative_scan_matcher.rotation_delta_cost_weight = 1e-1
pose_graph.optimization_problem.huber_scale = 1e2
pose_graph.optimize_every_n_nodes = 35
pose_graph.constraint_builder.min_score = 0.65
return options
總結:cartographer演算法進行3d建圖必須要imu資料,2d可以不使用imu,因此需要將三維資料先轉換成二維,即pointcloud2scan。不然一直會提示找不到map座標系,實際上是因為演算法找不到traking frame 導致無法提供它與map之間的transform關係,生成不了map座標系。
雷達自身帶有rslidar frame,不需要再另外構建tf關係,可以直接將traking frame設定為rslidar,完成手持雷達建圖。
ros編譯執行Cartographer演算法
google的cartographer演算法現在還在不斷更新,如果想使用的話選取乙個release版本,最好選取舊的版本,新的版本都沒人趟過,都是雷和眼淚 這裡面有舊的 共享目錄 需要安裝三個軟體包cartographer,cartographer ros,ceres solver 安裝依賴 sud...
Cartographer(一) 安裝及執行流程學習
1 安裝依賴項 sudo apt get install y google mock libboost all dev libeigen3 dev libgflags dev libgoogle glog dev liblua5.2 dev libprotobuf dev libsuitespars...
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...