ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have been playing around with this problem for a while and I think I managed to get a solution. You need to delete all observation sources for just the explore cost map. Make a new local_costmap_params.yaml file with no observation sources and include this with just the explore cost map.

I created the new files costmap_explore_params.yaml and explore_costmap.yaml which are different to the settings used for the navigation costmaps.

explore_costmap_params.yaml

map_type: voxel origin_z: 0.0 z_resolution: 0.2 z_voxels: 10 unknown_threshold: 9 mark_threshold: 0 transform_tolerance: 0.3 obstacle_range: 2.5 max_obstacle_height: 2.0 raytrace_range: 3.0 footprint: [[-0.325, -0.325], [-0.325, 0.325], [0.325, 0.325], [0.46, 0.0], [0.325, -0.325]] footprint_padding: 0.01 inflation_radius: 0.55 cost_scaling_factor: 10.0 lethal_cost_threshold: 100

In the explore_costmap.yaml file you need to set static_map to true (so it will subscribe to the map topic created by gmapping), track_unknown_space to true and set unknown_cost_value as 255. explore_costmap.yaml

explore_costmap: publish_voxel_map: true global_frame: /map robot_base_frame: base_link update_frequency: 0.5 publish_frequency: 1.0 raytrace_range: 10.0 obstacle_range: 5.0 static_map: true rolling_window: false width: 100.0 height: 100.0 resolution: 0.1 origin_x: 0.0 origin_y: 0.0 track_unknown_space: true unknown_cost_value: 255 transform_tolerance: 0.5

With these settings explore will only create a costmap from the map created with gmapping. Since now the map used for navigation and the cost map in explore used for setting goals are the same the navigation stack has much more success at reaching the goals set for it.