Abstract:
A method of and apparatus for controlling the path of an industrial robot, in which a slight change in the shape of the work or the position of the work relatively to the robot, if any, can be detected by a position detection arrangement capable of detecting the work position, and a previously given data concerning the path of the robot is corrected in accordance with the result of the detection by the position detection arrangement, so that the range of work conducted by robot, such as welding, sealing and so forth, is broadened advantageously.

Description:
BACKGROUND OF THE INVENTION 
     1. FIELD OF THE INVENTION 
     The present invention relates to a method of and apparatus for controlling the path of a robot having a position detecting means for detecting the position of a work. 
     2. DESCRIPTION OF THE PRIOR ART 
     In the field of industrial robots for performing tasks such as welding, sealing or the like, there has been proposed to provide a position detecting means on the robot so that the robot can detect any change in the shape of the work or the position of the work relatively to the robot and perform the task automatically and correctly while correcting the content of the instruction in accordance with the result of the detection. 
     FIG. 1 shows a conventional system for achieving a task such as welding or sealing by means of a robot. Namely, a plate W 2  having a hook-shaped plan is placed on a horizontal plate W 1 , and welding or application of an adhesive is achieved by a robot along the inner juncture line between the plates W 1  and W 2 , i.e. along the lines between points a and b, b and c, c and d. 
     Points P 1  to P 6  are determined as positions for making the detection of the work by means of the position detection means. The detection of the working positions is made by moving the detection means by the robot in the direction of arrows f 1  to f 17 . The position detection means detects the plate W 2  when it is moved in the direction of arrows f 1 , f 4 , f 7 , f 10 , f 12  and f 16  and upon receipt of a predetermined signal, moved back along the arrows f 2 , f 5 , f 6 , f 11 , f 14  and f 17 . Therefore, the points P 1  to P 6  of detecting operation have to be determined to fall, even when the positions of the plates W 1  and W 2  are fluctuated relatively to the robot, within the range of straight lines between points a and b, b and c and c and d. The points P 1  and P 6  of the position detecting operation have to be determined such that the plate W 2  can be detected without fail when the position detection means is moved in the directions of arrows f.sub. 1 and f 16 . Therefore, at the points P 1  and P 6 , the detecting operation is inevitably made for points spaced away from the points a and b. 
     The points P 1  &#39; to P 6  &#39; on the work corresponding to respective points P 1  to P 6  are determined by a calculation from the output of a posture detection means of the robot when the position detection means provides a specific signal. The points b and c are determined by calculating the points of intersection between the line interconnecting points P 2  &#39; and P 4  &#39; and the line interconnecting points P 1  &#39; and P 2  &#39; or the line interconnecting points P 3  &#39; and P 6  &#39;. 
     Therefore, the welding or sealing between the point P 1  &#39; and point b, point b and point c, and point c and point P 6  &#39; can be achieved by moving the robot while making a linear interpolation of the object of the path control. 
     Conventionally, however, it has not been possible to effect an automatic work such as welding, sealing or the like in the region between point a and point P 1  &#39; and the region between point P 6  &#39; and point d. In these regions, therefore, the work had to be accomplished by a manual work which is quite troublesome and time consuming. 
     SUMMARY OF THE INVENTION 
     Accordingly, an object of the invention is to provide a method of and apparatus for controlling the path of robot which can broaden the region of the work as compared with the prior art. 
     To this end, according to the invention, work detecting points are set at a plurality of positions and the detection of position of the work is made at each of the detecting point. The position detecting means is made to operate to determine the detection point to which the path control object portion of the robot is to be brought. 
     In addition, assuming a line interconnecting a selected detection point and a point adjacent to the selected detection point, an arithmetic operation point is determined by an arithmetic operation at a position which is on the extension of the assumed line adjacent to the selected detection point and spaced from the latter by a designated distance. The path control object portion is controlled to interconnect the arithmetic operation point and the detection point. 
     Alternatively, the position detection means is moved along the above-mentioned extension of the assumed line and a changing point at which the output of the position detection means is changed abruptly is detected, and the path control object portion is controlled to interconnect the detected point of abrupt output change and the detection point. 
     The determination of the point of abrupt output change may be made after the detection of all detection points or immediately after the detection of all detection points or immediately after the finding out of the selected point and the adjacent point. 
     The detection of the point of abrupt output change may be made by obtaining the differential value of the signal from the position detection means and determining the point where the differential value exceeds a predetermined level as the point of abrupt output change. Alternatively, the output of the position detection means is compared with a predetermined reference value and the point at which the output is changed across the reference value is determined as the point of abrupt output change. 
     The position detection means may be of the type having a sensor adapted to detect the work position upon direct contact with the latter or may be of the type in which the work position is detected in a non-contacting manner as in U.S. Pat. No. 4,205,217 (Takeshi Araya). 
     The detecting operation and the correction of instructed data are achieved by a method which is made known by U.S. Pat. No. 4,042,161 (Shimon Ando). 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a chart for explaining the drawback of the conventional method of controlling the path of a robot; 
     FIG. 2 is a chart for explaining a robot path controlling method in accordance with an embodiment of the invention; 
     FIG. 3 is a perspective view of an example of the mechanical portion of a robot path controlling apparatus in accordance with the invention; 
     FIG. 4 is a block diagram showing an example of the control section of the robot path controlling apparatus of the invention; 
     FIG. 5 is a chart for explaining a robot path controlling method in accordance with another embodiment of the invention; and 
     FIG. 6 is a block diagram of another example of the control section of the robot path controlling apparatus of the invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Preferred embodiments of the invention will be described hereinunder as to a case where the task or work is accomplished for two works W 1  and W 2  with reference to FIG. 2. 
     After setting the work detection points P 1  to P 6 , the position detection means is moved by the robot along the arrows f 1  to f 17  and the work detecting operation is made at each of the detecting operation points P 1  to P 6 . The position detection means is made to operate at each detecting operation to determine the points which are to be passed by the path control object portion of the robot or the points where the same is to be stopped i.e. the future detection points P 1  &#39; to P 6  &#39;. The point P 1  &#39; is extracted as a selected point out of these detection points P 1  &#39; to P 2  &#39;. A line is assumed to interconnect the selected point P 1  &#39; and an adjacent point P 2  &#39;. An arithmetic operation point P 0  &#39;, an extrapolated point, is determined by an arithmetic operation at a position on the extension of the line adjacent to the selected point P 1  &#39; and spaced from the latter by a predetermined distance l.sub. 1. 
     Similarly, the point P 6  &#39; is selected as the selected point and an arithmetic operation point P 7  &#39;, an extrapolated point, is determined on the extension of the line interconnecting the selected point P 6  &#39; and the adjacent point P 5  &#39; at a distance of l 2  from the selected point P 6  &#39;. 
     The path control object portion e.g., a robot manipulator, is controlled in such a manner as to connect the arithmetic operation points P 0  &#39;, P 7  &#39; and the detection points P 1  &#39; to P 6  &#39; to pass successively the points P 0  &#39;, P 1  &#39;, P 2  &#39;, b, P 3  &#39;, P 4  &#39;, c, P 5  &#39;, P 6  &#39; and P 7  &#39; while making a linear interpolation. 
     This control can be achieved, for example, by the apparatus shown in FIGS. 3 and 4. FIG. 3 shows the mechanical portion of a robot. The robot has a base 1 and a rotary table 2 around which provided are teeth 3. A pinion gear 5 is directly connected to the shaft of an electric motor 4 mounted on the base 1. The pinion gear 5 meshes with a teeth 3 so that the rotary table 2 may be rotated around a vertical axis in the direction θ indicated by an arrow. A first arm 6 is pivotally secured to the rotatable table 2 by means of a pin which is not shown. A hydraulic actuator 7 has a head 8 which is pivotally connected to the rotary table 2 by means of a pin 9, and a rod 10 which is pivotally connected to the first arm 6 by means of a pin 11. The arrangement is such that the first arm 6 is rotated in the direction of an arrow φ by the hydraulic actuator 7. A second arm 12 is pivotally connected to the first arm 6 by means of a pin which is not shown. 
     The head 14 of an hydraulic actuator 13 is pivotally secured to the first arm 6 by means of a pin 15, while a rod 16 is pivotally connected to the second arm 12 by means of a pin 17. The actuator 13 causes a rotation of the second arm 12 in the direction of an arrow φ. 
     The second arm 12 carries at its end a first oscillation motor 18 which has a horizontal axis of rotation and rotatable in the direction of an arrow α. A second oscillation motor 19 is attached to the first oscillation motor 18. The second oscillation motor 19 has an oscillation shaft which is perpendicular to the oscillation shaft of the first oscillation motor 18, and is adapted to rotate in the direction of an arrow β. 
     A welding torch 20 and a pair of position detection means 21a, 21b are secured to the second oscillation motor 19. The arrangement is such that the detecting directions of the position detection means 21a and 21b are inclined at 45° to the direction of the welding torch 20 and that two position detection means forms an angle of 90° therebetween. 
     Posture detection means 22, 23, 24, 25 and 26 are adapted to detect, respectively, the posture of the rotary table 2 relatively to the base 1, posture of the first arm 6 relatively to the rotary table 2, posture of the second arm 12 relatively to the first arm 2, posture of the first oscillation motor 18 relatively to the second arm 12, and the posture of the second oscillation motor 19 relatively to the first oscillation motor 18. 
     The mechanism of the robot as explained hereinbefore in connection with FIG. 3 is not exclusive and the robot can have various other mechanical construction such as the construction disclosed in a preceding Japanese Patent Application No. 130821/1979. It is also possible to use a robot in which the whole part or a part of the movable portion moves linearly as in the case of the robot shown in Japanese Patent Laid-open No. 124357/1975. 
     FIG. 4 shows an example of the control section of the robot. A teaching box 27 has a first appointing means 28 adapted to appoint the selected point out of the detection points, and a second appointing means 29 adapted to instruct the position between the selected point and the arithmetic operation position. 
     The first appointing means 28 may be a mere push button or a digital switch. If a push button switch is used as the first appointing means, a judgement is made at the setting of each work detection point as to whether the point constitutes a selected point or not. If the point constitutes a selected point, the push button is pressed and then the next work detection position is set. 
     In the case where a digital switch or the like is used, it is possible to appoint the selected point after the completion of setting of all work detection points. 
     The second appointing means 29 may also be composed of a mere push button switch or a digital switch. In case that the distance between the selected point and the arithmetic operating position has to be made variable, it is preferred to use a digital switch. 
     In the case where the distance between the selected point and the arithmetic operation point is fixed, it is possible to integrate the first and second appointing means. A reference numeral 30 designates a memory means for memorizing work detection points, while a numeral 31 denotes an arithmetic operation means. The arithmetic operation means 31 is adapted to read out the content of the memory means 30 and to make the robbot perform the work detecting operation. At the same time, the arithmetic operation means 31 is adapted to detrmine the detection point to which the path control object of the robot, i.e. the end P of the welding torch 20, is to be brought, making use of the outputs from the posture detection means 22 to 26, when a predetermined output conditions of the detection means 21a and 22a are obtained. 
     The arithmetic operation means 31 is adapted to determine by a calculation the extrapolated arithmetic operation point. As stated before, this point is determined, assuming a line interconnecting the selected point appointed by the first appointing means 28 and an adjacent point, on the extensiion of the line adjacent to the selected point and spaced from the latter by a distance instructed by the second appointing means. Thus, the arithmetic operation means 31 operates to make the path control object of the robot move along the line between the arithmetic operation point and the detection point, by suitable controlling the electric motor 4, hydraulic actuators 7, 13, first oscillation motor 18 and the second oscillation motor 19. 
     The apparatus having the construction described heretofore operates in a manner explained hereinunder. Using the teaching box 27, an order is written in the memory means 30 such that the path control object P moves along the arrows f 1  to f 17  FIG. 2 and that the detection of work is made at each point of work detecting operation points P 1  to P 6 . Also, the first appointing means 28 is operated to write in the memory means 30 that the detection points P 1  &#39; and P 6  &#39; detected by the detection operation made at the work detecting operation points P 1  and P 6  are the selected points. In addition, the second appointing means 29 is operated to write the distances l 1  and l 2  between the selected points and respective arithmetic operating points P 0  &#39; and P 7  &#39;. 
     As the plates W 1  and W 2  are brought to the predetermined positions, the arithmetic operation means 31 reads out the informations concerning the work detecting operation from the memory means 30, and operates to move the path control object P along the arrow f 1  to f 17 . At this time, the position detection means 21a opposes to the inner surface of the plate W 2 , while the detection means 21b opposes to the surface of the plate W 1 . 
     Then, as the output from the position detection means 21a, 21b take predetermined values at each work detecting operation point P 1  to P 6 , the arithmetic operation means 31 reads the outputs from the posture detecting means θn, φn, ψn, αn and βn. Using these values, the values Xn, Yn and Zn of the detection points P 1  &#39; to P 6  &#39; are determined in a rectangular coordinates in accordance with the following equation (1). ##EQU1## 
     In the equation (1) above, the coefficients α 11  to α 55  are determined by the construction of the mechanical portion of the apparatus shown in FIG. 3. 
     The values (X 1 , Y 1 , Z 1 ) to (X 6 , Y 6 , Z 6 ) of the points P 1  to P 6  on the rectangular coordinates are thus determined. These values are written in the memory means 30. 
     The lines passing the points P n  and P n-1  can be given by the following equations (2) and (3) ##EQU2## 
     From these equations, the equations of the lines between the detection points P 1  &#39; and P 2  &#39;, between P 3  &#39; and P 4  &#39; and between P 5  &#39; and P 6  &#39; are determined by the operation of the arithmetic operation means 31. Then, the values (Xb, Yb, Zb) of the point b on the rectangular cordinates are determined by solving simultaneous equations, i.e. the equation of the line interconnecting the detection points P 1  &#39; and P 2  &#39; and the equation of the line interconnecting the detection points P 3  &#39; and P 4  &#39;. Similarly, the values (Xc, Yc, Zc) of the point c on the rectangular coordinates are determined by solving the simultaneous equations, i.e. the equation of the line interconnecting the detection points P 3  &#39; and P 4  &#39; and the equation of the line interconnecting the detection points P 5  &#39; and P 6  &#39;. 
     In some cases, there are differences between the values Xb, Xc obtained through simultaneous equations derived from the equation (2) and the values Xb, Xc obtained through simultaneous equations derived from the equation (3). These differences, however, are negligibly small and there is no problem in selectively using one of these values. 
     In the case where the axes X, Y and Z of the coordinates are determined as shown by arrows in FIG. 2 while the plate W 1  is placed horizontally, the value of Z can be regarded as being constant. In this case, therefore, it is not necessary to effect the calculation of equation (3). 
     The values of detection points P 1  &#39; to P 6  &#39; and the points b and c on the rectangular coordinates are determined as described above. Then, the values of the arithmetic operation points P 0  &#39; and P 7  &#39; on the rectangular coordinates are determined in a manner explained hereinunder. 
     Generally, the coordinates values (X n+1 , Y n+1 ) spaced by a distance l from a point (X n , Y n ) on a line y=ax+b is expressed by the following equations. 
     
         X.sub.n+1 =X.sub.n +l cos γ                          (4) 
    
     
         Y.sub.n+1 =Y.sub.n +l sin γ                          (5) 
    
     where, γ=tan -1  a 
     Similarly, the coordinates values (X n+1 , Z n+1 ) of the point spaced by the distance from a point (X n , Y n ) on a line z=a&#39;x+b&#39; are given as follows. 
     
         X.sub.n+1 =X.sub.n +l cos σ                          (6) 
    
     
         Z.sub.n+1 =Z.sub.n +l sin σ                          (7) 
    
     where, σ=tan -1  a&#39; 
     The coordinates values of the arithmetic operation points P 0  &#39; and P 7  &#39; are calculated by the arithmetic operation means 31 from the equations (4), (5), (7) or the equations (4), (6), (7). 
     The coordinates values of the arithmetic operation points P 0  &#39;, P 7  &#39;, as well as those of the detection points P 1  &#39; to P 6  &#39; and the points b and c are thus determined. Then, calculations are made by the arithmetic operation means 31 to make interpolation between adjacent points P 0  &#39;-P 1  &#39;-P 2  &#39;-b, b-P 3  &#39;-P 4  &#39;-c, c-P 5  &#39;-P 6  &#39;-P 7  &#39;, and the electric motor 7, hydraulic actuators 7, 13, first oscillation motor 18 and the second oscillation motor 19 are controlled in accordance with the calculation result. 
     As will be seen from the foregoing description, according to the invention, in the case where the position a portion of the work cannot be detected due to a fluctuation in the shape of the work or a deviation of the work position in relation to the robot, such a position is determined by a calculation and such a portion can be processed by a linear interpolation. 
     Accordingly, it is possible to broaden the range of work which can be conducted by the robot. 
     Referring now to FIG. 5 showing another embodiment of the invention, after setting the work detecting operation positions P 1  to P 6  &#39; the position detection means is moved by means of the robot along the arrows f 1  to f 17  and the position detecting operation is made at each of the points P 1  to P 6 . At each time of the detecting operation, the position detection means is operated to determine the position which is to be passed by the path control object of the robot or the point at which the same is to be stopped, i.e. the future detection points, P 1  &#39; to P 6  &#39;. Out of these detection points P 1  &#39; to P 6  &#39;, the point P 1  &#39; is picked up as the selected point. Then, the position detection means is moved on the extension of the line interconnecting the selected point P 1  &#39; and the adjacent point P 2  &#39; and a point P 0  &#39; is detected as the point of an abrupt output change. Namely, the output of the position detection means is abruptly changed at the point P 0  &#39; because the positional relationship between the position detection means and the work W 2  is abruptly changed at this position. Similarly, the point P 6  &#39; is picked up as the selected point and the position detection means is moved along the extension of the line interconnecting the selected point P 6  &#39; and the adjacent point P 5  &#39;, and a point P 7  &#39; is detected as the point of abrupt output change. The path control object is controlled to interconnect the points P 0  &#39;, P 7  &#39; of abrupt output change and the detection points P 1  &#39; to P 6  &#39;, passing the points P 0  &#39;, P 1  &#39;, P 2  &#39;, b, P 3  &#39;, P 4  &#39;, c, P 5  &#39;, P 6  &#39;, P 7  &#39; while making linear interpolation in each region between adjacent points. 
     This controlling method can be performed, for example, by an apparatus as shown in FIGS. 3 to 6. FIG. 6 shows an example of the control section of such an apparatus. Namely, the control section has a teaching box 27 which includes a selected point appointing means adapted to appoint the selected point out of a plurality of detection points. 
     The selected point appointing means 28 may be a mere push button or may be a device like a digital switch. When a push button is used as the appointing means 28, at the time of setting of each detection point, a judgement is made as to whether the point constitutes a selected point and, if the point constitutes a selected point, the push button is pressed before the setting of the next work position detection point. 
     A reference numeral 30 designates a memory means adapted to memorize the work detection points, while a reference numeral 31 designates an operation controlling means. 
     The operation controlling means 31 is adapted to read out the content of the memory means 30 thereby to make the robot perform the work detecting operation. The operation controlling means 31 is further adapted to effect such a control as to make the path control object of the robot, i.e. the end P of the welding torch 20 seeks for the expected detection, when the point outputs from the detection means 21a and 21b take predetermined conditions at the time of detection of the work, from the outputs from the posture detection means 22 to 26. 
     The memory means 30 has such a commanding function as to actuate the operation controlling means 31 to operate the electric motor 4, hydraulic actuator 13, first oscillation motor 18 and the second oscillation motor 19, such that the path control object moves between the point of abrupt output change and the detection point, while moving the position detection means along the extension of the line interconnecting the selected point and the adjacent detection point to permit the position detection means finds the point of an abrupt change of the output thereof. 
     The apparatus having the construction explained hereinbefore operates in a manner explained hereinunder. Using the teaching box 27, an instruction is written in the memory means 30 such that the path control object moves along the arrows f 1  to f 17  and that the work detecting operation is performed at each of the work detecting operation points P 1  to P 6 . At the same time, the selected point appointing means 28 is operated to write in the memory means 30 that the detection points P 1  &#39; and P 6  &#39; detected as a result of the detection operation at the work position detecting operation points P 1  and P 6  are the selected points. 
     Then, as the plates W 1  and W 2  are brought to the predetermined position, the operation controlling means 31 reads out the information concerning the work detection from the memory means 30 and drives the path control object P along the arrows f 1  to f 17 . At this time, the position detection means 21 opposes to the inner wall surface of the plate W 2  while the detection means 21b opposes to the surface of the plate W 1 . 
     At each of the work position detecting operation position P 1  to P 6  &#39; as the outputs from the position detection means 21a and 21b take predetermined values, the operation controlling means reads the value of the outputs θ n , φ n , ψ n , α n , β n  from the posture detection means 22 to 26. 
     From these values, the values X n , Y n , Z n  of the points P 1  &#39; to P 6  &#39; on the rectangular coordinates are determined in accordance with the foregoing equation (1). 
     Then the positions of the points b and c are determined in the same manner as that explained in connection with FIG. 2 using equations (2) and (3). 
     The operation controlling means 31 operates the position detection means 21a, 21b while activating the same, along the extension of line interconnecting the selected point P 1  &#39; and the adjacent point P 2  &#39; adjacent to the selected point P 1  &#39;, in accordance with the instruction given by the memory means 30. Then, as the position detection means 21a and 21b are moved to the points a, the outputs from these means are changed abruptly. The point P 0  &#39; of abrupt output change is determined at this moment from the outputs of the posture detection means 22, 23, 24, 25 and 26. 
     Similarly, while activating the position detection means 21a, 21b, the operation controlling means 31 drives these means along the extension of the line interconnecting the selected point P 6  &#39; and the adjacent point P 5  &#39; adjacent to the selected point P 6  &#39;. Then, as the position detection means 21a, 21b reach the position d, the outputs from these detection means are changed abruptly. The point P 7  &#39; of abrupt output change is determined at this moment from the outputs of the posture detection means 22, 23, 24, 25 and 26. 
     An arithmetic operation for the linear interpolation between the points P 6  &#39; and P 7  &#39; is achieved by the operation controlling means 31, and the electric motor 4, hydraulic actuators 7, 13, first oscillation motor 18 and the second oscillation motor 19 are controlled in accordance with the result of the arithmetic operation. 
     The selected point and the point adjacent to the selected point may be appointed by a device like a push button. However, if the work is simple as in the case of that shown in FIG. 5, it suffices only to write in the memory device that the first and the last points are the selected points. In the case of a work as shown in FIG. 5 in which the first and the last points constitute the selected points, each selected point has only one adjacent point, so that the memory means stores such an information that the second point from the beginning and the second point from the last constitute the adjacent points. Instead of moving the sensor along the extension of the line interconnecting the selected point and the adjacent point adjacent to the selected point, it is possible to move the sensor along an arcuate extension adjacent to the selected point of an arc inter connecting three points including the selected point, the point adjacent to the selected point and another point next to the adjacent point. 
     The memory means 30, operation controlling means 31 and other associated means incorporated in the apparatus of the invention can be substituted by a microcomputer.