In order to solve the problem that the robot can coexist harmoniously with human beings and provide better service in the human settlement environment. Based on the Mecanum wheel mobile robot platform, by introducing the pyramid optical flow algorithm and CamShift algorithm, empirical results show that the robot can quickly predict the movement tendency and speed of the moving object according to the moving characteristics and color characteristic information of the moving object as well as accurate identification of tracking. Based on the above algorithm research, it can effectively improve the ability of robot motion planning and
executing tasks in complex environment.