This paper reports an autonomous cooperative navigation system for robot formations in realistic scenarios. The formation movement control is based on a virtual structure composed by spring-dampers elements, which allows the formation to comply with the environment shape. A different navigation strategy is applied to the leader of the formation and to the rest of robots of the team. The leader plans the trajectories by using a two-level path planner with obstacle avoidance capabilities. The motion of the follower robots is controlled by the virtual structure, which adapts to the environment while the leader is tracked, taking into account the kinodynamic constraints of the vehicles. The system is evaluated in experiments carried out in simulations, some of them made in a realistic and complex urban scenario, and with real robots.