Method and apparatus for controlling robot

Abstract: A reference direction of the correction of the torch of a robot (1) is defined. A correction direction suitable to robot control is calculated on the basis of the definition and the moving direction of the robot (1) using the correction direction information specified through a man-machine interface (200) for directing the correction direction to be changed. An algorism is provided to calculate a correction amount in the correction direction for each predetermined interpolation sampling and to add it during robot interpolation. Thus, a sensor correction direction can be changed in real time while the robot operates. This permits the distortion of a work to be always dealt with suitably to provide an accurate correction operation.

Description: The present invention relates to a method and an apparatus for controlling a robot which detects a relative position of the robot and a workpiece using a sensor and determines a target position of the robot based on the detected relative position. Such a robot control is suited for a robot of a teaching/play-back type. Usually, an industry robot device such as a welding robot is designed to perform a series of operations sequentially on the basis of prepared data by way of e.g. teaching. In this case, the posture of a work (object to be worked) may be controlled with an error due to different setting positions and shapes of the work between the time of teaching and the time of play-back, or its deformation. To obviate such an inconvenience, an industry robot system as shown in Fig. 6 has been used which detects relative positions of a robot mechanism (manipulator) and a work using a sensor (AVC sensor) and corrects the position of the robot. The system of Fig. 6 is directed to control of a TIG (tungsten-inert gas) welding robot, and more specifically a robot equipped with an AVC sensor. In this control, the fact that the welding voltage (arc voltage) in an electric arc welding corresponds to an arc length is used. The voltage is introduced into a control apparatus. The distance between the tip of a welding torch and a work is varied so that the voltage is constant, thereby providing a constant arc length. In Fig. 6, reference numeral 1 denotes a robot mechanism unit; 2 denotes a robot control apparatus; 3 denotes a TIG welding machine equipped with an AVC sensor; 4 denote welding torches; and 5 denotes a work. The AVC control acts on the welding torches 4 so that the distance Δx between the tip of the welding torches and the work is constant, thereby correctively controlling the robot mechanism (hereinafter, simply referred to as a robot). Actually, the correction amount Vs calculated from a detected arc voltage is used to calculate the correction amount of a torch direction vector (which is an approach vector including a torch moving direction when the distance between the torch tip and the work is varied) on a robot coordinate (which is given at the fingertips of the robot). The correction amount thus calculated is added to an interpolation directing value to perform the AVC sensor control so that the voltage detected by the AVC sensor is reflected on the torch direction. Now when the TIG welding is done while the AVC sensor is operated for the work 5, as shown in Fig. 8(a), the position of the torch 4 is corrected in such a manner that it is moved along the torch direction vector by a correction amount calculated corresponding to the distortion of the work 5. However, when the shape of the work 5 has been greatly deformed as shown in Fig. 8(b), the moving direction for correction must be taken in a modifying direction denoted by broken line which is different from the prescribed torch direction vector. The conventional AVC sensor, which is commercially available from YASUKAWA DENKI CO. LTD. as a product name of "YASNAC-ERC" is therefore adapted to be capable of selecting the modifying direction from three directions of a tool coordinate direction, an optional direction and a moving direction. However, in this case also, the modifying direction is decided using as a reference the coordinate given to the fingertips of the robot, and the direction vector resulting from the summation of values on the rectangular axes of the coordinate is taken as a correction direction vector; this vector is an approach vector or a tool direction vector indicative of the vector of the direction in which the tool moves. Changing the modifying direction, which means a change in the values on the rectangular coordinate axes at the robot fingertips, is not intuitively known by an operator. It is therefore necessary to stop the operation once to change the values on the rectangular coordinate thereby to modify the approach vector; thereafter the passing point of the robot must be taught again. This is because the teaching point is determined by the approach vector. As described above, in the prior art, no care is taken of changing the modifying direction in real time while the robot operates. However, the direction of changing the direction vector to be corrected is determined by the state of an actual work during play-back. It is therefore difficult to determine the changing direction if it is not carried out while the state of an actual welding arc (a direction of generating the arc, a welding state, etc.) is actually seen. The above prior art cannot deal with it sufficiently. The EP-A-0 400 154 shows furthermore a robot operation method which enables a correction of a teach point taught in advance by a manual operation using a teaching pendant. The EP-A-0 132 616 defining the closest prior art shows a system for automatically calibrating the space coordinates of a robot gripper in six degrees of freedom and is therefore directed to correcting errors occurring in the robot itself. The above prior art, however, does not show any means for allowing correction direction information to be input while the robot operates in accordance with the shape or posture of the work. An object of the present invention is to realize a method and an apparatus for controlling a robot which can change a sensor correction direction in real time while a robot operates, and can always deal with the distortion of a work to perform an accurate correction operation. This object is solved according to the features of the independent claims. The dependent claims show advantageous embodiments of the invention. In accordance with the present invention, the reference direction for a correction direction is defined, a man-machine interface is provided for directing the correction direction to be changed, and the correction direction suitable to control of a robot is acquired on the basis of the defined reference direction and the moving direction of the robot using the correction direction information given by the man-machine interface. In a preferred embodiment, an algorithm is provided to calculate the correction amount in a correction direction every predetermined interpolation sampling and add it in robot interpolation. In another preferred embodiment, a modifying direction storage table is provided for storing the calculated correction direction using as an index the corresponding operation condition such as a welding condition. In accordance with the present invention, since the correction direction is defined by an angle of the correction direction of a robot formed with the reference direction, an operator can easily know the correction direction. So he can easily direct the modifying direction so that he can direct the modifying direction while the robot operates through a man-machine interface using an input from the operating box for a robot. The algorism for calculating the correction amount every predetermined interpolation sampling and adding it in robot interpolation acts so that the correction processing for a robot is executed for the most short time. The correction can be surely made in real time. Further, the modifying direction storage table enables the modifying direction due to the operation condition of the robot to be read. So the correction based on a previous learning result can be acquired without inputting modifying direction information. Fig. 1 is a block diagram of a control apparatus in one embodiment of the present invention; Fig. 2 is a schematic block diagram of a system arrangement in one embodiment of the present invention; Fig. 3 is a view for explaining an operation box in one embodiment of the present invention; Fig. 4 is a view for explaining the definition of a sensor modifying direction vector in one embodiment; Fig. 5 is a view showing the robot mechanism to which one embodiment of the present invention is applied; Fig. 6 is a view showing the arrangement of one example of a robot system equipped with an AVC sensor according to the present invention; Fig. 7 is a view for explaining the operation theory of a robot system equipped with an AVC sensor according to the present invention; and Figs. 8A and 8B are views for explaining the relationship between a work and a torch in a welding robot. The robot controlling method according to the present invention will be explained in detail by way of an embodiment as illustrated. An embodiment according to the present invention has a hardware construction as shown in Fig. 1 on which the system as shown in Fig. 2 operates. The block construction shown in Fig. 1 corresponds to the robot control apparatus 2 in the system shown in Fig. 6. The hardware of Fig. 1 includes a main processor 20, a servo processor 21, an I/O processor 22, a bus 23, an A/D converter 24 and an input filter 25. The robot control apparatus 2 is designed to be able to introduce, through the I/O processor 22, analog inputs from several kinds of sensors attached to a robot and also provide an interface with an operation box 30. The system shown in Fig. 2 illustrates a partial arrangement of the operation program within the main processor 20. The operation of this embodiment will be explained. The control operation for a robot will proceed along the internal processing flow as shown in Fig. 7. Concurrently with this, the man-machine control system 200 of Fig. 2 makes the display as shown in Fig. 3 on the operation box 30 connected with the I/O processor 22, and urges an operator to input modifying direction information. Incidentally, on the operation box 30 shown in Fig. 3, numeral 31 denotes a display unit serving as a man-machine interface. In response, when the operator inputs predetermined angle information by operating the operation box 30, the man-machine control system 200 takes in this information through an I/O processor interface control system 201. Thereafter the man-machine control system 200 causes, for confirmation, the information to be displayed on the display unit 31 of the operation box 30, and also transfers the modifying direction information thus obtained and the welding condition now being used by the robot to an operation control system 202 through a path A in Fig. 2. The input data (modifying direction information) and display data in the man-machine information control system 200 are defined as shown in Fig. 4. A robot moving direction vector is defined as the reference direction of a modifying direction. The robot moving direction vector when a work forms a right angle represents a plane formed by the moving direction of the robot torch at issue and a line (which forms 45° with the respective axes of the work) drawn in the middle of the angle of the work; this plane shown by broken line is defined as 0°. Since the modifying direction of the torch is defined by the angle formed by the above plane (reference direction of the modifying direction) and the torch direction vector (approach vector) when the torch moves for correction, the modifying direction information of the torch direction vector is inputted in terms of the above angle. Next, the operation control system 202 calculates a new matrix on the basis of the following matrix calculation algorism using the angle information (modifying direction angle) of the modifying direction information acquired. The operation control system 202 sets this matrix on a matrix table 203 with indices of numbers representative of welding conditions (operation conditions). Now this matrix results in a 3 x 3 matrix as described later, and its third column designates an approach vector. Thus, the approach vector of the calculated matrix is an approach vector rotated by a modifying angle given by the man-machine control system 200 as defined in connection with Fig. 4. (Matrix calculation algorism) It is assumed that the mechanism of a robot (manipulator) has six axes as shown in Fig. 5. Then, a general equation of normal transform when a torch (tool) is attached to the tip of a robot provides a vector with the posture and position of the torch tip in accordance with a Link coordinate as expressed by Equation (1) A T R = [ i=1 6 A i i-1 ] · A T F = A 1 0 · A 2 1 · A 3 2 · A 4 3 · A 5 4 · A 6 5 · A 7 6 If this vector is separated into a position component and a posture component, the final position of the torch is given by Equation (2) and the final posture is given by Equation (3). 0 E T = 0 E 6 + d 6 · 0 F 6 · 6 F T + 0 F 6 · 6 E T = 0 E 6 + 0 F 6 (d 6 · 6 F T + 6 F T ) where 0 E T : a final position. 0 F T = 0 F 6 · 6 F T where 0 F T : a final posture. OFT denotes a transform matrix from a robot base to a tool tip; 0F6 denotes a transform matrix from the base to a sixth axis (flange); and 6FT denotes a transform matrix including the approach vector from the sixth axis to the tool tip (Mt at 1 ○ in Fig. 7). Character 6FT having a pre-superscript 6 and a post-subscript T on the right side of Equation (3) designates a coordinate (2 ○ in Fig. 5) of the tool attached to the tip of the robot, and takes the matrix form expressed by Equation (4) In the matrix of Equation (4), the third column composed of Ax, Ay and Az is called the approach vector as described above. This approach vector is located in the same direction as the torch direction. In order to rotate the approach vector in the matrix represented by Equation (4) in accordance with the definition illustrated in Fig. 4, it is transformed according to Equation (6) using the angle  given by the man-machine control system 200 and the robot moving direction vector given by Equation (5) thereby to provide a new approach vector. C = P i + 1 - P i |P i+1 - P i | = e x e y e z where C : a robot moving direction vector where A : a previous approach vector B : a new approach vector C = Cos , S = Sin Thus, the new approach vector is acquired on the basis of the angle information as modifying information. Robot control is advanced using this approach vector as a torch direction vector in the correction processing unit 1 ○ along the internal processing flow in the control device of Fig. 7. The angle information provides a correction amount on the approach vector so that the path is corrected to interpolate the robot. Thus, the correction direction can be changed in real time while the robot operates. Thus, in accordance with the embodiment, if a necessary angle is inputted from the operation box 30 while a robot operates, the correction direction of the robot can be easily changed in real time. An operator can easily deal with the modifying direction explained in connection with Fig. 8 while actually seeing the state of a welding arc, thereby providing a correct changing direction. On the other hand, in this embodiment, if changing the correction direction is not instructed, the operation control system 202 reads, from the matrix table 203, the matrix with the index of the condition number now being used, and advances the robot control using this matrix as a torch direction vector in the correction processing unit (1). Therefore, in accordance with the present invention, if a predetermined correction direction is previously given in accordance with an operation condition, it is used as a learning data. The corresponding operation condition number can automatically provide an optimum modifying direction. Thus, a work with a complicate shape and plural different works can be dealt with easily. Accordingly, in accordance with the present invention, since the sensor correction direction can be easily changed while a robot operates, a suitable correction direction can be always given in accordance with the state of a work. So the present invention can be applied to e.g. a welding operation to provide a good working result easily at all time.

Claims: Method for controlling a robot, comprising the steps of: detecting a relative position of the robot (1) and a workpiece (5) by a sensor, determining a target position of the robot (1) based on the detected relative position, and controlling the robot (1) to operate in a predetermined direction based on the determined target position, characterized in that a robot moving direction vector is defined as a reference direction, a modifying direction information relative to the reference direction is input, a robot direction vector is determined based on the modifying direction information, and the robot (1) is controlled to operate based on the determined robot direction vector and the determined target position. Method according to claim 1, characterized in that the modifying direction information is input during an operation of the robot (1). Method according to claim 1 or 2, characterized in that the modifying direction information is input via the robot operation unit (30) in terms of an angle formed with the reference direction. Method according to at least one of claims 1 to 3, characterized in that the determination of the robot direction vector is sequentially executed for each interpolation processing of the robot (1). Method according to at least one of claims 1 to 4, characterized in that the determined robot direction vector is stored with an index relating to the corresponding operation condition of the robot (1). Apparatus for controlling a robot (1), including a sensor for detecting a relative position of the robot (1) and a workpiece (5), a robot control unit (2) having an operation control system (202) for determining a target position of the robot (1) based on the detected relative position, and for controlling the robot (1) to operate in a predetermined direction based on the determined target position, characterized in that the robot control unit (2) defines a robot moving direction vector as a reference direction, allows the input of modifying direction information relative to the reference direction via a man-machine control system (200), determines a robot direction vector based on the modifying direction information, and controls the robot (1) to operate based on the determined robot direction vector and the determined target position. Apparatus according to claim 6, characterized in that the modifying direction information is input during an operation of the robot (1). Apparatus according to claims 6 or 7, characterized in that the modifying direction information is input via the robot operation unit (30) in terms of an angle formed with the reference direction. Apparatus according to at least one of claims 6 to 8, characterized in that the determination of the robot direction vector is sequentially executed for each interpolation processing of the robot (1). Apparatus according to at least one of claims 6 to 9, characterized in that the determined robot direction vector is stored with an index relating to the corresponding operation condition of the robot (1).

Inventors: SHIBUYA HAJIME, SHIINA TSUKASA, TAKABUCHI YUJI, WASHIZU SUMIO, WATANABE HIROSHI, SHIBUYA, HAJIME, SHIINA, TSUKASA, TAKABUCHI, YUJI, WASHIZU, SUMIO, WATANABE, HIROSHI
Applicants: HITACHI KEIYO ENG, HITACHI LTD, HITACHI KEIYO ENGINEERING CO., LTD., HITACHI, LTD.
Application year: 1992
Main classification: B25J9
IPC codes: B25J13, B25J9, G05B19