METHOD OF FORMING POSITIONAL DATA ON CONTROL SHAFTS OF ROBOT

Abstract: Method of forming the positional data on the control shafts of a robot without carrying out a teaching operation. This method of forming the positional data on the control shafts of a robot consists of a step of inputting the data by which the shape of a workpiece (WK) is determined, and the data (α, β, δ) by which the posture of a tool (TL) which is in accordance with the content of an operation practiced by the robot is determined, a step of computing the positions (X, Y, Z) in the coordinate system X-Y-Z of the workpiece of a free end (P) of the tool by using the data by which the shape of the workpiece is determined, a step of determining the positions of the robot-forming control shafts with reference to the position of the free end of the tool and the data on the posture of the tool, and a step of determining the positions of the control shafts of the robot in order along a path of tool (PT).

Description: This invention relates to a method of generating data indicative of robot control axis positions. A robot has its position controlled on the basis of robot control data created in advance and stored in memory and performs tasks at predetermined positions, such tasks including loading and unloading the workpiece of a machine tool or the like, attaching and detaching tools to and from the machine tool, and subjecting workpieces to painting, welding and sealing. Hereafter, an effector such as the robot hand, a welding torch or a paint spraying nozzle attached to the robot shall be referred to generically as a "tool". Conventionally, the positions of the control axes constituting a robot or path data are created by a teaching operation in which the tool is moved manually along a desired path, and the data are stored in a robot control unit memory. When an actual task is performed, path control is executed using the position or path data created by the teaching operation and the tool is moved along the desired path or positioned at desired points to performed the predetermined task. Such a teaching operation is disclosed in JP-A-50-124357. However, creating the position data and path data by teaching is troublesome and time-consuming, and the teaching operation is hazardous. Moreover, highly precise teaching of positions and paths cannot be performed, thus making it impossible to achieve highly precise painting, welding and sealing. Accordingly, an object of the present invention is to provide a robot control axis position data generating method through which data indicative of robot control axis positions can be created simply and offline without teaching. Another object of the present invention is to provide a robot control axis position data generating method through which data indicative of robot control axis positions can be created offline in the same format for robots of all kinds. Still another object of the present invention is to provide a robot control axis position data generating method for specifying robot control axis positions in terms of the task the robot executes and tool attitude data determined by the tool shape, in addition to the tool tip position obtained from data specifying the shape of the workpiece. A further object of the present invention is to provide a robot control axis position data generating method for creating data specifying robot control axis positions in the same format for robots of all kinds, subjecting these data to a coordinate transformation in dependence upon the robot being controlled, and controlling the position of each axis of the robot on the basis of the control axis position data obtained by the coordinate transformation. According to the present invention there is provided a method of generating data for commanding robot control axis positions for guiding a tool, held by the robot, along the surface of a workpiece, characterized by: inputting, offline without teaching, data specifying the shape of the workpiece, data specifying a required attitude relative to the workpiece surface of the tool, said attitude conforming to a task to be executed by the robot on the workpiece, and data specifying a tool path on the workpiece, wherein the data specifying said tool attitude include angles which indicate deviations of a central axis of the tool from the direction of a line normal to the workpiece at the tool tip position, and a twist angle indicating an amount of tool tip twist: calculating required successive positions of the tip of the tool in a workpiece coordinate system by using the data specifying the workpiece shape and the data specifying the tool path, wherein the tip of the tool lies on the tool path; converting said tool attitude data relative to the workpiece surface into tool direction data in the workpiece coordinate system; and converting successive tool positions along the tool path, defined by tool control data in the workpiece coordinate system, into position command data for each control axis of the robot in a coordinate system of the robot, on the basis of the type of robot to be controlled and data specifying dimensions of said robot. Examples of the different types of robot to which the invention may be applied are cylindrical coordinate system robots, articulated robots, Cartesian coordinate system robots, and other robots having different control axes. Brief Description of the Drawings Fig. 1 is a view for describing the general features of the present invention; Figs. 2 through 4 are views for describing the relationship between constraints α, β, γ and a robot task, in which Fig. 2 is a view for describing the constraints in a painting operation, Fig. 3 is a view for describing the constraints in arc welding and sealing operations, and Fig. 4 is a view for describing the constraints in a spot welding operation; Fig. 5 is a view for describing tool direction data P, Q, R in a workpiece coordinate system; Figs. 6 through 9 are views for describing a method of obtaining P, Q, R by using the constraints (α, β, γ); Figs. 10 and 11 are views for describing a method of obtaining position data ϑ₁, ϑ₂, S₃, ϑ₄, ϑ₅, ϑ₆ for each axis of a robot from X, Y, Z, P, Q, R in case of a Scheinman arm; and Fig. 12 is a block diagram of an embodiment of the present invention. Fig. 1 is a view for describing the general features of the present invention. TL represents a tool, and WK denotes a workpiece having a freely curved surface. To specify the freely curved surface of the workpiece, by way of example, data are given specifying several sections and section curves of the workpiece WK, a plurality of intermediate sections are generated in accordance with predetermined rules by using the section data and section curve data, and section curves (intermediate section curves) of the workpiece are obtained based on the intermediate sections. The freely curved surface of the workpiece is specified by a plurality of the generated intermediate section curves. For the details of this curved surface generating method, refer to the specification of Japanese Patent Application No. 55-78247 (U.S.P. 4,491,906). Returning to Fig. 1, let a point P (the position of the tool tip) on a freely curved surface represent the origin, and let an S axis represent the direction of a normal line to the workpiece at the origin P, an H axis the direction along which the tool advances, and a V axis a third axis of a right-hand coordinate system in which the other two axes are so decided as to coincide with the S and H axes, respectively. Under these conditions, the position of each control axis of a robot in the workpiece coordinate system is specified by the position X, Y, Z of the origin P (namely the position of tip of the tool TL) in a Cartesian coordinate system (the workpiece coordinate system), angles of deviation α, β of the tool central axis T from the normal vector S, and a twist angle (angle of rotation) γ of the tool TL. It should be noted that α, β and γ are attitude data specifying the attitude of the tool. These data are defined as follows: α is an angle formed in the SV plane by an axis T' (dashed line), which is obtained by projecting the tool central axis T onto the VS plane, and the S axis. Accordingly, the S axis is superimposed on the axis T' when rotated α° about the H axis. β is an angle formed by an S' axis and the tool central axis T in an S'H plane, where S'V' is a new plane obtained by rotating the VS plane about the H axis until the S axis is superimposed on the axis T'. In other words, the S' axis is superimposed on the tool central axis T when rotated β° about the V' axis. γ is a tool twist angle about an S'' axis (tool central axis), where S''H' is a new plane obtained by rotating the S'H plane about the V' axis until the S' axis is superimposed on the tool central axis T. The counter-clockwise direction is taken as being positive for this angle. The final attitude of the tool cannot be determined even when the coordinate values (X, Y, Z) of the tool tip P on the workpiece and the workpiece normal vector at this position are given. The reason is that, depending upon the robot task, it is necessary to perform the task with the tool central axis T tilted from the normal vector in the direction of advance, or with the tool tip pointed toward the workpiece at a fixed attitude at all times. Therefore, according to the present invention, the three elements (constraints) α, β, γ that determine the tool attitude are introduced, as set forth above. All tool states can be specified in terms of the three constraints (α, β, γ) and the coordinate values (X, Y, Z) of the tool tip position. Accordingly, if X, Y, Z, α, β and γ are subjected to predetermined processing conforming to the robot used, position data for each control axis constituting the robot can be obtained. If each control axis is driven based on the position data obtained by the above processing, the tool tip will arrive at the positions designated by the coordinate values (X, Y, Z), the tool central axis will be displaced from the normal vector by α and β, and the tool tip will assume the state which results by being twisted by γ. In other words, X, Y, Z, α, β and γ are converted into the robot control axis position data by executing the predetermined processing in dependence upon the robot used and, hence, these are universal data good for all robots. The coordinate values (X, Y, Z) of the origin P in the workpiece coordinate system are obtained based on the above-described curved surface generating method using data specifying the shape of the workpiece. The constraints α, β, γ are determined based on the activity (painting, arc welding, spot welding, sealing, etc.) executed by the robot and the shape of the workpiece, as will be described below. Accordingly, if discrete tool tip positions (positions indicated by the dots in Fig. 1) on the workpiece along the tool path PT are successively generated, then universal robot control axis position data will be generated based on the tool tip position (X, Y, Z) and the separately given constraints α, β, γ. Reference will now be had to Figs. 2, 3 and 4 to describe the values which the constraints α, β, γ assume depending upon the task executed by the robot. (A) Painting In a painting operation, the central axis T of the tool (a paint spray nozzle) TL is constantly controlled so as to be directed along the normal line to the workpiece WK (painted surface), as illustrated in Fig. 2. Therefore, we have α = β = 0 Since the shape of the paint spray nozzle has point symmetry in relation to the center of the nozzle, there is no change in the state of the nozzle with respect to the workpiece even if the nozzle is rotated about the central axis of the tool. Accordingly, γ may be any angle. In other words, γ need not be taken into consideration (in which case the constraint γ will referred to as being arbitrary). (B) Arc welding and sealing In arc welding and sealing operations, we will have α = -ϑ, β = 0 where these operations are performed with the central axis T of the tool (torch) TL tilted clockwise at all times in the VS plane through an angle of ϑ° with respect to the normal vector S to the workpiece WK (the surface being welded or sealed), as shown in Fig. 3. Since the shape of the tool tip has point symmetry in relation to the center of the tool, there is no change in the state of the tool with respect to the workpiece even if the tool is rotated about its central axis. Accordingly, γ is arbitrary. (C) Spot welding In a spot welding operation, the workpiece WK is placed in a bifurcated portion at the tip of the tool TL and control is so executed that a straight line connecting electrodes P₁, P₂ of the bifurcated portion is directed along the normal line to the workpiece at all times, as shown in Fig. 4(A). Assume that the tool TL is in the state (initially set state) indicated by the solid line in Fig. 4(B) when α = β = γ = 0 holds. In such case, the constraints should be α = -90°, β = 0, γ = 0 to attain the attitude shown by the dotted line in Fig. 4(B), namely the attitude illustrated in Fig. 4(A). The universal robot control axis position data X, Y, Z, α, β, γ obtained above are converted into robot position data based on the type of robot used and the dimensions thereof (the dimensions and arrangement of each robot axis). First, the constraints α, β, γ are converted into direction data P, Q, R in the workpiece coordinate system. With reference to Fig. 5, the meanings of P, Q and R in the workpiece coordinate system are as follows: By rotating the central axis T of tool TL P° about the X axis in the advancing direction of a right-hand screw starting from the +Y axis (from a state in which the T is in coincidence with the Y axis), then rotating the axis T Q° at this position about the Y axis in the advancing direction of a right-hand screw, and finally rotating the axis T R° in this state about the tool central axis, the tool will assume a state decided by (P, Q, R) at the tool tip position X, Y, Z). The transformation equations for transforming the constraints α, β, γ into P, Q, R will now be described. We shall assume that a coordinate system H i -V i -S i (referred to as an "initially set coordinate system") for the initial state of the tool (see Fig. 6) is known, and that the coordinates (X, Y, Z) of a positioning point P₁ in the workpiece coordinate system X-Y-Z, a normal vector (i, j, k) at the point P₁, and the constraints (α, β, γ) also are known, where a tool advance vector is presented by (first axial direction), a tool axis vector by (third axial direction), and the outer product of and (second axial direction). (a) First, an HVS coordinate system is created at the present point P₁. Let this coordinate system be represented by H c -V c -S c (Fig. 6). Note that a vector is the tool axis vector obtained when the tool axis is made to coincide with the direction of the normal vector (i, j, k) at the present point P₁, is the tool advance vector at the point P₁, and is the outer product of the vectors and (b) Next, the HVS coordinate system is obtained upon being rotated by the constraints (α, β, γ). Let this coordinate system be represented by Hγβα-Vγβα-Sγβα. Note that the constraints (α, β, γ) control axis rotation of the kind shown in Fig. 7. Axial vectors obtained when one axial vector, e.g. a third axial vector among three orthogonal unit vectors is rotated by ϑ are as follows: Note that * signifies an outer product. Accordingly, the HVS coordinate system (Hγαβ - Vγαβ - Sγαβ) resulting from α, β, γ rotation in the following order is obtained by using Eqs. (1) - (3): First, a new coordinate system Hγ - Vγ - Sγ which results when the S c axis is rotated by γ is obtained from Eqs. (1) - (3), where Next, a new coordinate system Hγα - Vγα - Sγα which results when the Hγ axis is rotated by α is obtained from Eqs. (1) - (3), where Finally, a new coordinate system Hγαβ - Vγαβ - Sγαβ which results when the Vγα axis is rotated by β is obtained from Eqs. (1) - (3), where Note that is a tool axis vector (i t , j t , k t ) at the positioning point P₁, and that when the constraints are (0, 0, 0). (c) Next, the Hγαβ - Vγαβ - Sγαβ coordinate system obtained at step (b) is transformed into a coordinate system based on an initial setting by using the following formula: The matrix M depends upon the initial state of the tool. Fig. 8 is a view illustrating the relationship between the initial state of the tool in the HVS coordinate system and the matrix M. Where the initial state is as shown in Fig. 6, the matrix is that of case 2 in Fig. 8. (d) Thereafter, a matrix N is found for bringing the vector into coincidence with The matrix N is obtained as set forth hereinbelow. Let represent a vector obtained by projecting the vector onto the S i - V i plane, and let represent a vector obtained by projecting the vector onto the S i - H i plane, as shown in Fig. 9. An angle ϑ defined by vectors and may then be obtained in accordance with the following equation: where · signifies an inner product, and | | signifies absolute value. is a normalized vector. Further, since Eq. (5) can be evaluated only when 0 ≦ ϑ ≦ π holds, 0 ≦ ϑ ≦ π shall hold when the inner products and are positive (same direction) and - π < ϑ ≦ 0 shall hold when these inner products are negative (opposite direction). A matrix N₁ for effecting rotation about the first axis (H i axis) by the angle ϑ is given by the equation Similarly, if the angle defined by the vector and the vector is ϑ', a matrix N₂ for effecting rotation about the second axis (V i axis) by the angle ϑ' is given by the equation Therefore, the matrix N for bringing the vector into coincidence with is as follows: N = N₁ x N₂ (8) (e) An H axis vector which results when the vectors and coincide is obtained from the equation (f) If the angle defined by the vector and the vector is obtained by using Eq. (5), then this angle will be the twist angle R. (g) When the angle R is obtained from the foregoing, the angles P, Q (Fig. 5) are calculated in accordance with the equation using the tool axis vector (i t , j t , k t ). The angle P is ϑ when in Eq. (10), and the angle Q is ϑ when in Eq. (10). The vector uses a normalized vector, and ϑ = 0 holds when When P, Q, R are thus obtained, X, Y, Z, P, Q, R are subjected to a coordinate transformation, described below, to generate control axis position data for the robot used. Assume that the robot is a so-called "Scheinman arm" having the six degrees of freedom shown in Fig. 10. In a Scheinman arm, the third degree of freedom is a sliding degree of freedom and the others are rotational degrees of freedom. Let the six link variables be expressed by ϑ ₁, ϑ ₂, S₃, ϑ ₄, ϑ ₅ and ϑ ₆. Let the coordinate system (workpiece coordinate system) that is fixed with respect to the floor be expressed by Σ o (x o , y o , z o ), and let the coordinate system that is fixed with respect to the hand be expressed by Σ ₆ (x₆, y₆, z₆). In accordance with the present invention, the position data (ϑ₁, ϑ ₂, S₃, ϑ ₄, ϑ ₅ and ϑ ₆) of the respective robot axes are obtained from the data (X, Y, Z, P, Q, R) by the following three transformations (first, second and third transformations): where the vectors are attitude vectors [the three fundamental axes of the tool coordinate system (X t , Y t , Z t )] of the tool attached to the hand, and the vectors are the hand attitude vectors [the three fundamental axes of the hand coordinate system (X₆ Y₆ Z₆)]. (a) Since P, Q, R are the angles of rotation about the respective axes, the tool attitude vectors are obtained in accordance with the following equation: The first transformation can be carried out by using Eq. (11). In the above equation, the alphabetic character C signifies the cosine value of the subscripts P, Q, R, and the alphabetic character S signifies the sine value of the subscripts P, Q, R. For example, C p means cosP, and S p means sinP. (b) Matrix for transforming the tool coordinate system into the hand coordinate system Since which result when the respective axes attain setting values, can be calculated from setting values entered beforehand (here the metric values of each axis which prevail when the tool coordinate system becomes parallel to the robot coordinate system are entered), an inverse matrix (T)⁻¹ is obtained beforehand in accordance with the equation The following will then hold at all times: Thus, the second transformation can be carried out in accordance Eq. (13). For the method of obtaining the above matrix T for a Scheinman arm, refer to the publication "bit Extra Edition", July, 1976 issue (Vol. 8, No. 8), pp. 99 - 102, published by Kyoritsu Shuppan K.K. on July 15, 1976. (c) If a position vector of the origin O₆ of the coordinate system (x₆-y₆-z₆) fixed with respect to the hand of the Scheinman arm shown in Fig. 10 is expressed by (the vector is obtained from the tool tip position), then the mechanism of the Scheinman arm is one in which the rotational axes of the three links at the distal end portion pass through one point O₅, as shown in Fig. 11(A). Therefore, from the relationships shown in Fig. 11(B), the robot axis position data ϑ ₁, ϑ ₂, S₃, are given by the following set of equations: where is an attitude vector of the second axis of the hand coordinate system obtained from Eq. (13), and S₁, S₂, S₆ are the lengths of the links. Further, the position data ϑ ₄, ϑ ₅, ϑ ₆ of the other robot axes are readily obtained when ϑ ₁, ϑ ₂, S₃, are been found. Accordingly, the third transformation can be carried out in accordance with Eq. (14). Fig. 12 is a block diagram illustrating an embodiment of the present invention. Numeral 11 denotes a processor, 12 a ROM storing a control program, 13 a RAM, and 14 a CAD system which uses the shape of a workpiece and tool path data to calculate and output, offline, the position vector (X i , Y i , Z i ) of discrete tool tip positions on the workpiece along the tool path, as well as the workpiece normal line vector at the tool tip positions. Numeral 15 denotes an input unit for inputting the position vector and workpiece normal line vector created by the CAD system. Numeral 16 designates an operator's panel for inputting, in addition to other data, the constraints (attitude data) based on the type of robot task and the tool tip shape, 17 a non-volatile memory for storing parameters used to convert (X, Y, Z, α, β, γ) into the position data of the axes constituting the robot under control, 18 a pulse distributor, 19 the robot, 20 an interface circuit for supervising the exchange of data between the processor 11 and the robot 19, and 21 a servo circuit. Data specifying the shape of the workpiece and data specifying the tool path are inputted to the CAD system 14, the position vector (X i , Y i , Z i ) of the discrete tool tip positions on the workpiece along the tool path, and the workpiece normal line vector at the tool tip positions are calculated, and these are stored in advance on an external storage medium TPM, such as a floppy disc or magnetic bubble memory. The data stored on the external storage medium TPM are successively read out and stored in the RAM 13 by the input unit 15. The constraints α, β, γ, are decided by taking into consideration the task (painting, arc welding, sealing, spot welding, etc.) executed by the robot as well as the shape of the tool tip, these constraints are inputted from the operator's panel, and data specifying the initial state of the tool (the H i -V i -S i coordinate system based on the initial setting) are inputted and stored in the RAM 13. All of the data specifying the robot control axis positions are stored in the RAM 13 through the foregoing steps. If a start button (not shown) on the operator's panel 16 is now pressed, the processor 11 succussively reads the position vector the normal vector the constraints α, β, γ and the tool initial state data out of the RAM 13, and obtains the position data of each control axis of the robot by executing the calculations of Eqs. (1) - (14) using the parameters stored in the non-volatile memory 17. Once the position data of each control axis of the robot have been obtained through the foregoing steps, the processor 11 uses these position data to obtain incremental quantities for each axis and then outputs these quantities to the pulse distributor 18. The latter executes a pulse distribution calculation to generate distributed pulses. The servo circuit 21 drives each control axis of the robot in response to these distributed pulses. When each control axis reaches a commanded position, the next position vector and normal line vector are read out of the RAM 13 and the tool is subsequently moved along the commanded tool path as set forth above. In the case described above, the data (X i , Y i , Z i , α, β, γ) obtained offline along the tool path are successively fed into the robot control unit, in which these data are converted into the axis data of the robot to be controlled, whereby each axis is controlled. However, it is also possible to adopt an arrangement in which the data (X i , Y i , Z i , α, β, γ) are converted into the axis data of the robot to be controlled and each axis of the robot is controlled by using the data resulting from the conversion. Furthermore, the constraints α, β, γ are not limited to the case indicated by the embodiment. In the case described above, the robot control axis position data are obtained from the data (X, Y, Z, P, Q, R) for the Scheinman arm. However, robot control axis position data can be calculated using the data (X, Y, Z, P, Q, R) for robots having other constructions as well. Accordingly, it will suffice if the transformation equations conforming to the robot to be controlled are stored in the robot control unit in advance. According to the present invention as described above, data specifying the shape of a workpiece and data specifying the attitude of a tool conforming to the task to be executed by a robot are entered, the position (X, Y, Z) of the tool tip in the workpiece coordinate system is calculated by using the data specifying the workpiece shape, the tool attitude data are converted into tool direction data (P, Q, R) in the workpiece coordinate system, and data (X, Y, Z, P, Q, R) comprising the direction data and the data specifying the tool tip position are converted into robot control axis data of the robot to be controlled. As a result, universal robot control axis position data of the same format can be created offline and without teaching. In addition, since the tool tip position from among the position data can be calculated automatically by a CAD system, and since the tool attitude is uniquely determined by the task which the robot executes or by the shape of the tool, position data that enable the task to be performed with uniform precision can be created more simply, and without danger, compared to the teaching method.

Claims: A method of generating data for commanding robot control axis positions for guiding a tool (TL), held by the robot, along the surface of a workpiece (WK), characterized by: inputting, offline without teaching, data specifying the shape of the workpiece (WK), data specifying a required attitude relative to the workpiece surface of the tool (TL), said attitude conforming to a task to be executed by the robot on the workpiece (WK), and data specifying a tool path (PT) on the workpiece (WK), wherein the data specifying said tool attitude include angles α, β, which indicate deviations of a central axis (T) of the tool (TL) from the direction of a line (S) normal to the workpiece (WK) at the tool tip position (P), and a twist angled γ indicating an amount of tool tip twist; calculating required successive positions (X, Y, Z) of the tip of the tool (TL) in a workpiece coordinate system by using the data specifying the workpiece shape and the data specifying the tool path (PT), wherein the tip of the tool (TL) lies on the tool path (PT); converting said tool attitude data (α, β, γ) relative to the workpiece surface into tool direction data (P, Q, R) in the workpiece coordinate system; and converting successive tool positions along the tool path (PT), defined by tool control data (X, Y, Z, P, Q, R) in the workpiece coordinate system, into position command data for each control axis of the robot in a coordinate system of the robot, on the basis of the type of robot to be controlled and data specifying dimensions of said robot.

Inventors: KISHI, HAJIMU HINO HIRAYAMADAI JUTAKU 1104, SAKAKIBARA, SHINSUKE, TANAKA, KUNIO
Applicants: FANUC LTD.
Application year: 1985
Main classification: G05B19
IPC codes: B25J9, G05B19