METHOD AND APPARATUS FOR GENERATING AND APPLYING COMMON TEACHING DATA OF ROBOTS

Abstract: In a robot having a servo control section (3) for driving an actuator, an arithmetic operating unit (4), memories (6 and 7), and input and output devices (9 and 10), there are provided method and apparatus for making teaching data of the robot in which mechanism errors peculiar to the self robot (B) are estimated and with respect to standard position information obtained from the result of the teaching operation and compensation of the mechanism errors of another robot (A), the corrected standard position information (teaching data for the self robot) which is derived by subtracting the mechanism errors of the self robot (B) from that standard position information is made as the teaching data.

Description: BACKGROUND OF THE INVENTION The present invention relates to generation and utilization of teaching data of a robot and, more particularly, to a method and apparatus for generating and applying teaching data whereby teaching data of a robot can be commonly used for another robot. A servo command value for a robot is frequently indicated by joint angles, e.g. ϑ 1A , ϑ 2A shown in Fig. 3A. There is a relation of between joint angles and a command position D A by a mechanism parameter P including the angle ϑ 2A . denotes a vector indicative of the position, orientation of a robot. is the mechanism parameter indicative of the length of arm, attaching angle, or the like. When considering a 2 degree-of-freedom SCARA robot shown in, e.g., Fig. 4A, the command values are ϑ₁ and ϑ₂ in Fig. 4B. (Although the definitions of the ϑ₁ and ϑ₂ differ in every robot, they are defined as shown in Fig. 4B in this example). Only arm lengths r₁ and r₂ are provided as mechanism parameters. Consequently, the following equation is derived. On the contrary, joint angles can be also obtained from ( ) by the well-known coordinates transformation of a robot. For instance, in the case of Figs. 4A and 4B, assuming that ϑ₁ and ϑ₂ can be obtained by However, since the mechanism parameter includes the assembling error and the machining error of the dimensions and angle Δ (which is called as the mechanism errors) which occur upon working, even if the robot is operated in accordance with a command value, the robot does not reach the command position D A but actually moves to a position T A . For example, when the arm lengths r₁ and r₂ of the robot shown in Fig. 4A include errors of Δr₁ and Δr₂, if ϑ₁ and ϑ₂ are given, the robot does not reach the position D A but it obviously moves to the position T A Further, if the origin positions (the positions when ϑ=0) of ϑ₁ and ϑ₂ are deviated by Δϑ₁ and Δϑ₂, the equation (4) becomes as follows. That is, even if the robot is desired to move to the position D A of the equation (3) by using (r₁, r₂, ϑ₁, ϑ₂), the robot arrives at the position T A of the equation (5) due to (Δr₁, Δr₂, Δϑ₁, Δϑ₂). In other words, when the robot is controlled by the command position the robot eventually reaches the position Therefore, the operator performs a teaching work for allowing the robot to be positioned to the actual position T A , and the command position ( ) is stored as teaching data into a memory, and playback processes are executed on the basis of this teaching data. A method of obtaining the mechanism error Δ has been disclosed in U.S. Patent Serial No. 4,670,849 by Okada et al, filed on June 2, 1987. On the other hand, a method of obtaining what is called a coordinates transformation equations corresponding to the equations (1) and (2) suitable for general robots such as robots other than the SCARA robot has been disclosed in detail in Richard P. Paul, "Robot Manipulators: Mathematics, Programming and Control", The MIT Press. In the case of using a plurality of robots of the same type, there is a large demand such that the data taught to one of the robots is used even for the other robots. However, since the mechanism error Δ of the robot as mentioned above differs in each robot, the data taught to one robot cannot be directly used for the other robots. Therefore, hitherto, when the teaching data is implanted to the other robots, the complicated adjustments of the positioning points are executed by using a teaching pendant after the teaching data was implanted. Namely, hitherto, the teaching data cannot be mutually used by the other robots. From prior art document US-A-4 670 849 a method and an apparatus for correcting position errors for industrial robots are known. According to the described method, a robot is moved in accordance with position command values, then by making reference to the difference between the target position and the actual position structural errors of the robot are determined and finally a work program prepared for the robot is modified in accordance with the structural errors which were determined beforehand. It is the object of the present invention to provide a method and apparatus for generating and utilizing teaching data whereby teaching data are commonly usable among a plurality of robots and to provide a robot control unit which is able to use another robot's teaching data without adjusting it manually. This object is solved in accordance with the features of the independent claims. Dependent claims are directed to preferred embodiments of the present invention. The described method comprises the steps of presuming the mechanism errors of individual robots and by making standard position information from which the mechanism errors were eliminated as teaching data. Generation of the standard position information from which the mechanism errors were eliminated has the following meanings. That is, the current position of a robot in the robot coordinates system assumes ( ). denotes the position and orientation of the robot and represents the mechanism parameter (arm length, attaching angle, etc.). The state of a robot in the space can be represented by six independent data of the position coordinates of the robot hand and the orientation thereof. It is sufficient that the position coordinates are set to three points (x, y, z) in a three-dimensional space. The orientation can be represented by various expressing methods. Typical examples of the expressing methods are shown in Figs. 5A to 5C. (Refer to the foregoing literature of R. Paul.) The method of Fig. 5A is called a robot hand coordinates system expression. The method of Fig. 5B is called an Eulerian angle expression. The method of Fig. 5C is called a roll pitch yaw expression. In the cases of the Eulerian angle and the roll pitch yaw, three independent data are used. In the case of the robot hand coordinates system, three vectors , , and are used. However, since there is no need to store . Since and between the remaining two vectors and (the number of components is six) are the direction cosine, its length is set to 1. That is, Therefore, since either one of (f x , f y , f z ) and either one of (g x , g y , g z ) is expressed by the other components, it is also unnecessary to store it. For instance, since f z ² = 1 - f x ² - f y ² , f z can be omitted. On the other hand, since and cross perpendicularly, the inner product is 1. That is, From this equation, another component becomes unnecessary. For example, g y can be completely expressed by the other components f x , g x and f y . Therefore, in the case of the robot hand coordinates system, even if there are three vectors (the number of components is 9), the number of independent components among them is still three. For instance, it is sufficient to have the data of only f x , f y and g x . However, actually, six data of and are provided as redundancy data for convenience of the calculations. The current position after the teaching operation is expressed as ( + Δ ) in the absolute coordinates system in which the installing position of the robot is set to an origin. Δ denotes an error of the mechanism parameter. The robot coordinates system and absolute coordinates system will now be described. First, absolute coordinates system is the ordinary xyz coordinates system in which the installing position of the robot is set to an origin as mentioned above. Although the definitions of x, y and z differ in dependence on the respective robot manufacturers, they are defined as shown in Fig. 16 in this embodiment. On the other hand, the robot coordinates system relates to a space which is drawn by each articulated angle (in the case of a mechanism having a joint which translates, a translational distance thereof) to control the robot. For instance, in the case of the robot shown in Fig. 4B, the robot coordinates system cooresponds to a two-dimensional plane in which ϑ₁ and ϑ₂ are set to axes. The points (ϑ₁, ϑ₂) (which are equal to ( )) in the robot coordinates system are set to ( + Δ ) in the case of the absolute coordinates system. That is, if the current position of a robot is ( + Δ ) in the absolute coordinates system, the command values to the robot is actually the value ( ) in the robot coordinates system. In other words, the robot moves to the position of ( + Δ ) due to the mechanism errors when the robot is controlled so as to move to the position of the command value ( ). No problem occurs so long as teaching data is given and executed by using the same robot. However, when the command value (teaching data) ( ) is transferred to the other robot and executed, this robot moves to the position of ( + Δ B ) because the mechanism errors Δ B differ. Therefore, the standard position information ( + Δ ) is previously made from the command value ( ) by using the known mechanism errors Δ and the command value for positioning is made on the basis of the standard position information. Due to this, the teaching data can be efficiently mutually used. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a control unit for a robot to which a teaching data generating method according to an embodiment of the present invention is applied; Fig. 2 is a flowchart showing a procedure of the teaching data generating method according to the embodiment of the invention; Figs. 3A and 3B are diagrams showing the coordinates systems of robots A and B, respectively; Figs. 4A and 4B are a diagram showing an example of a biaxial SCARA robot and a diagram showing a coordinates system expression, respectively; Figs. 5A to 5C are a diagram showing a robot hand coordinates system expression, an explanatory diagram of an Eulerian angle, and an explanatory diagram of a roll pitch yaw, respectively; Fig. 6 is a diagram showing an example of a storage format of teaching points; Fig. 7 is an explanatory diagram of the moving operation among a plurality of points; Fig. 8 is a format diagram of error parameters; Fig. 9 is a flowchart for explaining a method of obtaining the current position of a robot; Fig. 10 is a diagram showing a method of obtaining the current position of a robot whose degree of freedom is two; Fig. 11 is a flowchart for explaining the operating steps of previously calculating a command value with respect to a special robot and storing into a memory; Fig. 12 is a diagram showing a storage format of the command value ( ) and the current position ( + Δ ); Fig. 13 is a diagram showing a modification of Fig. 12; Fig. 14 is a flowchart for explaining a processing procedure when a mechanism parameter changes; Fig. 15 is a flowchart for explaining the processes in another embodiment according to the invention; and Fig. 16 is an explanatory diagram of the absolute coordinates system. DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described hereinbelow with reference to the drawings. Fig. 1 is a block diagram of a control unit for a robot. Reference numeral 1 denotes a robot and 2 indicates a control unit for the robot. The control unit 2 comprises: a servo section 3; an arithmetic operating unit 4; an input/output (I/O) processing section 5; and an internal memory 6 and an external memory 7 to store teaching data. A teaching pendant 8 to input the teaching operation, an input apparatus 9 to input commands, and an output apparatus 10 are connected to the control unit 2. Arrows 11 to 21 show flows of information among the respective components and represent a command value 11 to an actuator in the servo section 3, a status signal 12 of the actuator, a signal 13 indicative of a servo command and a servo status, input/output (I/O) information 14, I/O information 15 to the teaching pendant 8, input information 16 from the input apparatus 9, output information 17 to the output apparatus 10, I/O data 18 and 19 of teaching data from/into the internal memory 6, and I/O data 20 and 21 of the teaching data from/into the external memory 7. The control by the teaching playback of the robot is executed in the following steps. (a) The robot is positioned at a desired position in the space at a certain orientation by pressing buttons (for instance, X+ denotes that the robot is moved in the + direction on the x axis) on the teaching pendant 8. (b) To take in the command values ( ) of the position and orientation, the button to "take in the teaching points" on the teaching pendant is pressed. (c) The arithmetic operating unit 4 performs the following processes for those processes. (i) The status 12 of the actuator is taken in (the status includes the data regarding the current position of each actuator). (ii) Each of the articulated angles (ϑ₁ to ϑ n in Fig. 3) of the robot is obtained from the data regarding the current position of each actuator. (iii) The position (x, y, z) and orientation ( , ) of the robot hand are obtained from the respective articulated angles. (iv) The position and orientation data obtained are stored into the external memory 7. At this time, a storage format is as shown in Fig. 6. The orientation can be also expressed as shown in Fig. 5B or 5C without limiting to ( , ). On the other hand, the articulated angles ϑ₁ to ϑ n in the step (ii) may be also together provided (as shown in an example of Fig. 6). Or only the articulated angles can be also stored. Even if those data were stored, they can be mutually converted and they can be said to be all equivalent in terms of this meaning. (d) A plurality of teaching points are set to positioning points and such a playback operation as to connect these points is executed. This operating process has been described in detail, for example, in the fifth chapter, 6th to 9th paragraphs, of the book by R. Paul. Fig. 2 is a flowchart showing a procedure of a teaching data generating method according to the present invention and shows the case where teaching data of the robot B is made from teaching data of the robot A. In this embodiment, the teaching data is made in five steps comprising: a step 22 of estimating the mechanism errors of the robot A; a step 23 of generating teaching data; a step 24 of generating the standard position information; a step 25 of estimating the mechanism errors of the robot B; and a step 26 of generating teaching data of the robot B from the standard position information of the robot A. In the steps 22 and 25 of estimating the mechanism errors, the mechanism errors of the robots are estimated. As a method of obtaining the mechanism errors (also including the installation errors of the robots in more detail) Δ , the method described in, e.g., Okada et al, U.S. Patent mentioned above can be also used. After the mechanism errors were once obtained, they are not changed so long as the robot is moved to the other place or struck with obstacles. Therefore, they are stored in the external memory 7 in a format as shown in Fig. 8. The mechanism errors relate to the errors of the parts of the robot and the degree of freedom of the part in the space is six, so that each part has six parameters. Therefore, in the case of the robot whose degree of freedom is n, at most 6n error parameters exist. Further, when the installation errors are also included in those parameters, 6 (n+1) parameters exist. In the next step 23, the teaching data is made. This step 23 relates to the teaching operation. In this step, the robot A is moved to a desired position by using the teaching pendant 8, the current position of the robot is obtained from the status 12 including the encoder value from the robot, and the current position obtained is stored into the internal memory 6 or external memory 7. The details of these processes are as mentioned above. The robot A has only the teaching data of the command position ( ). However, the position orientation at which the operator wants to actually position the robot are the position ( + Δ ) in absolute coordinates system. Therefore, in step 24, the position ( + Δ ) is obtained from the command position ( ) by using the mechanism parameter errors Δ obtained in step 22. The details of the method are as shown in Fig. 9. In the case of explaining the method as an example in the robot shown in Fig. 4, it is assumed that (limited to only the errors in the plane) have already been given, and the ( + Δ ) is derived as shown in Fig. 10 by using the equation (2) and (5). The ( + Δ ) indicates the actual position of the robot A in the space when it is controlled by using the command values ( ). Consequently, ( + Δ ) is the position to which the robot B is to be actually moved. The ( + Δ ) can be said to be the standard position information when the teaching data is mutually used among the robots. In step 26, the teaching data of the robot B is obtained by the standard position information. In order to actually move both of the robots A and B to the same position, the standard position information also corresponds to the values of the positioning points of the robot B in the absolute coordinates system (Fig. 3B). Δ B indicates the mechanism errors of the robot B. denotes a vector indicative of the position and orientation of the robot B. The practical functional form of is the same as that of if the robots A and B have the same mechanism. ( ) is obtained from the ( + Δ B ) and the robot B is moved by using the ( ) as the command position. Thus, the robot B can be positioned to the position ( + Δ B ), that is, to the positioning point ( + Δ ) of the robot A. In this manner, the teaching data can be mutually used. The ( ) can be obtained from the position ( + Δ B ) to which the robot B is to be moved by performing the arithmetic operations (namely, the process to subtracting the mechanism errors Δ B ) opposite to those in step 24. In other words, a situation such that the robot moves to the position ( + Δ ) in spite of the instruction of the command value ( ) means that the mechanism errors Δ are cancelled and the robot moves to the position ( ) on the basis of the instruction of the command value ( + Δ ). By use of this meaning, it can be said that the command value to position the robot to the position ( ) is ( - Δ B ). Since ( ) is equal to ( + Δ ), when using the same arithmetic operating equations as those in step 24, the command position D B can be obtained by because it is sufficient to eliminate the influence by Δ B . The right side of the equation (6) can be approximated as follows. Now, since this equation can be modified as follows. By substituting this equation to the equation (7), we have Since the mechanism errors Δ and Δ B are small, their product is further small. By ignoring this product, can be also obtained. At this time, Now, means (where X i , P i , ΔP i are the i-th components of the vectors , , and Δ .) Since each X i ( ) has already been known as shown in the equation (1), can be calculated. For example, in the case of the robot of Fig. 4A, Now, ϑ₁ and ϑ₂ are obtained from ( ), r₁ and r₂ are constants, and Δr₁, Δr₂, Δϑ₁, and Δϑ₂ are obtained as the mechanism errors. Therefore, by substituting these values to the equation (8), Therefore, where, x′ and y′ denote x′ and y′ in Fig. 10. The teaching data D B obtained in this manner and indicative of the command position for the robot B is stored into the memory 6 or 7 in the same format as that of Fig. 6. This data indicates the command position of the robot B. The ( ) are previously calculated in correspondence to all of the ( ) of the robot A and stored in the memory. This procedure is shown in Fig. 11. Therefore, in the robot B, by playing back at the command position D B = ( ), the robot can be positioned to the positioning point ( + Δ ) of the robot A. It is also possible to control the robot while calculating the ( ) upon playback without calculating them at once. For this purpose, the ( + Δ ) itself is stored into the memory 6 or 7 in the format of Fig. 6, and each time the point data ( + Δ ) is read out of the memory, the processes in steps 30 to 42 in Fig. 11 are calculated by using the mechanism errors Δ B . On the other hand, the ( ) and ( + Δ ) can be also stored in place of the teaching data shown in Fig. 6. This example is shown in Fig. 12. In this case, ϑ₁ to ϑ n in step 32 in Fig. 11 are obtained from the ( ). In addition, since the Δ have already been stored, only the ( ) can be also stored. This example is shown in Fig. 13. At this time, ϑ₁ to ϑ n in step 32 in Fig. 11 are obtained from the ( ) as shown in step 26 in Fig. 9. The ( + Δ ) in step 32 in Fig. 11 is obtained by using the Δ by the same method as Fig. 9. The system of the present invention is not limited to only the mutual use of the teaching data for the other robots but can be also effective even if the mechanism parameters are changed due to some reason (for example, an end-effector was struck or the like). For this purpose, it is sufficient to execute the processes in steps 44 to 50 shown in Fig. 14. In the present system, it will be obviously understood that the robots A and B are not necessarily the same type when considering the processing system. If the equations to obtain the position and orientation of the robot A and the mechanism parameters A ( A ) of the robot A and the equations to obtain the position and orientation of the robot B and the mechanism parameters B ( B ) of the robot B are known, the invention can be extended by the same method as shown in steps 52 to 62 in Fig. 15. On the other hand, the precision of the approximate expression can be improved by considering the partial differentiation of second or higher order. The following is the equation when considering until the second order. The equation of can be calculated without any problem since it is partially differentiable many times. Although the foregoing embodiment has been described as an example with respect to the robots A and B, the invention can be also similarly applied to three or more robots 1 to n. For instance, it will be understood that arbitrary one of a group of robots is set to the foregoing robot A and the other robots are handled as the robots B, so that desired teaching data can be used commonly for each robot. In this case, an arbitrary robot is not necessarily a standard apparatus of the special specifications. As already mentioned above, the teaching data can be also supplied to the robot using the teaching data in any of the online and offline control manners. Particularly, in the case of the online control, the teaching data is supplied from one robot to the other robots by using communication lines or the like due to the parallel connection, ring-shaped connection, or hierarchy connection and each of the other robots is automatically controlled in accordance with the common teaching data. Thus, the teaching operation of the operator becomes unnecessary. According to the present invention, teaching data can be mutually used and there is an advantage such that even in the robot itself, even if the mechanism errors change due to some reason, the old teaching data can be used.

Claims: A method for generating and commonly applying data to a plurality of robots in a system for controlling said plurality of robots, each robot including input/output devices (9 and 10), a servo control section (3) for driving actuators of the robots, a memory (6 and 7), and an arithmetic operating unit (4) coupled with each of said input/output devices, said servo control section and said memory for executing arithmetic operations of data, said method comprising the steps of: (a) estimating structural errors Δ which are peculiar to a first robot (1); (b) moving said first robot to a first position by using a teaching pendant and obtaining as teaching data a current position ( ) of said first robot from status data of each actuator, said current position corresponding to a command position produced by said teaching pendant; (c) obtaining data of a desired position ( + Δ ) from said teaching data indicative of a commando position ( ) by using said structural errors Δ estimated in the step (a) wherein said data of a desired position are standard position information which represent a position and an orientation for another robot; (d) determining structural errors Δ B associated with a second robot; and (e) calculating corrected command position data X( + Δ - Δ B ) from said standard position information and the structural errors of said second robot, thereby enabling the second robot to be controlled on the basis of the teaching data of the first robot. A method according to claim 1, wherein each time said standard position information is supplied from the first robot, the second robot fetches a teaching point included in said information and obtains a command value ( - Δ B ) of the second robot using said teaching point and said structural errors of said second robot. A method according to claim 1, wherein said steps of determining the structural errors of the first and second robots each include a step of updating the corresponding robot structural errors, obtaining new structural errors, and storing the new structural errors, and new teaching data are generated using said teaching data and the new structural errors and said new teaching data are stored to enable compensation of a change in structural parameter when a parameter change occurs. A method according to claim 2, wherein each time the second robot receives the teaching data from the first robot, the second robot again executes said step of determining the structural errors thereof and obtains an updated structural error parameter and again calculates the standard position information from the first robot by the updated structural error parameter, thereby generating new teaching data. A method according to claim 1, further comprising the steps of: fetching teaching points A ( A + Δ A ) and ϑ₁ to ϑ n from the first robot, where A ( A ) denotes a command value which is peculiar to the first robot, A and Δ A indicate structural parameter and structural errors respectively, and ϑ₁ to ϑ n represent articulation angles; obtaining articulation angles ϑ₁' to ϑ m ' of the second robot from said teaching points A ( A + Δ A ) and calculating a position B ( B - Δ B ) to which the second robot is to be actually controlled by the following approximate equation from both of the articulation angles ϑ₁' to ϑ m ' obtained and the structural parameter errors Δ B of the second robot where, B denotes structural parameters of the second robot. A method according to claim 5, wherein said calculating operation of said position B ( B - Δ B ) to which the second robot is to be actually controlled is prepared in advance, as a command value for the second robot. A method according to claim 5, wherein said calculating operation of said position B ( B - Δ B ) to which the second robot is to be actually controlled is executed each time the teaching point of the second robot is supplied from the first robot. A method according to claim 1, wherein said peculiar commanded position information of said second robot which is obtained by said calculating step are stored in a memory of said second robot. A method according to claim 1, wherein said calculating step includes: fetching a positioning point ( + Δ ) and ϑ₁ to ϑ n , where denotes a command value to said first robot, and Δ indicate structural parameters and structural errors, and ϑ₁ to ϑ n represent articulation angles, from the standard position information supplied from said first robot; obtaining by using both of the structural errors Δ B of said second robot and the ϑ₁ to ϑ n ; obtaining the command value of said second robot by substituting said obtained value of for the second term of the equation for ( ) and calculating the articulation angles ϑ₁' to ϑ n ' of said second robot from the command value ( ) derived. A method according to claim 9, wherein said command value ( ) and articulation angles ϑ₁' to ϑ n ' calculated are stored in a memory in said second robot. An apparatus for generating and commonly applying data to a plurality of robots in a system for controlling said plurality of robots, each robot including input/output devices (9 and 10), a servo control section (3) for driving actuators of the robots, a memory (6 and 7), and an arithmetic operating unit (4) coupled with each of said input/output devices, said servo control section and said memory for executing arithmetic operations of data, comprising: (a) first means for estimating structural errors Δ which are peculiar to a first robot (1); (b) means for moving said first robot to a first position by using a teaching pendant (8) and obtaining as teaching data a current position ( ) of said first robot from status data of each actuator, said current position corresponding to a command position produced by said teaching pendant; (c) means for obtaining data of a desired position ( + Δ ) from said teaching data indicative of a command position ( ) by using said structural errors Δ estimated by said first means wherein said data of a desired position are standard position information which represent a position and an orientation for another robot; (d) second means for determining structural errors Δ B associated with a second robot; and (e) means for calculating corrected command position data ( + Δ - Δ B ) from said standard position information and the structural errors of said second robot, thereby enabling the second robot to be controlled on the basis of the teaching data of the first robot. An apparatus according to claim 11, wherein said second robot includes: a memory storing said desired position data from said first robot so that said desired position data can be updated, said memory also storing the structural error parameters from said first means; and a central processing unit for executing predetermined procedures to move said second robot to obtain all of said peculiar teaching data of said second robot from both said stored desired position data and said stored structural error parameters and then storing said peculiar teaching data in said memory so as to be able to read out when said second robot is to be moved to points corresponding to said peculiar teaching data.

Inventors: ASHIDA, AKIRA, MOHRI, SHUNJI
Applicants: HITACHI, LTD.
Application year: 1988
Main classification: G05B19
IPC codes: G05B19, B25J9