METHOD OF DETECTING AND CONTROLLING WORK START POINT OF ROBOT

Abstract: Disclosed is a method of detecting and controlling a work start point of a robot of the preprogrammed control type hav­ ing the interpolating function and responding function to a position sensor, whereby a work tool attached to the robot wrist is accurately positioned to the work start point of a work­ piece. The method comprises the following steps. A shadow (17) of the work tool (11) is produced by the illumination source (16). The work line (4′) of the workpiece, working tool, and shadow thereof are image-recognized by a visual sensor (14). The visual sensor generates the position correcting signals along the first and second correcting directions on the basis of the image recognized. The edge of the work tool is moved along the first correcting direction in response to the position correcting signal so as to reduce the distance be­ tween the work line (4′) and the edge of the work tool (11) on the image recognized. The edge of the work tool (11) is moved along the second correcting direction in response to the posi­ tion correcting signal so as to reduce the distance between the work tool edge and the edge of the shadow (17) of the work tool on the image recognized. The operations to move the work tool edge in the first and second correcting directions are repeated until the work line, the work tool edge, and the edge of the shadow thereof all coincide on the image recognized.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to a method of detecting and controlling a work start point of a robot having an interpolating function and a response function to a position sensor. Description of the Related Art In teaching playback type robots, a workpiece must be positioned with a high degree of accuracy so that the locus of the edge of the robot end effector as programmed coincides with the work line of a workpiece. When there is a variation in dimensional accuracy of the workpiece itself or when the workpiece is not properly positioned, the robot cannot be worked in accordance with the programmed locus data. To solve this problem, robots equipped with a position error detecting sensor have recently been studied and developed and some of them have already been put into practical use ("Werkstattstechnik, Zeitschrift für Industrielle Fertigung" 74 [1984] December, pages 721-724, article of R. Strauch "Sensorgeführte Industrieroboter-systeme" especially Chapter 2 "Nahtsuchsensor für Lichtbogenschweissroboter" on pages 722-723; "Journal of Physics E Scientific Instruments Volume 16 [1983] November, pages 1081-1085; and EP-A-0108599) As this sensor, various kinds of sensors such as the mechanical type, magnetic type, arc sensor (in which the arc itself is used as an information source), and optical type have been proposed. However, the mechanical type has various drawbacks which are caused because of contact with the workpiece. The magnetic type also has various drawbacks in that the sensor must be arranged near the robot end effector in terms of detection sensitivity. The arc sensor type has the drawback that high precision cannot be obtained due to variations in welding condition and characteristic of the welding arc itself. The optical type, however, is excellent in that the shape of the operating workpiece can be recognized. In the optical type, a system in which an image signal is obtained due to the reflection of an external light emitting source (e.g., laser slit light) can recognize the line of the work point and the operating workpiece. However, this system has the following drawbacks because the work tool and the work line are relatively positioned based on calculation on the assumption that "the relative position of the sensor and working tool never changes". In other words, if the working tool itself deforms or if the play, deformation, or deviation of the mechanism to which the sensor is attached occur, the relative position between the sensor and the work point of the work tool changes, so that they cannot be accurately positioned for the operating work piece. When this point is considered with respect to the production technology, the deviation of the operating workpiece side is equivalent to the deviation of the robot side including the deviation of the sensor as well. An automated system using a position correcting sensor robot which is constructed on the assumption that "all of the robot, sensor, and operating workpiece deviate from the normal positions" is excellent in terms of production technology compared with one using a position correcting sensor robot which is constructed on the assumption that "the relative position between the robot and the sensor never change but the operating workpiece deviate from the normal position". With respect to this viewpoint, it is obvious that a sensor system which directly recognizes the relative position between the working tool and the operating workpiece is far superior to a sensor system which recognizes only the position of the operating work piece due to the reflection of the external light emitting source. SUMMARY OF THE INVENTION It is an object of the present invention to provide a method of detecting and controlling a work start point of a robot whereby a work tool attached to the robot wrist is accurately positioned to the work start point of a workpiece. According to one aspect of the invention, there is provided a method of detecting a work start point of a robot of the teaching playback control type having an interpolating function and in which a work tool is attached to an edge of an arm and an illumination source and a visual sensor are provided for the wrist portion of said arm, whereby a plurality Of drive shafts constituting the robot are controlled in response to position correcting signals from said visual sensor, thereby adjusting the position of said tool, said method being characterised by the steps of: (1) producing a shadow of said tool by said illumination source; (2) image-recognizing a work line of a workpiece, said tool, and the shadow of said tool by said visual sensor; (3) generating said position correcting sigals along first and second correcting directions from said visual sensor on the basis of said image recognition by the visual sensor; (4) moving the edge of said tool along said first correcting direction in response to said position correcting signal in order to reduce the distance between said work line and the edge of said tool on said recognized image; (5) moving the edge of said tool along said second correcting direction in response to said position correcting signal in order to reduce the distance between the edge of the tool and the edge of the shadow of the tool on said recognized image; and (6) repeating said steps (3), (4) and (5) until said work line, the edge of said work tool, and the edge of the shadow of the work tool all coincide on said recognized image. There may be provided the additional step of: (7) repeating steps (3), (4) and (5) until the visual sensor detects a sharp bend in a point of the work line on the image recognized while tracing an extension of a straight line connecting a point which a taught work end point is displaced by the deviation vector between the coincident point derived in the step (6) and the taught work start point to the coincident point in the direction opposite the taught work direction. According to another aspect of the invention, there is provided a method of detecting a work start point of a robot of the teaching playback control type having an interpolating function and in which a working tool is attached to an edge of an arm and an illumination source and a visual sensor are provided for the wrist portion of said arm, whereby a plurality of drive shafts constituting the robot are controlled in response to position correcting signals from said visual sensor, thereby adjusting the position of said working tool, said method being characterised by the steps of: (1) producing a shadow of said work tool by said illumination source; (2) image-recognizing a work line of a work, said work tool, and the shadow of said work tool by said visual sensor; (3) generating said position correcting signals along first and second correcting directions from said visual sensor on the basis of said image recognized by the visual sensor; (4) moving the edge of said work tool along said first correcting direction in response to said position correcting signal until said work line and the edge of said work tool coincide on said recognized image; and (5) moving the edge of the work tool along said second correcting direction in response to said position correcting signal until the edge of said work tool and the edge of the shadow of the work tool coincide on said recognized image and, at the same time, correcting the position of the edge of the work tool along said first correcting direction in order to reduce the displacement between said work line and the edge of said work tool on said image. The above and other objects, features, and advantages of the present invention will be more apparent from the following detailed description in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram of an example of a lap joint showing a situation in which the welding start point is deviated due to the deviation of a work piece; Fig. 2 is a diagram showing a situation in which a welding torch is located at a welding start point 3 taught in Fig. 1; Figs. 3A to 3G are diagrammatical views when a video signal output of a camera is observed by a TV monitor 20 in the case where a work piece is variably deviated three-dimensionally; Fig. 4 is a diagram explaining the fundamental concept of the image processing method in an image processor 21; Fig. 5 is a control block diagram of a robot equipped with a sensor; Fig. 6 is a diagram showing the vertical and horizontal movements in vertical cross section in the welding direction of a welding torch; Figs. 7A and 7B are diagrams explaining the control method from the state of Fig. 3F to the state of Fig. 3G. Figs. 8A and 8B are diagrams explaining a method of recognizing an image at a welding start point 3' from a binarized image 3'' at the welding start points 3'; and Fig. 9 is a diagram corresponding to Fig. 2 in the case where a plurality of welding start points exist. DESCRIPTION OF THE PREFERRED EMBODIMENT An embodiment of the present invention will now be described with reference to the drawings. An example of a welding torch will be described in detail hereinbelow as one of working tools. However, a sizing gun, deburring tool, screw fastening tool, clamping hand, or other device can also be used in place of the welding torch for this invention. Therefore, it should be noted that the invention is not limited to welding application welding. Fig. 1 is a diagram of an example of a lap joint showing a situation in which a welding start point is displaced due to a displacement of a work piece. In the diagram, 2 denotes a taught work position; 2' an actual work position; 3 a taught welding start point; 4 a taught welding line; 3' an actual welding start point; 4' an actual welding line; 5 and 5' lower plates constituting a lap joint; 6 and 6' upper plates of the lap joint; 7 and 7' arrows indicating of the welding directions; and 8 and 8' welding end points. Fig. 2 is a diagram when the welding torch is located at the taught welding start point 3. In the diagram, 10 denotes a welding torch; 11 a wire electrode; 12 the wrist of the robot; 13 the upper arm of the robot; 14 a two-dimensional camera; 15 a cable through which a video signal (i.e., image pickup signal) of the camera is transmitted; 16 an illumination source (e.g., halogen lamp); 17 the shadow of the wire electrode 11; 18 a camera controller; 20 a monitor television; and 21 an image processor. The illumination source 16 is provided to allow the shadow 17 of the wire electrode 11 to be invariably produced without being influenced by the ambient light. The two-dimensional camera 14 serves to recognize the welding line and the relation of the relative position between the wire electrode 11 and the shadow 17 thereof. Figs. 3A to 3G are diagrammatical views when a video signal output of the camera is observed by the monitor television 20 in the case where a workpiece is three-dimensionally displaced from the taught position. These diagram illustrate the deviations of the welding start point 3' at the actual position of the workpiece when it is seen from the welding start point 3 of the taught work position 2. In Figs. 3A to 3G, it is assumed the the edge of the wire electrode 11 is located at the taught welding start point 3. In the following description, the horizontal direction denotes the lateral direction when the workpiece in Fig. 2 is seen from the left. Fig. 3A shows the state in which the welding start point 3' is displaced, for example, downward to the left as seen from the side of the welding start point 3 (this state corresponds to the state shown in Fig. 2). Fig. 3B shows the state in which the welding start point 3' is displaced to the left side and, at the same time, the edge of the wire electrode 11 comes into contact with the upper surface of the lower plate 5' of the work piece. Fig. 3C shows the state in which the welding start point 3' is displaced, for example, downward to the right as seen from the side of the welding start point 3 and corresponds to the case where the edge of the wire electrode 11 is located over the upper plate 6' in Fig. 2. Fig. 3D shows the state in which the welding start point 3' is displaced to the right and at the same time, the edge of the wire electrode 11 comes into contact with the upper surface of the upper plate 6' of the work piece. Fig. 3E shows the state in which the welding start point 3' is located below the welding start point 3, although there is no displacement in the horizontal direction between the edge of the wire electrode 11 and the welding line 4 in the image detected by the image sensor. Fig. 3F shows the state in which the welding start point 3 does not coincide with the welding start point 3', although there is no displacement in the horizontal direction between the edge of the wire electrode 11 and the welding line 4' and at the same time, the edge of the wire electrode 11 also coincides with the edge of the shadow thereof. Fig. 3G shows the state in which there is no displacement in the horizontal direction between the edge of the wire electrode 11 and the welding line 4' and the edge of the wire electrode 11 coincides with the edge of the shadow thereof and, at the same time, the welding start point 3 coincides with the welding starting point 3'. The present invention intends to provide a method of detecting and controlling the work start point of a robot which performs, for example,welding operations. Fig. 4 is a diagram explaining the fundamental concept of the image processing method in the image processor 21. In the diagram, 40 denotes a frame memory of the binary video signal; 41 is a window to recognize the image of a wire electrode signal 11''; 42 a window to recognize a shadow signal 17''; 43 a window to recognize a welding line signal 4'; 44 an axial line of th wire electrode signal 11''; 44'' an edge of the axial line 44; 45 an axial line of the shadow signal 17''; and 45'' an edge of the axial line 45. The windows 41, 42, and 43 are set by the operator while observing the TV monitor 20 when the locus data is taught (the welding start point 3 and welding line 4 at the work position 2 in Fig. 1 are taught) based on variations in operating workpieces, i.e., variations in welding line 4'. The windows 41 to 43 are set such that even if there are variations in workpieces as well, the workpieces exist in the windows 41, 42 and 43. Fig. 5 is a control block diagram of a robot equipped with a sensor. 50 denotes a welding start point search command signal which is generated as a result of the image processing by the image processor 21; 51 is a robot control unit; 52 to 54 conventional position servo circuit of three fundamental axes (not shown) of the robot; 55 and 56 conventionalposition servo circuits of two axes (not shown) of the robot wrist; 57 to 61 command pulses to the position servo circuits 52 to 56 of the respective axes; 611, 621, 631, 641, and 651 error counters; 612, 622, 632, 642 and 652 digital-to-analog (D/A) converters; 613 623, 633, 643, and 653 servo amplifiers; 614, 624, 634, 644, and 654 drive shaft motors; 615 625, 635, 645, and 655 tachogenerators to compensate the speed loop and 616, 626, 636, 646, and 656 pusle genertors to detect the positions of the respective axes. The respective axial position servo circuits 52 to 56 store the differences between the command pulses 57 to 61 and the feedback pulses from the pulse generators 616, 626, 636, 646, and 656 into the error counters 611, 621, 631, 641, and 651. Outputs of these error counters and D/A converted to the analog signals by the A/D converters 612, 622, 632, 642, and 652. The differences between the analog speed command signals as outputs of these D/A converters and the speed feedback signals from the tachogenerators 615, 625, 635, 645, and 655 are compensated and amplified by the servo amplifiers 613, 623, 633, 643, 653, thereby driving and controlling the motors 614, 624, 634, 644, and 654. As described above, the servo control is performed in a conventional manner. Due to this position servo control, the edge of the wire electrode 11 attached to the edge of the welding torch 10 attached to the robot wrist 12 is controlled so as to follow in accordance with the command pulse. The robot control unit 51 has the well-known linear interpolating function, disclosed in EP-A-60563 entitled "Control Unit of Industrial Robot of the Joint Type" filed on March 18, 1981 by the same applicant as in the present invention. The robot control unit 51 also has the moving function set forth in EP-A-76498 entitled "Control System of Welding Robot" filed on October 7, 1981 by the same applicant as the present invention. The moving function is called the shifting function to move the robot in a predetermined second correcting direction, e.g., wire electrode direction (vertical direction) and in a predetermined first correcting direction, e.g., (horizontal) direction perpendicular to the wire electrode direction due to the control of the three fundamental axes of the robot. In other words, due to the control of the robot axes, the edge of the wire electrode 11 can move at a desired speed on the straight line connecting the welding start point 3 and the welding end point 8 shown in Fig. 1. The robot control unit 51 further has the function that the edge of the wire electrode 11 can be shifted in accordance with the commands of the sensor by controlling the three fundamental axes of the robot in response to the sensor commands in the vertical and horizontal directions in the vertical cross sectional area in the welding direction shown in Fig. 6. When the edge 44'' of the axial line of the wire electrode signal described in Fig. 4 does not coincide with the edge 45'' of the axial line of the shadow signal 17'', the image processor 21 generates, for example, a "down" direction signal as the welding start point search command signal 50 in the case of Figs. 3A, 3C, 3E, and 4. When the edge 44'' of the axial line is not located on the welding line signal 4'', the image processor 21 generates either "left" or a "right" direction signal as the search command signal 50. The image processor 21 generates the "left" signal in the case of Figs. 3A, 3B, and 4 and the "right" signal in the case of Figs. 3C and 3D. The image processor 21 sequentially receives the video signal from the camera 14 and executes the image processes and sequentially transmits the "left", "right", "up", and "down" signals to the robot control unit 51. the control unit 51 drives three fundamental axes of the robot to perform the shifting operations each time the control unit 51 receives the signal 50. Due to the above controls, the states shown in Figs. 3A to 3E become the state of Fig. 3F. The above description relates to the case where the edge of the wire electrode 11 is alternately moved in the first correcting direction (horizontal direction) and the second correcting direction (vertical direction). However, the edge of the wire electrode 11 may be controlled in the following manner. The movement of the wire electrode edge in the second correcting direction is stopped and the edge is moved in the first correcting direction until the edge of the wire electrode 11 coincides with the welding line 4' on the image. The wire electrode edge is then moved in the second correcting direction until it coincides with the edge of the shadow of the wire electrode 11 on the image. At the same time, the position of the edge of the wire electrode 11 is corrected along the first correcting direction in order to reduce the displacement between the welding line on the image and the edge of the wire electrode 11. In place of this method, the following method may be also used. (1) The edge of the wire electrode 11 is moved along the first correcting direction until the welding line 4' coincides with the edge of the wire electrode 11 on the image. (2) The edge of the wire electrode 11 is moved along the second correcting direction by a predetermined amount in order to reduce the distance between the wire electrode edge and the edge of the shadow of the wire electrode 11 on the image. (3) The above steps (1) and (2) are repeated until all of the welding line 4', edge of the wire electrode 11, and edge of the shadow of the wire electrode 11 coincide on the image. The control from the state of Fig. 3F to the state of Fig. 3G will next be described. Fig. 7A is a diagram explaining this control. Fig. 7B is an enlarged diagram of portion A in Fig. 7A. First, the edge of the wire electrode 11 which exists at the point 3 is moved to a point 9' on the welding line 4' due to the above operation (this state corresponds to Fig. 3F). The coordinate data P₃ (x₃, y₃, z₃) and P₈ (x₈, y₈, z₈) of the operation orthogonal system of the welding start point 3 and welding end point 8 which were taught are calculated in advance. When the robot control unit 51 receives an "(f) state" signal (not shown) from the image processor 21, the coordinate data P₉' (x₉', y₉, z₉') in the operation orthogonal system of the point of the edge of the wire electrode 11 corresponding to the image point 9'' in Fig. 3 is calculated from the current values of the respective axes of the robot at this time. The coordinates P₈''' (x₈''', y₈''', z₈''') of a point 8''' of which the deviation vector Δ of P₉' (x₉', y₉', z₉') and P₃(x₃, y₃, z₃) was added to P₈(x₈, y₈, z₈) are calculated. The elongated line 3''' - 8''' of the straight line connecting the point 8''' and 9' is set to a reference line when moving from the point 9' to the point 3' (from the state of Fig. 3F to the state of Fig. 3G). When the welding start point search command signal 50 is not given from the image processor 21 at the point 9', the wire electrode 11 is moved along the straight line 8''' 3'''. This movement is carried out according to a conventional linear interpolating method in the manner as described in e.g., Japanese Patent Application No. 38872/1981. As shown in the enlarged diagram of Fig. 7B, when the edge of the wire electrode 11 advances to the point 9'', this edge does not exist on the welding line 4'. Thus, the signal 50 which is sampling image processed on an intermittent basis is generated in order to represent any one of the states of Figs. 3A to 3E. The robot control unit 51 receives the signal 50 and controls the three fundamental axes of the robot in the manner described above, thereby shifting the edge of the wire electrode 11 onto a point 9'''. Thereafter, the control unit 51 controls the three fundamental axes of the robot so that the edge of the wire electrode 11 moves in a straight line which is parallel to the straight line 8''' 3''' until the next signal 50 is given. The control in this parallel moving mode has been disclosed in detail as the well-known technology in Japanese Patent Application No. 158627/1981. When the edge of the wire electrode 11 reaches a point 9'''', a shifting operation similar to the above is executed on the basis of the signal 50. Therefore, by repeating these operations, the wire electrode edge reaches the point 3'. In this way, the operation to detect the welding start point is completed. Figs. 8A and 8B are diagrams explaining a method whereby the image at the welding start point 3' is recognized from a binary image 3'' at the welding start point 3'. In association with the movement of the edge of the wire electrode 11 from the point 9' to the point 3' described with reference to Fgis. 7A and 7B, a camera 14 also moves along the welding lines 4', wherein the camera 14 is fixed to the robot wrist 12 in order to have a predetermined geometrical relation with regard to the wire electrode 11 as shown in Fig. 2. Therefore, the window 43, which has already been described in Fig. 4, also moves along the welding line 4', i.e., from 4'' to 3'' on the screen. When the window 43 moves from the state of Fig. 8A to the area including the point 3'' as shown in Fig. 8B, the point at which the image line connecting with the point 4'' suddenly changes can be recognized as the welding start point 3'', i.e., point 3'. The edge of the wire electrode 11 is positioned at the welding start point 3' derived in this manner and thereafter actual welding is started along the welding line (3' 8'). In execution of actual welding along a locus, two methods can be considered. (1) The first method: A reverse straight line locus from 9' to 3' is stored in advance in a memory (not shown) and the welding locus is obtained according to the linear interpolating method on the assumption that the welding end point 8' exists on the elongated line of the welding line 3' 9'. (2) The second method: Copy welding is executed from the welding start point 3' by use of a sensor. However, since these welding methods are not directly related to the feature of the present invention, their descriptions are omitted in this specification. The deviation of the workpiece is exaggeratedly and enlargedly illustrated in Figs. 1, 2, 7A, and 7B compared to the actual displacement of the workpiece for convenience of explanation. However, the actual displacement is at most a few millimeters. Therefore, there is no need to consciously distinguish the point 9' from the point 3'. In this case, the movement of the wire electrode edge from the state of Fig. 3F to the state of Fig. 3G becomes unnecessary and the point 9' may be set at the welding start point and the operations described with reference to Figs. 7A, 7B, 8B, and 8B may be omitted as well. It should be noted that even if the workpiece is not deviated, and even when the relative position between the camera 14 and the wire electrode 11 is displaced due to certain causes (for example, due to the play of the attaching mechanism around the robot wrist in Fig. 2, and other movement) as well, it is possible to execute a series of correct control operations to the states of Figs. 3F and 3G described with reference to Figs. 3A to 3G as long as the lines 44, 45, and 4'' exist in the each of set windows. In other words, it is a typical feature of this invention that even when the workpiece is deviated or the relative position between the sensor and the robot is deviated as well, the edge of the wire electrode 11 can be positioned at the welding start point 3'. It should be noted that the camera 14 is obliquely arranged in front of the wire electrode 11 and the welding line 4' and, that strictly speaking, it generates none of the "up", "down", "left", and "right" signals in the cross sectional area which is perpendicualr to the welding line direction 7' described in fig. 6. The video signals 4'', 11'', and 17'' correspond to the images projected onto the camera surface of the actual welding line 4', actual wire electrode 11, and actual shadow 17, so that these video signals are reduced by only the amounts of sine or cosine of the angles between the camera surface and the actual welding line 4', actual wire electrode 11, and actual shadow 17, respectively. However, this reduction results in the problem of the sensitivity of the sensor and only the sizes and values of the dimensions of the projected image of the actual welding line 4', actual wire electrode 11, and actual shadow 17 change. If the resolutions of the camera sensors in the "left", "right", "up", and "down" directions are better than the necessary positioning accuracies of the robot, the camera sensor will not erroneously detect. In other words, if the camera sensor has the resolutions which are enough to correctly recognize the states shown in Figs. 3A to 3G, there is no need to execute the correcting calculations of the angles between the camera surface and the actual welding line 4', wire electrode 11, and shadow 17 thereof. If this condition is satisfied, by use of the well-known technology of "Control System for a Robot which can Follow in response to "Left", "Right", "Up", and "Down" Direction Commands which are Generated from a Sensor" disclosed in detail in Japanese Patent Application NO. 158627/1981, the robot drive shafts are controlled in a zero-method manner in response to commands from the camera sensor and the edge of the wire electrode 11 can be positioned on a desired welding line 4'. An explanation was made above with respect to the shape of the workpiece in Fig. 1 in conjunction with the arrangement of the equipment shown in Fig. 2. The case in which a plurality of welding start points exist will next be described. Fig. 9 shows an example of a workpiece set at an instructed work position 101. In the diagram, 103A and 103B denote welding start points; 104A and 104B are welding lines; 105 a lower plate to which welding lines are formed; 106A and 106B upper plates or upper base materials; 107A and 107B arrows indicating of the welding directions; 108A and 108B welding end points; and 110 a rotating motor (hereinafter referred to as an R axis or R axis data) to rotate the camera 14 around the robot wrist as a rotational center and a position detector. The welding directions 107A and 107B are substantially opposite directions. The camera 14 observes the welding lines 104A and 104B, wire electrode 11, and shadow 17 thereof from the oblique forward direction of the welding line direction. Therefore, as for the positional relation of the camera 14, the camera 14 is rotated by almost 180° by the R axis motor 110 from the welding start point 103A to the welding start point 103B. Since the welding line 104A is constituted by an arc-like curve, the positioning operations of the wire electrode 11 to the welding start points 103A and 103B can be executed in substantially the same manner as described above except that the parallel moving mode during locus motion which is equivalent to the locus motion from the point 9' to the point 3' described in Figs. 7A and 7B is carried out on the basis of the arc interpolation instead of the straight line. When instructing, the operator determines the operations to set the angle of rotation of the R axis and to set the windows based on variations in the work piece while observing the TV monitor 20. When the R axis is driven, the video signals 4'', 11'', and 17'' in Fig. 4 rotate. The windows 41 to 43 are decided based on variations of the video signals 4'', 11'', and 17'' after rotaion. The taught values of the windows 41, 42, and 43 shown in Fig. 4 near the welding start points 103A and 103B are stored into a RAM memory of the image processor 21 as the coordinate values based on the camera coordinate system (not shown in this specification). Upon playback, these coordinate data are read out of the RAM memory corresponding to the taught welding start points 103A and 103B. The actual video signals 4'', 44'', and 45'' in the windows 41 to 43, respectively, are image processed and recognized. To further make the instructing operation by the operator easy, there is also considered method whereby the operator merely instructs only the position of the R axis near each welding start point in such a manner that the welding line signal 4, wire electrode signal 11'', and shadow signal 17'' thereof properly exist in the frame memory 40 while observing the TV monitor 20. In this case, a function to automatically produce the windows 41 to 43 is needed. Since the illumination source 16 is directly coupled with the R axis as shown in Fig. 9, the illuminating direction does not change according to the rotation of the R axis. Therefore, it is necessary to calculate the positions of the video signals 4'', 11'', and 17'' in the frame memory 40 due to the driving of the R axis on the basis of the geometrical relation among the optical axix of the camera coupled to the R axis, direction of the torch axial line coupled to the robot wrist 12 (i.e., the direction of the wire electrode 11), and work surface onto which the shadow of the wire electrode is produced and to calculate the windows 41 to 43 having allowable variation widths. Since these calculations can be performed by use of conventional mathematical techniques, only the idea thereof is mentioned here and its detailed description is omitted in this specification. When the R axis is necessary, it is sufficient to merely add an R axis position servo circuit having the same constitution as the five axes of the robot to the constitution shown in Fig. 5 as a control circuit of the R axis. If there is a limitation in the R axis operating range and the shadow signal 17'' is not produced at the proper location in the frame memory 40 because of the problem of interference between the camera and the workpiece, the wire electrode can be led to the welding start point by use of well-known technology(e.g., Japanese Patent Laid-opn Publication NO. 22488/1980) in which the control of the "left" and "right" directions (i.e., position matching control between 44'' and 4'' in Fig. 4) is carried out in a manner similar to the above and the control in the "up" and "down" directions is executed according due to the contact between the wire electrode 11 and the base material. The present invention has been described above with respect to the camera as an example. However, the invention can be also obviously applied to a system in which a small-size and light-weight visual such as a fiberscope is attached to the robot wrist and an image pickup signal at the edge of the fiberscope is transmitted to a camera arranged at a remote position (e.g., to the upper arm of the robot). As will be readily understood from the above description, according to the invention, even if the operating workpiece is displaced or when the robot wrist side is displaced as well, the relative position between the work point of the working tool and the work start point of the workpiece can be matched. Consequently, strict management of the accuracies of workpieces and strict management of the positions when working tools are exchanged become unnecessary and the work operation can be simplified.

Claims: A method of detecting a work start point of a robot of the teaching playback control type having an interpolating function and in which a work tool is attached to an edge of an arm and an illumination source and a visual sensor are provided for the wrist portion of said arm, whereby a plurality of drive shafts constituting the robot are controlled in response to position correcting signals from said visual sensor, thereby adjusting the position of said tool, said method being characterised by the steps of: (1) producing a shadow of said tool by said illumination source; (2) image-recognizing a work line of a workpiece, said tool, and the shadow of said tool by said visual sensor; (3) generating said position correcting signals along first and second correcting directions from said visual sensor on the basis of said image recognition by the visual sensor; (4) moving the edge of said tool along said first correcting direction in response to said position correcting signal in order to reduce the distance between said work line and the edge of said tool on said recognized image; (5) moving the edge of said tool along said second correcting direction in response to said position correcting signal in order to reduce the distance between the edge of the tool and the edge of the shadow of the tool on said recognized image; and (6) repeating said steps (3), (4) and (5) until said work line, the edge of said work tool, and the edge of the shadow of the work tool all coincide on said recognized image. A method as claimed in claim 1, characterised by the additional step of: (7) repeating said steps (3), (4) and (5) until said visual sensor detects a sharp bend in a point of the work line on said image recognized while tracing an extension of a straight line connecting a point at which the taught work end point is displaced by the vector between the coincident point derived in said step (6) and the taught work start point to said coincident point in the direction opposite to the taught work direction. A method of detecting a work start point of a robot of the teaching playback control type having an interpolating function in which a working tool is attached to an edge of an arm and an illumination source and a visual sensor are provided for the wrist portion of said arm, whereby a plurality of drive shafts constituting the robot are controlled in response to position correcting signals from said visual sensor, thereby adjusting the position of said working tool, said method being characterised by the steps of: (1) producing a shadow of said work tool by said illumination source; (2) image-recognizing a work line of a work, said work tool, and the shadow of said work tool by said visual sensor; (3) generating said position correcting signals along first and second correcting directions from said visual sensor on the basis of said image recognized by the visual sensor; (4) moving the edge of said work tool along said first correcting direction in response to said position correcting signal until said work line and the edge of said work tool coincide on said recognized image; and (5) moving the edge of the work tool along said second correcting direction in response to said position correcting signal until the edge of said work tool and the edge of the shadow of the work tool coincide on said recognized image and, at the same time, correcting the position of the edge of the work tool along said first correcting direction in order to reduce the displacement between said work line and the edge of said work tool on said image. A method as claimed in claim 3, characterised by the additional step of: (6) repeating said steps (3), (4) and (5) until said visual sensor detects a sharp bend in point of said working line on said recognized image while tracing an extension of a straight line connecting a point which the taught work end point is displaced by deviation vector between the coincident point derived in said step (5) and the taught work start point to said coincident point in the direction opposite to the taught work direction. A method of detecting a work start point of a robot as claimed in claim 1, in which due to problems of interference between the camera and the workpiece, the shadow signal (17'') is not produced at the right location, the method using a contact sensor for generating a contact signal when the edge of said work tool comes into contact with the object to be worked and being characterised by replacing steps (1) to (6) by the steps of: (1') image-recognizing a working line of a work object and said work tool by said visual sensor; (2') generating a position correcting signal along a first correcting direction from said visual sensor on the basis of said image recognized by said visual sensor; (3') moving the edge of said work tool along said first correcting direction in response to said position correcting signal until said work line and the edge of said work tool coincide on said recognized image; (4') moving the edge of the work tool by a predetermined amount along the axial direction of said work tool in the direction such that said contact sensor generates the contact signal; and (5') repeating said steps (2'), (3') and (4') until said working line and the edge of said work tool coincide on said recognized image and a contact signal is generated. A method of detecting a work start point of a robot as claimed in claim 3, in which due to problems of interference between the camera and the workpiece the shadow signal (17'') is not produced at the right location, the method using a contact sensor for generating a contact signal when the edge of the work tool comes into contact with an object to be worked and being characterised by replacing steps (1) to (6) by the steps of: (1'') image-recognizing a working line of said work object worked and said work tool by said visual sensor; (2'') generating said position correcting signal along a first correcting direction from said visual sensor on the basis of said image recognized by said visual sensor; (3'') moving the edge of said work tool along said first correcting direction in response to said position correcting signal until said work line and the edge of said work tool coincide on said recognized image; and (4'') moving the edge of said work tool along the axial direction of the work tool until said contact sensor generates the contact signal and, at the same time, correcting the position of the edge of said work tool along said first correcting direction in order to reduce the displacement between said work line and the edge of the work tool on said image.

Inventors: NIO, SATORU, WAKISAKO, HITOSHI
Applicants: YASKAWA ELECTRIC MFG. CO., LTD.
Application year: 1986
Main classification: G05B19
IPC codes: B25J9, G05B19, B25J13, B25J19