fix(lane_change): fix prepare length too short at low speed (RT1-8909) #9735
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When the prepare metrics are computed, if the ego velocity is lower than the lane-changing velocity, the returned prepare duration becomes abnormally short, even when the ego vehicle is far from the terminal stop.
In the following video, the prepare distance is less than 1m.
cap-.2024-12-23-18-02-45.mp4
In above video, current_velocity is somewhere less than min_lc_velocity, and the following is computed
the small discrepancy resulted in very short duration.
After PR
The solution is to compare the computation with parameterized
min_prepare_duration
cap-.2024-12-23-18-16-30.mp4
Related links
TIER IV Internal link
Parent Issue:
How was this PR tested?
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
Longer prepare duration when ego's velocity is low and the distance from ego to terminal stop is far.