In order to effectively solve the problem of energy autonomy of patrol robots in open-air working environment and free them from the limitation of power lines on their activity range. In this article, a solar-powered patrol robot based on a robot operating system is designed. The system adopts a modular design, using a master-slave distributed controller to control the robot's motion, and building an intelligent sensing system for the robot with various sensors. Meanwhile, flexible thin-film solar cells and lithium batteries form a folded multi-mode power supply system, which solves the problem of timely power supply. In addition, a simple and practical human-computer interaction interface is designed to facilitate viewing the robot's status. Finally, in order to verify the performance of the robot, the stability of the designed solar-powered patrol robot is verified through different experiments, which has a reference value and practical significance for the development of patrol robots.