Abstract— In this paper, we address navigation and coordination methods that allow swarms of robots to converge and spread along complex 2D shapes in environments containing unknown obstacles. Shapes are modeled using implicit functions and a gradient descent approach is used for controlling the swarm. To overcome local minima, that may appear in these scenarios, we use a coordination mechanism that reallocates some robots as “rescuers” and sends them to help other robots that may be trapped. Simulations and real experiments demonstrate the feasibility of the proposed approach.