Skip to content
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): fix path bound for overlapped lanes #280

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kosuke55
Copy link
Contributor

@kosuke55 kosuke55 commented Mar 16, 2025

Description

  1. fix calculation of s for projected point in overlapping lanes
  const auto s_bound_start =
    lanelet::geometry::toArcCoordinates(
      lanelet_bound_2d, lanelet::geometry::interpolatedPointAtDistance(lanelet_centerline, s_start))
      .length;

In the previous calculations, toArcCoordinates in overlapping lanes would find s in the first lane.
Even if s is in return lane, the s for outward lane will be calculated.
In this PR, calc_bound_s_range is modified to find the lane containing s at the centerline and calculate s at the boundary of same lane.

before
image

after

image

  1. Make get_first_self_intersection_arc_length not calculate the intersection before s_start.

So far, the intersection before s_start was also calculated if it was in the current lane. This will delay the timing of path cut release.

  1. fix wrong clamp usage

prevent hi < lo when *s_intersection - vehicle_info_.max_longitudinal_offset_m is negative

Related links


tier4 internal slack

Parent Issue:

  • Link

How was this PR tested?

  • psim
path_cut-2025-03-16_21.19.06.mp4
path_cut-2025-03-16_21.17.10.mp4
  • evaluator

2025/03/16 https://evaluation.tier4.jp/evaluation/reports/0452bf5a-59d4-5bbf-aed4-8764dba357d7/?project_id=prd_jt
2025/03/17 https://evaluation.tier4.jp/evaluation/reports/35423c04-0ab5-5771-b10d-4b9c7979100f/?project_id=prd_jt

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@kosuke55 kosuke55 requested a review from a team as a code owner March 16, 2025 12:40
Copy link

github-actions bot commented Mar 16, 2025

Thank you for contributing to the Autoware project!

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

Please ensure:

@kosuke55 kosuke55 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 16, 2025
Copy link

codecov bot commented Mar 16, 2025

Codecov Report

Attention: Patch coverage is 76.56250% with 15 lines in your changes missing coverage. Please review.

Project coverage is 19.43%. Comparing base (4cb18f5) to head (6c098d4).
Report is 89 commits behind head on main.

Files with missing lines Patch % Lines
planning/autoware_path_generator/src/utils.cpp 77.96% 6 Missing and 7 partials ⚠️
planning/autoware_path_generator/src/node.cpp 60.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #280       +/-   ##
===========================================
- Coverage   78.75%   19.43%   -59.33%     
===========================================
  Files          11       85       +74     
  Lines         193     3757     +3564     
  Branches       73      765      +692     
===========================================
+ Hits          152      730      +578     
- Misses         11     2951     +2940     
- Partials       30       76       +46     
Flag Coverage Δ
differential 19.43% <76.56%> (?)
total ?

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

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.

3 participants