  The quadrotor is popularly used in challenging environments due to its
superior agility and flexibility. In these scenarios, trajectory planning plays
a vital role in generating safe motions to avoid obstacles while ensuring
flight smoothness. Although many works on quadrotor planning have been
proposed, a research gap exists in incorporating self-adaptation into a
planning framework to enable a drone to automatically fly slower in denser
environments and increase its speed in a safer area. In this paper, we propose
an environmental adaptive planner to adjust the flight aggressiveness
effectively based on the obstacle distribution and quadrotor state. Firstly, we
design an environmental adaptive safety aware method to assign the priority of
the surrounding obstacles according to the environmental risk level and
instantaneous motion tendency. Then, we apply it into a multi-layered model
predictive contouring control (Multi-MPCC) framework to generate adaptive,
safe, and dynamical feasible local trajectories. Extensive simulations and
real-world experiments verify the efficiency and robustness of our planning
framework. Benchmark comparison also shows superior performances of our method
with another advanced environmental adaptive planning algorithm. Moreover, we
release our planning framework as open-source ros-packages.
