Skip to main content
Sim to real gap F! story banner
Engineering and technology

From Simulation to Reality: Assessing the Efficacy of Pure Pursuit, MPC, and MPCC on the F1Tenth Platform

Robert Kellerman
Contributor
04 March 2026
  • Overcoming the sim-to-real gap: Algorithms that excel in simulation struggled in reality due to localisation errors
  • Pure Pursuit algorithm was more robust: the algorithm transitioned smoothly to the real vehicle, while MPC required refinement. MPCC, though fastest in simulation, failed in practice.
  • Fixes Improved Real Performance: Kalman filtering, delay compensation, and adaptive steering stabilised MPC, but MPCC remained limited by onboard computational constraints.

Simulation serves as the primary proving ground where autonomous algorithms take shape. Yet, a significant disconnect exists between a perfect digital environment and the physical laws of reality, a phenomenon known as the “sim-to-real” gap. 

This engineering challenge forms the core of Xiangyiming Kong’s research, which utilised the F1Tenth racing platform to test the limits of modern control algorithms.

The Contenders: Three Approaches to Control

The study examined three distinct control algorithms, selected for their varying levels of computational complexity and theoretical sophistication:

  1. Pure Pursuit: The simplest of the three, this geometric path-tracking algorithm calculates a steering angle based on a “pursuit point” at a fixed distance ahead of the vehicle. It remains computationally efficient and stable, functioning much like a driver looking a few meters down the road to adjust the steering wheel.
  2. Model Predictive Control (MPC): A more sophisticated optimization-based algorithm. MPC uses a dynamic model of the vehicle to predict future states over a finite horizon. It solves an optimization problem at every time step to minimize tracking errors and control effort, effectively planning ahead to balance safety and efficiency.
  3. Model Predictive Contouring Control (MPCC): The most complex of the trio. Unlike standard MPC, which strictly follows a pre-determined path, MPCC combines predictive modeling with contouring objectives. It balances the trade-off between path accuracy and progress, allowing the vehicle to deviate slightly from the centerline if it means carrying more speed through a corner, mimicking the behavior of a professional racing driver finding the fastest line.

 

graph
Image by: Xiangyiming Kong

Fig 1: Visual representation of the problems faced by the Follow the Gap algorithm.

The Simulation Phase: Theory vs. Physics

In the controlled environment of the F1Tenth Gym simulator, the study subjected these algorithms to noise and delay disturbances to mimic realistic challenges. The results revealed distinct performance characteristics. MPCC proved to be the fastest, producing the best lap times by dynamically optimising its speed profile to race at the limit of the tires' friction.

MPC offered a balanced performance, effectively tracking reference speeds and trajectories. Pure Pursuit excelled in simplicity and stability on tracks with minimal curvature changes. Yet it struggled when the track geometry became complex, resulting in poor performance on sharp turns.

The Reality Check: When Algorithms Hit the Asphalt

The true test occurred when the team deployed these algorithms on the physical F1Tenth RC vehicle. The transition revealed the harsh reality of the sim-to-real gap. While Pure Pursuit handled the transition relatively well due to its simplicity, the optimization-based algorithms (MPC and MPCC) initially failed to complete a lap at target speeds.

The investigation identified the primary culprit not as the vehicle dynamics model, but as localisation inaccuracy. The physical vehicle relies on a particle filter and LiDAR data to estimate its position. In featureless environments, like a long, smooth hallway, the particle filter struggled to lock onto distinct landmarks, leading to position estimates that lagged or jittered. 

For algorithms like MPC and MPCC, which rely on precise initial position data to predict future states, these errors were catastrophic, leading to vehicle oscillation and crashes.

The Solution: A Three-Pronged Defense

To bridge this gap, the research proposed a composite solution designed to refine the data before the control algorithms processed it:

  • Kalman Filter Smoothing: The study implemented an Extended Kalman Filter (EKF) to filter out the Gaussian noise from the localization measurements, providing a smoother path for the controller to follow.
  • Real-Time Delay Compensation: The system measured an average latency of 226 ms between the vehicle's true position and the estimated position. A compensation technique predicted the vehicle's actual location, effectively “fast-forwarding” the delayed data to the present moment.
  • Adaptive Steering: To further stabilise the vehicle on straights where oscillation was prone to occur, the team added an adaptive steering weight to the cost function. This penalises rapid steering changes on straightaways while allowing aggressive steering during corners.

The Verdict

Implementing this solution yielded significant improvements. The MPC algorithm, which previously failed in the real world, produced a smooth, stable trajectory at speeds up to 2 m/s. Pure Pursuit's performance was also refined.

Yet, the study also highlighted a critical hardware bottleneck for the most advanced algorithm, MPCC. While MPCC performed well in simulation, it failed in practice, even with the proposed fixes. 

The cause was computational limits: the physical vehicle's onboard computer (Nvidia Jetson Xavier NX) could only update the MPCC control commands at an average of 3 Hz, compared to 19 Hz for the other algorithms. At 1 m/s, a 3 Hz update rate means the vehicle travels 0.33 meters between decisions—a distance too great for high-speed racing.

Final Thoughts

This research underscores that bridging the sim-to-real gap is not just about better code; it involves managing the imperfections of sensors and the limits of hardware. The study successfully demonstrated that by combining robust state estimation (Kalman Filtering) with delay compensation, sophisticated algorithms like MPC can transfer successfully to small-scale autonomous platforms. 

Future work will need to focus on computational optimization or more powerful hardware to unlock the full potential of MPCC in the physical world.

Download and read the full research paper: https://scholar.sun.ac.za/items/a9c1084b-d0fa-47a3-9229-928d6153fac7

Related stories