Patent attributes
A robot control method includes, storing, in a memory, shape information about a robot including a tool attached to a tip and about a peripheral object located on a periphery of the robot. A teaching program also is stored in the memory. The teaching program includes a setting speed when operating the robot. By a processor connected to the memory, a distance between the robot and the peripheral object, based on the shape information, is calculated at each operation position when operating the robot according to the teaching program. By the processor, it is determined whether or not the calculated distance is changing in a decreasing direction. In response to determining that the calculated distance is changing in the decreasing direction, by the processor, the robot is operated at a speed lower than the setting speed in the teaching program.