Skip to content
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

Conversation

kyoichi-sugahara
Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara commented Aug 24, 2023

Description

🤖 Generated by Copilot at eeba145

Modified the filterObjects and filterObjectsByVelocity functions in objects_filtering.cpp and objects_filtering.hpp to improve the path safety checker's handling of static or slow-moving objects. Added a new parameter filter_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 than lim_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.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Aug 24, 2023
@kyoichi-sugahara kyoichi-sugahara changed the title update filter objects by velocity feat(behavior_path_planner): update filter objects by velocity Aug 24, 2023
@kyoichi-sugahara kyoichi-sugahara added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 24, 2023
@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (be626b7) 15.10% compared to head (8603cf8) 15.11%.
Report is 14 commits behind head on main.

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     
Flag Coverage Δ *Carryforward flag
differential 13.15% <0.00%> (?)
total 15.11% <ø> (+<0.01%) ⬆️ Carriedforward from eeba145

*This pull request uses carry forward flags. Click here to find out more.

Files Changed Coverage Δ
...rc/utils/path_safety_checker/objects_filtering.cpp 0.00% <0.00%> (ø)

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 64 to 65
PredictedObjects filterObjectsByVelocity(
const PredictedObjects & objects, const double lim_v, const bool filter_dynamic_objects = true);
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a little unclear

Copy link
Contributor Author

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! thanks!!

@kyoichi-sugahara kyoichi-sugahara force-pushed the feature/update_filter_objects_by_velocity branch from 917d37d to d9b7b76 Compare August 25, 2023 13:03
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants