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

fix(AEB): ego to object distance calculation logic with predicted path #5930

Merged

Conversation

ismetatabay
Copy link
Member

@ismetatabay ismetatabay commented Dec 21, 2023

Description

Fixes #5931

This PR fixes the calculation of ego to object distance.

At the following motion_utils::calcSignedArcLength function:

const double dist_ego_to_object =
motion_utils::calcSignedArcLength(ego_path, current_p, obj.position) -

For instance, the predicted trajectory points of 'ego_path' have a size of 50, with only 15 predicted points provided. Consequently, the remaining 35 points have coordinates x: 0, y: 0, z: 0. As we've set 'current_p' to x: 0, y: 0, z: 0, the distance calculation becomes impossible. To resolve this issue, we need to utilize 'current_p' as the first index of 'ego_path' for calculating the distance between the ego and the object.

const auto current_p = tier4_autoware_utils::createPoint(0.0, 0.0, 0.0);

Related links

Tests performed

Planning Sim

(Only use_predicted_trajectory is set as true)

2023-12-21.16-28-44.mp4

Notes for reviewers

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

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.
  • The PR is ready for merge.

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

Signed-off-by: ismetatabay <ismet@leodrive.ai>
@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Dec 21, 2023
@ismetatabay ismetatabay marked this pull request as ready for review December 21, 2023 14:13
@ismetatabay
Copy link
Member Author

@TakaHoribe-san, @tkimura4-san can you check this PR and the following issue:

I think it is important for the utilizing AEB module with latest Autoware.

@ismetatabay ismetatabay added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 21, 2023
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

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

Comparison is base (f63ad33) 15.29% compared to head (05f5595) 15.29%.

Files Patch % Lines
control/autonomous_emergency_braking/src/node.cpp 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5930      +/-   ##
==========================================
- Coverage   15.29%   15.29%   -0.01%     
==========================================
  Files        1750     1750              
  Lines      120380   120382       +2     
  Branches    36723    36723              
==========================================
  Hits        18408    18408              
- Misses      81318    81320       +2     
  Partials    20654    20654              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 15.29% <ø> (+<0.01%) ⬆️ Carriedforward from f63ad33

*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.

Copy link
Contributor

@tkimura4 tkimura4 left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM!

@tkimura4 tkimura4 merged commit eb9e1e9 into autowarefoundation:main Dec 22, 2023
33 of 36 checks passed
zulfaqar-azmi-t4 pushed a commit to zulfaqar-azmi-t4/autoware.universe that referenced this pull request Dec 22, 2023
@ismetatabay ismetatabay deleted the fix/aeb-ego-to-obj-distance branch December 22, 2023 13:55
danielsanchezaran pushed a commit to tier4/autoware.universe that referenced this pull request Apr 15, 2024
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 26, 2024
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 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:control Vehicle control algorithms and mechanisms. (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.

The Autonomous Emergency Brake (AEB) does not perform as expected when only using the predicted trajectory.
2 participants