arXiv:2610.20873cs.ROOct 2026

Manuscript Offprint

arXiv:2610.20873

Race to Recovery: Designing Advanced Safety Systems for Autonomous Driving via Learning Autonomous Racing

Teodor Ilie, Kleber Cabral, Sidney Givigi

Teodor Ilie, Kleber Cabral, and Sidney Givigi

Abstract—Vehicles that lose control at the handling limit through icing, hydroplaning, or an abrupt evasive maneuver fall outside the operating envelope of production safety systems such as electronic stability control, which focus on preventing instability rather than recovering from it. Expert drivers regain authority in these conditions by drifting. Existing autonomous recovery approaches are validated on idealized scenarios, define “recovered” states empirically and inconsistently, or rely on offline-planned trajectories rather than acting online. We address these gaps by first training a racing policy with reinforcement learning that learns drifting as a time-optimal maneuver, then adapting it to recovery through continued training with a minimum-time reward. We define recovery relative to a phase-plane-grounded stable equilibrium and introduce Gym-Khana for controller training and evaluation. Across 294 initial loss-of-control states, the transferred policy improves recovery by 186.8% over a Stanley path tracker and outperforms both a nonlinear model predictive controller and a recovery-only policy trained from scratch, while also recovering faster on states the baseline can already handle. An ablation shows that racing pretraining, rather than broader initial-state exposure alone, drives this gain. Deployed on a physical 1:10-scale F1TENTH vehicle using system identification, actuator-lag modelling, and domain randomization, the transferred policy outperforms Stanley on every tested loss-of-control state, including recovering 50% of the time from a hard state the baseline never recovers from.

Index Terms—Reinforcement learning, transfer learning, vehicle dynamics, vehicle safety.

I. INTRODUCTION

Usually, driving takes place in the linear tire regime, where manual inputs or conventional controllers perform well. Controlling a vehicle safely at the limit of handling remains an open challenge. Events that could cause loss of control, such as driving on ice, high-speed hydroplaning, or a sudden evasive maneuver, are rare but dangerous, and excessive speed alone is a factor in roughly a third of all traffic fatalities [1]. They are also the events an advanced driver assistance system (ADAS) is least able to help with. Production systems such as electronic stability control (ESC) are designed to keep the vehicle inside a conservative, linear-tire handling envelope, braking individual wheels to suppress the onset of tire saturation. That design is well suited to preventing a loss of control, but not to act once one has occurred: beyond this stable envelope, suppressing instability is no longer the same problem as recovering from it.

Expert rally and drift drivers, by contrast, routinely operate at the limit by “drifting”, where they intentionally saturate the tires to sustain large sideslip angles. Saturation decouples the direction the vehicle points from the direction it travels, giving the driver direct lateral control through two inputs, steering and throttle, rather than one, enabling more agile vehicle control [2]. This is the authority an expert exploits when control is lost, while current production safety systems cannot. Recent research has begun to reproduce this capability autonomously in the service of active safety, using drift-based control to regain control of the vehicle in scenarios where conventional safety systems fall short [3], [4]. We call this task recovery: returning an out-of-control vehicle to a stable driving state while keeping it on its intended path. We aim to develop a controller that recovers from the broadest possible set of loss-of-control states and recovers in the least time while remaining within the track. Our motivation is to endow an ADAS with the recovery skill of an expert driver.

Existing autonomous approaches to recovery, however, leave three elements unresolved. Each addresses a single narrow, idealized scenario from a fixed initial condition, so nothing is established about the range of loss-of-control states from which a controller can recover [5], [6]. Each defines the “recovered” state empirically, and differently, so no two results are comparable. And the one method validated on a real vehicle relies on a trajectory planned offline in advance [3], whereas an intervention must act online, from whatever state the vehicle is in.

A recovery controller that closes these gaps must therefore act online, without a precomputed plan, across a broad domain of loss-of-control states in the saturated-tire regime. That is the regime of racing and drifting at the limit of handling, where reinforcement learning (RL) has been shown to outperform state-of-the-art model predictive control (MPC) [7], [8]. We therefore derive the controller with RL, focusing on the control task in particular, assuming knowledge of the vehicle state, and leave perception, state estimation, and planning out of our scope. The open question is how to set up training.

Our central insight is that the answer lies in racing. The recovery task has much in common with drifting: both are defined primarily by a large sideslip angle and yaw rate, but where a racing driver produces the drift state intentionally, a loss of control is an unwanted drift that can lead to a collision. A policy that has learned to race by drifting has, in the process, learned to manage saturated tires and large sideslip angles.

This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible. (Corresponding author: Teodor Ilie.)

We acknowledge the support of the Natural Sciences and Engineering Research Council of Canada (NSERC). Nous remercions le Conseil de recherches en sciences naturelles et en génie du Canada (CRSNG) de son soutien. T. Ilie was supported by an NSERC Canada Graduate Scholarship – Master's and by a Vector Scholarship in Artificial Intelligence. The authors declare no conflicts of interest.

The authors are with the School of Computing, Queen's University, Kingston, ON K7L 2N8, Canada (e-mail: teodor.ilie@queensu.ca; kleber.cabral@queensu.ca; sidney.givigi@queensu.ca).

across the whole regime, which is precisely the competency that recovery requires. We therefore investigate the following hypothesis: a policy first trained to race with drifting, and then adapted to recovery, recovers control more reliably than a policy trained on recovery alone, and more reliably than classical control baselines. To test it, we train a racing policy in Gym-Khana, a simulator we built for prototyping vehicle control at the limit, adapt it to recovery by continuing training under a minimum-time recovery reward, and deploy the result on a 1:10-scale F1TENTH vehicle [9].

In summary, our contributions are:

  • A racing-to-recovery transfer learning method, which builds a recovery controller by pretraining a policy to race with drifting and then adapting it to recovery. Over a grid of 294 initial states spanning conditions more extreme than any seen in training, the transferred policy recovers 186.8% more than a Stanley path tracker, and outperforms both a model predictive controller and a recovery-only policy trained from scratch. Additionally, we demonstrate that even non-specialized racing policies recover competently with no recovery-specific training (Sections IV-C and V-C).

• Gym-Khana, a simulator for prototyping vehicle control at the limit of handling, built around the drift-capable single-track model used here, on which both the racing and recovery policies are trained (Section IV). It is released open-source, with online documentation. 1^{1}

  • A rigorous, phase-plane-grounded definition of vehicle recovery that formalizes the “recovered” state as a tolerance region about a stable equilibrium, together with a set of experimental recovery metrics that make recovery controllers comparable over a common domain of loss-of-control states (Sections III-B and V-A).

  • Validation on a physical F1TENTH vehicle, enabled by a sim-to-real pipeline of system identification, actuator-lag modelling, and domain randomization. Over 179 runs from three real loss-of-control initial states of increasing difficulty, the transferred policy outperforms the Stanley baseline on every state (Section VI).

References (41)