Ask Your Question
1

Navigation costmap parameter unknown_cost_value

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

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

Comments

weiin gravatar imageweiin ( 2012-09-19 23:56:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

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

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

Comments

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 imageAchim ( 2012-08-29 21:56:02 -0600 )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 imageRoy89 ( 2012-09-10 06:32:45 -0600 )edit

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

weiin gravatar imageweiin ( 2012-09-19 23:56:04 -0600 )edit

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

weiin gravatar imageweiin ( 2012-09-19 23:59:30 -0600 )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 imageAchim ( 2012-09-22 05:31:17 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 1,114 times

Last updated: Aug 01 '12