A multilayer scheme is here proposed to implement coordinated control of a group of mobile robots. Specifically, a trajectory tracking controller is proposed to coordinately guide a platoon of robots, with an obstacle deviation subsystem based on virtual forces and mechanical impedance implemented in each robot. Such a controller is firstly designed for groups of three robots and then generalized to larger groups ( $$n>3$$ robots), by proposing a modular structure based on the concatenation of triangular modules, composing a polygon of $$n$$ sides (one of the designed controllers is adopted to guide each module). The stability of the closed-loop control system is also proven for each individual control system, based on the theory of Lyapunov, taking into account the saturation of the control signals, adopted to prevent the saturation of the robot actuators. Based on such a proof, a conjecture that the whole control system is stable is presented, which is supported by several simulated and experimental results, some of which are presented, thus validating the proposed control structure.