Collision avoidance for multiple Lagrangian dynamical systems with gyroscopic forces