OccupancyGrid vs. Costmap [closed]

asked 2012-07-13 09:42:04 -0500

David Lu gravatar image

updated 2014-01-28 17:13:00 -0500

ngrennan gravatar image

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.


1) Wouldn't it make more sense to use a consistent numbering system for these costmaps

2) Is this a bug?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-03-26 18:23:52.027421


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/

weiin gravatar image weiin  ( 2012-09-19 23:54:04 -0500 )edit