-
Notifications
You must be signed in to change notification settings - Fork 712
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(behavior_path_planner, behavior_static_obstacle_avoidance_module): crash during goal changes #10205
fix(behavior_path_planner, behavior_static_obstacle_avoidance_module): crash during goal changes #10205
Conversation
…: empty path handling Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10205 +/- ##
==========================================
+ Coverage 25.64% 26.25% +0.60%
==========================================
Files 1362 1385 +23
Lines 104703 106840 +2137
Branches 39824 40916 +1092
==========================================
+ Hits 26855 28054 +1199
- Misses 75241 76083 +842
- Partials 2607 2703 +96
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@soblin @kyoichi-sugahara |
@soblin @kyoichi-sugahara |
|
||
mutable BehaviorModuleOutput last_valid_reference_path_; | ||
|
||
mutable bool has_last_valid_reference_path_; |
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.
Please use optional<BehaviorModuleOujtput> last_valid_rerference_path_
and set a valid value if and only if the reference path was not empty.
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.
Thank you, fixed in 3fb679c
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.
@soblin Could you check my fix?
Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
…: crash during goal changes (autowarefoundation#10205) * fix(behavior_path_planner, behavior_static_obstacle_avoidance_module): empty path handling Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp> * style(pre-commit): autofix * refactor: use optional Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp> * fix: std Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp> --------- Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…: crash during goal changes (autowarefoundation#10205) * fix(behavior_path_planner, behavior_static_obstacle_avoidance_module): empty path handling Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp> * style(pre-commit): autofix * refactor: use optional Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp> * fix: std Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp> --------- Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…: crash during goal changes (autowarefoundation#10205) (#1931) * fix(behavior_path_planner, behavior_static_obstacle_avoidance_module): empty path handling * style(pre-commit): autofix * refactor: use optional * fix: std --------- Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
Problem
This PR addresses two related crash scenarios that occur during route transitions, particularly when modified goals are updated:
Primary crash:
When routes are updated,
PlannerManager::getReferencePath()
can produce empty paths, leading to exceptions invalidateNonEmpty()
functions when these paths are used by downstream modules.Secondary crash:
After initially addressing the primary crash, we discovered a segmentation fault in
RoutingGraph::following()
when the Static Obstacle Avoidance module processes these empty paths.The crashes occur in this sequence:
Primary crash ros log
Secondary crash ros log
Screencast.from.2025.02.27.19.49.37.webm
Screencast.from.2025.02.27.19.16.30.webm
Solution
The PR implements defensive programming at two steps:
PlannerManager enhancements:
Path utils and Avoidance module improvements:
utils::getReferencePath()
fillFundamentalData()
for empty paths/laneletsgetExtendLanes()
This PR significantly improves system robustness during route transitions, which is critical for operational safety.
Related links
How was this PR tested?
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.