A hydraulic drive-based self-propelled photovoltaic panel cleaning robot was developed to tackle the challenges of harsh environmental conditions, difficult roads, and incomplete cleaning of dust particles on the photovoltaic panel surface in photovoltaic power plants. The robot has the characteristics of the crawler wheel drive, rear-wheel-independent turning and three-point-independent suspension design, which makes it adhere to the walking requirements of complex environmental terrains, more flexible in turning and automatically levelling so that the stability of the boom mechanism during walking can be ensured. The kinematics model of the upper arm structure equipped with the end cleaning device was built, and the optimized Circle chaotic map and nonlinear weight factor were introduced to enhance the search ability and convergence speed of the sparrow algorithm. Furthermore, the boom running track was optimized in combination with the seven-order non-uniform B-spline curve. Through optimization, the running time of the boom was reduced by 18.7%, and the cleaning efficiency of photovoltaic panel surface was increased. The effectiveness of self-propelled photovoltaic panel cleaning robot cleaning and the reliability of time-optimal trajectory planning were confirmed through simulation and experiment.