Fix VelocityLocalPlanner end-of-path crash and Control Step ego desync - #18
Merged
Conversation
slice_trajectory_horizon at the last global wp built a single-point TrajectoryTracker; convert_xy_path_to_sd_path assumed next_wp=1 and IndexError'd, crashing VelocityLocalPlanner.replan at path end. Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
Manual control only moved the plant after the world/stack ego split, leaving pm.ego_vehicle stale; dual-write via apply_world_control. Save Start now snapshots velocity 0 so Reset matches a cold start. Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
This was referenced Jul 31, 2026
majid-khonji
approved these changes
Jul 31, 2026
majid-khonji
marked this pull request as ready for review
July 31, 2026 17:03
Author
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
cursor Bot
pushed a commit
that referenced
this pull request
Jul 31, 2026
Keep closed-loop path_s / adjacent-segment Frenet fixes from this PR and PR #18's 1-point convert_sd_to_xy lateral-offset handling; retain both CHANGELOG Fixed entries. Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug and impact
VelocityLocalPlanner.replancrashes at the final global waypoint —slice_trajectory_horizonbuilds a 1-pointTrajectoryTracker; Frenet conversion indexednext_wp=1and raisedIndexError. Hits SAN Campus / any stack usingVelocityLocalPlanner(including lattice velocity stage) when the ego reaches path end.pm.ego_vehiclestay put until the next GT tick (same class of bug as the Align fix in Fix Control Align ego split regression and TrajectoryTracker final-waypoint crash #16).[x,y,theta].Root cause
convert_xy_path_to_sd_path/_npassumedclosest_wp==0 ⇒ next_wp=1without checking path length.world.control_ego_statewithout syncing stack PM.State.set_start()copies all fields including velocity; Save Start did not zero velocity for the snapshot.Fix
VisualizerApp.apply_world_control(plant + stack dual-write) and route Control Step/Steer/Accel through it.Validation
20 passed.