Skip to content

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

Conversation

mitukou1109
Copy link
Contributor

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 than refine_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:

Screenshot from 2025-06-03 10-56-06

After:

Screenshot from 2025-06-03 10-54-10

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Copy link

github-actions bot commented Jun 3, 2025

Thank you for contributing to the Autoware project!

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

Please ensure:

Copy link
Contributor

@kosuke55 kosuke55 left a comment

Choose a reason for hiding this comment

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

@youtalk youtalk added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 3, 2025
@@ -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) {
Copy link
Member

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.

Copy link
Contributor Author

@mitukou1109 mitukou1109 Jun 3, 2025

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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.

Copy link

codecov bot commented Jun 3, 2025

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 45.94%. Comparing base (eb0a0df) to head (79a173e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
planning/autoware_path_generator/src/utils.cpp 66.66% 0 Missing and 2 partials ⚠️
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     
Flag Coverage Δ *Carryforward flag
differential 20.03% <77.77%> (?)
total 47.00% <ø> (+0.02%) ⬆️ Carriedforward from f4e5f16

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

refactor(path_generator): parameterize pre-goal offset
Comment on lines +675 to +676
// 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.
Copy link
Contributor

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!

@sasakisasaki
Copy link
Contributor

@sasakisasaki
Copy link
Contributor

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 👍

@sasakisasaki
Copy link
Contributor

Success rate 3944/3946. Good to me! 👍

@kosuke55 kosuke55 merged commit 89db2d0 into autowarefoundation:main Jun 6, 2025
25 of 28 checks passed
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.

4 participants