Distributed planning, offline trajectory, online motion, avoid collision