Sideslip-Conditioned Drift Trajectory Planning with Flow Matching and Control Barrier Functions

Seokjun Lee, Seung-Hyun KongarXiv 2026 · arXiv

TL;DR

This paper introduces the first generative drift trajectory planner that allows a user to explicitly request a specific "drift intensity" via a peak sideslip angle. By combining conditional flow matching for rapid trajectory generation, reinforcement fine-tuning for accuracy, and Control Barrier Functions (CBFs) for physical safety, the system enables an autonomous vehicle to negotiate corners with precise, adjustable drift angles ranging from 20° to 45°.

What Problem Does This Paper Address?

Drifting is the art of deliberately oversteering a vehicle to maintain a large sideslip angle. While it looks like pure chaos, it is a highly skilled maneuver used in motorsports for speed on low-friction surfaces and is critical for autonomous safety systems to recover from unexpected skids.

The core challenge is that drifting adds an extra degree of freedom: an expert driver can take the same corner with a "shallow" drift or a "deep" drift.

Fig. 1. Illustration of grip driving (a) and shallow (b) and deep drifting (c) through the same corner.

Existing autonomous drifting methods usually have a fixed drift behavior baked into their reference trajectories or reward functions. They lack a "knob" to adjust drift intensity on the fly. Furthermore, while generative models (like those used for image generation) can create diverse trajectories, they often "hallucinate" paths that violate physical laws, such as tire friction limits or road boundaries.

Methods

The authors propose a three-stage pipeline to bridge the gap between flexible generation and physical feasibility:

  1. Conditional Flow Matching: Unlike standard diffusion models that require many iterative steps, flow matching learns a vector field to transport noise to a valid trajectory distribution in just a few steps. This makes it fast enough for the rapid replanning required at the limits of handling. The model is conditioned on the road geometry, vehicle history, and the requested peak sideslip angle ($\beta_c$).
  2. Reinforcement Fine-Tuning (RFT): The initial model is trained on human demonstrations, but it might not perfectly hit the requested sideslip angle. The authors use a reinforcement learning technique (Flow Policy Optimization) to fine-tune the generator, rewarding it for hitting the target angle and penalizing jerky or un-trackable movements.
  3. CBF Correction & Certification: To ensure the generated plan is actually drivable, a model-based Control Barrier Function (CBF) acts as a safety filter. It mathematically enforces constraints on road boundaries, tire friction (using an inverse vehicle model), and actuator limits (engine power and steering). If a generated plan is "unsafe," the CBF minimally corrects it.
Fig. 2. Overview of the proposed sideslip-conditioned drift trajectory planner. Flow matching generates candidate trajectories, the CBF correction addresses the vehicle constraints, and the NMPC tracks the selected trajectory.

Finally, a Nonlinear Model Predictive Controller (NMPC) tracks the certified plan in a closed-loop simulation.

Datasets

The model was trained and evaluated using the high-fidelity racing simulator Assetto Corsa:

  • Training Data: 150,523 frames (approx. 120 minutes or 73 laps) of drift demonstrations on the Magione circuit using a BMW M3 E92 drift car.
  • Evaluation: The system was tested over 180 laps (approx. 450 km total) across six different requested sideslip angles (20°, 25°, 30°, 35°, 40°, and 45°).

Key Insights and Ideas

  • Hindsight Labeling: During training, the "requested" sideslip label for a demonstration is assigned in hindsight by looking at the actual peak sideslip achieved in that window. This allows the model to learn the relationship between intent and outcome from raw data.
  • The Synergy of Learning and Control: Pure generative models are flexible but "unsafe"; pure model-based controllers are "safe" but rigid. This hybrid approach uses the generative model to explore the complex "how-to-drift" space and the CBF to provide the necessary physical guardrails.
  • Flow Matching for Speed: The authors highlight that flow matching's ability to generate trajectories in as few as four Euler integration steps is a significant advantage over diffusion for real-time robotics where the environment changes every millisecond.

Key Results

The system demonstrated impressive precision and reliability in closed-loop testing:

  • High Accuracy: The median peak sideslip angle followed the user's request with a mean absolute error of only 1.2° across all test conditions.
  • Variable Intensity: The planner successfully generated and executed distinct trajectories for the same corners based solely on the requested angle.
Fig. 3. Closed-loop drift trajectories and sideslip profiles at two corners of Magione for six requested peak sideslip angles. Vehicle poses are colored by |β|, and dashed lines indicate the requested angles.
  • Ablation Success: Removing the CBF correction led to a massive spike in "spins" and "off-road" events (e.g., at 45°, spin events dropped from 4.87/10km to 0.67/10km when CBF was added). RFT was shown to be the primary driver for reducing the error between the requested and actual drift angle.

Limitations and Future Work

  • Simulation Only: While Assetto Corsa is high-fidelity, the system has not yet been tested on a physical vehicle, where sensor noise and unmodeled dynamics (like tire temperature changes) are more prevalent.
  • Physical Limits: At very high requested angles (45°+), the system still experiences more off-road events as it approaches the absolute physical limits of the vehicle's steering and power.
  • Complex Scenarios: The current work focuses on track driving. Future directions include using this adjustable sideslip capability for more complex tasks, such as obstacle avoidance or navigating narrow, low-friction paths where drifting is the only way to stay on the road.

Summary updated

Abstract

Drifting, the deliberate control of a vehicle at large sideslip angles, is relevant to both motorsport and recovery from unexpected oversteer. Existing autonomous drifting methods typically determine drift intensity through predefined reference trajectories, optimization objectives, or learned policy rewards, rather than accepting a desired sideslip angle as an explicit input. We propose, to the best of our knowledge, the first generative drift trajectory planner explicitly conditioned on a requested peak sideslip angle. A conditional flow matching model is trained on demonstrated drift laps with hindsight-derived sideslip labels and refined through reinforcement fine-tuning. A control barrier function (CBF) correction is then applied to satisfy model-based road, tire friction, and actuator constraints at the planning waypoints. In closed-loop experiments in the racing simulator Assetto Corsa, a nonlinear model predictive controller tracks the generated plans for six requested sideslip angles from 20 deg to 45 deg, with 30 laps (approximately 75 km) per request. The median peak sideslip angle measured across drift-corner passes follows the requested angle, with a mean absolute error of 1.2 deg across the six conditions. Ablation experiments show that reinforcement fine-tuning improves conditioning accuracy, while CBF correction substantially reduces off-road and spin events.
BibTeX
@misc{lee2026sideslip,
  author = {Seokjun Lee and Seung-Hyun Kong},
  title = {{Sideslip-Conditioned Drift Trajectory Planning with Flow Matching and Control Barrier Functions}},
  year = {2026},
  eprint = {2611.22927},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.22927},
}
Figure