hector_mapping是一种无需里程计数据的SLAM方法,利用激光雷达获得二维姿态估计,虽然没有回环检测功能,但对于大多真实场景,它是较准确的。该系统已用于无人地面机器人、无人地面车辆、手持测绘设备、四旋翼无人机。
1、论文
https://www.sim.informatik.tu-darmstadt.de/publ/download/2011_SSRR_KohlbrecherMeyerStrykKlingauf_Flexible_SLAM_System.pdf
2、硬件需求
为了使用hector,我们需要高精度的激光扫描仪(SICK、hokuyo等),扫描周围环境时,节点会使用tf变换,因此无需将雷达固定,并且不需要里程计数据。
3、ROS API
hector_mapping是基于SLAM算法的LIDAR节点,使用时无需里程计数据。介绍ROS API时不会以所有可用于调试的选项,而是以常用选项为介绍。
3.1 订阅话题(Subscirbed Topics)
scan(sensor_msgs/LaserScan) SLAM系统使用的激光扫描数据
Header header
float32 angle_min
float32 angle_max
float32 angle_increment
float32 time_increment
float32 scan_time
float32 range_min
float32 range_max
float32[ ] ranges
float32[ ] intensities
syscommand(Std_msgs/String)系统命令,如果命令是“reset”,那么地图和机器人位姿将重置为初始状态。
string命令
3.2 发布话题(Published Topics)
map_metadata(nav_msgs/MapMetaData) 从这个主题获取地图数据,锁定并定期更新
这个消息保存了有关栅格占用特性的基本信息
time map_load_time 加载地图时间
float32 resolution 地图分辨率[m/cell]
uint32 width 地图宽度cells
uint32 height 地图高度cells
geometry_msgs/Pose origin 原点姿势
map (nav_msgs/OccupancyGrid)从这个主题获取地图数据。。。
Heard heard //表示2D栅格地图,其中每个单元格的值表示占用的概率
MapMetaData info //地图的元数据
int8[ ] data // 以行为主顺序从(0,0)开始的地图数据,占用概率在[0,100],未知是-1
slam_out_pose( geometry_msgs/PoseStamped ) 无协方差的机器人姿态估计
Header header 头标题 带有参考坐标系和时间戳的位姿
Pose pose 位姿
poseupdate ( geometry_msgs/PoseWithCovarianceStamped ) 基于不确定性高斯估计的机器人姿态估计
表示一个带有参考坐标系和时间戳的估计位姿
Header header
PoseWithCovariance pose
3.3 服务(Service)
dynamic_map( nav_msgs/GetMap ) 调用此服务获取地图数据
nav_msgs/OccupancyGrid map
3.4 参数(Parameters)
~base_frame (string, default: base_link)
- The name of the base frame of the robot. This is the frame used for localization and for transformation of laser scan data.
~map_frame (string, default: map_link)
- The name of the map frame.
~odom_frame (string, default: odom)
- The name of the odom frame.
~map_resolution (double, default: 0.025)
- The map resolution [m]. This is the length of a grid cell edge.
~map_size (int, default: 1024)
- The size [number of cells per axis] of the map. The map is square and has (map_size * map_size) grid cells.
~map_start_x (double, default: 0.5)
- Location of the origin [0.0, 1.0] of the /map frame on the x axis relative to the grid map. 0.5 is in the middle.
~map_start_y (double, default: 0.5)
- Location of the origin [0.0, 1.0] of the /map frame on the y axis relative to the grid map. 0.5 is in the middle.
~map_update_distance_thresh (double, default: 0.4)
- Threshold for performing map updates [m]. The platform has to travel this far in meters or experience an angular change as described by the map_update_angle_thresh parameter since the last update before a map update happens.
~map_update_angle_thresh (double, default: 0.9)
- Threshold for performing map updates [rad]. The platform has to experience an angular change as described by this parameter of travel as far as specified by the map_update_distance_thresh parameter since the last update before a map update happens.
~map_pub_period (double, default: 2.0)
- The map publish period [s].
~map_multi_res_levels (int, default: 3)
- The number of map multi-resolution grid levels.
~update_factor_free (double, default: 0.4)
- The map update modifier for updates of free cells in the range [0.0, 1.0]. A value of 0.5 means no change.
~update_factor_occupied (double, default: 0.9)
- The map update modifier for updates of occupied cells in the range [0.0, 1.0]. A value of 0.5 means no change.
~laser_min_dist (double, default: 0.4)
- The minimum distance [m] for laser scan endpoints to be used by the system. Scan endpoints closer than this value are ignored.
~laser_max_dist (double, default: 30.0)
- The maximum distance [m] for laser scan endpoints to be used by the system. Scan endpoints farther away than this value are ignored.
~laser_z_min_value (double, default: -1.0)
- The minimum height [m] relative to the laser scanner frame for laser scan endpoints to be used by the system. Scan endpoints lower than this value are ignored.
~laser_z_max_value (double, default: 1.0)
- The maximum height [m] relative to the laser scanner frame for laser scan endpoints to be used by the system. Scan endpoints higher than this value are ignored.
~pub_map_odom_transform (bool, default: true)
- Determine if the map->odom transform should be published by the system.
~output_timing (bool, default: false)
- Output timing information for processing of every laser scan via ROS_INFO.
~scan_subscriber_queue_size (int, default: 5)
- The queue size of the scan subscriber. This should be set to high values (for example 50) if logfiles are played back to hector_mapping at faster than realtime speeds.
~pub_map_scanmatch_transform (bool, default: true)
- Determines if the scanmatcher to map transform should be published to tf. The frame name is determined by the 'tf_map_scanmatch_transform_frame_name' parameter.
~tf_map_scanmatch_transform_frame_name (string, default: scanmatcher_frame)
- The frame name when publishing the scanmatcher to map transform as described in the preceding parameter.
3.5 需要的tf变换
扫描的每帧传入SLAM中,并换算为位姿用于计算
3.6 提供的tf变换
将换算好的位姿在地图上显示
参考:http://wiki.ros.org/hector_mapping