Skip to content

Refactoring goals#504

Closed
vcharraut wants to merge 9 commits into
3.0from
vcha/goals
Closed

Refactoring goals#504
vcharraut wants to merge 9 commits into
3.0from
vcha/goals

Conversation

@vcharraut

@vcharraut vcharraut commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

What

Rewrites the target/waypoint system into a single, direct goal abstraction.

Removed the intermediate Path/Waypoint layer:

  • Dropped struct Path, struct Waypoint, MAX_NUM_WP_PATH (200-point densification), build_path, get_closest_waypoint_index_on_path, path_progression, closest_path_idx_wp, num_waypoints_reached.
  • Goals are now sampled directly at spacings along the route/map — no per-agent 200-waypoint buffer.

New goal model (datatypes.h):

  • Flat goal list list_goal_{x,y,z}[MAX_GOALS] + list_goal_lane[], with current_goal_* aliases, goal_count, and gt_goal_* (ground-truth goal pin for replay).
  • Agent.current_route_indexcurrent_route_idx.

New generation / regeneration pipeline (drive.h): chain_goalscommit_goals, generate_new_goals_from_route, generate_new_goals_from_map, roll_goals, route_point_at_distance, compute_new_route.

Lane-graph GPS distance: LaneGraph.lane_to_graph_idx (road-element idx → graph idx) enables appending normalized lane-graph distance-to-goal on lane obs rows.

Config (drive.ini / env_config.h) — renamed/replaced:

  • target_type (static/dynamic) → goal_regen_mode (finite = regen full set once all reached / rolling = sliding window).
  • goal_on_lanegoal_source (route = agent forward route / map = uniform free-roam).
  • num_target_waypointsnum_goals; min/max_waypoint_spacingmin/max_goal_spacing.
  • New obs_goal_lane_distance flag.

Lane/boundary observation unpacking capped to the first 7 elements per row; obs feature counts adjusted accordingly. Notebooks, viz.py, torch.py, tests, and rollout/smoke golden data updated to match.

🤖 Generated with Claude Code

@vcharraut vcharraut changed the title [WIP] Refactoring goals Refactoring goals Jul 4, 2026
@vcharraut vcharraut marked this pull request as ready for review July 4, 2026 23:37
@vcharraut

Copy link
Copy Markdown
Collaborator Author

Split into two stacked PRs for reviewability:

Superseded by those; can be closed once #511/#512 are reviewed.

@vcharraut vcharraut closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant