Fix agent-cap wipe, Town03 map crash, and short HDMap smoothing - #40
Draft
cursor[bot] wants to merge 3 commits into
Draft
Fix agent-cap wipe, Town03 map crash, and short HDMap smoothing#40cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
…olay. Evict the oldest agent instead of clearing the detection set when c11_max_agents is reached. Skip unresolved OpenDRIVE lane predecessors so bundled Town03 loads. Clamp Savitzky–Golay window/polyorder so short HDMap routes no longer raise. Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
Town03 junction stubs have 2-point polylines; indexing [:, -3] crashed after unresolved links were skipped. Clamp column indices instead. Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
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
Three high-severity correctness bugs on
dev:Detection / NPC wipe at the agent cap.
PerceptionModel.add_agent_vehiclecleared all agents whenc11_max_agents(default 12) was reached, then appended the new one. FastBEV rebuilds detections each frame, so a scene with 13+ clusters left only the last obstacle. Spawning a 13th NPC in BasicSim deleted every previously spawned agent. Lattice / velocity planners then planned through traffic that was still present.Bundled Town03 OpenDRIVE cannot load.
_connect_laneslooked up predecessor/successor lanes in the driving-onlylane_by_uidmap and dereferencedNonewhen the link pointed at a sidewalk or missing lane. After skipping those links,can_laneA_access_laneBstill crashed on short CARLA junction centerlines ([:, -3]on a 2-point polyline). Selectingdata/Town03_Opt.xodraborted stack build.Short HDMap routes crash in Savitzky–Golay.
smoothen_path_savgolis always called fromHDMapGlobalPlanner.plan. After 0.5 m near-duplicate pruning, a same-lane start/goal a few meters apart can leave 3, 4, or 6 points. The window clamp producedwindow_length > norpolyorder >= window_length, raisingValueErrorand killing global replan.Root cause
window_length <= nandpolyorder < window_length.Fix
Validation
test_add_agent_evicts_oldest_when_cap_reached— 5 adds with cap 3 keep the last 3.Town03_Opt.xodrload without crash.smoothen_path_savgolparametrized for n ∈ {2..8}.pytest test/c10_perception/ test/c20_planning/test_c24_global_hdmap_planners.py— 28 related tests passed; broader perception/planning subset 43 passed.Not in this PR
Existing open inspection PRs (#22–#37) were not re-reported. Toolbar Save Settings still omits planning/control YAML (silent profile data loss); F-key profile cycle still skips
reload_stack. Those are noted in the Slack summary.