To address the problem of cooperative work among right-angle coordinate robots in spacecraft structural plate mount tasks, an improved particle swarm optimization (PSO) algorithm was proposed to assign paths to three robots in a surface-mounted technology (SMT) machine. First, the optimization objective of path planning was established by analyzing the working process of the SMT machine. Then, the inertia weight update strategy was designed to overcome the early convergence of the traditional PSO algorithm, and the learning factor of each particle was calculated using fuzzy control to improve the global search capability. To deal with the concentration phenomenon of particles in the iterative process, the genetic algorithm (GA) was introduced when the particles were similar. The particles were divided into elite, high-quality, or low-quality particles according to their performance. New particles were generated through selection and crossover operations to maintain the particle diversity. The performance of the proposed algorithm was verified with the simulation results, which could shorten the planning path and quicken the convergence compared to the traditional PSO or GA. For large and complex maps, the proposed algorithm shortens the path by 7.49% and 11.49% compared to traditional PSO algorithms, and by 3.98% and 4.02% compared to GA.