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.