Energy-minimal target retrieval for quadrotor UAVs: trajectory generation and tracking