ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Navigation costmap parameter unknown_cost_value

asked 2012-08-01 03:52:30 -0500

Roy89 gravatar image

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.

edit retag flag offensive close merge delete


weiin gravatar image weiin  ( 2012-09-19 23:56:49 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-08-01 22:11:33 -0500

Roy89 gravatar image

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 :)

edit flag offensive delete link more


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...

Achim gravatar image Achim  ( 2012-08-29 21:56:02 -0500 )edit

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 :(

Roy89 gravatar image Roy89  ( 2012-09-10 06:32:45 -0500 )edit

I managed to get the planner to plan into unknown space with track_unknown_space: true unknown_cost_value: 255

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

These two parameters are set in costmap_common.yaml, global_costmap uses static_map: true, local_costmap uses static_map: false

weiin gravatar image weiin  ( 2012-09-19 23:59:30 -0500 )edit

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.

Achim gravatar image Achim  ( 2012-09-22 05:31:17 -0500 )edit

Question Tools



Asked: 2012-08-01 03:52:30 -0500

Seen: 1,865 times

Last updated: Aug 01 '12