The study introduces a ROS-based four-axis sliding table teaching aid robot.It automatically recognizes and acquires the coordinate and color information of the chess pieces on the four-axis sliding table through visual recognition algorithm,and obtains the solution steps through the upper computer algorithm.Then,it sends relevant instructions to STM32 through serial communication,and transmits corresponding pulses and switching quantities to four servo motor drives and vacuum suction cups,so as to achieve the purpose of moving pieces and jigsaw puzzle.The selected model of the product is simple,closely related to life,interesting and participatory.It can be realized by playing chess with robots in the environment to approximate the real"doing"and"learning",which is conducive to training students'innovative thinking in practice,and improving their ability to analyze and solve problems.