-
Notifications
You must be signed in to change notification settings - Fork 668
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(pure_pursuit): return zero curvature when neighboring idx isn't found #2891
fix(pure_pursuit): return zero curvature when neighboring idx isn't found #2891
Conversation
…ound Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
1b29b9c
to
29b337c
Compare
Codecov ReportBase: 11.80% // Head: 11.83% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2891 +/- ##
==========================================
+ Coverage 11.80% 11.83% +0.02%
==========================================
Files 1319 1319
Lines 92309 92109 -200
Branches 24794 24719 -75
==========================================
- Hits 10899 10898 -1
+ Misses 70051 69916 -135
+ Partials 11359 11295 -64
*This pull request uses carry forward flags. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Thank you for your work! LGTM!
control/pure_pursuit/src/pure_pursuit/pure_pursuit_lateral_controller.cpp
Outdated
Show resolved
Hide resolved
if (trajectory_resampled_->points.size() - 1 >= closest_idx + idx_dist) { | ||
next_idx = closest_idx + idx_dist; | ||
} else { | ||
// return zero curvature because next_idx can't be found |
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.
@kyoichi-sugahara
IMO
I think it's better to use prev_idx
and next_idx
a certain distance far from closest_idx with threshold.
What do you think?
prev_index,<--->closest index <--->next_idx
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.
@taikitanaka3
I think your proposal method is expected behavior in the current implementation
@kyoichi-sugahara |
checked warnings are not outputted pure_pursuit_without_warnings.mp4 |
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
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.
LGTM
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
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.
thank you!
…ound (autowarefoundation#2891) * fix(pure_pursuit): return zero curvature when neighboring idx isn't found Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> * modify comment and add TODO Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> * fix comments Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> --------- Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
…ound (autowarefoundation#2891) * fix(pure_pursuit): return zero curvature when neighboring idx isn't found Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> * modify comment and add TODO Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> * fix comments Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp> --------- Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Description
When candidate point for the curvature calculation isn't found, 0 is returned to avoid unnecessary warnings.
But there is a still space to solve this probelem by
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.
After all checkboxes are checked, anyone who has write access can merge the PR.