-
Notifications
You must be signed in to change notification settings - Fork 682
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(dynamic_avoidance): precise cut-out decision #4527
feat(dynamic_avoidance): precise cut-out decision #4527
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4527 +/- ##
==========================================
- Coverage 14.85% 14.84% -0.01%
==========================================
Files 1521 1521
Lines 105231 105271 +40
Branches 32020 32047 +27
==========================================
Hits 15631 15631
- Misses 72529 72571 +42
+ Partials 17071 17069 -2
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
WalkthroughThe changes introduce updates to the Changes
|
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.
Files selected (3)
- planning/behavior_path_planner/include/behavior_path_planner/scene_module/dynamic_avoidance/dynamic_avoidance_module.hpp (6)
- planning/behavior_path_planner/src/scene_module/dynamic_avoidance/dynamic_avoidance_module.cpp (7)
- planning/behavior_path_planner/src/scene_module/dynamic_avoidance/manager.cpp (2)
Files not summarized due to errors (1)
- planning/behavior_path_planner/src/scene_module/dynamic_avoidance/dynamic_avoidance_module.cpp (diff tokens exceeds limit)
Review comments generated (3)
- Review: 2
- LGTM: 1
Tips
Chat with
CodeRabbit Bot (@coderabbitai
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitai
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignore
anywhere in the PR description to pause further reviews from the bot.
planning/behavior_path_planner/src/scene_module/dynamic_avoidance/manager.cpp
Show resolved
Hide resolved
const auto target_objects_candidate = target_objects_manager_.getValidObjects(); | ||
target_objects_.clear(); | ||
for (const auto & target_object_candidate : target_objects_candidate) { | ||
if (target_object_candidate.should_be_avoided) { | ||
target_objects_.push_back(target_object_candidate); | ||
} | ||
} |
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 code for updating target_objects_
can be simplified using the std::copy_if
algorithm. Instead of manually iterating over target_objects_candidate
and checking the condition, you can use std::copy_if
to copy the elements that satisfy the condition directly into target_objects_
. Here's an example:
const auto target_objects_candidate = target_objects_manager_.getValidObjects();
target_objects_.clear();
std::copy_if(target_objects_candidate.begin(), target_objects_candidate.end(),
std::back_inserter(target_objects_),
[](const auto& target_object_candidate) {
return target_object_candidate.should_be_avoided;
});
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
d0b923c
to
32eaee2
Compare
…#4527) * feat(dynamic_avoidance): precise cut-out decision Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * update Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> --------- Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
…#4527) * feat(dynamic_avoidance): precise cut-out decision Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * update Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> --------- Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
…#4527) * feat(dynamic_avoidance): precise cut-out decision Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * update Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> --------- Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
…#4527) * feat(dynamic_avoidance): precise cut-out decision Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * update Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> --------- Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Description
More precise cut out decision of target objects for dynamic avoidance.
This PR checks if the object to cut out was inside the ego's path a few seconds before cutting out.
Tests performed
planning simulator
Effects on system behavior
Precise cut out decision of target objects for dynamic avoidance
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.
Summary by CodeRabbit
Release Notes:
DynamicAvoidanceModule
andTargetObjectsManager
classes.