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

refactor(avoidance): add function to check if the object is moving #6243

Merged

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Jan 31, 2024

Description

Add function to check if the object is stopped or not.

bool isMovingObject(
  const ObjectData & object, const std::shared_ptr<AvoidanceParameters> & parameters)
{
  const auto object_type = utils::getHighestProbLabel(object.object.classification);
  const auto object_parameter = parameters->object_parameters.at(object_type);
  return object.move_time > object_parameter.moving_time_threshold;
}

Tests performed

Psim

Effects on system behavior

Nothing.

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.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Jan 31, 2024
@@ -303,8 +303,7 @@ void AvoidanceModule::fillAvoidanceTargetObjects(
data, parameters_, forward_detection_range + MARGIN, debug);

for (const auto & object : object_outside_target_lane.objects) {
ObjectData other_object;
other_object.object = object;
ObjectData other_object = createObjectData(data, object);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use createObjectData to fill move_time.

Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara left a comment

Choose a reason for hiding this comment

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

LGTM!

@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jan 31, 2024
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (ae3e758) 14.40% compared to head (bb5f76f) 14.40%.
Report is 6 commits behind head on main.

Files Patch % Lines
...nning/behavior_path_avoidance_module/src/utils.cpp 0.00% 5 Missing ⚠️
...nning/behavior_path_avoidance_module/src/scene.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6243      +/-   ##
==========================================
- Coverage   14.40%   14.40%   -0.01%     
==========================================
  Files        1906     1906              
  Lines      129843   129844       +1     
  Branches    37572    37571       -1     
==========================================
  Hits        18699    18699              
- Misses      90150    90151       +1     
  Partials    20994    20994              
Flag Coverage Δ *Carryforward flag
differential 13.08% <0.00%> (?)
total 14.40% <ø> (+<0.01%) ⬆️ Carriedforward from ae3e758

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

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

@satoshi-ota satoshi-ota enabled auto-merge (squash) January 31, 2024 07:36
@satoshi-ota satoshi-ota merged commit 82d1b10 into autowarefoundation:main Jan 31, 2024
42 of 45 checks passed
@satoshi-ota satoshi-ota deleted the refactor/bpp-avoidance branch January 31, 2024 08:30
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Feb 2, 2024
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Feb 2, 2024
shmpwk pushed a commit to tier4/autoware.universe that referenced this pull request Feb 12, 2024
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Feb 23, 2024
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Mar 8, 2024
TomohitoAndo pushed a commit to tier4/autoware.universe that referenced this pull request Apr 1, 2024
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Apr 8, 2024
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
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