During the past decades, multi-robot systems have been studied deeply and have demonstrated their advantages in conducting autonomous missions, particularly in underwater environment. When using multiple robots, high cost single sensor can be replaced by many coordinated low cost sensors, such as optical sensors used in our work for acquiring relevant data and coordinating the fleet of robots. In this paper, we propose a coordination algorithm for pattern formation (the shape of the fleet), which includes a new predefined pyramid pattern independent on the number of robots and an associated formation control strategy for building and maintaining this pyramid without collision among robots and without external assistant in non-obstacle situation. The formation control strategy consists of three steps: (1) a common frame is built after the exchange of local information extracted from visual servoing (VS) and compass of each robot; (2) a pyramid frame is established from the distribution of robots, and whose orientation is defined by one of the two following methods: one based on principal component analysis (PCA) and the other one based on an intermediate circle pattern (CP); (3) the kernel part is the collision avoidance strategy (CA) which is realized by optimally matching up positions in the distribution and the pyramid, and planning the straight non-intercrossed trajectories. At last, robots build the pyramid along the straight trajectory. During the whole process, except the information exchange for establishing the common frame, robots do not need communication as they have the same algorithms. Until now the performance of the formation control strategy is demonstrated with 4 to 6 robots in Blender based on dynamic equations of real underwater robots.