1. Field of the Invention
The present invention relates to a robot controller and a robot control method for controlling a robot to position its robot arm.
2. Description of the Related Art
Industrial robots are used widely for a variety of purposes including spot welding, boring, arc welding and laser machining. A six-axis articulated robot, for example, has a base and a robot arm. Set points, the positions of the free end of the robot arm at the set points and angular positions of the robot arm at the set points are given to the industrial robot (hereinafter referred to simply as “robot”) before the robot operates, to achieve tasks. The set point is a working position where a workpiece is machined with a tool attached to the free end of the robot arm.
The robot is taught by, for example, an off-line teaching method or a direct teaching method, namely, a manual teaching method. The off-line teaching method enters teaching data produced by an external computer or the like into the robot controller. The teaching data specifies a set point, and a position of the free end of the robot arm and an attitude of the robot at the set points (hereinafter, referred to as “the position and attitude of the robot”). The direct teaching method, namely, the manual teaching method, is carried out directly by the operator by operating an input device, such as a teaching pendant included in the robot controller.
The position and attitude of the robot are specified by position-attitude data indicating a position and an attitude of the robot in a rectangular coordinate system or by angular displacements by which drive shafts for driving the robot arm are to be turned. When teaching data is the positional and attitudinal values in the rectangular coordinate system, the robot controller converts the positional and attitudinal values in the rectangular coordinate system into corresponding shaft angular displacements and controls the robot to turn the drive shafts of the robot by the specified angular displacements.
The robot has errors including machining errors, assembling errors, errors caused by a deflection of the robot and errors in the origins of coordinate systems for the shafts. Consequently, the actual position and the actual attitude of the robot differ respectively from a desired position and a desired attitude. Therefore, the robot needs to be instructed of a corrected position and a corrected attitude obtained by correcting positional and attitudinal deviations due to errors in the specified position-attitude data.
A first technique relating to a positional error correcting system for an industrial robot is disclosed in JP-A 60-205713. This positional error correcting system corrects errors in specified working positions of the robot through the correction of specified operation data. This positional error correcting system corrects teaching data specifying operations and taught to the robot by an off-line teaching method on the basis of previously measured three-dimensional error data. Specifically, the three-dimensional error data is a three-dimensional map of positional deviations in a three-dimensional coordinate system.
A second technique relating to a positioning data correcting system for an industrial robot is disclosed in JP-A 2-198783. This positioning data correcting system corrects positioning data specifying positions of the robot in a rectangular coordinate system. This positioning data correcting system corrects positioning instructions, namely, teaching data provided by an off-line teaching method, on the basis of previously produced and stored inherent errors in the robot before converting the teaching data into corresponding angular displacements of the drive shafts. The inherent errors in the robot are, for example, positional deviations in a coordinate system and an error in the length of the robot arm.
A third technique relating to an error correcting system is mentioned in Takushi Okada and one other, “Takansetsu Robotto Kikou Gosa Hosei Houshiki (Method of Correcting Errors in Articulated Robot Mechanism)” Nippon Kikai Gakkai Ronbun-shu (Edition C), Vol. 51, No. 462, pp. 324-331, February, 1985, Nippon Kikai Gakkai. This error correcting system corrects the positional deviation attributable to mechanismic errors resulting from machining errors and assembling errors, installation errors and errors in the origins of axes. The error correcting system measures the positional deviation of the robot hand from a desired position, estimates errors in the robot through linear approximation using the measured positional deviation, and corrects the position-attitude of the robot hand on the basis of the estimated errors.
In some cases, the off-line teaching method specifies angular displacements for the shafts. All the foregoing known techniques corrects the positional attitudinal values on the basis of the previously determined inherent errors in the robot and do not correct the angular displacements for the shafts.
For example, there are a plurality of angular displacements for each of the shafts to set the robot at a position and in an attitude specified by the positional and attitudinal values in a rectangular coordinate system. Therefore, in some cases, the attitude of the robot cannot be uniquely determined and angular displacements for the shafts are taught to the robot to specify the attitude of the robot uniquely. However, all the foregoing known techniques cannot correct the specified angular displacements and hence cannot position the robot accurately.
Since corrections for correcting errors in positional and attitudinal values are not proper for the position-attitude of the robot arm in a marginal region of the operating range of the robot arm or the off-line teaching method does not specify data on obstructive cables and such, the off-line teaching method requires the manual correction of the teaching data.
Thus the teaching data includes teaching data produced by the off-line teaching method and teaching data produced by manual teaching. The foregoing known techniques, however, cannot handle the teaching data including both the teaching data produced by the off-line teaching method and teaching data produced by manual teaching and hence cannot achieve accurate positioning.
The robot is used not only as a positioning device, but also, in some cases, as a three-dimensional measuring device. For example, the robot hand attached to the free end of the robot arm is positioned at the datum position of the workpiece or a jig holding the workpiece by operating a teaching pendant to measure the position of the robot in the rectangular coordinate system, angular displacements of the shafts are measured and the position and the attitude of the robot in the rectangular coordinate system is calculated using the measured angular displacements.
The angular displacements measured by the robot correspond to a correct position determined by correcting a positional deviation attributable to the inherent errors in the robot. When the robot used for measurement malfunctions and is replaced with another robot, another robot cannot be accurately positioned by using the angular displacements measured by the replaced robot because the angular displacements are specific to the replaced robot used for measurement.