This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Alternating Minimization Based Trajectory Generation for
Quadrotor Aggressive Flight

Zhepei Wang, Xin Zhou, Chao Xu, Jian Chu, and Fei Gao All authors are with the State Key Laboratory of Industrial Control Technology, Institute of Cyber-Systems and Control, Zhejiang University, Hangzhou, 310027, China. {wangzhepei, iszhouxin, cxu, chuj, and fgaoaa}@zju.edu.cn
Abstract

With much research has been conducted into trajectory planning for quadrotors, planning with spatial and temporal optimal trajectories in real-time is still challenging. In this paper, we propose a framework for generating large-scale piecewise polynomial trajectories for aggressive autonomous flights, with highlights on its superior computational efficiency and simultaneous spatial-temporal optimality. Exploiting the implicitly decoupled structure of the planning problem, we conduct alternating minimization between boundary conditions and time durations of trajectory pieces. In each minimization phase, we leverage the algebraic convenience of the sub-problem to escape poor local minima and achieve the lowest time consumption. Theoretical analysis for the global/local convergence rate of our proposed method is provided. Moreover, based on polynomial theory, an extremely fast feasibility check method is designed for various kinds of constraints. By incorporating the method into our alternating structure, a constrained minimization algorithm is constructed to optimize trajectories on the premise of feasibility. Benchmark evaluation shows that our algorithm outperforms state-of-the-art methods regarding efficiency, optimality, and scalability. Aggressive flight experiments in a limited space with dense obstacles are presented to demonstrate the performance of the proposed algorithm. We release our implementation as an open-source ros-package111Open-source implementation is available at: https://github.com/ZJU-FAST-Lab/am_traj.

I Introduction

Recently, our community has witnessed the development of planning methods for quadrotors. Spline-based methods, which decompose the spatial and temporal parameters of a planning problem and focus on optimizing its spatial part, are widely applied for real-time applications [1, 2, 3].

Although spline-based methods can efficiently and accurately generate energy-optimal solutions for online usage, they usually omit temporal planning for simplicity. A typical spatial-temporal joint planning problem has high nonlinearity and nonconvexity coming from its objective and constraints. Since temporal planning has underlying coupling with spatial parameters and implicit gradients, the spatial-temporal joint optimization cannot be solved by general nonlinear programming (NLP) in real-time. Even though existing methods can provide online motion planning without temporal planning, they are often too conservative to be used for autonomous flights with high aggressiveness. To bridge this gap, we propose a framework to split the spatial and temporal aspects of a trajectory optimization problem, then solve them alternately. With our method, we can obtain the energy-time joint optimal trajectory in milliseconds.

Refer to caption
Figure 1: Composite image of the quadrotor aggressive flight in a limited space. Our quadrotor is equipped with a stereo camera, an IMU and an onboard computer. No external positioning system is used. Video of the experiment can be viewed at https://youtu.be/ayoQ7i1Lz5s.

The proposed method is based on the naturally alternating structure of the spatial-temporal trajectory optimization and designed to have guaranteed optimality and efficiency. Our method is motivated by the fact that a polynomial trajectory with an odd order can be uniquely determined by its endpoint derivatives, i.e., the boundary condition, and the time duration. For a piecewise polynomial, once all boundary conditions are fixed, each piece of the trajectory depends only on its time duration, which can be optimized separately. By utilizing the widely-adopted linear-quadratic objective [4] of the optimization, the optimal time durations can be updated efficiently. Moreover, inspired by [2], the closed-form solution is adopted to update derivatives on waypoints. Based on the above observations, the joint optimization can be efficiently processed by an alternating minimization (AM) procedure [5]. With our method, a large-scale joint optimization can be done in a few milliseconds to generate optimal trajectory with the best time allocation.

To the best knowledge of us, the proposed method is the first one that generates trajectories for a quadrotor with the spatial-temporal optimality, in such a limited time. Summarizing our contributions in this work:

  • An unconstrained alternating minimization algorithm is proposed to generate spatial-temporal optimal trajectories efficiently, with a proven non-asymptotic rate of the global/local convergence.

  • A computationally efficient feasibility check method is designed for a wide range of constraints in our method.

  • A constrained alternating minimization algorithm is constructed to optimize feasible trajectories in a recursive fashion, with global convergence verified.

  • The proposed method is integrated into an autonomous quadrotor system then evaluated by real-world experiments as well as extensive benchmarks. The source code is released for the reference of the community.

In what follows, we discuss related literature in Sec. II. Preliminaries of this paper are given in Sec. III. The proposed spatial-temporal trajectory generation method for unconstrained and constrained planning cases are detailed in Sec. IV and V, respectively. Experiments and benchmarks are given in Sec. VI. The paper is concluded in Sec. VII.

II Related Work

For quadrotor planning, polynomial splines have long been used for trajectory parametrization since [1], because of their flexibility and analytical convenience. In [1], the minimization of squared derivatives is used as the objective of quadratic programming (QP), which can be solved efficiently and accurately. Based on this formulation, intensive works have been recently proposed. A method for obtaining a closed-form solution of the above QP program is proposed in [2], where a safe geometric path guides the generation of the trajectory to ensure its safety. By recursively adding intermediate waypoints to the path, a safe trajectory is finally generated after solving the minimum-snap problem several times. In [6, 7, 8], safe and dynamically feasible trajectories are online generated within a safe flight corridor, which excludes all obstacles in complex environments. However, in these methods, the time allocation of the piece-wise trajectory is pre-defined or online adjusted by heuristics. Although these heuristics are cheap to compute, the trajectories generated are often far less optimal and over-conservative, making them incapable of high-speed flights.

To address the time allocation problem, Mellinger et al. [1] compute the projected gradient with respect to durations on a hyperplane where the sum is fixed. They optimize time allocation through backtracking gradient descent. Temporal scaling is applied on the solution until dynamical feasibility is achieved. Both the finite difference and scaling used in this method are expensive operations when the number of trajectory pieces is large. Liu et al. [6] propose a way to calculate the proper scaling factor such that a single scaling operation suffices, while it only applies for rest-to-rest trajectories. Sun et al. [9] formulate the problem as a two-level optimization. They estimate the projected gradient analytically through the dual solution of the low-level QP, which improves accuracy compared with the numerical gradient. Nonetheless, the projected gradient is still inconvenient to compute and inefficient for nonlinear optimization. To avoid this situation, Richter et al. [10] use total duration as a regularization term, thus making each duration an independent variable. The time allocation is optimized through gradient descent, while actuator constraints are also fulfilled by scaling. However, the optimal ratio of time allocation under the constrained case may differ a lot from the unconstrained case. Consequently, scaling can ruin a trajectory where constraints are violated on a very short piece. Burri et al. [3] optimize the squared total duration instead. They soften all constraints by penalizing them in the objective and optimize durations through an NLP solver, while the pieces number is limited.

Gradient-based direct optimization is not satisfactory when computational overhead or solution quality is critical. To address this, Gao et al. [11] propose a method which decouples geometrical and temporal information of a trajectory. They use QP to generate a spatial trajectory with guaranteed safety in a virtual domain. A temporal trajectory is then optimized through second-order conic programming (SOCP) based on direct collocation [12], which maps time to the virtual domain. Their method achieves near real-time. The drawback is that the spatial trajectory can restrict the aggressiveness in consequent optimization, resulting in slow motions. In [13], they improve the above method by alternating minimization between coefficients of the two-layer parametrization. Time durations of the optimized temporal trajectory is used to re-generate a spatial trajectory, on which the optimization is applied again. Although high-quality trajectories can be obtained by this process, several rounds of QP and SOCP make it unapplicable to use online. Moreover, this method lacks theoretical convergence analysis and only works in the rest-to-rest case. Almeida et al. [14] propose a machine learning method to train a supervised neural network offline, thus online application is able to refine good initial guesses in real-time. However, the neural network has to be trained case by case.

In this paper, we adopt the time regularized objective [10] as well as the alternating minimization framework [13]. For efficiency, the spatial and temporal parameters are alternately updated in separate phases. Each minimization phase exploits the objective structure and is solved algebraically, making it free from gradient estimation and step-size choosing. To handle various constraints, we also design a simple yet solid feasibility checker. The proposed framework is able to generate aggressive trajectories at extremely high frequency and not limited to the rest-to-rest case.

III Preliminaries

Differential flatness of quadrotor dynamics is validated by Mellinger et al. [1]. It means the trajectory planning for a quadrotor can be done solely in the translational space. The kinodynamic feasibility is implicitly transformed into smoothness of the trajectory. Then, actuator constraints can be enforced by restricting norms on high-order derivatives.

In this paper, we employ the piece-wise polynomial trajectory, with each piece denoted as an NN-order polynomial:

p(t)=𝐜Tβ(t),t[0,T],p(t)=\mathbf{c}^{\mathrm{T}}\beta(t),~{}t\in[0,T], (1)

where 𝐜(N+1)×3\mathbf{c}\in\mathbb{R}^{(N+1)\times{3}} is the coefficient matrix, TT is the duration and β(t)=(1,t,t2,,tN)T\beta(t)=({1,t,t^{2},\cdots,t^{N}})^{\mathrm{T}} is a basis function.

It is worth noting that we only consider odd-order polynomial trajectories. Since NN is odd, the mapping is bijective between the coefficient matrix and the boundary condition. To further explain this, consider derivatives of p(t)p(t) up to (N1)/2\lceil{(N-1)/2}\rceil order:

𝐝(t)=(p(t),p˙(t),,p((N1)/2)(t))T,\mathbf{d}(t)=({p(t),\dot{p}(t),\cdots,p^{(\lceil{(N-1)/2}\rceil)}(t)})^{\mathrm{T}}, (2)

we have 𝐝(t)=𝐁(t)𝐜\mathbf{d}(t)=\mathbf{B}(t)\mathbf{c} where

𝐁(t)=(β(t),β˙(t),,β((N1)/2)(t))T.\mathbf{B}(t)=({\beta(t),\dot{\beta}(t),\cdots,\beta^{(\lceil{(N-1)/2}\rceil)}(t)})^{\mathrm{T}}. (3)

We denote 𝐝start\mathbf{d}_{start} and 𝐝end\mathbf{d}_{end} by 𝐝(0)\mathbf{d}(0) and 𝐝(T)\mathbf{d}(T), respectively. The boundary condition of this polynomial is described by the tuple (𝐝startT,𝐝endT)T({\mathbf{d}^{\mathrm{T}}_{start},\mathbf{d}^{\mathrm{T}}_{end}})^{\mathrm{T}}. The following mapping holds:

(𝐝startT,𝐝endT)T=𝐀(T)𝐜,({\mathbf{d}^{\mathrm{T}}_{start},\mathbf{d}^{\mathrm{T}}_{end}})^{\mathrm{T}}=\mathbf{A}(T)\mathbf{c}, (4)

where 𝐀(T)=(𝐁T(0),𝐁T(T))T\mathbf{A}(T)=({\mathbf{B}^{\mathrm{T}}(0),\mathbf{B}^{\mathrm{T}}(T)})^{\mathrm{T}} is the mapping matrix. 𝐀(T)\mathbf{A}(T) is a non-singular square matrix only if NN is an odd number. Otherwise, 𝐀(T)\mathbf{A}(T) becomes over-determined, which means for any given 𝐝start\mathbf{d}_{start} and 𝐝end\mathbf{d}_{end}, there may not exist polynomial whose 𝐜\mathbf{c} satisfies (4).

Refer to caption
Figure 2: A trajectory 𝐏(t)\mathbf{P}(t) contains MM pieces. Each piece is fully determined by its duration TmT_{m} and boundary condition 𝐝m=(dmT,dm+1T)T\mathbf{d}_{m}=({d^{\mathrm{T}}_{m},d^{\mathrm{T}}_{m+1}})^{\mathrm{T}}.

Moreover, the inverse 𝐀(T)1\mathbf{A}(T)^{-1} can be implemented with zero overhead when NN is an odd number. Burri et al. [3] explore the structure of 𝐀(T)\mathbf{A}(T) and find that 𝐀(T)1\mathbf{A}(T)^{-1} can be computed more efficiently through its Schur-Complement, which only involves submatrix inverse. We take things one step further. Actually, all entries of 𝐀(T)1\mathbf{A}(T)^{-1} are power functions of TT, thus Gaussian-Elimination is applied to get its analytic form. Consequently, time-consuming operation is no longer needed when 𝐀(T)1\mathbf{A}(T)^{-1} is computed online. To achieve this, we pre-compute matrices 𝐄,𝐅,𝐆,𝐔,𝐕,𝐖S×S\mathbf{E},\mathbf{F},\mathbf{G},\mathbf{U},\mathbf{V},\mathbf{W}\in\mathbb{R}^{S\times{S}} offline, where S=(N+1)/2S=(N+1)/2:

𝐄ij={k=1i1kif i=j,0if ij.,𝐅ij={k=ji+1j1kif ij,0if i>j.\mathbf{E}_{ij}=\begin{cases}\prod\limits_{k=1}^{i-1}{k}&\text{if }i=j,\\ 0&\text{if }i\neq{j}.\end{cases},~{}\mathbf{F}_{ij}=\begin{cases}\prod\limits_{k=j-i+1}^{j-1}{k}&\text{if }i\leq{j},\\ 0&\text{if }i>j.\end{cases}
𝐆ij=k=Si+j+1S+j1k,𝐔ij={1/k=1i1kif i=j,0if ij.\mathbf{G}_{ij}=\prod\limits_{k=S-i+j+1}^{S+j-1}{k},~{}\mathbf{U}_{ij}=\begin{cases}1/\prod\limits_{k=1}^{i-1}{k}&\text{if }i=j,\\ 0&\text{if }i\neq{j}.\end{cases}
𝐖=𝐆1,𝐕=𝐖𝐅𝐔.\mathbf{W}=\mathbf{G}^{-1},\mathbf{V}=-\mathbf{W}\mathbf{F}\mathbf{U}.

Following mapping matrices are computed online:

𝐀(T)=(𝐄𝟎(𝐅ijTji)S×S(𝐆ijTSi+j)S×S),\mathbf{A}(T)=\begin{pmatrix}\mathbf{E}&\mathbf{0}\\ \left({\mathbf{F}_{ij}T^{j-i}}\right)_{S\times{S}}&\left({\mathbf{G}_{ij}T^{S-i+j}}\right)_{S\times{S}}\end{pmatrix},
𝐀(T)1=(𝐔𝟎(𝐕ijTjiS)S×S(𝐖ijTjiS)S×S).\mathbf{A}(T)^{-1}=\begin{pmatrix}\mathbf{U}&\mathbf{0}\\ \left({\mathbf{V}_{ij}T^{j-i-S}}\right)_{S\times{S}}&\left({\mathbf{W}_{ij}T^{j-i-S}}\right)_{S\times{S}}\end{pmatrix}.

Therefore, provided with an odd order, we show the practical equivalence between the tuple (𝐝start,𝐝end,T)({\mathbf{d}_{start},\mathbf{d}_{end},T}) and (𝐜,T)({\mathbf{c},T}) in the sense of polynomial representation.

Consequently, we consider an MM-piece trajectory 𝐏\mathbf{P} parametrized by time allocation 𝐓=(T1,T2,,TM)T\mathbf{T}=({T_{1},T_{2},\cdots,T_{M}})^{\mathrm{T}} as well as boundary conditions 𝐃=(d1T,d2T,,dM+1T)T\mathbf{D}=({d^{\mathrm{T}}_{1},d^{\mathrm{T}}_{2},\cdots,d^{\mathrm{T}}_{M+1}})^{\mathrm{T}} of all pieces, as shown in Fig. 2. The trajectory is defined by

𝐏(t):=𝐝mT𝐀(Tm)Tβ(ti=1m1Ti),\mathbf{P}(t):=\mathbf{d}_{m}^{\mathrm{T}}\mathbf{A}(T_{m})^{-\mathrm{T}}\beta(t-\sum_{i=1}^{m-1}{T_{i}}), (5)

where tt lies in the mm-th piece and 𝐝m=(dmT,dm+1T)T\mathbf{d}_{m}=({d^{\mathrm{T}}_{m},d^{\mathrm{T}}_{m+1}})^{\mathrm{T}} is a boundary condition of the mm-th piece. This definition implicitly involves (N1)/2(N-1)/2 order continuity at boundaries of each piece. Normally, some entries in 𝐃\mathbf{D} are fixed, such as the position of waypoints [2]. We split 𝐃\mathbf{D} into two parts, the fixed part 𝐃F\mathbf{D}_{F} which is viewed as constant, and the free part 𝐃P\mathbf{D}_{P} which is to be optimized. Then, the whole trajectory can be fully determined by 𝐏=𝚽(𝐃P,𝐓)\mathbf{P}=\mathbf{\Phi}(\mathbf{D}_{P},\mathbf{T}).

IV Spatial-Temporal Trajectory Optimization: Unconstrained Case

In this section, we describe our method for jointly optimizing spatial and temporal parameters of a trajectory, for the Unconstrained Case, where no constraint is considered.

IV-A Optimization Objective

We use the time regularized quadratic cost over the whole trajectory, as the objective of the optimization:

J(𝐏)=0m=1MTm(ρ+i=DminDmaxwi𝐏(i)(t)2)dt,J(\mathbf{P})=\int_{0}^{\sum_{m=1}^{M}{T_{m}}}\left({{\rho+\sum_{i=D_{min}}^{D_{max}}{w_{i}\left\|{\mathbf{P}^{(i)}(t)}\right\|^{2}}}}\right)\mathrm{d}t, (6)

where DminD_{min} and DmaxD_{max} are the lowest and the highest order of derivative to be penalized respectively, wiw_{i} is the weight of the ii-order derivative and ρ\rho is the weight of time regularization. The weight ρ\rho adjusts the aggressiveness of the trajectory [3], which allows total duration varies adaptively. For now, we consider the unconstrained optimization:

min𝐃P,𝐓J(𝐃P,𝐓)\min_{\mathbf{D}_{P},\mathbf{T}}{J(\mathbf{D}_{P},\mathbf{T})} (7)

where free boundary conditions and durations are decision variables. J(𝐃P,𝐓):=J(𝚽(𝐃P,𝐓))J(\mathbf{D}_{P},\mathbf{T}):=J(\mathbf{\Phi}(\mathbf{D}_{P},\mathbf{T})) is used for brevity.

The cost JmJ_{m} for the mm-th piece can be calculated as

Jm=ρTm+Tr{𝐝mT𝐀(Tm)T𝐐(Tm)𝐀(Tm)1𝐝m},J_{m}=\rho T_{m}+\operatorname*{Tr}\left\{{\mathbf{d}_{m}^{\mathrm{T}}\mathbf{A}(T_{m})^{-\mathrm{T}}\mathbf{Q}(T_{m})\mathbf{A}(T_{m})^{-1}\mathbf{d}_{m}}\right\}, (8)

in which 𝐐(Tm)\mathbf{Q}(T_{m}) is a symmetric matrix [10] consisting of high powers of TmT_{m}, and Tr{}\operatorname*{Tr}\left\{{\cdot}\right\} is trace operation which only sums up diagonal costs produced in three dimensions. The overall objective can be formulated as

J=ρ𝐓1+Tr{(𝐃F𝐃P)T𝐂T𝐇(𝐓)𝐂(𝐃F𝐃P)},J=\rho\left\|{\mathbf{T}}\right\|_{1}+\operatorname*{Tr}\left\{{\begin{pmatrix}\mathbf{D}_{F}\\ \mathbf{D}_{P}\end{pmatrix}^{\mathrm{T}}\mathbf{C}^{\mathrm{T}}\mathbf{H}(\mathbf{T})\mathbf{C}\begin{pmatrix}\mathbf{D}_{F}\\ \mathbf{D}_{P}\end{pmatrix}}\right\}, (9)
𝐇(𝐓)=m=1M𝐀(Tm)T𝐐(Tm)𝐀(Tm)1,\mathbf{H}(\mathbf{T})=\bigoplus_{m=1}^{M}{\mathbf{A}(T_{m})^{-\mathrm{T}}\mathbf{Q}(T_{m})\mathbf{A}(T_{m})^{-1}}, (10)

where 𝐇(𝐓)\mathbf{H}(\mathbf{T}) is the direct sum of its MM diagonal blocks, and 𝐂\mathbf{C} is a permutation matrix. We make sure that the setting for JJ is legal by assuming that the α\alpha-sublevel set of J(𝐃P,𝐓)J(\mathbf{D}_{P},\mathbf{T}) for any finite α\alpha is bounded and only consists of positive time allocation. For example, consecutive repeating waypoints with identical boundary conditions fixed in 𝐃F\mathbf{D}_{F} are not allowed.

IV-B Unconstrained Trajectory Optimization

To optimize Eq. (9), we propose an AM-based algorithm, as shown in Alg. 1. Initially, 𝐓0\mathbf{T}^{0} is solved for the provided 𝐃P0\mathbf{D}_{P}^{0}. After that, the minimization of the objective function is done through a two-phase process, in which only one of 𝐃P\mathbf{D}_{P} and 𝐓\mathbf{T} is optimized while the other is fixed.

Input: 𝐃P0,K+,δ>0\mathbf{D}_{P}^{0},K\in\mathbb{Z}_{+},\delta>0
Output: 𝐃P,𝐓\mathbf{D}_{P}^{*},\mathbf{T}^{*}
begin
       𝐓0argmin𝐓J(𝐃P0,𝐓)\mathbf{T}^{0}\leftarrow\operatorname*{arg\,min}_{\mathbf{T}}{J(\mathbf{D}_{P}^{0},\mathbf{T})};
       JlJ(𝐃P0,𝐓0),k0J_{l}\leftarrow J(\mathbf{D}_{P}^{0},\mathbf{T}^{0}),k\leftarrow 0;
       while k<Kk<K do
             𝐃Pk+1argmin𝐃PJ(𝐃P,𝐓k)\mathbf{D}_{P}^{k+1}\leftarrow\operatorname*{arg\,min}_{\mathbf{D}_{P}}{J(\mathbf{D}_{P},\mathbf{T}^{k})};
             𝐓k+1argmin𝐓J(𝐃Pk+1,𝐓)\mathbf{T}^{k+1}\leftarrow\operatorname*{arg\,min}_{\mathbf{T}}{J(\mathbf{D}_{P}^{k+1},\mathbf{T})};
             JcJ(𝐃Pk+1,𝐓k+1)J_{c}\leftarrow J(\mathbf{D}_{P}^{k+1},\mathbf{T}^{k+1});
             if |JlJc|<δ|{J_{l}-J_{c}}|<\delta then
                  break
            JlJc,kk+1J_{l}\leftarrow J_{c},k\leftarrow k+1;
            
      𝐃P𝐃Pk,𝐓𝐓k\mathbf{D}_{P}^{*}\leftarrow\mathbf{D}_{P}^{k},\mathbf{T}^{*}\leftarrow\mathbf{T}^{k};
      
      return 𝐃P,𝐓\mathbf{D}_{P}^{*},\mathbf{T}^{*};
Algorithm 1 Unconstrained Spatial-Temporal AM

In the first phase, the sub-problem

𝐃P(𝐓)=argmin𝐃PJ(𝐃P,𝐓)\mathbf{D}_{P}^{*}(\mathbf{T})=\operatorname*{arg\,min}_{\mathbf{D}_{P}}{J(\mathbf{D}_{P},\mathbf{T})} (11)

is solved for each 𝐓k\mathbf{T}^{k}. We employ the unconstrained QP formulation by Richter et al. [10], and briefly introduce it here. The matrix 𝐑(𝐓)=𝐂T𝐇(𝐓)𝐂\mathbf{R}(\mathbf{T})=\mathbf{C}^{\mathrm{T}}\mathbf{H}(\mathbf{T})\mathbf{C} is partitioned as

𝐑(𝐓)=(𝐑FF(𝐓)𝐑FP(𝐓)𝐑PF(𝐓)𝐑PP(𝐓)),\mathbf{R}(\mathbf{T})=\begin{pmatrix}\mathbf{R}_{FF}(\mathbf{T})&\mathbf{R}_{FP}(\mathbf{T})\\ \mathbf{R}_{PF}(\mathbf{T})&\mathbf{R}_{PP}(\mathbf{T})\end{pmatrix}, (12)

then the solution is be obtained analytically through

𝐃P(𝐓)=𝐑PP(𝐓)1𝐑FP(𝐓)𝐃F.\mathbf{D}_{P}^{*}(\mathbf{T})=-\mathbf{R}_{PP}(\mathbf{T})^{-1}\mathbf{R}_{FP}(\mathbf{T})\mathbf{D}_{F}. (13)

For efficiency, we solve the sparse linear system

𝐑PP(𝐓)X=𝐑FP(𝐓)𝐃F\mathbf{R}_{PP}(\mathbf{T})X=-\mathbf{R}_{FP}(\mathbf{T})\mathbf{D}_{F} (14)

through Sparse LU Factorization to get 𝐃P(𝐓)\mathbf{D}_{P}^{*}(\mathbf{T}) since 𝐇(𝐓)\mathbf{H}(\mathbf{T}) and 𝐂\mathbf{C} are both sparse.

In the second phase, the sub-problem

𝐓(𝐃P)=argmin𝐓J(𝐃P,𝐓)\mathbf{T}^{*}(\mathbf{D}_{P})=\operatorname*{arg\,min}_{\mathbf{T}}{J(\mathbf{D}_{P},\mathbf{T})} (15)

is solved for each 𝐃Pk\mathbf{D}_{P}^{k}. In this phase, the scale of sub-problem can be reduced into each piece. Due to our representation of trajectory, once 𝐃P\mathbf{D}_{P} is fixed, the boundary conditions 𝐃\mathbf{D} isolate each entry in 𝐓\mathbf{T} from the others. Therefore, TmT_{m} can be optimized individually to get all entries of 𝐓(𝐃P)\mathbf{T}^{*}(\mathbf{D}_{P}). As for the mm-th piece, its cost JmJ_{m} in (8) is indeed a rational function of TmT_{m}. We show the structure of JmJ_{m} and omit the deduction for brevity:

Jm(T)=ρT+1Tpni=0pdαiTi,J_{m}(T)=\rho T+\frac{1}{T^{p_{n}}}\sum\limits_{i=0}^{p_{d}}{\alpha_{i}T^{i}}, (16)

where pn=2Dmax1p_{n}=2D_{max}-1 and pd=2(DmaxDmin)+N1p_{d}=2(D_{max}-D_{min})+N-1 are orders of numerator and denominator, respectively. The coefficient αi\alpha_{i} is determined by 𝐝m\mathbf{d}_{m}. Due to positiveness of Jm(T)J_{m}(T), we have Jm(T)+J_{m}(T)\rightarrow+\infty as T+T\rightarrow+\infty or T0+T\rightarrow 0^{+}. Therefore, the minimizer exists for

Tm(𝐃P)=argminT(0,+)Jm(T).T_{m}^{*}(\mathbf{D}_{P})=\operatorname*{arg\,min}_{T\in({0,+\infty})}{J_{m}(T)}. (17)

To find all candidates, we compute the derivative of (16):

dJm(T)dT=ρ+1T1+pni=0pd(ipn)αiTi.\frac{\mathrm{d}J_{m}(T)}{\mathrm{d}T}=\rho+\frac{1}{T^{1+p_{n}}}\sum\limits_{i=0}^{p_{d}}{(i-p_{n})\alpha_{i}T^{i}}. (18)

The minimum exists in solutions of dJm(T)/dT=0{\mathrm{d}J_{m}(T)}/{\mathrm{d}T}=0, which can be calculated through any modern univariate polynomial real-roots solver [15]. In this paper, we utilize the Continued Fraction method [16] to isolate all positive roots of any high order (5\geq 5) polynomial. The second phase is completed by updating every entry Tm(𝐃P)T_{m}^{*}(\mathbf{D}_{P}) in 𝐓(𝐃P)\mathbf{T}^{*}(\mathbf{D}_{P}).

IV-C Convergence Analysis

Alg. 1 is globally convergent. Moreover, it is faster than conventional gradient descent used in time allocation refinement, under no assumption on convexity.

Theorem 1.

Consider the process described in Algorithm 1. Provided with any 𝐃P0\mathbf{D}_{P}^{0}, the following inequality always holds for the KK-th iteration:

min0kKJ(𝐃Pk,𝐓k)F2McJ(𝐃P0,𝐓0)JcK,\min_{0\leq{k}\leq{K}}{\|{\nabla{J(\mathbf{D}_{P}^{k},\mathbf{T}^{k})}}\|}_{F}^{2}\leq{M_{c}\frac{J(\mathbf{D}_{P}^{0},\mathbf{T}^{0})-J_{c}}{K}},

where McM_{c} and JcJ_{c} are both constant, F\left\|{\cdot}\right\|_{F} is Frobenius norm. It shows the process globally converges to a stationary point with non-asymptotic sublinear rate O(1/K)O(1/\sqrt{K}).

Proof.

See [17] for details. ∎

Thm. 1 shows that our algorithm shares the same global convergence rate as that of gradient descent with the best step-size chosen in each iteration [18]. The best step-size is practically unavailable. In contrast, our algorithm does not involve any step-size choosing in its iterations. Sub-problems in Eq. (11) and Eq. (15) both are solved exactly and efficiently due to their algebraic convenience. Therefore, Alg. 1 is faster than gradient-based methods in practice.

Another key advantage of our algorithm is its capability of escaping from a local minimum in the time optimization. Watching Eq. (9), despite J(𝐃P,𝐓)J(\mathbf{D}_{P},\mathbf{T}) is convex in 𝐃P\mathbf{D}_{P} as proved in [17], it is a rational function which can have multiple local minima in TmT_{m}. Therefore, a case may occur where the initial time allocation falls into one of these local minima instead of the global minimum in (0,+)(0,+\infty). Under this situation, naturally, the global minimum in time allocation cannot be attained by gradient-based methods. However, with our method, all local minima are compared directly. Thus, the situation can be avoided.

It is worth noting that, here the global optimality is not guaranteed because our algorithm still exploits local structure of the problem. Although convergence to a stationary point is ensured, we argue that strict saddle points are theoretically and numerically unstable for our first-order AM method [19]. Moreover, when the stationary point is a strict local minimum, we show that the convergence rate is faster.

Theorem 2.

Let (𝐃^P,𝐓^)(\widehat{\mathbf{D}}_{P},\widehat{\mathbf{T}}) denote any strict local minimum of J(𝐃P,𝐓)J(\mathbf{D}_{P},\mathbf{T}) to which Alg. 1 converges. There exist Kc+K_{c}\in\mathbb{Z}_{+} and γ+\gamma\in\mathbb{R}_{+}, such that

J(𝐃PK,𝐓K)J1γ(KKc)+(J(𝐃PKc,𝐓Kc)J)1,J(\mathbf{D}_{P}^{K},\mathbf{T}^{K})-J^{*}\leq{\frac{1}{\gamma(K-K_{c})+(J(\mathbf{D}_{P}^{K_{c}},\mathbf{T}^{K_{c}})-J^{*})^{-1}}},

for all KKcK\geq{K_{c}}, where J=J(𝐃^P,𝐓^)J^{*}=J(\widehat{\mathbf{D}}_{P},\widehat{\mathbf{T}}).

Proof.

See [17] for details. ∎

Thm. 2 shows that a faster convergence rate O(1/K)O(1/K) can be attained for a strict local minimum than the general case in Thm. 1. Note that it is possible to accelerate our method to attain the optimal rate O(1/K2)O(1/K^{2}) of first-order methods or use second-order methods to achieve better performance. However, we still employ the first-order AM process because of its simplicity in implementation and its good performance when the trajectory is far from optimum.

The non-asymptotic property implies that the convergence is bounded strictly by the rate, rather than approximated. This property, along with the monotone decrease of the objective, shows guaranteed progress in each iteration, while gradient-based methods may try bad step-size thus making no/negative progress.

V Spatial-Temporal Trajectory Optimization: Constrained Case

In this section, we present our method to incorporate safety and dynamical feasibility constraints into our optimization process. To begin with, we introduce a computationally efficient feasibility check method that applies to a wide range of constraints. Then this method is used in a constrained trajectory optimization process.

V-A Computationally Efficient Feasibility Check

A piece of the trajectory is denoted by

p(t)=(p1(t),p2(t),p3(t))T.p(t)=({p_{1}(t),p_{2}(t),p_{3}(t)})^{\mathrm{T}}. (19)

Constraint G(p1(i)(t),p2(i)(t),p3(i)(t))<0G(p_{1}^{(i)}(t),p_{2}^{(i)}(t),p_{3}^{(i)}(t))<{0} over [0,T][0,T] should be satisfied by the ii-order derivative of the piece. It is required that GG has the form of a multivariate polynomial:

G(a,b,c):=e1+e2+e3dgdc,ejdcae1be2ce3,G(a,b,c):=\sum_{e_{1}+e_{2}+e_{3}\leq{d_{g}}}^{d_{c}\in\mathbb{R},e_{j}\in\mathbb{N}}{d_{c}\cdot{a^{e_{1}}b^{e_{2}}c^{e_{3}}}}, (20)

where dgd_{g} is the highest degree. Many kinds of constraints can be expressed by GG, such as the safe distance constraint to keep away from an obstacle located at (0,0,0)T({0,0,0})^{\mathrm{T}}:

Gp(p1(t),p2(t),p3(t))<0,\displaystyle G_{p}(p_{1}(t),p_{2}(t),p_{3}(t))<{0},
Gp(a,b,c):=rsafe2(a2+b2+c2),\displaystyle G_{p}(a,b,c):=r_{safe}^{2}-(a^{2}+b^{2}+c^{2}),

or maximum speed constraint:

Gv(p˙1(t),p˙2(t),p˙3(t))<0,\displaystyle G_{v}(\dot{p}_{1}(t),\dot{p}_{2}(t),\dot{p}_{3}(t))<{0},
Gv(a,b,c):=a2+b2+c2vmax2.\displaystyle G_{v}(a,b,c):=a^{2}+b^{2}+c^{2}-v^{2}_{max}.

Provided with any piece p(t)p(t), we check whether constraint GG is fulfilled for all t[0,T]t\in[0,T]. We define 𝒢(t):=G(p1(i)(t),p2(i)(t),p3(i)(t))\mathcal{G}(t):=G(p_{1}^{(i)}(t),p_{2}^{(i)}(t),p_{3}^{(i)}(t)) which is indeed a polynomial of tt. The procedure is as follows: Firstly, check the sign of 𝒢(0)\mathcal{G}(0) and 𝒢(T)\mathcal{G}(T). Then, If both two endpoints satisfy the constraint, we have to make sure the constraint is not violated inside the interval (0,T)(0,T). Instead of locating all extrema of 𝒢(t)\mathcal{G}(t) and checking their values, we only need to check the existence of root of 𝒢(t)=0\mathcal{G}(t)=0 in the interval. If the equation has any root in (0,T)(0,T), then p(t)p(t) is infeasible. Fortunately, it is convenient for a polynomial to achieve this leveraging Sturm’s Theory [20]. Now that neither 0 nor TT is the root of 𝒢(t)=0\mathcal{G}(t)=0, we compute the Sturm sequence g0(t),g1(t),g2(t),g_{0}(t),g_{1}(t),g_{2}(t),\cdots by

g0(t)\displaystyle g_{0}(t) =𝒢(t),\displaystyle=\mathcal{G}(t),
g1(t)\displaystyle g_{1}(t) =𝒢˙(t),\displaystyle=\dot{\mathcal{G}}(t), (21)
gk+1(t)\displaystyle-g_{k+1}(t) =Rem(gk1(t),gk(t)),\displaystyle=Rem(g_{k-1}(t),g_{k}(t)),

where Rem(gk1(t),gk(t))Rem(g_{k-1}(t),g_{k}(t)) is remainder in the Euclidean division of gk1(t)g_{k-1}(t) by gk(t)g_{k}(t) [20]. When gk(t)g_{k}(t) becomes constant, we stop expanding this sequence. Let Vsign(τ)V_{sign}(\tau) denote the number of sign variations of Sturm sequence at t=τt=\tau, in which zero values should be ignored. Then the number of distinct roots inside (0,T)(0,T) equals Vsign(0)Vsign(T)V_{sign}(0)-V_{sign}(T). Here the feasibility check is done for G(,,)<0G(\cdot,\cdot,\cdot)<{0}. Sometimes, constraint has the form G(,,)0G(\cdot,\cdot,\cdot)\leq{0}. In practice, it can be equally handled by checking G(,,)<ϵG(\cdot,\cdot,\cdot)<\epsilon, where ϵ\epsilon is a small positive real number. What’s more, non-polynomial constraint can also be efficiently checked through its Taylor series within acceptable approximation error.

In conclusion, our method converts the feasibility check into the root existence check for polynomial, without computing the root itself. Our method is straightforward and involves no redundant operations, in comparison with methods used in [21] and [3].

V-B Constrained Trajectory Optimization

For the Constrained Case, we enforce constraints on norms of derivatives of the trajectory:

min𝐃P,𝐓\displaystyle\min_{\mathbf{D}_{P},\mathbf{T}} J(𝐃P,𝐓)\displaystyle{J(\mathbf{D}_{P},\mathbf{T})} (22)
s.t.\displaystyle s.t.~{} 𝐏(n)(t)σn,n=1,,N\displaystyle\|{\mathbf{P}^{(n)}(t)}\|\leq\sigma_{n},n=1,\cdots,N (23)
𝐏=𝚽(𝐃P,𝐓)\displaystyle\mathbf{P}=\mathbf{\Phi}(\mathbf{D}_{P},\mathbf{T}) (24)

Generally, the constraint does not have to be like (23). If only a constraint is representable in (20) and its feasible solution can be constructed, then it can be handled in our optimization. With a slight abuse of notation, we use 𝐆(𝐃P,𝐓)0\mathbf{G}(\mathbf{D}_{P},\mathbf{T})\leq 0 to denote that 𝚽(𝐃P,𝐓)\mathbf{\Phi}(\mathbf{D}_{P},\mathbf{T}) is feasible. 𝐆(𝐝m,Tm)0\mathbf{G}(\mathbf{d}_{m},T_{m})\leq{0} is used to denote that the mm-th piece is feasible. We say 𝐆(𝐝m,Tm)0\mathbf{G}(\mathbf{d}_{m},T_{m})\leq{0} is tight by meaning that, at least one constraint is tight at a tt on the mm-th piece.

Refer to caption
(a) Update of Derivatives.
Refer to caption
(b) Update of time allocation.
Figure 3: Illustration for the two phases in constrained optimization.

The constrained version of our method is shown in Alg. 2. An initial feasible trajectory 𝐏0\mathbf{P}^{0} can be constructed from conservative time allocation. The spatial-temporal parameters (𝐃P0,𝐓0)(\mathbf{D}_{P}^{0},\mathbf{T}^{0}) are then recovered from the trajectory, which is used in the consequent two-phase constrained minimization.

In the first phase, 𝐓k\mathbf{T}^{k} is fixed. An illustration is provided in Fig. 3(a), where the unconstrained minimum 𝐃~P\widetilde{\mathbf{D}}_{P} is obtained as is done in Alg. 1. The trajectory 𝚽(𝐃~P,𝐓k)\mathbf{\Phi}(\widetilde{\mathbf{D}}_{P},\mathbf{T}^{k}) may not be feasible. Since the feasibility of (𝐃Pk,𝐓k)(\mathbf{D}_{P}^{k},\mathbf{T}^{k}) is ensured in last iteration, a line search is done as

minλ[0,1]J(𝐃(λ),𝐓k),s.t.𝐆(𝐃(λ),𝐓k)0,\min_{\lambda\in[0,1]}{J(\mathbf{D}(\lambda),\mathbf{T}^{k})},~{}s.t.~{}\mathbf{G}(\mathbf{D}(\lambda),\mathbf{T}^{k})\leq{0}, (25)

where 𝐃(λ)\mathbf{D}(\lambda) is the convex combination of 𝐃~P\widetilde{\mathbf{D}}_{P} and 𝐃Pk\mathbf{D}_{P}^{k}. Convexity of J(,𝐓k)J(\cdot,\mathbf{T}^{k}) implies the convexity of J(𝐃(),𝐓k)J(\mathbf{D}(\cdot),\mathbf{T}^{k}). Moreover, λ=0\lambda=0 is a feasible solution, while λ=1\lambda=1 is the unconstrained global minimum. We simply take λ=1\lambda^{*}=1 if it is feasible. If not, a bisection procedure is done on the interval [0,1][0,1]. In this procedure, the feasibility check method described in Sec. V-A is employed to shrink the interval. The procedure stops at an acceptable interval length, with λ\lambda^{*} taking the feasible lower bound. After that, we update 𝐃Pk+1\mathbf{D}_{P}^{k+1} by 𝐃(λ)\mathbf{D}(\lambda^{*}). Meanwhile, a set Δ\Delta is maintained to store indices of tightened pieces.

Input: Feasible 𝐏0\mathbf{P}^{0}, K+,δ>0K\in\mathbb{Z}_{+},\delta>0
Output: 𝐏\mathbf{P}^{*}
begin
       (𝐃P0,𝐓0)𝚽1(𝐏0)(\mathbf{D}_{P}^{0},\mathbf{T}^{0})\leftarrow\mathbf{\Phi}^{-1}(\mathbf{P}^{0});
       JlJ(𝐃P0,𝐓0)J_{l}\leftarrow J(\mathbf{D}_{P}^{0},\mathbf{T}^{0});
       k0,Δ{}k\leftarrow 0,\Delta\leftarrow\left\{{}\right\};
       while k<Kk<K do
             𝐃~Pargmin𝐃PJ(𝐃P,𝐓k)\widetilde{\mathbf{D}}_{P}\leftarrow\operatorname*{arg\,min}_{\mathbf{D}_{P}}{J(\mathbf{D}_{P},\mathbf{T}^{k})};
             𝐃(λ):=λ𝐃~P+(1λ)𝐃Pk\mathbf{D}(\lambda):=\lambda\widetilde{\mathbf{D}}_{P}+(1-\lambda)\mathbf{D}_{P}^{k};
             λargminλ[0,1]J(𝐃(λ),𝐓k)\lambda^{*}\leftarrow\operatorname*{arg\,min}_{\lambda\in[0,1]}{J(\mathbf{D}(\lambda),\mathbf{T}^{k})}
             s.t.𝐆(𝐃(λ),𝐓k)0~{}~{}~{}~{}~{}~{}~{}~{}s.t.~{}\mathbf{G}(\mathbf{D}(\lambda),\mathbf{T}^{k})\leq{0};
             𝐃Pk+1=𝐃(λ)\mathbf{D}_{P}^{k+1}=\mathbf{D}(\lambda^{*});
             Recover TmkT^{k}_{m} from 𝐓k\mathbf{T}^{k} and 𝐝mk+1\mathbf{d}_{m}^{k+1} from 𝐃Pk+1\mathbf{D}_{P}^{k+1};
             for m1m\leftarrow 1 to MM do
                   if 𝐆(𝐝mk+1,Tmk)0\mathbf{G}(\mathbf{d}_{m}^{k+1},T_{m}^{k})\leq{0} is tight then
                         ΔΔ{m}\Delta\leftarrow\Delta\cup\left\{{m}\right\};
                        
                   else
                         ΔΔ{m}\Delta\leftarrow\Delta\setminus\left\{{m}\right\};
                        
                  
            for m1m\leftarrow 1 to MM do
                   Construct Jm(T)J_{m}(T) from 𝐝mk+1\mathbf{d}_{m}^{k+1};
                   Tmk+1argminT(0,+)Jm(T)T_{m}^{k+1}\leftarrow\operatorname*{arg\,min}_{T\in(0,+\infty)}{J_{m}(T)}
                   s.t.𝐆(𝐝mk+1,T)0~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}s.t.~{}\mathbf{G}(\mathbf{d}_{m}^{k+1},T)\leq{0};
                  
            Construct 𝐓k+1\mathbf{T}^{k+1} from Tmk+1T_{m}^{k+1};
             JcJ(𝐃Pk+1,𝐓k+1)J_{c}\leftarrow J(\mathbf{D}_{P}^{k+1},\mathbf{T}^{k+1});
             if |JlJc|<δ|{J_{l}-J_{c}}|<\delta then
                  break
            JlJc,kk+1J_{l}\leftarrow J_{c},k\leftarrow k+1;
            
      𝐏k𝚽(𝐃Pk,𝐓k)\mathbf{P}^{k}\leftarrow\mathbf{\Phi}(\mathbf{D}_{P}^{k},\mathbf{T}^{k});
       if Δ\Delta is not empty then
             Split 𝐏k\mathbf{P}^{k} by removing pieces in Δ\Delta;
             Call this Algorithm on sub-trajectories;
             Update sub-parts of 𝐏k\mathbf{P}^{k};
            
      𝐏𝐏k\mathbf{P}^{*}\leftarrow\mathbf{P}^{k};
       return 𝐏\mathbf{P}^{*};
Algorithm 2 Constrained Spatial-Temporal AM

In the second phase, 𝐃Pk+1\mathbf{D}_{P}^{k+1} is fixed. An illustration is given in Fig. 3(b). Each entry in 𝐓k\mathbf{T}^{k} is updated by solving

minT(0,+)Jm(T),s.t.𝐆(𝐝mk+1,T)0.\min_{T\in(0,+\infty)}{J_{m}(T)},~{}s.t.~{}\mathbf{G}(\mathbf{d}_{m}^{k+1},T)\leq{0}. (26)

As stated in Alg. 1, all extrema of Jm(T)J_{m}(T) can be computed exactly. However, the constrained minimum may not exist in them. It can be any T~\widetilde{T} at which some constraints are exactly tightened. When infeasible extremum exists, T~\widetilde{T} must be located between any infeasible extremum and the neighboring feasible one or TmkT_{m}^{k}. A bisection procedure with feasibility check suffices to compute T~\widetilde{T}. After that, we compare Jm(T)J_{m}(T) on those feasible extrema together with T~\widetilde{T}.

When all iterations are done, the set Δ\Delta indicates pieces stuck by active constraints. If Δ\Delta is not empty, we recursively apply Alg. 2 on split sub-trajectories, while boundary conditions of pieces indexed by Δ\Delta should be totally fixed. Finally, 𝐏\mathbf{P}^{*} is updated and returned. The recursive process is essential, since it ensures that pieces with no room for optimization do not prevent other pieces to decrease the objective. Alg. 2 is globally convergent to a solution set where constraints are tight or local minimum is attained, which can be checked by Zangwill’s theorem [22].

VI Results

VI-A Comparison of Feasibility Check Methods

Refer to caption
Figure 4: Computation time for feasibility check of speed constraint, under different temporal resolution (upper) and different polynomial order (lower).

Firstly, we compare our feasibility check method with Mueller’s recursive bound check [21], Burri’s analytical extrema check [3], as well as the widely used sampling-based check. In each case, 1000 trajectory pieces are randomly generated along with velocity constraints to estimate average time consumption. As is shown in Fig. 4, our method outperforms all other methods in computation speed because of its resolution independence and scalability with higher polynomial orders. The recursive check and sampling-based check may have false positives under rough temporal resolution. The efficiency of analytical check and recursive check deteriorates with higher polynomial orders, because both of them involve roots finding which has closed-form solution only for low order (4\leq 4). In comparison, our method is able to do a solid feasibility check within 1μs1\mu s.

VI-B Benchmark for Trajectory Optimization Methods

Refer to caption
Figure 5: Process of unconstrained/constrained minimization with the same initial guess. Dashed line indicates optimal trajectory in respective case. Constraint on maximum acceleration rate is set to 2.5m/s22.5m/s^{2}. The optimized total durations are 10.37s10.37s (left) and 23.74s23.74s (right), respectively.

Secondly, we conduct the benchmark comparison of our trajectory optimization method against state-of-the-art methods. The benchmark is done as follows: We generate a sequence of waypoints by random walk, of which the step is uniformly distributed over [3.0m,8.0m][-3.0m,8.0m] for each axis. The maximum speed and acceleration rates are set to 5.0m/s5.0m/s and 3.5m/s23.5m/s^{2}, respectively. The derivatives on the first and the last waypoints are set to zero. The objective function is set as ρ=512.0\rho=512.0, Dmax=Dmin=3D_{max}=D_{min}=3, w3=1.0w_{3}=1.0 and N=5N=5. For a given number of pieces, each method is applied to 1000 sequences of waypoints. The optimization process stops until the relative decrease of objective is less than 0.0010.001. The cost is then normalized by the cost of Alg. 1. An illustration in Fig. 5 shows that the minimized cost in unconstrained case can be used as a baseline. All comparisons are conducted on an Intel Core i7-8700 CPU under Linux environment.

We compare our method with Richter’s method [2] and Mellinger’s method [1]. Richter’s method optimizes trajectory derivatives on waypoints through an unconstrained QP while time allocation is adjusted by gradient descent and scaling. To use it in constrained case, we soften the constraints by penalizing them in objective function as suggested in [3] and directly optimize the time allocation through NLopt [23]. Mellinger’s method optimizes the time allocation with total duration fixed first, using backtracking gradient descent (BGD). Then dynamical feasibility is ensured through time scaling, of which the ratio is properly calculated using Liu’s method [6].

Refer to caption
(a) Trajectories in a random map.
Refer to caption
(b) Benchmark in computation time (solid) and normalized cost (dotted).
Figure 6: Comparisons of trajectory optimization methods. In Fig. 6(a), trajectories are generated in a random map with fixed waypoints. Lap times for blue, green and red trajectories are 46.54s46.54s, 62.07s62.07s and 66.08s66.08s respectively. In Fig. 6(b), the performance of different methods are provided. Dashed lines indicate standard deviation.

As is shown in Fig. 6(b), our Alg. 2 has the fastest speed and the lowest cost when constraints are taken into consideration. Our method is capable of computing trajectories with 6060 pieces within 5ms5ms, i.e., 150Hz150Hz at least. However, both benchmarked methods fail to accomplish real-time computing for trajectories with more pieces. Moreover, our Alg. 2 always obtains better trajectories in terms of the cost function, while benchmarked methods cannot fully utilize the capability of system dynamics.

VI-C Aggressive Flight Experiment

Refer to caption
(a) Aggressive flight experiment.
Refer to caption
(b) Trajectory of the experiment.
Refer to caption
(c) Velocity and acceleration against time.
Figure 7: Details of our aggressive indoor flight. Fig. 7(a) shows some snapshots of our experiment, where the speed is up to 4.0m/s4.0m/s. In Fig. 7(b), the map along with compulsory waypoints is constructed offline. The optimal trajectory is online computed and applied. In Fig. 7(c), velocity/acceleration profiles are provided. The trajectory fully employs capability of the quadrotor in terms of maximum velocity/acceleration rate.

To validate the performance of our method in real-world applications, we deploy it on a self-developed compact quadrotor platform. The proposed method is implemented with C++ 11, and all tasks are conducted on an onboard computer with Intel Core i7-8550U CPU. The pose of our quadrotor is obtained through a robust visual-inertial state estimator [24]. Besides, no external positioning system nor offboard computing is used. A geometric controller is employed for trajectory tracking control [25].

The experiment is conducted in a complex indoor scene, which is shown in Fig. 1. A globally consistent map of the scene is pre-built, from which some compulsory waypoints are selected offline. At the beginning of each flight, an optimal path is produced by RRT* [26], which starts from an initial position and passes all compulsory waypoints. Our method generates an optimal trajectory online based on this path within milliseconds. Immediately, the quadrotor starts its aggressive flight. Different from parameters used in benchmark, we set vmax=4.0m/sv_{max}=4.0m/s, amax=4.5m/s2a_{max}=4.5m/s^{2} and ρ=1024.0\rho=1024.0. The aggressive flight along with the generated trajectory is shown in Fig. 7. More details are included in the attached video.

VII Conclusion

In this paper, we propose an efficient trajectory generation method for quadrotor aggressive flight, which has guaranteed convergence and feasibility. Benchmarks for components in our method show its superior computation speed, trajectory quality as well as scalability against state-of-the-art methods. Aggressive flight experiments in limited space with dense obstacles validate the practical performance of our method. Currently, in the proposed framework, positions of waypoints are fixed during optimization. However, the method is underlying compatible with waypoints as part of decision variables. Our feasibility checker also supports various safety constraints. In the future, we plan to apply and improve our method in time-critical large-scale motion planning scenarios where complex spatial constraints exist.

References

  • [1] D. Mellinger and V. Kumar, “Minimum snap trajectory generation and control for quadrotors,” in Proc. of the IEEE Intl. Conf. on Robot. and Autom., Shanghai, China, May 2011.
  • [2] C. Richter, A. Bry, and N. Roy, “Polynomial trajectory planning for aggressive quadrotor flight in dense indoor environments,” in Proc. of the Intl. Sym. of Robot. Research, Singapore, Dec 2013.
  • [3] M. Burri, H. Oleynikova, M. Achtelik, and R. Siegwart, “Real-time visual-inertial mapping, re-localization and planning onboard mavs in unknown environments,” in Proc. of the IEEE/RSJ Intl. Conf. on Intell. Robots and Syst., Hamburg, Germany, Sep 2015.
  • [4] D. P. Bertsekas, Dynamic Programming and Optimal Control, 1995.
  • [5] A. Beck, First-Order Methods in Optimization, 2017.
  • [6] S. Liu, M. Watterson, K. Mohta, K. Sun, S. Bhattacharya, C. J. Taylor, and V. Kumar, “Planning dynamically feasible trajectories for quadrotors using safe flight corridors in 3-D complex environments,” IEEE Robotics and Automation Letters (RA-L), pp. 1688–1695, 2017.
  • [7] F. Gao, W. Wu, Y. Lin, and S. Shen, “Online safe trajectory generation for quadrotors using fast marching method and Bernstein basis polynomial,” in Proc. of the IEEE Intl. Conf. on Robot. and Autom., Brisbane, Australia, May 2018.
  • [8] L. Campos-Macías, D. Gómez-Gutiérrez, R. Aldana-López, R. de la Guardia, and J. I. Parra-Vilchis, “A hybrid method for online trajectory planning of mobile robots in cluttered environments,” IEEE Robotics and Automation Letters (RA-L), vol. 2, pp. 935–942, 2017.
  • [9] W. Sun, G. Tang, and K. Hauser, “Fast UAV trajectory optimization using bilevel optimization with analytical gradients,” ArXiv, vol. abs/1811.10753, 2018.
  • [10] A. Bry, C. Richter, A. Bachrach, and N. Roy, “Aggressive flight of fixed-wing and quadrotor aircraft in dense indoor environments,” The International Journal of Robotics Research, vol. 34, pp. 1002–969, 2015.
  • [11] F. Gao, W. Wu, J. Pan, B. Zhou, and S. Shen, “Optimal time allocation for quadrotor trajectory generation,” in Proc. of the IEEE/RSJ Intl. Conf. on Intell. Robots and Syst., Madrid, Spain, Oct 2018.
  • [12] D. Verscheure, B. Demeulenaere, J. Swevers, J. De Schutter, and M. Diehl, “Time-optimal path tracking for robots: A convex optimization approach,” IEEE Transactions on Automatic Control, vol. 54, no. 10, pp. 2318–2327, 2009.
  • [13] F. Gao, L. Wang, B. Zhou, L. Han, J. Pan, and S. Shen, “Teach-repeat-replan: A complete and robust system for aggressive flight in complex environments,” ArXiv, vol. abs/1907.00520, 2019.
  • [14] M. M. de Almeida, R. Moghe, and M. R. Akella, “Real-time minimum snap trajectory generation for quadcopters: Algorithm speed-up through machine learning,” in Proc. of the IEEE Intl. Conf. on Robot. and Autom., Montreal, Canada, May 2019.
  • [15] M. Sagraloff and K. Mehlhorn, “Computing real roots of real polynomials,” Journal of Symbolic Computation, vol. 73, pp. 46–86, 2013.
  • [16] E. P. Tsigaridas and I. Z. Emiris, “Univariate polynomial real root isolation: Continued fractions revisited,” in Proc. of the Conf. on Ann. Euro. Sym., Zwitserland, Zurich, Sep 2006.
  • [17] Z. Wang, X. Zhou, C. Xu, and F. Gao, “Detailed proofs of alternating minimization based trajectory generation for quadrotor aggressive flight,” https://arxiv.org/abs/2002.09254.
  • [18] Y. Nesterov, Lectures on Convex Optimization, 2018.
  • [19] J. D. Lee, I. Panageas, G. Piliouras, M. Simchowitz, M. I. Jordan, and B. Recht, “First-order methods almost always avoid strict saddle points,” Mathematical Programming, vol. 176, pp. 311–337, 2019.
  • [20] S. Basu, R. Pollack, and M.-F. Roy, Algorithms in Real Algebraic Geometry, 2003.
  • [21] M. W. Mueller, M. Hehn, and R. D’Andrea, “A computationally efficient motion primitive for quadrocopter trajectory generation,” IEEE Transactions on Robotics, vol. 31, pp. 1294–1310, 2015.
  • [22] W. I. Zangwill, Nonlinear programming: A Unified Approach, 1972.
  • [23] S. G. Johnson, “The NLopt nonlinear-optimization package.”
  • [24] T. Qin, P. Li, and S. Shen, “VINS-Mono: A robust and versatile monocular visual-inertial state estimator,” IEEE Transactions on Robotics, vol. 34, no. 4, pp. 1004–1020, 2018.
  • [25] T. Lee, M. Leok, and N. H. McClamroch, “Geometric tracking control of a quadrotor UAV on SE(3),” in Proc. of the IEEE Control and Decision Conf., Atlanta, Georgia, USA, Dec 2010.
  • [26] S. Karaman and E. Frazzoli, “Sampling-based algorithms for optimal motion planning,” The International Journal of Robotics Research, vol. 30, pp. 846 – 894, 2011.