In view of the low formation redundancy in the traditional rigid formation algorithm and its difficulty in dynamically adapting to the external environment, this study considers the use of the CVT (centroidal Voronoi tessellation) algorithm to control multiple robots to form the desired formation. This method significantly increases the complexity of the multi-robot system, its structural redundancy, and its internal carrying capacity. First, we used the CVT algorithm to complete the Voronoi division of the global map, and then changed the centroid position of the Voronoi cell by adjusting the density function. When the algorithm converged, it could ensure that the position of the generated point was the centroid of each Voronoi cell and control the robot to track the position of the generated point to form the desired formation. The use of traditional formations requires less consideration of the impact of the actual environment on the health of robots, the overall mission performance of the formation, and the future reliability. We propose a health optimization management algorithm based on minor changes to the original framework to minimize the health loss of robots and reduce the impact of environmental restrictions on formation sites, thereby improving the robustness of the formation system. Simulation and robot formation experiments proved that the CVT algorithm could control the robots to quickly generate formations, easily switch formations dynamically, and solve the formation maintenance problem in obstacle scenarios. Furthermore, the health optimization management algorithm could maximize the life of unhealthy robots, making the formation more robust when performing tasks in different scenarios.