In this paper, we addressed the problem of controlling the position of a group of unicycle-type robots to follow in formation a time-varying reference avoiding obstacles when needed. We propose a kinematic control scheme that, unlike existing methods, is able to simultaneously solve the both tasks involved in the problem, effectively combining control laws devoted to achieve formation tracking and obstacle avoidance. The main contributions of the paper are twofold: first, the advantages of the proposed approach are not all integrated in existing schemes, ours is fully distributed since the formulation is based on consensus including the leader as part of the formation, scalable for a large number of robots, generic to define a desired forma...