According to the path information collected, combined with the characteristics of the car body, the data of the path has been analyzed, the path optimizing algorithm for line track robots has been established, and the correctness of the algorithm has been verified in experiments in this paper. The algorithm design has some certain significance for the line track optimization of robots and the autopilot of vehicles.