-
Notifications
You must be signed in to change notification settings - Fork 83
fix(path_generator): ensure refined path connects start and goal #511
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(path_generator): ensure refined path connects start and goal #511
Conversation
Signed-off-by: mitukou1109 <[email protected]>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
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
internal disuccusion: https://star4.slack.com/archives/C0575HP7NJG/p1748515312534479?thread_ts=1748479122.395359&cid=C0575HP7NJG
@@ -672,6 +672,10 @@ experimental::trajectory::Trajectory<PathPointWithLaneId> refine_path_for_goal( | |||
if (!intervals.empty()) { | |||
auto cropped = autoware::experimental::trajectory::crop(cropped_path, 0, intervals.back().end); | |||
goal_connected_trajectory_points = cropped.restore(2); | |||
} else if (cropped_path.length() > 1.0) { |
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.
1.0
is a magic number. Please declare the constexpr
value to name it.
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.
This is due to the pre-goal offset being hardcoded, and I have just made it a parameter in mitukou1109#6.
Internal discussion: https://star4.slack.com/archives/C0575HP7NJG/p1748917579897599?thread_ts=1748479122.395359&cid=C0575HP7NJG
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.
mitukou1109#6 was merged to this branch.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #511 +/- ##
==========================================
- Coverage 46.98% 45.94% -1.04%
==========================================
Files 285 285
Lines 18957 19909 +952
Branches 8015 8103 +88
==========================================
+ Hits 8906 9148 +242
- Misses 9264 9986 +722
+ Partials 787 775 -12
*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:
|
Signed-off-by: mitukou1109 <[email protected]>
Signed-off-by: mitukou1109 <[email protected]>
Signed-off-by: mitukou1109 <[email protected]>
refactor(path_generator): parameterize pre-goal offset
// If distance from start to goal is smaller than refine_goal_search_radius_range and start is | ||
// farther from goal than pre_goal, we just connect start, pre_goal, and goal. |
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.
This comment is helpful. Thank you!
Now testing on the evaluator: |
Thank you so much for fix! I'm going to approve after seeing the result of tests on the evaluator. Let me know if I'm missing some already performed test results 👍 |
Success rate 3944/3946. Good to me! 👍 |
Description
This PR fixes the smooth goal connection feature of
path_generator
to ensure the refined path connects the start and the goal when the raw path is shorter thanrefine_goal_search_radius_range
.How was this PR tested?
Psim,
refine_goal_search_radius_range
is set to 100.0m and the length of the ego lanelet is 32.5358m.Before:
After:
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.