Abstract
Generating time-optimal quadrotor trajectories is challenging due to the complex dynamics of high-speed, agile flight. In this paper, we propose a data-driven method for real-time time-optimal trajectory generation that is suitable for complicated system models. We utilize a temporal deep neural network with sequence-to-sequence learning to find the optimal trajectories for sequences of a variable number of waypoints. The model is efficiently trained in a semi-supervised manner by combining supervised pretraining using a minimum-snap baseline method with Bayesian optimization and reinforcement learning. Compared to the baseline method, the trained model generates up to 20% faster trajectories at an order of magnitude less computational cost. The optimized trajectories are evaluated in simulation and real-world flight experiments, where the improvement is further demonstrated.
Introduction
Achieving time-optimal flight for quadrotors through a series of waypoints is a classic optimization challenge. Quadrotor dynamics are highly nonlinear; at high speeds, factors such as battery voltage sag, motor saturation, and complex aerodynamics create a difficult-to-model "feasibility boundary." Traditional "minimum-snap" trajectories prioritize mathematical smoothness as a proxy for feasibility but often leave significant performance on the table. While nonlinear optimization can find faster paths, the computational cost—often seconds or minutes—precludes real-time adaptation during flight.
Methodology
We propose a Sequence-to-Sequence (Seq2Seq) model designed to map a variable-length list of waypoints to an optimal time allocation ($x_t$) and segment-specific smoothness weights ($x_w$).
Model Architecture
The architecture, shown in Figure 1, leverages Bi-directional Gated Recurrent Units (GRUs) within an encoder-decoder framework to handle varying sequence lengths. An attention mechanism allows the model to focus on critical "bottleneck" waypoints that limit overall speed. To ensure generalization and prevent overfitting to training data, a Variational Autoencoder (VAE) is integrated into the bottleneck, forcing the network to learn a robust latent representation of trajectories.
Three-Phase Training Pipeline
A key innovation is the semi-supervised training strategy that overcomes the sparse reward problem in reinforcement learning. As illustrated in Figure 2, the training progresses through three distinct stages:
- Supervised Pretraining (SL #1): The model is initialized using labels from a standard minimum-snap solver to learn basic feasibility.
- Guided Refinement (SL #2): The model is fine-tuned on a high-quality dataset generated via Bayesian Optimization (BO). While BO is computationally expensive, it provides the "gold standard" for time-optimal performance.
- Reinforcement Learning (RL): Finally, the model uses the REINFORCE algorithm to explore the trajectory space. The previous phases provide a "warm start," allowing the RL agent to optimize performance without the common failure of finding valid initial solutions from scratch.
Key Results
The proposed method demonstrates significant improvements in both flight performance and computational efficiency:
- Speed and Success: The model generates trajectories up to 20% faster than the minimum-snap baseline and outperforms it in 93% of validation cases.
- Real-Time Performance: Inference takes approximately 0.01 seconds, representing an order of magnitude speedup over traditional optimization methods and enabling high-rate online planning.
- Physical Feasibility: Real-world flight experiments confirmed that the aggressive maneuvers learned in simulation are flyable, with tracking errors maintained under 20cm.
Conclusion
By combining Seq2Seq learning with a multi-stage training pipeline, we enable real-time generation of near-optimal trajectories for agile quadrotors. Future work will focus on removing the assumption of static start/end states and deploying the system on embedded hardware for dynamic obstacle avoidance.
Summary updated