In order to reduce the abnormal operation of mobile robot caused by collision, a full ergodic path planning algorithm for power equipment fault detection is proposed. Based on the grid method, the workspace of the robot is divided, and the mathematical model of path planning is established. The bb-pso algorithm is introduced to calculate the path. On this basis, the mutation operator is used as the optimization iteration power of the bb-pso algorithm. Therefore, the collision avoidance calculation is carried out to improve the feasibility of the path. The simulation results show that the distance between the path and the obstacles of the proposed algorithm is basically stable between 30-40 cm, and the fluctuation range of the path running time is only 3 min, the average time is 40 min, which has high feasibility.