The research on robot cluster control and collaborative motion has gradually become an important issue in the research of cluster robots A clustering control and collaborative motion algorithm based on the Flocking algorithm is proposed to address the above issues, which mainly includes three parts: robot cluster path planning, cluster object avoidance, and cluster formation control Firstly, a stable cluster formation is observed through the cluster control of the Flocking algorithm, which enables it to have the ability of cluster collaborative motion Based on this, an improved A * algorithm can be used to plan a cluster movement path At the same time, in the collaborative motion of robot clusters, dynamic and static objects can be avoided through the DWA algorithm, there quickly reaching the destination Solve the problem of cluster control and collaborative motion of robots in complex environments, and finally verify the effectiveness and rationality of the algorithm through simulation experiments.