I'm looking for a way to map a non-binary occupancy grid to a global cost map. The occupancy grid has the values -1 for undefined, 0 for non-collision and 1-100 for collision areas. There is a similar question here for which the given answer doesn't offer a concrete solution:
https://answers.ros.org/question/335530/what-range-of-costs-does-ros-navigation-support/
For a better overview:
I'm using ROS Melodic.
My occupancy grid looks like this: Image of Occupancy grid
My global_costmap_params.yaml looks like this:
global_costmap:
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
global_frame: base_link
map_topic: "prediction_occ_grid"
update_frequency: 10.0
publish_frequency: 10.0
rolling_window: true
always_send_full_costmap: true
height: 26.9
width: 36.4
Note that I'm a pure beginner in costmaps, so it might be that this doesn't make sense at all!
Using the given global_costmap_params.yaml deliveres the following costmap: Image of the resulting global costmap
As you can see the costmap "ignores" the collision-areas and maps them in the same costs as the non-collision-path-area. Is there any way to modify the costmap_params in order for it to map the occupancy grid properly?
Thanks in advance!