APPARATUS AND METHOD FOR CORRECTING A TRAVELLING ROUTE FOR A ROBOT

Abstract: Apparatus and method for correcting a travelling route for a robot, the method comprising the steps of setting a tool (2) mounted on a leading end of a wrist of a robot (1) at a preset photographing position P1, photographing the front and side of the tool (2) by cameras (41, 42) to thereby obtain three-dimensional configuration data of the tool (2), comparing the three-dimensional configuration data so obtained with standard configuration data to thereby detect a deformed amount of the tool (2), and modifying a traveling route for a robot instructed by a program based on the deformed amount.

Description: The present invention relates to an apparatus and a method for automatically correcting deviation from a taught path due to deformation of a tool mounted on the wrist end of a robot during an operation by means of the robot. In general, a tool that is mounted on the wrist end of a robot for arc welding and sealing has an elongate shape, and is more apt to be bent, even by a light impact, than tools for spot welding and handling. If programs for the robot are executed with the tool bent, naturally, the welding or sealing cannot be effected along a taught path. Conventionally, if the tool is bent during operation, it is replaced in its entirety or corrected to a possible extent, and errors resulting from insufficient correction are adjusted by correcting a programmed path corresponding to the degrees of errors. In order to carry out such repairing operation, however, the working line must be stopped for a long time, and the adjustment requires much time and labor, so that the manufacturing efficiency is lowered. Moreover, the operation is performed along a wrong path without the attendance of an operator, so that defective products may possibly be manufactured. US-A-5,255,199 discloses a compensation system for a computer-controlled machining apparatus, which is in accordance with the preamble of attached claim 1. A programmed movement path for a cutting tool is compensated when it is detected that the cutting edge of the tool has become worn and altered in shape. A two-dimensional image of the actual cutting edge enables the actual size and shape of the cutting edge to be compared with the assumed size and shape of the cutting edge, and for the pre-programmed cutting path to be altered in accordance with variations between the actual and assumed sizes and shapes. The object of the present invention is to provide a tool shape compensating method and apparatus for a robot, in which the shape of a tool mounted on the wrist end of the robot is recognised before starting operation by the robot, whereby any deviation from a taught path attributable to deformation of the tool, can be corrected automatically. According to a first aspect of the present invention there is provided an apparatus for correcting a movement path of a machine tool, comprising: a camera for picking up an image of a tool mounted on the machine tool; an image processing apparatus for obtaining shape data of the tool by processing an image of said tool picked up by said camera; comparing means for comparing the obtained tool shape data with reference tool shape data; and a machine tool control apparatus for correcting a movement path in accordance with the comparison, with the reference tool shape data, of the shape data of the tool obtained by said image processing apparatus, and controlling the machine tool to make it move along the corrected movement path; characterised in that: said machine tool is a robot, said tool is an elongate tool mounted on the wrist end of the robot, and said movement path is a taught path; said image processing apparatus is adapted to obtain three-dimensional shape data of the tool by receiving an image of one side face of the tool picked up by the camera, and an image of another face of the same tool perpendicular to said one side face; and the image processing apparatus is adapted to detect the shape of the tool in terms of the three-dimensional lengths and angles thereof on the basis of said obtained three-dimensional shape data. According to a second aspect of the present invention there is provided a movement path correcting method for a machine tool, comprising steps of: locating a tool mounted on the machine tool, and a camera for picking up an image of said tool, in predetermined relative positions; fetching and processing images through the camera to obtain shape data of the tool from the processed image data; comparing the obtained tool shape data with reference tool shape data to detect deformation of the tool; and correcting a path defined by a program in accordance with the result of the detection; characterised in that: said machine tool is a robot, said tool is an elongate tool mounted on the wrist end of the robot, and said program-defined path is a taught path; said image processing apparatus obtains three-dimensional shape data of the tool by receiving an image of one side face of the tool picked up by the camera, and an image of another face of the same tool perpendicular to said one side face; and the image processing apparatus detects the shape of the tool in terms of the three-dimensional lengths and angles thereof on the basis of said obtained three-dimensional shape data. According to the present invention, having the features described above, the extent of deformation of the tool is detected before the operation by the robot is executed, and the taught path can be automatically corrected depending on the extent of deformation, so that accurate operation can be performed even if there is deformation of the tool. Brief Description of the Drawings FIG. 1 is a block diagram schematically illustrating an apparatus, according to the present invention, for detecting deformation of a tool and correcting a program-taught path in accordance with the extent of the deformation; FIG. 2 is a diagram for illustrating positional relations among the tool in a predetermined photographing position and cameras; FIG. 3 is a diagram showing the hardware configuration of an image processing apparatus constituting the apparatus shown in FIG. 1; FIG. 4 is a diagram showing the hardware configuration of a robot control apparatus constituting the apparatus shown in FIG. 1; FIG. 5 is a flowchart showing processing in the image processing apparatus of FIG. 3; and FIG. 6 is a flowchart showing processing in the robot control apparatus of FIG. 4. Referring first to FIG. 1, an outline of an apparatus for detecting deformation of a tool and correcting a program-taught path in accordance with the extent of the deformation will be described. A robot 1 is fitted with the tool 2 on its arm end. The tool 2 carries out an operation (hereinafter referred to as main operation) such as arc welding for a workpiece 3 (e.g., vehicle body frame). The robot 1 is controlled by means of a robot control apparatus 30. Before the main operation is started, the tool 2 is moved to a predetermined photographing position P1 by the robot control apparatus 30. As a result, the tool 2 is made to take a predetermined posture by which its tool center point is in alignment with the position P1. Two cameras 41 and 42 photograph the tool in the predetermined position P1 and the predetermined posture. One camera 41 photographs the front face of the tool 2, while the other camera 42 photographs a side face of the tool 2. These cameras 41 and 42 photograph the shape of the tool 2 in response to a command from an image processing apparatus 20. This image processing apparatus 20 comprises tool shape recognizing means 5, error value computing means 6, and reference shape data storage means 7. The tool shape recognizing means 5 recognizes the shape of the tool 2 referring to the images picked up by the cameras 4. The error value computing means 6 compares the current tool shape recognized by the tool shape recognizing means 5 and the reference shape data previously stored in the reference shape data storage means 7, and computes a deviation (error value or extent of deformation of the tool) of the current tool shape from the reference shape data. The error value computed by the error value computing means 6 is fed to movement control means 8 in the robot control apparatus 30. On the other hand, the movement control means 8 corrects the programmed path in accordance with the error value data fed from the error value computing means 6, and, in the main operation, controls the movement of the robot 1 according to the corrected path. Referring further to FIG. 2, positional relations among the tool 2 and the cameras 41 and 42 in FIG. 1 will be described. The two cameras 41 and 42 are set in the vicinity of the predetermined photographing position P1, and both face this photographing position P1. The direction in which the one camera 41 faces the photographing position P1 is perpendicular to the direction in which the other camera 42 faces the photographing position P1. If a machine coordinate system having three rectangular axes (X-, Y- and Z- axes) is set in the manner shown in FIG. 2, the one camera 41 is located so that its optical axis extends parallel to the Y-axis, and picks up an image of the front face of the object of photographing (tool 2), that is, an XZ-plane image, while the other camera 42 is located so that its optical axis extends parallel to the X-axis, and picks up an image of the side face of the object of photographing, that is, a YZ-plane image. Thus, image data in two directions are obtained for the object of photographing (tool 2) by means of the two cameras 41 and 42, so that three-dimensional data for the object of photographing can be obtained by synthesizing those image data. Referring to FIG. 3, the hardware configuration of the image processing apparatus 20 will be described. A processor 21 of the image processing apparatus 20 is connected with a ROM 22, RAM 23, nonvolatile memory 24, communication processor 25, image processor 26, frame memory 27, and interfaces (INT) 28 and 29, respectively, through a bus 20a. The ROM 22 is loaded with a basic program for operating the image processing apparatus 20. The RAM 23 stores data for temporary processing and calculation. The nonvolatile memory 24 is composed of a CMOS or the like that is backed up by a power source, and stores data that are expected to be held even after the image processing apparatus 20 is cut off from the power supply. The data to be stored in this nonvolatile memory 24 include reference shape data of the tool 2 in the predetermined photographing position P1 (and therefore, the reference shape data storage means 7 shown in FIG. 1 corresponds specifically to the nonvolatile memory 24 in the image processing apparatus 20 of FIG. 4). The reference shape data are based on the parameters, namely, the three-dimensional lengths and angles of a distal end portion 2a of the tool 2 fixed in a given direction at the predetermined photographing position P1 as viewed from the cameras 41 and 42. The communication processor 25 delivers to and receives data from the robot control apparatus 30 through a communication line. The image processor 26 reads the image data picked up by the cameras 41 and 42 through the interface (INT) 28, temporarily loads them into the frame memory 27, and carries out profiling and the like of the image data in the frame memory 27. Data such as the photographing conditions of the cameras 41 and 42 and the state of operation are fed to a monitor (not shown) through the interface (INT) 29, and displayed thereon. The processor 21 detects the shape of the tool 2 in terms of the three-dimensional lengths and angles thereof on the basis of the profiled image data, compares it with the reference shape data in the nonvolatile memory 24, and compute the error value. The computed error value is fed to the robot control apparatus 30 through the communication processor 25. Also, the processor 21 determines whether or not the error value is within a preset allowable range, and informs the robot control apparatus 30 of the result. Referring to FIG. 4, the hardware configuration of the robot control apparatus 30 will be described. The robot control apparatus 30 is provided with a processor board 31. A processor 31a of the processor board 31 is connected with a ROM 31b and a RAM 31c through a bus 39. The processor 31a controls the whole robot control apparatus 30 in accordance with system programs stored in the ROM 31b. The RAM 31c is loaded with various data and also with operation programs for the robot 1 and correction programs for the taught path, which will be mentioned later. Part of the RAM 31c is formed as a nonvolatile memory, and the operation programs or correction programs are stored in this nonvolatile memory portion. Further, the bus 39 is connected with a digital servo control circuit 32, serial port 34, digital I/O 35, analog I/O 37, and large-capacity memory 38. The digital servo control circuit 32 drives servomotors 51, 52, 53, 54, 55 and 56 through a servo amplifier in accordance with commands from the CPU 31a of the processor board 31. These servomotors 51 to 56 are built in the robot 1, and operate individual axes of the robot 1. The serial port 34 is connected to a teaching control panel 57 with display and other external apparatuses 58, which are connected through RS232C. This serial port 34 is connected to the image processing apparatus 20 (i.e., those external apparatuses 58 include the image processing apparatus 20). The teaching control panel 57 with display is used to input the taught path of the tool 2 and the like. Moreover, the serial port is connected to a CRT 36a, which displays a coordinate position, control screen, etc. A console panel 36b is connected to the digital I/O 35. The analog I/O 37 is connected to a power supply unit of a laser apparatus, and welding voltage is instructed through the analog I/O 37. The large-capacity memory 38 is loaded with taught data and the like. Referring now to the flowcharts of FIGS. 5 and 6, procedures to be executed by the image processing apparatus 20 and the robot control apparatus 30 having the above hardware configuration and constituting the correcting apparatus for the robot movement path will be described. Referring first to the flowchart of FIG. 5, the procedures of processing by the CPU 21 of the image processing apparatus 20 will be described. This processing is started upon receiving the information from the robot control apparatus 30 to the effect that the robot 1 is moved by the robot control apparatus 30 so that the tool 2, the object of photographing, is moved to the predetermined photographing position P1. When the processing is started, the CPU 21 first outputs a command for photographing to the first camera 41, reads XZ-plane image data of the photographed tool 2 through the interface 27, and temporarily stores the data into the frame memory 27 (Step S1). Then, the CPU 21 delivers a command requiring the detection of the object to the image processor 26. In response to this command, the image processor 26 makes the image data to undergo profiling and the like, and measures the shape of the tool 2 (i.e., the length, angle, and position of the tool 2) projected on the XZ-plane (Step S2). Likewise, YZ-plane image data of the tool 2 picked up by the second camera 2 are read through the interface 27 and temporarily loaded into the frame memory 27 (Step S3). Then, the image data are made to undergo profiling and the like, and the shape of the tool 2 projected on the YZ-plane is measured (Step S4). Thereupon, three-dimensional shape data in the XYZ coordinate space of the tool 2 are obtained from the shape of the tool 2 on the XZ-plane obtained in Step S2 and the shape of the tool 2 on the YZ-plane obtained in Step S4 (Step S5). Then, the reference three-dimensional shape data of the tool 2 are fetched from the nonvolatile memory 24, and are compared with the three-dimensional shape data of the tool 2 obtained in Step S6, whereupon errors or deviations from the reference values of the three-dimensional shape data of the tool 2, currently attached to the robot, are obtained (Step S6). Then, it is determined whether or not the obtained errors are within the allowable range (Step S7). If the errors are concluded to be within the allowable range, information to the effect that the errors are within the allowable range is transmitted to the robot control apparatus 30 (Step S9) to terminate this processing. If the obtained errors are concluded to be out of the allowable range, the error data and information to the effect that the errors are out of the allowable range are delivered to the robot control apparatus 30 (Step S8) to terminate this processing. Referring now to the flowchart of FIG. 6, the procedures of processing by the CPU 31 of the robot control apparatus 30 will be described. This processing is executed every time one stage of the main operation by the robot 1 is finished (i.e., before the next main operation is started). The robot 1 is controlled so that the tool 2, the object of photographing, is moved to the predetermined photographing position P1 (Step T1). When the tool 2 has reached the photographing position P1, information to that effect is transmitted to the image processing apparatus 20. On receiving this signal, the image processing apparatus 20 starts processing according to the flowchart of FIG. 5. After the tool 2 has moved to the photographing position P1, it is kept on standby (Step T2) until the information to the effect that the errors are within the allowable range or the information to the effect that the errors are out of the allowable range is received from the image processing apparatus 20 (see Steps S9 and S8 of FIG. 5). When the information to the effect that the errors are within the allowable range is received from the image processing apparatus 20, execution of the main operation is started in accordance with the path taught by the program (Step T6). On the other hand, when the information to the effect that the errors are out of the allowable range and the relevant error data are received from the image processing apparatus 20, an operator is informed of the fact that the taught movement path must be corrected due to deformation of the tool through display on the CRT 36a or the like (Step T4), and the program-taught path of the tool 2 is then corrected on the basis of the delivered error data (Step T5). Execution of the main operation is started by actuating the robot in accordance with the corrected taught path (Step T6). Thus, in the present embodiment, the shape of the tool 2 is measured based on the images of the tool 2 picked up by the cameras 41 and 42, and the taught path is corrected on the basis of the differences between the measured shape and the reference shape data. Thus, even when the operator is not in the site of operation, the deformation of the tool 2 can be detected, and the path can be automatically corrected depending on the extent of the deformation. Thus, the machining line need not be stopped in order to execute the path correction to cope with the deformation of the tool, so that the manufacturing efficiency is improved, and normal operation can be carried out at all times. Moreover, since the operator need not enter the job site for the correction, safety can also be maintained. Furthermore, in the case of the present embodiment, it is designed so that the taught path is corrected when the deformation of the tool gets beyond the allowable range; however, this embodiment may be arranged so that the tool can be replaced after stopping the operation of the robot 1, when the deformation of the tool is too much beyond the allowable range.

Claims: An apparatus for correcting a movement path of a machine tool, comprising: a camera (41, 42) for picking up an image of a toot (2) mounted on the machine tool; an image processing apparatus (20) for obtaining shape data of the tool (2) by processing an image of said tool (2) picked up by said camera (41, 42); comparing means (6) for comparing the obtained tool shape data with reference tool shape data; and a machine tool control apparatus (30) for correcting a movement path in accordance with the comparison, with the reference tool shape data, of the shape data of the tool (2) obtained by said image processing apparatus (20), and controlling the machine tool to make it move along the corrected movement path; characterised in that: said machine tool is a robot (1), said tool (2) is an elongate tool mounted on the wrist end of the robot (1), and said movement path is a taught path; said image processing apparatus (20) is adapted to obtain three-dimensional shape data of the tool (2) by receiving an image of one side face of the tool (2) picked up by the camera (41, 42), and an image of another face of the same tool (2) perpendicular to said one side face; and the image processing apparatus (20) is adapted to detect the shape of the tool (2) in terms of the three-dimensional lengths and angles thereof on the basis of said obtained three-dimensional shape data. An apparatus for correcting a movement path of a robot (1) according to claim 1, wherein said robot control apparatus (30) has a function to control the robot (1) to move the tool (2) to a predetermined photographing position (P1) and transmit information to the effect that said photographing position (P1) is reached by the tool (2) to said image processing apparatus (20), while said image processing apparatus (20) has a function to command the camera (41, 42) to photograph said tool (2) on receiving the information to that effect from the robot (1). An apparatus for correcting a movement path of a robot (1) according to claim 1 or 2, wherein said taught path is corrected in accordance with the shape data of the tool (2) obtained by said image processing apparatus (20) only when the difference between the obtained tool shape and a reference tool shape, as a result of comparison thereof, is not smaller than a predetermined value. An apparatus for correcting a movement path of a robot (1) according to claim 1, 2 or 3, wherein said image processing apparatus (20) includes tool shape recognising means (5) for recognising the shape of the tool (2) from the images picked up by the camera (41, 42), reference shape data storage means (7) for storing reference shape data of said tool (2), and error value computing means (6) for computing error values between the tool shape recognised by said tool shape recognising means (5) and the reference shape data stored in said reference shape data storage means (7). A movement path correcting method for a machine tool, comprising steps of: locating a tool (2) mounted on the machine tool, and a camera (41, 42) for picking up an image of said tool (2), in predetermined relative positions; fetching and processing images through the camera (41, 42) to obtain shape data of the tool (2) from the processed image data; comparing the obtained tool shape data with reference tool shape data to detect deformation of the tool (2); and correcting a path defined by a program in accordance with the result of the detection; characterised in that: said machine tool is a robot (1), said tool (2) is an elongate tool mounted on the wrist end of the robot (1), and said program-defined path is a taught path; said image processing apparatus (20) obtains three-dimensional shape data of the tool (2) by receiving an image of one side face of the tool (2) picked up by the camera (41, 42), and an image of another face of the same tool (2) perpendicular to said one side face; and the image processing apparatus (20) detects the shape of the tool (2) in terms of the three-dimensional lengths and angles thereof on the basis of said obtained three-dimensional shape data. A movement path correcting method for a robot according to claim 5, wherein said camera (41, 42) is placed in a fixed position, and said robot (1) is controlled so that the tool (2) is brought to a photographing position for the camera (41, 42). A movement path correcting method for a robot according to claim 5 or 6, wherein said camera (41, 42) photographs the front and side faces of the tool (2) to obtain three-dimensional shape data of the tool (2) from the two image data.

Inventors: AKIYAMA KAZUHIKO, ARIMATSU TARO, AKIYAMA, KAZUHIKO, ARIMATSU, TARO
Applicants: FANUC LTD, FANUC LTD.
Application year: 1996
Main classification: B25J9
IPC codes: B25J9, B25J13, G05B19