-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pedestrian routes using walkway_factor #1780
Conversation
Updated the AStarCostFactor method so we do not create crazy routes when favoring walkways
…with walkway_factor options Added more test routes
factor *= driveway_factor_; | ||
} | ||
|
||
return (speedfactor_ * factor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noting that A*s goal estimation heuristic should never overestimate the actual cost to the goal, we landed on this implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://en.wikipedia.org/wiki/Consistent_heuristic <-- that is what i was referring to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want to limit how small the factors can be. Making them very small values like 0.1 will force the A* factor to change and performance will drop. Also, it is usually more effective to penalize edges rather than favor them, so to dramatically favor walkways one might try penalizing regular roads (weighting factor > 1.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The favor
examples were used to show that it was not working as expected prior to the change. The thinking is that it will be used more for avoiding every separate sidewalk to keep a simpler path and calling out street names for users
Issue
We were seeing crazy routes when testing the walkway_factor values. After analyzing routes we did the following:
BEFORE#1
walkway_factor = 0.1
https://github.com/valhalla/valhalla/blob/gdg_walkway_factor/test_requests/pedestrian_routes.txt#L4
AFTER#1
walkway_factor = 0.1
https://github.com/valhalla/valhalla/blob/gdg_walkway_factor/test_requests/pedestrian_routes.txt#L4
BEFORE#2
walkway_factor = 0.8
https://github.com/valhalla/valhalla/blob/gdg_walkway_factor/test_requests/pedestrian_routes.txt#L17
AFTER#2
walkway_factor = 0.8
https://github.com/valhalla/valhalla/blob/gdg_walkway_factor/test_requests/pedestrian_routes.txt#L17
Tasklist