0
$\begingroup$

Rosanswers logo

Hi,

The NavFn planner takes in ROS's costmap created by costmap_2d package. The input is in the format mentioned here.

Now, when NavFn reads those values, it refactors everything from the (0, 253) range by the equation COST_NEUTRAL + COST_FACTOR * input_cost_value which scales all of it proportionally to the (50, 253) range.

Why is this done?

Thank you.


Originally posted by 2ROS0 on ROS Answers with karma: 1133 on 2014-11-14

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

My guess is that this was done to ensure there is always a minimal cost to visit a cell. Otherwise, if the costmap has 0-cost cells any path nevermind the length would be equally good as a solution.


Originally posted by dornhege with karma: 31395 on 2014-11-14

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by 2ROS0 on 2014-11-14:
I see, but you could potentially resolve that by making the score 1. What is the need to scale the data to 50+?

Comment by dornhege on 2014-11-14:
If my guess is even correct this is just a balancing factor. if there is a narrow passage with 253, you'd be willing to take a 253 times as long detour to avoid that.

Comment by 2ROS0 on 2014-11-14:
The author mentions something about narrow packages when deciding on the COST_FACTOR (set to 0.8) which is different from the initial 50 offset.

Comment by 2ROS0 on 2014-11-14:
I'm not sure I entirely understand your point - are you saying that by making it 50+ you ensure open passages only upto ~5 times as large as the narrow passage (253) would be considered equivalent per se?

Comment by dornhege on 2014-11-17:
Basically yes, under the assumption that my guess is correct. There might be other motivations.

Comment by David Lu on 2014-11-19:
Those are the motivations as far as I have been able to uncover. Note that global_planner has these factors as dynamic parameters.

$\endgroup$

Your Answer

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