cartographer初试-turtlebot

来源:互联网 发布:国家开放大学网络教育 编辑:程序博客网 时间:2024/05/24 15:36

一. cartographer介绍

这是一个实时同步定位与地图系统(SLAM),提供ROS 系统支持2D 和 3D SLAM(simultaneous localization and mapping)库。

注意:只能用来扫图,并不能导航。

github链接:https://github.com/googlecartographer/cartographer_turtlebot

二.安装方法

DOC链接:https://google-cartographer-ros-for-turtlebots.readthedocs.io/en/latest/

# Install wstool and rosdep.sudo apt-get updatesudo apt-get install -y python-wstool python-rosdep ninja-build# Create a new workspace in 'catkin_ws'.mkdir catkin_wscd catkin_wswstool 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.rosinstallwstool update -t src# Install deb dependencies.rosdep initrosdep updaterosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y# Build and install.catkin_make_isolated --install --use-ninja   #注意 此处应有翻墙source install_isolated/setup.bash  

三.下载例子运行

# Download the example bag.(下载例子)wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/turtlebot/cartographer_turtlebot_demo.bag
#注意  此处不应翻墙,否则下载过慢。ubuntu用户请配置DNS,速度将会提升n个等级
# Launch the 2D LIDAR demo.   2D激光roslaunch cartographer_turtlebot demo_lidar_2d.launch bag_filename:=${HOME}/Downloads/cartographer_turtlebot_demo.bag# Launch the 2D depth camera demo. 2D深度相机roslaunch cartographer_turtlebot demo_depth_camera_2d.launch bag_filename:=${HOME}/Downloads/cartographer_turtlebot_demo.bag# Launch the 3D depth camera demo. 3D深度相机roslaunch cartographer_turtlebot demo_depth_camera_3d.launch bag_filename:=${HOME}/Downloads/cartographer_turtlebot_demo.bag

运行:我运行的试2D LIDAR demo

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

参考:http://www.ncnynl.com/archives/201610/907.html

0 0
原创粉丝点击