0
$\begingroup$

Rosanswers logo

Hello Does anyone know why the costmap_2d parameter "unknown_cost_value" cannot be set to 0 or lower. My understanding is that a costmap with static_map set to true will take in an occupancy_grid from the map topic. It then uses this unknown_cost_value to set all the corresponding cells with this value as unknown space in the newly created costmap. Since occupancy grids from the map topic have values at -1 for unknown space 0 for free space and 100 for occupied space it seems I can't set the unknown space for the cost map to be the same as the unknown_space in the map. It works fine if I set the unknown_cost_value larger then 0 to 100 for example but this then sets the unknown space in the cost map to be equal to the occupied space in the map.


Originally posted by Roy89 on ROS Answers with karma: 133 on 2012-08-01

Post score: 1


Original comments

Comment by weiin on 2012-09-19:
The inconsistency is also noted here http://answers.ros.org/question/38765/occupancygrid-vs-costmap/

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think I solved the problem by setting the unknown_cost_value to 255. The cost maps have a range of 0 to 255 so a value of -1 in the occupancy grid is set as 255 in the cost map. It seems to be setting the new cost maps unknown space the same as the occupancy grid from gmappings map which is what I wanted. Thanks me :)


Originally posted by Roy89 with karma: 133 on 2012-08-01

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Achim on 2012-08-29:
Does that mean you managed to use navfn with gmapping planing in unknown space? Or are you using your own stuff? I'm quite stuck here...

Comment by Roy89 on 2012-09-10:
I used gmapping and the navigation stack with navfn planner. There's is an allow_unknown parameter in navfn that should allow plans to traverse unknown space. I can't seem to get the planner to do so though :(

Comment by weiin on 2012-09-19:
I managed to get the planner to plan into unknown space with track_unknown_space: true unknown_cost_value: 255

Comment by weiin on 2012-09-19:
These two parameters are set in costmap_common.yaml, global_costmap uses static_map: true, local_costmap uses static_map: false

Comment by Achim on 2012-09-22:
I have the same parameters, now. It works, but usually I have to start move_base two times, in order to get it working. Usually on the first run unknown cells still are obstacles.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.