1. 程式人生 > >谷歌開源SLAM庫cartographer在Turltlebot的應用

谷歌開源SLAM庫cartographer在Turltlebot的應用

cartographer介紹

這是一個實時同步定位與地圖系統(SLAM),提供ROS 系統支援2D 和 3D SLAM(simultaneous localization and mapping)庫。

目前,Cartographer 特別注重於 Lidar SLAM,通過社群的貢獻和持續開發,我們希望增加更多感測器和平臺的支援,增加更多的新特徵,比如在預先存在的地圖中的 lifelong mapping 和 localizing。

由於集成了 ROS 和來自外部貢獻者的支援,Cartographer 已經被用在多個 ROS 支援的機器人平臺上了:

  • Toyota HSR
  • TurtleBots
  • PR2
  • Revo LDS

 

Cartographer 2D 演算法的詳細描述可參考2016年穀歌 ICRA 論文:Real-Time Loop Closure in 2D LIDAR SLAM

下載連線:(Hess W, Kohler D, Rapp H, et al. Real-time loop closure in 2D LIDAR SLAM[C]// IEEE International Conference on Robotics and Automation. IEEE, 2016.)(感謝“八進位制喵”提供文獻下載)

 

創客智造的ncnynl

在第一時間進行了測試,並授權ExBot轉載教程如下:

(專注開源軟硬體的學習和應用)

cartographer使用

說明

Cartographer ROS for TurtleBots介紹

這個庫通過Cartographer ROS提供針對Turtlebots的Cartographer SLAM

庫安裝

- 在ubuntu 14.04 + indigo 測試通過,應該在ubuntu 16.04 + Kinetic 也能執行。

  • 我們推薦使用wstoolrosdep.但更快安裝推薦使用Ninja.
  • 安裝步驟:

 


# Install wstool and rosdep. 

sudo apt-get update 

sudo apt-get install -y python-wstool python-rosdep ninja-build

# Create a new workspace in 'catkin_ws'. mkdir catkin_ws cd catkin_ws wstool init src # Merge the cartographer_turtlebot.rosinstall file and fetch code for dependencies. wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_turtlebot/master/cartographer_turtlebot.rosinstall wstool update -t src # Install deb dependencies. rosdep update rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y # Build and install. catkin_make_isolated --install --use-ninja source install_isolated/setup.bash

執行

  • 安裝完成即Cartographer, Cartographer ROS, and Cartographer ROS’s TurtleBot都已經安裝。
  • 下載例子包到~/Downloads目錄,並測試
# Download the example bag.(下載例子)
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/turtlebot/cartographer_turtlebot_demo.bag





# Launch the 2D LIDAR demo.(2D雷達DEMO) roslaunch cartographer_turtlebot demo_lidar_2d.launch bag_filename:=${HOME}/Downloads/cartographer_turtlebot_demo.bag # Launch the 2D depth camera demo.(2D深度相機DEMO) roslaunch cartographer_turtlebot demo_depth_camera_2d.launch bag_filename:=${HOME}/Downloads/cartographer_turtlebot_demo.bag

Launch the 3D depth camera demo.(3D深度相機DEMO)

roslaunch cartographer_turtlebot demo_depth_camera_3d.launch bag_filename:=${HOME}/Downloads/cartographer_turtlebot_demo.bag

  • launch 檔案會自動啟動roscore和rviz

視訊演示