Goal-system rewrite: direct goal sampling (replaces Path/Waypoint)#512
Open
vcharraut wants to merge 20 commits into
Open
Goal-system rewrite: direct goal sampling (replaces Path/Waypoint)#512vcharraut wants to merge 20 commits into
vcharraut wants to merge 20 commits into
Conversation
Pure identifier renames ahead of the goal-system rewrite, so the
functional PR is reviewable on its own. Behavior is unchanged: builds
clean and passes the existing 3.0 golden rollout + unit tests.
current_route_index -> current_route_idx
MAX_TARGET_WAYPOINTS -> MAX_GOALS
goal_positions_{xyz} -> list_goal_{xyz}
goal_position_{xyz} -> current_goal_{xyz}
num_target_waypoints -> num_goals
{min,max}_waypoint_spacing -> {min,max}_goal_spacing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removes the Path/Waypoint densification layer (struct Path, struct Waypoint, MAX_NUM_WP_PATH, build_path, closest-waypoint tracking, path_progression) and samples goals directly along the route or map. - New generation/regen pipeline: chain_goals, commit_goals, generate_new_goals_from_route/_from_map, roll_goals, route_point_at_distance, compute_new_route. - goal_regen_mode (finite|rolling), goal_source (route|map) replace target_type / goal_on_lane. - Lane-graph GPS distance: LaneGraph.lane_to_graph_idx + obs_goal_lane_distance obs flag. - gt_goal_* ground-truth goal pin for replay; goal reward via point-to-segment distance. - Golden rollout/smoke data regenerated (behavior changed by design). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Closed
…n road observation
| # Town10HD map diameter (~260m) so goals can land anywhere on the network. | ||
| env.num_goals: 1 | ||
| env.goal_on_lane: False | ||
| env.goal_source: "map" |
| } | ||
|
|
||
| // Build reverse lookup road-element idx -> graph idx. lane_ids[g] holds road-element | ||
| // indices (binary is reindexed so road id == array idx, drive.h:1003). |
There was a problem hiding this comment.
drive.h:1003 is probably not a good pointer
| const float seg_dx = wp_b.x - wp_a.x; | ||
| const float seg_dy = wp_b.y - wp_a.y; | ||
| const float seg_len_sq = seg_dx * seg_dx + seg_dy * seg_dy; | ||
| for (int pass = 0; pass < 2; pass++) { |
There was a problem hiding this comment.
would appreciate a comment at the top of here I think, it's not immediately obvious to me the logic of this method though I am digging into it before approving
| ; in front of the agent). False: scatter each goal at a uniformly random | ||
| ; drivable point anywhere on the map. | ||
| goal_on_lane = True | ||
| ; --- Goal --- |
There was a problem hiding this comment.
I think we need to update the target definitions in the validation set
Comment on lines
+222
to
+224
| // GT source spaces num_goals goals along the logged trajectory. They carry no lane (list_goal_lane | ||
| // = -1, so no GPS lane-distance) and every coordinate is finite. current_goal_idx starts at 0 but | ||
| // may already have advanced if the agent spawns inside the first goal's radius (metrics run in reset). |
There was a problem hiding this comment.
hmm, can we not assign a lane to the expert goal points?
eugenevinitsky
approved these changes
Jul 15, 2026
eugenevinitsky
left a comment
There was a problem hiding this comment.
So as not to block, going to suggest that we merge. Please squash so that we can revert easily if it causes a regression.
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.
What
Rewrites the target/waypoint system into a direct goal abstraction. Stacked on top of the rename PR (#), so this diff is functional-only.
Path/Waypointdensification layer:struct Path,struct Waypoint,MAX_NUM_WP_PATH(200-pt buffer),build_path,get_closest_waypoint_index_on_path,path_progression,closest_path_idx_wp,num_waypoints_reached.chain_goals,commit_goals,generate_new_goals_from_route,generate_new_goals_from_map,roll_goals,route_point_at_distance,compute_new_route.target_type(static/dynamic) ->goal_regen_mode(finite/rolling);goal_on_lane->goal_source(route/map); newobs_goal_lane_distanceflag.LaneGraph.lane_to_graph_idx+ normalized distance-to-goal-lane on lane obs rows.gt_goal_*ground-truth goal pin for replay; goal reward via point-to-segment distance.🤖 Generated with Claude Code