OccupancyGrid vs. Costmap [closed]
In the OccupancyGrid
documentation, the values are [1, 100] or -1 for unknowns.
In costmap_2d
, the values are [0, 254] or 255 for unknowns.
However, there are these lines in move_base.
private_nh.param("unknown_cost_value", temp_unknown_cost_value, int(0));
unsigned char unknown_cost_value = max(min(temp_unknown_cost_value, 255),0);
That means that unknown_cost_value is set to be [0,255], so even if you pass in the parameter -1, unknown space is treated like an obstacle. Turning on /move_base_node/global_costmap/obstacles
in Rviz seems to confirm this.
Questions:
1) Wouldn't it make more sense to use a consistent numbering system for these costmaps
2) Is this a bug?
In http://ros.org/wiki/costmap_2d#Map_management_parameters , unknown_cost_value is an int, which occupancy grid uses. Seems like only the costmap_2d is using unsigned char... which does create some confusion: http://answers.ros.org/question/40317/navigation-costmap-parameter-unknown_cost_value/