In this paper we show how non-linear attractor dynamics can be used as a framework to control teams of autonomous mobile robots that should navigate according to a predefined geometric formation. The environment does not need to be known a priori and may change over time. Implicit to the control architecture are some important features such as establishing and moving the formation, split and join of formations (when necessary to avoid obstacles). Formations are defined by a formation matrix. By manipulating this formation matrix it is also possible to switch formations at run time. Examples of simulation results and implementations with real robots (teams of Khepera robots and medium size mobile robots), demonstrate formation switch, static and dynamic obstacle avoidance and split and join formations without the need for any explicit coordination scheme. Robustness against environmental perturbations is intrinsically achieved because the behaviour of each robot is generated as a time series of asymptotically stable states, which contribute to the asymptotic stability of the overall control system.