Skip to content

fix(path_generator): prevent path truncation before current lanelet#85

Open
ToshifumiTeranishi wants to merge 1 commit intobeta/v0.65from
debug/cc65fb37-path-generator-fix
Open

fix(path_generator): prevent path truncation before current lanelet#85
ToshifumiTeranishi wants to merge 1 commit intobeta/v0.65from
debug/cc65fb37-path-generator-fix

Conversation

@ToshifumiTeranishi
Copy link
Copy Markdown

Description

This PR fixes an issue in path_generator where the path is prematurely truncated before reaching the ego vehicle's current lanelet, causing a Failed to build trajectory from path points error.

Since the introduction of RouteManager in PR autowarefoundation#803, the lanelet sequence is provided and processed as a single continuous array ([backward] -> [current] -> [forward]). However, the forward path truncation logic calculates the accumulated distance s starting from the very beginning of this sequence. If the backward lanelets are physically long, s can exceed the truncation threshold (s_end) before the loop reaches the ego's current_lanelet. This triggers an early break and erases the ego's current and forward lanelets.

To resolve this, a current_lanelet_seen guard flag was added in the sequence iteration loop. This ensures that the forward path truncation (lanelets.erase and break) only triggers after the ego vehicle's current lanelet has been explicitly passed and the s_end threshold is correctly updated.

Related links

Internal: https://star4.slack.com/archives/C017VB9UG1L/p1773728712843039

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@ToshifumiTeranishi ToshifumiTeranishi added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 18, 2026
@github-actions
Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

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

Please ensure:

@masahiro-kubota masahiro-kubota removed their request for review March 26, 2026 16:59
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.

2 participants