Fix Sync ZOH after Control off and Frenet SD orientation - #26
Draft
cursor[bot] wants to merge 2 commits into
Draft
Fix Sync ZOH after Control off and Frenet SD orientation#26cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
When call_control=False, clear the held command so simulate cannot keep integrating the last accel/steer. Paced control with call_control=True still holds between recomputes (intentional ZOH). Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
convert_sd_orientation_to_xy_orientation now brackets the path segment by arc-length (same as convert_sd_to_xy). Frenet teleport also converts at the click pose, not the drag-tip cursor. Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
This was referenced Aug 3, 2026
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.
Summary
Two high-severity correctness bugs found in recent 0.5.3-era control/Frenet paths:
_simulate_stepcontinued applying the held ZOH command whencall_control=False, so the plant kept integrating the last accel/steer. Async already exits its control worker when Control is off; Sync did not.current_wp, not path heading ats—convert_sd_orientation_to_xy_orientationadded the heading of the currently tracked segment. Teleporting/spawning on a later segment (e.g. after a corner) pointed the ego/NPC the wrong way. The Frenet-view orient drag also passed the mouse-tip(s,d)instead of the click pose.Root cause
_last_cmdwhenever actuation was allowed, ignoring the Control stage gate.convert_sd_to_xy.Fix
_last_cmdwhencall_control=False(paced ZOH with Control still enabled is unchanged).sinconvert_sd_orientation_to_xy_orientation.teleport_s/teleport_d.Validation
test_call_control_false_drops_held_zoh_command— Control off → no furthercontrol_ego_state,_last_cmdcleared; existing paced-ZOH test still passes.test_sd_orientation_uses_heading_at_s_not_tracker_wp— vertical-leg query with tracker at start →θ ≈ π/2; also covers final-wpcurrent==next.