Autonomous navigation · 2025–2026
Graph-Based Mapping & Navigation
Real-time track mapping and autonomous navigation in Assetto Corsa using ROS 2.
01
Overview
The project took inspiration from Ivanov and Markgraf’s paper Lane Detection using Graph Search and Geometric Constraints for Formula Student Driverless. Their Cone Lane Connector algorithm detects two track boundaries from sparse points by combining depth-first graph search, backtracking, geometric constraints, and candidate ranking. It was designed for compact Formula Student tracks whose layouts and dimensions remain within a relatively narrow operating domain.
Our target was broader: reconstruct tracks substantially larger than those used in Formula Student, from a feature map that was not fixed in advance but expanded as the vehicle explored. Boundary detection also could not depend on cone color. This required an architectural redesign rather than a direct implementation of the paper. The initial Python prototype became computationally expensive as the number of mapped points grew, so the core algorithm was re-engineered in C++. Recursive candidate generation was replaced by an explicit iterative search, while warm-starting preserved useful search state between updates and geometric constraints pruned invalid branches early. The paper’s neural ranking stage was replaced with configurable geometric scoring because a model trained on FSAE layouts did not generalize reliably to tracks with different widths, scales, and geometry.
Planning was divided into two phases. During the exploration lap, the lane detector ran at 10 Hz and continuously generated local left and right boundaries and an online drivable racing line. These local results accumulated into a persistent global map. After loop closure, mapping stopped and a second pass used the complete circuit to optimize the full racing line and its speed profile. Curvature-based limits were refined through alternating braking and acceleration passes, and a 100 Hz Pure Pursuit controller followed the result using a speed-dependent lookahead distance.
Assetto Corsa provided the unknown-track simulation, vehicle feedback, and closed-loop dynamics. ROS 2 connected the lane detector, controller, visualization, and virtual Xbox 360 interface, while Rerun displayed graph vertices, candidate edges, reconstructed boundaries, and both local and global racing lines. Test runs reached 50 km/h during mapping and 150 km/h on the completed racing line.
02
My contribution
- Re-engineered a recursive Formula Student graph-search method as an iterative C++/ROS 2 pipeline for larger, incrementally growing feature maps.
- Replaced the FSAE-specific learned ranking stage with configurable geometric ranking suitable for tracks with different widths, scales, and boundary features.
- Implemented online local racing-line generation during exploration and full-track racing-line and speed-profile optimization after loop closure.
- Built an Xbox 360 virtual-controller bridge for commanding Assetto Corsa.
- Integrated Pure Pursuit control and Rerun visualization for closed-loop testing and diagnostics.
03
System architecture
The ROS 2 bridge exchanges vehicle data with Assetto Corsa over UDP. Observed boundary features and vehicle state feed an incrementally growing graph map. During exploration, the lane detector publishes a local racing line; after loop closure, the completed map is used for full-track racing-line and speed-profile optimization.
04
Technical details
Iterative graph search
Depth-first search, geometric constraints, backtracking, candidate filtering, and warm-started state reuse keep the expanding graph tractable in real time.
Two-stage planning
Local boundaries and a drivable line are updated online during the first lap. Once the map closes, mapping stops and a second pass optimizes the complete racing line.
Speed and control
Curvature sets the initial speed limits; repeated backward braking and forward acceleration passes produce a feasible profile for a 100 Hz Pure Pursuit controller.
Simulator interface
A virtual Xbox 360 controller sends software-generated inputs to Assetto Corsa.
05
Technologies
06