Cartographer ROS Integration
一、Configuration配置
二、调试
2.1 两个系统
2.2 局部SLAM
2.3 验证
三、ROS API
3.1 Cartographer 节点
3.2 离线节点
3.3 占据栅格节点
四、包含的资源?(Assets writer)
4.1 采样指南
4.2 配置
4.3 点云的第一人称视角的可视化
五、demos
5.1 仅局部的
5.2 Revo LDS
5.3 PR2
5.4 Taurob Tracker
六、公共数据
6.1 2D Cartographer Backpack--德国博物馆
6.2 3D Cartographer Backpack--德国博物馆
6.3 PR2 柳树车库
七、FAQ
7.1 为什么3D bags里的激光数据比VLP-16最高的20HZ的转速还要高?
7.2 为什么IMU数据对于3D SLAM是必须的,对于2D SLAM却不是?
7.3 若没有RVIZ的话,如何使用cartographer_ros?
7.4 如何解决“You called InitGoogleLogging() twice!”错误?
Cartographer 是一个可以在多个平台和传感器配置中提供实时SLAM的系统。
这个项目提供了Cartographer 的ROS集成包。
系统要求
见Cartographer’s系统要求。
支持下面的ROS版本:
~Indigo
~Kinetic
生成和安装
建议使用wstool和rosdep,为了能快速安装,建议也使用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_wscd catkin_ws
wstool init src
# Merge the cartographer_ros.rosinstall file and fetch code for dependencies.
wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
wstool update -t src
# Install proto3.
src/cartographer/scripts/install_proto3.sh
# Install deb dependencies.# The command 'sudo rosdep init' will print an error if you have already# executed it since installing ROS. This error can be ignored.
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=${ ROS_DISTRO} -y
# Build and install.
catkin_make_isolated --install --use-ninjasource install_isolated/setup.bash
运行demos
现在Cartographer和Cartographer的ROS集成包已经安装,例程中的的Backpack(德国博物馆2D或3D数据包)也已经下载到指定的路径~/Download,使用roslaunch启动demo:
# Download the 2D backpack example bag.
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
# Launch the 2D backpack demo.
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${ HOME}/Downloads/cartographer_paper_deutsches_museum.bag
# Download the 3D backpack example bag.
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/b3-2016-04-05-14-14-00.bag
# Launch the 3D backpack demo.
roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${ HOME}/Downloads/b3-2016-04-05-14-14-00.bag
Launch文件自动启动roscore和rviz,更多的局部的和种类繁多的机器人的demo参考Demos。
一、Configuration配置
两点注意:
1、这个Cartographer的ROS包使用了TF2,因此所有的坐标系的名称(包含下划线的小写字符)都是唯一的,不能有前缀或斜杠,参考常用的坐标系文档REP_105。
2、这个Cartographer的ROS包的topic名字作为基本名字(参考ROS names),这意味着需要用户进行remap或将它们放入命名空间中。
以下是此包的顶层选项,所有的这些都需要在Lua的配置文件中指定:
map_frame
用来发布子地图的ROS坐标系ID,位姿的父坐标系,通常是“map”。
tracking_frame
SLAM算法跟随的坐标系ID,如果使用了IMU,应该是IMU的位置,尽管它可能转动了,常用的选择是“imu_link”。
published_frame
作为发布位置的子坐标系的ROS坐标系ID,对于“odom”例程,如果系统的其他地方提供“odom”坐标系,那么“odom”在map_frame中的位置将会被发布,否则,设置为“base_link”即可。
odom_frame