I'm looking to make custom costmap2d layer, where each cell in the occupancy grid would be a range of values rather than a binary OBSTACLE/NO OBSTACLE. For instance, if the robot was trapped between cells with cost 20, and cells with cost 50, it would opt to travel over the lower cost area (20 in this case).
While I know that the occupancy grid can technically take a range of values from [0,100], the costmap2d page on ROS wiki seems to indicate what I want to do is not possible: http://wiki.ros.org/costmap_2d/
Occupied, Free, and Unknown Space While each cell in the costmap can have one of 255 different cost values (see the inflation section), the underlying structure that it uses is capable of representing only three. Specifically, each cell in this structure can be either free, occupied, or unknown. Each status has a special cost value assigned to it upon projection into the costmap. Columns that have a certain number of occupied cells (see mark_threshold parameter) are assigned a costmap_2d::LETHAL_OBSTACLE cost, columns that have a certain number of unknown cells (see unknown_threshold parameter) are assigned a costmap_2d::NO_INFORMATION cost, and other columns are assigned a costmap_2d::FREE_SPACE cost.
Based on my reading of that, the costmap points essentially only has three states it can be in (Occupied, Free, or Unknown), and I can't assign an actual cost to bias the robot to go certain directions.
Is my reading of "only three states" correct? The original layered costmap paper from David Lu (http://wustl.probablydavid.com/publications/IROS2014.pdf) seems to indicate that there is a concept of adding non-lethal costs, and variable costs overall, but the wiki entry seems to contradict that.
Post score: 0