-
Notifications
You must be signed in to change notification settings - Fork 691
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
feat(autoware_behavior_path_planner): prevent infinite loop in approving scene module process #7881
feat(autoware_behavior_path_planner): prevent infinite loop in approving scene module process #7881
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
4db069f
to
bcb2368
Compare
bcb2368
to
ebfba74
Compare
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
0521215
to
d2c8977
Compare
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7881 +/- ##
==========================================
- Coverage 28.44% 28.43% -0.01%
==========================================
Files 1591 1597 +6
Lines 116213 116265 +52
Branches 49613 49617 +4
==========================================
+ Hits 33059 33063 +4
- Misses 74141 74188 +47
- Partials 9013 9014 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
36a1d14
into
autowarefoundation:main
…ing scene module process (autowarefoundation#7881) * prevent infinite loop Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> * calculate max_iteration_num from number of scene modules Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> * add doxygen explanation for calculateMaxIterationNum Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> --------- Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
…ter (#1413) feat(autoware_behavior_path_planner): prevent infinite loop in approving scene module process (autowarefoundation#7881) * prevent infinite loop * calculate max_iteration_num from number of scene modules * add doxygen explanation for calculateMaxIterationNum --------- Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
…ing scene module process (autowarefoundation#7881) * prevent infinite loop Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> * calculate max_iteration_num from number of scene modules Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> * add doxygen explanation for calculateMaxIterationNum Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> --------- Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Description
This PR should be merged first.
Current potential issue:
When scene modules A > B > C are in the approved state and A fails, all modules (A, B, C) are removed from
approved_modules
. Additionally,candidate_modules
becomes empty, causing all modules A-Z to be re-evaluated throughgetRequestModules
->runRequestModules
. This leads to A > B > C being approved again, and if A fails once more, an infinite loop may occur.Proposed solution:
Prevent modules that have been removed from
approved_modules
due to success or failure from being added again bygetRequestModules
.runApprovedModules
, add modules that have transitioned to success or failure state todeleted_modules
.getRequestModules
, skip the execution request judgment for modules that have been added todeleted_modules
.Additional change:
By implementing a process to delete modules that have either succeeded or failed in the loop, the maximum number of loops can now be theoretically determined based on the number of scene modules. As a result, I've changed the method to calculate the theoretical maximum instead of using a parameter definition.
How was this PR tested?
max_iteration_num
parameterNotes for reviewers
None.
Effects on system behavior
None.