最近这一段时间一直在调节基于蒙特卡罗定位的导航,前提是基于已经开源的基于激光雷达的SLAM算法。地图的建立,主要是参考网上的开源教程,根据实际情况,调整相关的参数文件。最终是实现了建图。建立的地图的精度还没有具体的分析,但从直观上看,应该是没什么问题。因此计划通过AMCL来测试建立地图的精度。要运行AMCL首要的工作是运行move_base导航包;本文以rplidar_A2雷达为例,介绍AMCL的定位性能。
调节move_base节点,相关的参数文件:
(1) rplidar_amcl.launch.xml
(2) rplidar_costmap_params.yaml
(3) move_base.launch.xml
(4) costmap_common_params.yaml
max_obstacle_height: 2.0 # assume something like an arm is mounted on top of the robot
# Obstacle Cost Shaping (http://wiki.ros.org/costmap_2d/hydro/inflation)
robot_radius: 0.18 # distance a circular robot should be clear of the obstacle (kobuki: 0.18)
# footprint: [[x0, y0], [x1, y1], ... [xn, yn]] # if the robot is not circular
#map_type: voxel
obstacle_layer:
enabled: true
max_obstacle_height: 2.0
min_obstacle_height: 0.0
#origin_z: 0.0
#z_resolution: 0.2
#z_voxels: 2
#unknown_threshold: 15
#mark_threshold: 0
combination_method: 1
track_unknown_space: true #true needed for disabling global path planning through unknown space
obstacle_range: 2.0
raytrace_range: 5.0
#origin_z: 0.0
#z_resolution: 0.2
#z_voxels: 2
publish_voxel_map: false
observation_sources: scan
scan:
data_type: LaserScan
topic: "/scan"
marking: true
clearing: true
expected_update_rate: 0
#cost_scaling_factor and inflation_radius were now moved to the inflation_layer ns
inflation_layer:
enabled: true
cost_scaling_factor: 10.0 # exponential rate at which the obstacle cost drops off (default: 10)
inflation_radius: 0.25 # max. distance from an obstacle at which costs are incurred for planning paths.
static_layer:
enabled: true
map_topic: "/map"
(5) local_costmap_params.yaml
local_costmap:
global_frame: odom
robot_base_frame: /base_footprint
update_