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(map_based_prediciton): use orientation reliability in prediction #5435

Conversation

YoshiRi
Copy link
Contributor

@YoshiRi YoshiRi commented Oct 27, 2023

Description

  • This PR aims to prevent predict path bending by unreliable object yaw estimation such as with radar sensor
  • New logic uses object.kinematics.orientation_availability to find unreliable yaw input
  • Unstable object's yaw is replaced by mean yaw angle of current_lanelets only in the path generation process

See the sample output:

  • Conventional process will generate extremely bent path due to the large lateral velocity
  • With this PR, we can get appropriate path because the path generator assumes the object yaw is equal to lane yaw.
    image

Tests performed

Tested with Psim.

This is related radar_far_away_perception project. See related PR.

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.

Summary by CodeRabbit

  • New Feature: Added a function replaceObjectYawWithLaneletsYaw in the map_based_prediction_node.cpp file to improve path prediction accuracy by replacing the yaw angle of objects with the mean yaw angle of the lanelets they are on.
  • Bug Fix: Modified the objectsCallback function in the map_based_prediction_node.cpp file to call replaceObjectYawWithLaneletsYaw before generating predicted paths, preventing path bending caused by unreliable object yaw estimation.

@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Oct 27, 2023
@YoshiRi YoshiRi marked this pull request as ready for review October 27, 2023 14:36
@YoshiRi YoshiRi added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Oct 27, 2023
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

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

Comparison is base (0d0a22c) 14.77% compared to head (c85e0ae) 14.71%.
Report is 69 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5435      +/-   ##
==========================================
- Coverage   14.77%   14.71%   -0.06%     
==========================================
  Files        1662     1662              
  Lines      115385   115823     +438     
  Branches    35616    35616              
==========================================
  Hits        17043    17043              
- Misses      79118    79556     +438     
  Partials    19224    19224              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 14.77% <ø> (+<0.01%) ⬆️ Carriedforward from 6acc281

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

Files Coverage Δ
...based_prediction/src/map_based_prediction_node.cpp 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

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

@github-actions
Copy link

github-actions bot commented Oct 30, 2023

Image description CodeRabbit

Walkthrough

The changes introduce a new function called replaceObjectYawWithLaneletsYaw in the map_based_prediction_node.cpp file. This function replaces the yaw angle of an object with the mean yaw angle of the lanelets it is currently on. The purpose of this change is to prevent path bending caused by unreliable object yaw estimation. The objectsCallback function has also been modified to call replaceObjectYawWithLaneletsYaw before generating predicted paths.

Changes

File Summary
perception/map_based_prediction/src/map_based_prediction_node.cpp Added a new function replaceObjectYawWithLaneletsYaw that replaces the yaw angle of an object with the mean yaw angle of the lanelets it is currently on. This helps prevent path bending caused by unreliable object yaw estimation. Modified the objectsCallback function to call replaceObjectYawWithLaneletsYaw before generating predicted paths.

"In the realm of maps and predictions,
A rabbit's touch brings corrections.
Yaw angles, once unreliable and bent,
Are now replaced with lanelets' intent.
Paths are straightened, no longer awry,
Thanks to code changes, oh my oh my!"


Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 25e8b3f and 6acc281 commits.
Files selected (1)
  • perception/map_based_prediction/src/map_based_prediction_node.cpp (2)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description 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.

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!

@YoshiRi YoshiRi enabled auto-merge (squash) October 31, 2023 14:12
@YoshiRi YoshiRi merged commit a2b114d into autowarefoundation:main Oct 31, 2023
19 of 23 checks passed
@YoshiRi YoshiRi deleted the feat/use_orientation_reliability_in_prediction branch October 31, 2023 14:58
YoshiRi added a commit to YoshiRi/autoware.universe that referenced this pull request Oct 31, 2023
…autowarefoundation#5435)

* replace object yaw with lanelets yaw when object orientation is unavailable

Signed-off-by: yoshiri <[email protected]>

* fix unintended behavior: add escape and move replace state before path generation

Signed-off-by: yoshiri <[email protected]>

* Update perception/map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kyoichi Sugahara <[email protected]>

---------

Signed-off-by: yoshiri <[email protected]>
Co-authored-by: Kyoichi Sugahara <[email protected]>
Signed-off-by: yoshiri <[email protected]>
kyoichi-sugahara added a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Nov 1, 2023
…autowarefoundation#5435)

* replace object yaw with lanelets yaw when object orientation is unavailable

Signed-off-by: yoshiri <[email protected]>

* fix unintended behavior: add escape and move replace state before path generation

Signed-off-by: yoshiri <[email protected]>

* Update perception/map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kyoichi Sugahara <[email protected]>

---------

Signed-off-by: yoshiri <[email protected]>
Co-authored-by: Kyoichi Sugahara <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (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