-
Notifications
You must be signed in to change notification settings - Fork 683
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(behavior_path_planner): update filter objects by velocity #4742
feat(behavior_path_planner): update filter objects by velocity #4742
Conversation
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #4742 +/- ##
=========================================
Coverage 15.10% 15.11%
=========================================
Files 1563 1563
Lines 107889 108893 +1004
Branches 33101 33868 +767
=========================================
+ Hits 16302 16463 +161
- Misses 73819 74530 +711
- Partials 17768 17900 +132
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
PredictedObjects filterObjectsByVelocity( | ||
const PredictedObjects & objects, const double lim_v, const bool filter_dynamic_objects = true); |
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.
dynamic_objects
means objects whose velocity is larger than lim_v
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.
a little unclear
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.
@kosuke55
I agree.
a little unclear
How about this?
/**
* @brief Filters objects based on their velocity.
*
* Depending on the remove_above_threshold parameter, this function either removes objects with
* velocities above the given threshold or only keeps those objects. It uses the helper function
* filterObjectsByVelocity() to do the actual filtering.
*
* @param objects The objects to be filtered.
* @param velocity_threshold The velocity threshold for the filtering.
* @param remove_above_threshold If true, objects with velocities above the threshold are removed.
* If false, only objects with velocities above the threshold are kept.
* @return A new collection of objects that have been filtered according to the rules.
*/
PredictedObjects filterObjectsByVelocity(
const PredictedObjects & objects, const double velocity_threshold,
const bool remove_above_threshold)
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.
nice! thanks!!
917d37d
to
d9b7b76
Compare
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
d9b7b76
to
8603cf8
Compare
Description
🤖 Generated by Copilot at eeba145
Modified the
filterObjects
andfilterObjectsByVelocity
functions inobjects_filtering.cpp
andobjects_filtering.hpp
to improve the path safety checker's handling of static or slow-moving objects. Added a new parameterfilter_dynamic_objects
to control the filtering mode based on the object velocity.filter objects by velocity and if you give arg of
filter_dynamic_objects
as false, object's velocity smaller thanlim_v
will be filtered.Tests performed
Not applicable.
Effects on system behavior
Not applicable.
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.