vlp16 + imu(fsm-9)的3d建圖測試
總之 跟cartographer放在一起編譯
$ catkin_make_isolated --install --use-ninja
$ source install_isolated/setup.bash
# 模擬online邊走邊建置地圖, 如果移動過快計算跟不上, 可能會建圖失敗
$ roslaunch cartographer_vlp16-imu_config demo_vlp16-imu.launch bag_filenames:=${HOME}/Downloads/2019-12-18-13-37-34.bag
# 計算完當前數據才會跑下一筆資料
$ roslaunch cartographer_vlp16-imu_config offline_vlp16-imu.launch bag_filenames:=${HOME}/Downloads/2019-12-18-13-37-34.bag
跑完後會產生2019-12-18-13-37-34.bag.pbstream,用於後續產生點雲圖與2d地圖
也可以在程式執行中輸入以下命令,直接產生pbstream檔案
# Finish the first trajectory. No further data will be accepted on it.
$ rosservice call /finish_trajectory 0
# Ask Cartographer to serialize its current state.
# (press tab to quickly expand the parameter syntax)
$ rosservice call /write_state "{filename: '${HOME}/Downloads/2019-12-18-13-37-34.bag.pbstream', include_unfinished_submaps: 'true'}"
$ roslaunch cartographer_vlp16-imu_config assets_writer_vlp16-imu.launch \
bag_filenames:=${HOME}/Downloads/2019-12-18-13-37-34.bag \
pose_graph_filename:=${HOME}/Downloads/2019-12-18-13-37-34.bag.pbstream
執行完就會跑出ply與2d地圖
- 不建議使用Google的point_cloud_viewer,編譯複雜且不易使用
- ply->CloudCompare
- pcd->pcl_viewer
- 如果想使用point_cloud_viewer記得assets_writer_vlp16-imu.lua裡面action = "intensity_to_color"必須啟用
- point_cloud_viewer測試data
- 如果不想要在輸出的地圖顯示路徑,將assets_writer_vlp16-imu.lua裡面draw_trajectories = true,改為false
- 舊版本測試
- 其他測試bag