Autonomous drone racing in complex environments requires agile, high-speed flight while maintaining reliable obstacle avoidance. Differentiable-physics-based policy learning has recently demonstrated high sample efficiency and remarkable performance across various tasks, including agile drone flight and quadruped locomotion. However, applying such methods to drone racing remains difficult, as key objective like gate traversal are inherently hard to express as smooth, differentiable losses. To address these challenges, we propose DiffRacing, a novel vector field-augmented differentiable policy learning framework. DiffRacing integrates differentiable losses and vector fields into the training process to provide continuous and stable gradient signals, balancing obstacle avoidance and high-speed gate traversal. In addition, a differentiable Delta Action Model compensates for dynamics mismatch, enabling efficient sim-to-real transfer without explicit system identification. Extensive simulation and real-world experiments demonstrate that DiffRacing achieves superior sample efficiency, faster convergence, and robust flight performance, thereby demonstrating that vector fields can augment traditional gradient-based policy learning with a task-specific geometric prior.
Figures & tables
Fig. 1: Compared to typical differentiable-dynamics-based methods that rely solely on dense differentiable loss functions to provide gradients, our framework integrates Attractive Vector Fields as a geometric prior for gate traversal, alongside standard loss functions to ensure safety.
Fig. 2: Overview of the DiffRacing Framework. The policy network ( π ) takes depth and state observations as input. The core components are: the differentiable simulator, which allows loss gradients to back-propagate to the network; the Attractive Vector Field module, which augments policy gradients during training. The detailed augmentation mechanism is provided in Sec. III-C ; and the Delta Action Model, which is trained to compensate for dynamics mismatch. Dashed lines indicate gradient flow. The orange lines represent the data flow during policy training, where the entire pipeline—including UAV dynamics rollout, image rendering, loss computation, and gradient backpropagation—is carried out fully within the simulator. The blue lines represent the data flow described in Sec. III-D , which includes data collection, Delta Action Model training, and subsequent policy fine-tuning.
Fig. 3: 3D Magnetic field visualization: (a) Top view of magnetic field; (b) Axonometric view of magnetic field.
Fig. 4: An Intuitive Illustration of Trajectory Self-Correction (Top View): From left to right, an overshooting trajectory is gradually refined under the continuous guidance of the Attractive Vector Fields.
Settings
λp
Success Cross
Success Rate
Max Velocity
W AVF
0.4
0.95
0.97
6.5
W/O AVF, W Lp
0.4
0.00
0.98
4.7
0.8
0.00
0.89
5.9
1.6
0.00
0.74
7.4
3.2
0.28
0.30
9.7
W/O AVF, W Lpnorm
1.6
0.00
0.95
5.0
TABLE I: Performance Comparison with and without AVF
Fig. 5: Performance comparison between different training schemes.
Method
Difficulty Level
Zigzag
Circular
Ellipse
SR
vmax
SR
vmax
SR
vmax
Ours w/ DA
0
10/10
7.1
10/10
6.4
10/10
7.1
3
10/10
7.0
10/10
6.2
10/10
6.4
6
10/10
6.1
10/10
5.8
9/10
6.3
9
7/10
6.1
9/10
5.6
7/10
5.9
Ours w/o DA
0
10/10
6.8
10/10
5.9
10/10
6.5
TABLE III: Sim-to-sim Performance
Fig. 6: Velocity components during real-world flight. The dashed line shows the velocity predicted by the simulation with Delta Action Model compensation, while the solid line represents the velocity measured by the motion capture system.
Fig. 7: Real-world experiments. The policy is deployed on a physical drone navigating (a-c) zigzag and (d) circular tracks with complex, obstacle-dense layouts that were unseen during training. The maximum velocities recorded in (a), (b), and (c) are 5.9, 6.4, and 6.0 m/s, respectively.
School of Automation and Perception, Shanghai Jiao Tong University, China · Faculty of Aerospace Engineering, Delft University of Technology, The Netherlands