-
Notifications
You must be signed in to change notification settings - Fork 88
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
base: main
Are you sure you want to change the base?
Conversation
…path contains only one point Signed-off-by: YuxuanLiuTier4Desktop <[email protected]>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Codecov ReportAttention: Patch coverage is
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
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
// 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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 🙏
Signed-off-by: YuxuanLiuTier4Desktop <[email protected]>
After the push, the pre-commit problem needs to solved with #547 |
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:
Private Links:
How was this PR tested?
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.