Method for controlling robot to move firstly anticlockwise and then clockwise

The invention discloses a method for controlling a robot to move firstly anticlockwise and then clockwise. The method comprises steps as follows: multiple robot motion parameters are set and input; coordinates of a first center of a circle of robot motion are calculated; coordinates of a second center of a circle of robot motion are calculated; a first unit vector from the first center of the circle to the second center of the circle is calculated; an included angle between the first unit vector and the second unit vector is calculated; coordinates of a first conversion point of robot motion are calculated; coordinates of a second conversion point of robot motion are calculated; a second unit vector from the first conversion point to the second conversion point is calculated; a first turning angle of robot motion is calculated; a second turning angle of robot motion is calculated; and the robot is controlled to move firstly anticlockwise and then clockwise on the basis of parameters of a motion path. In combination of knowledge of robotology, the robot is controlled to move firstly anticlockwise and then clockwise with a coordinate rotation conversion method; and the method is simple and effective.