Skip to content

fix(predicted_path_resample): fix a special case where the predicted path contains only one point #526

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Owen-Liuyuxuan
Copy link
Contributor

Description

Fix a special case where the predicted path contains only one point. In that case, we will resample that into multiple repeated points.

Related links

Parent Issue:

  • Link

Private Links:

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

…path contains only one point

Signed-off-by: YuxuanLiuTier4Desktop <[email protected]>
@Owen-Liuyuxuan Owen-Liuyuxuan requested review from takayuki5168, YoshiRi and a team as code owners June 9, 2025 08:30
Copy link

github-actions bot commented Jun 9, 2025

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@Owen-Liuyuxuan Owen-Liuyuxuan requested a review from shmpwk June 9, 2025 08:31
@Owen-Liuyuxuan Owen-Liuyuxuan added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 9, 2025
Copy link

codecov bot commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 46.56%. Comparing base (d08f9b7) to head (c97b1c4).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ect_recognition_utils/src/predicted_path_utils.cpp 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #526      +/-   ##
==========================================
+ Coverage   45.91%   46.56%   +0.64%     
==========================================
  Files         301      303       +2     
  Lines       19554    22966    +3412     
  Branches     8147    10188    +2041     
==========================================
+ Hits         8979    10694    +1715     
- Misses       9781    11340    +1559     
- Partials      794      932     +138     
Flag Coverage Δ *Carryforward flag
differential 29.95% <25.00%> (?)
total 45.89% <ø> (-0.03%) ⬇️ Carriedforward from e9a0781

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

// Handle special case: If the input path has only one point
if (path.path.size() == 1) {
const auto resampled_size = std::min(resampled_path.path.max_size(), resampled_time.size());
resampled_path.path.resize(resampled_size);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can just return the original path because there is no mathematical meaning for interpolating 1 point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soblin
Thanks for the review.
Since the original function should return a new handle of the path. I slightly refactored the update codes to return a copy of the input path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soblin
Sorry for the mention.. please have a check of this two-week-old PR 🙏

@Owen-Liuyuxuan
Copy link
Contributor Author

After the push, the pre-commit problem needs to solved with #547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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