RAYA runs fully onboard the STM32F405 microcontroller of a 35 g Crazyflie quadrotor at 20 Hz. Each controller is tested in five flights under each of two conditions: a 3 g attachment with wind, and an unmodeled 40% front-left motor-command loss with wind.
01 / The problem
Motivation
Unexpected aerodynamic forces or a shifted payload can leave a quadrotor without enough thrust or attitude authority to maintain stable flight. On the ground, an unmapped low-friction surface can leave a vehicle unable to follow its path. These disturbances can lead to a crash or a loss of control.
Before that failure occurs, the robot may already have crossed a point beyond which no admissible control input can enable recovery. Knowing that a system is unsafe is therefore not the same as being able to save it. The controller must recognize deteriorating recoverability while enough time and actuation authority remain.
A safety filter that corrects an action after it has been chosen may react too late: the nominal plan may already have spent the authority needed to recover. Even when risk is included in planning, fixed task priorities can still compete with recovery. This motivates two connected questions: where should recoverability enter the controller, and when should task objectives yield?
02 / The idea
Recoverability-Aware Yielding of Authority
We introduce RAYA (Recoverability-Aware Yielding of Authority), a hybrid learned–analytic control framework that pairs a learned recoverability margin with a bounded task-weight scheduler. The margin helps the controller account for recovery while choosing an action; the scheduler adjusts which task objectives take priority.
These components are trained on narrow, platform-specific datasets and evaluated zero-shot, without retraining, on unseen trajectories, disturbance processes, plant shifts, and friction layouts.
Where: learned margin inside the optimizer
The recoverability margin is modeled by a neural network trained to predict the minimum task-specific safety margin over a finite closed-loop recovery horizon. It uses signals available to the deployed controller, including state estimates and recent history. A lower predicted margin indicates less room to recover.
A local linear approximation of this learned margin enters the model predictive control (MPC) problem as an additional constraint. It shapes the predicted trajectory while the current action is being chosen, allowing the plan to account for recovery before the action is applied.
When: let task priorities yield
Next, we learn a lightweight, bounded scheduler that adjusts selected task-objective weights. Its inputs include the predicted recoverability margin described above, alongside state and actuator-risk features available to the controller. As recoverability deteriorates, the scheduler can reduce the emphasis on tracking objectives while preserving or increasing the weight of recovery-critical channels.
For the quadrotor, lateral position and velocity tracking can yield while attitude and angular-rate regulation gain weight. For the car, position and speed tracking can yield while heading and steering regulation are preserved.
Together, the learned margin and scheduler shape one optimal control problem. The prediction dynamics, state and input bounds, and platform-specific hard constraints remain unchanged. The underlying optimal controller chooses the final action; neither learned component generates a control command.
Read the paper’s abstract
A robot can predict failure and still be unable to prevent it. By the time a safety mechanism reacts, the nominal plan may already have spent the control authority that recovery requires, and fixed task priorities may block whatever response remains. Our key insight is that both aspects are decided inside the controller. Recoverability must inform actions while they are chosen rather than veto them afterward, and task objectives must be adapted as recoverability shrinks. Building on this, we present RAYA, a hybrid learned–analytic framework that places a learned finite-horizon recoverability margin inside an optimal controller with hard constraints and pairs it with a bounded learned scheduler that shifts task weights to facilitate recovery. Across 7,200 simulation episodes per controller spanning quadrotor and autonomous-vehicle benchmarks, RAYA not only improves survival rates, but also transfers the learned components zero-shot to unseen trajectories, disturbances, plant shifts, and friction layouts. We developed an embedded realization of RAYA and deployed it onboard a 35g Crazyflie quadrotor. Across 40 combined hardware flights under wind with either aerodynamic mismatch or an unmodeled 40% motor-command loss, each of three baselines fails in all trials, while RAYA completes 10/10 six-cycle missions. Code and artifacts are open-sourced.
03 / Evaluation
Simulation
A recovery controller should work when conditions change. We evaluate 7,200 episodes per controller across quadrotors and autonomous vehicles, keeping the learned components fixed. The tests include unseen trajectories, disturbance processes, plant changes, and friction layouts.
The plots below describe the full evaluation. The replays let you inspect selected runs and see when a controller reaches its failure limits.
Quadrotor
For the quadrotor, increasing wind makes it harder to stay on the reference path while preserving stability. We compare nine controllers, including nominal MPC, sampling-based safety filtering, CBF and HJ variants, learned-margin controllers, and RAYA.
Here, CBF means control barrier function and HJ means Hamilton–Jacobi. These methods bring different forms of safety or recovery information into the control decision. The plot asks how far each can go as disturbances grow.

Try it yourself
How much wind can each controller take?
Start with Figure-8 at 9×, then compare 10×, 11×, and 12×. In this selected trial, the sampling-based filter fails first; at 12×, only RAYA completes the mission. Choose another flight condition to explore a different test.
These are selected demonstrations of recovery differences. Each condition uses one fixed evaluated trial across all nine controllers and wind levels. Changing the condition or wind restarts the 14.05-second mission. Paths come from simulation logs; failed drones hold at their first failed state. The average success rates use all 100 trials at the selected condition and wind. Wind multipliers are not airspeeds.
Autonomous vehicle
On the ground, the disturbance takes a different form: a car enters a surface with less grip than its controller expects. Tire forces become limited, but the controller still has a position and speed target to pursue.
We test periodic low-grip strips with different friction levels, exposure periods, and placements. The question is the same as in flight: can task priorities adapt before recovery becomes impossible?

Watch what happens when grip runs out
Example autonomous-vehicle runs near the low-friction recovery limit, below which survival drops sharply across controllers.
The video shows one selected trial; percentages average all tested friction levels, strip periods, and placements.
04 / Hardware
Real flights
We next bring the same recovery mechanism from simulation to a 35 g drone. Onboard control must run on a small processor and meet a tight control deadline. As in simulation, the controller receives no measurement or preview of the disturbance.

Recorded hardware trials
Four controllers, the same mission. Each clip starts at takeoff. Play all four together to compare the flights; shorter clips hold their final frame.
3 g attachment + wind
40% M1 loss + wind
Recovery with RAYA. An onboard Crazyflie recovery flight.
| Method | 3 g attachment + wind | 40% M1 loss + wind |
|---|---|---|
| Nominal MPC | 0 / 5 | 0 / 5 |
| In-solver CBF | 0 / 5 | 0 / 5 |
| Post hoc Learned Margin | 0 / 5 | 0 / 5 |
| RAYA | 5 / 5 | 5 / 5 |
One RAYA motor-loss flight contacted the floor, recovered, completed the remaining trajectory, and landed under control. Mission completion under motor loss is 5/5, with 4/5 flights completed without contact. The worst observed RAYA control-step latency is 44.52 ms, within the 50 ms onboard deadline.
05 / Conclusion
Conclusion
We introduced RAYA, built on a simple premise. Recoverability should not be checked only after the action is chosen. It should shape the plan, and what the task is allowed to sacrifice, while recovery is still possible. Across aerial and ground embodiments, RAYA improves recovery over post hoc intervention, expands the recoverable operating envelope, and transfers without retraining to unseen tasks, disturbances, plant shifts, and friction layouts. The same design also transfers to embedded hardware, where RAYA maintains recovery under aerodynamic mismatch and unmodeled actuator degradation.
Acknowledgments
This project was supported by the National Science Foundation (Awards 2411369, 2535096). Any opinions, findings, conclusions, or recommendations expressed in this material are those of the authors and do not necessarily reflect those of the funding organizations.
Citing
@misc{mahajan2026raya,
title = {{RAYA}: Learning Where and When to Intervene for Robot Recovery},
author = {Ishaan Mahajan and Charles Chen and Frederike D{\"u}mbgen and Brian Plancher},
year = {2026},
eprint = {2609.21690},
archivePrefix = {arXiv},
primaryClass = {cs.RO},
doi = {10.48550/arXiv.2609.21690},
url = {https://arxiv.org/abs/2609.21690}
}