  We present an optimization-based framework for multicopter trajectory
planning subject to geometrical spatial constraints and user-defined dynamic
constraints. The basis of the framework is a novel trajectory representation
built upon our novel optimality conditions for unconstrained control effort
minimization. We design linear-complexity operations on this representation to
conduct spatial-temporal deformation under various planning requirements.
Smooth maps are utilized to exactly eliminate geometrical constraints in a
lightweight fashion. A wide range of state-input constraints are supported by
the decoupling of dense constraint evaluation from sparse parameterization, and
backward differentiation of flatness map. As a result, the proposed framework
transforms a generally constrained multicopter planning problem into an
unconstrained optimization that can be solved reliably and efficiently. Our
framework bridges the gaps among solution quality, planning frequency and
constraint fidelity for a multicopter with limited resources and maneuvering
capability. Its generality and robustness are both demonstrated by applications
and experiments for different tasks. Extensive simulations and benchmarks are
also conducted to show its capability of generating high-quality solutions
while retaining the computation speed against other specialized methods by
orders of magnitudes. Details and source code of our framework will be freely
available at: http://zju-fast.com/gcopter.
