-
Notifications
You must be signed in to change notification settings - Fork 650
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(autoware_motion_utils): set zero velocity after stop in resample trajectory #8768
feat(autoware_motion_utils): set zero velocity after stop in resample trajectory #8768
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
if (stop_point_found_in_v_lon) { | ||
v_lon.push_back(0.0); | ||
} else { | ||
v_lon.push_back(curr_pt.longitudinal_velocity_mps); | ||
} |
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.
Please add a comment on the reason why this implementation is required.
Also, can you create a unit test for this time's bug?
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 added test and comment!
… trajectory Signed-off-by: Y.Hisaki <yhisaki31@gmail.com>
Signed-off-by: Y.Hisaki <yhisaki31@gmail.com>
Signed-off-by: Y.Hisaki <yhisaki31@gmail.com>
9c046bf
to
0795a05
Compare
Signed-off-by: Y.Hisaki <yhisaki31@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8768 +/- ##
==========================================
- Coverage 25.02% 24.93% -0.10%
==========================================
Files 1322 1325 +3
Lines 98047 98423 +376
Branches 37795 37885 +90
==========================================
+ Hits 24536 24540 +4
- Misses 71020 71392 +372
Partials 2491 2491
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
… trajectory (autowarefoundation#8768) * feat(autoware_motion_utils): set zero velocity after stop in resample trajectory Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> * fix unit test Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> * simplify implementation Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> * update comment and add test Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> --------- Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> (cherry picked from commit 1a8fbc4)
… trajectory (autowarefoundation#8768) * feat(autoware_motion_utils): set zero velocity after stop in resample trajectory Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> * fix unit test Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> * simplify implementation Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> * update comment and add test Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> --------- Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> Signed-off-by: Autumn60 <harada.akiro@gmail.com>
… trajectory (#1522) feat(autoware_motion_utils): set zero velocity after stop in resample trajectory (autowarefoundation#8768) * feat(autoware_motion_utils): set zero velocity after stop in resample trajectory * fix unit test * simplify implementation * update comment and add test --------- Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> Signed-off-by: Autumn60 <harada.akiro@gmail.com>
… trajectory (autowarefoundation#8768) * feat(autoware_motion_utils): set zero velocity after stop in resample trajectory Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> * fix unit test Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> * simplify implementation Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> * update comment and add test Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> --------- Signed-off-by: Y.Hisaki <yhisaki31@gmail.com> Signed-off-by: emuemuJP <k.matsumoto.0807@gmail.com>
Description
This PR modifies the resampling of longitudinal_velocity_mps.
The algorithm has been updated to handle data points with embedded zero values differently. For example, when interpolating a sequence like [10, 10, 10, 0, 10, 0, 0, 0], the new algorithm will first transform the data to [10, 10, 10, 0, 0, 0, 0, 0] by setting all values after the first zero point to zero. Interpolation is then performed on this modified sequence.
Motivation for the Change:
When interpolating sequences like [10, 10, 10, 0, 10, 0, 0, 0] using zero-order hold, there were cases where the middle zero point was ignored due to the parameters of the zero-order hold. This resulted in interpolations like [10, 10, 10, 10, 10, 0, 0, 0], where the middle point that should have been zero was not.
This issue led to a bug in this ticket, where points that should have been zero were not being set to zero as expected. The proposed change aims to address this problem by ensuring that all values after the first detected zero point are set to zero before interpolation.
Related links
How was this PR tested?
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.