The present application claims priority from Japanese Patent Application No. 2008-12736, filed on Jan. 23, 2008, the entire content of which is fully incorporated herein by reference.
1. Field of the Invention
The present invention relates to a generating device of a processing robot program for carrying out processing such as burring, by using a robot.
2. Description of the Related Art
In the prior art, when a workpiece is processed after the position and orientation of the workpiece is detected in a robot system having a vision sensor, the vision sensor captures an image of the shape of the workpiece. Then, the difference in the images between the detected workpiece and a reference workpiece is calculated, by which each teaching position in a processing program is corrected in order to accommodate a positional error of the workpiece.
In some techniques, when the workpiece is captured by a vision sensor attached to a robot, the position and orientation of the robot, where the vision sensor may capture the workpiece, is finely adjusted by an operation such as a jog operation, in order to make a program for moving the robot to the imaging position. In some other techniques, a vision sensor does not detect the height of a surface of the workpiece to be processed relative to a reference surface, and the workpiece may be processed without correcting the position and orientation of a tool of a robot.
Various techniques, regarding burring using a robot, have been proposed. For example, Japanese Unexamined Patent Publication (Kokai) No. 5-31659 discloses a burring device and method capable of visually recognizing only a region of a workpiece where a burr may be generated, by utilizing design information of an ideal shape of the workpiece. Japanese Unexamined Patent Publication (Kokai) No. 5-31659 also discloses a technique to generate a robot path based on drawing information including a free curve portion generated by a CAD system or the like, in order to simply an operation offline. On the other hand, Japanese Unexamined Patent Publication (Kokai) No. 5-233048 discloses a technique to generate path teaching data for carrying out burring/polishing against various types of workpiece having a complicated ridge line.
In the prior art, it is possible to detect the position and orientation of a workpiece by means of a vision sensor, in order to process the workpiece in view of a positional error of the workpiece. However, it is not possible to process the workpiece in view of a manufacturing error or an error in the shape of the workpiece. Therefore, it is difficult to process the workpiece while the tool of the robot precisely traces the shape of the workpiece.
When the workpiece is captured by a vision sensor attached to a robot, it is necessary to finely adjust the position and orientation of the robot in order to determine the imaging position, which requires many man-hours.
Further, when the workpiece is processed without correcting the position and orientation of the tool of the robot, the tool may interfere with the workpiece and therefore the tool cannot process the workpiece.
Accordingly, an object of the present invention is to provide a generation device of a processing robot program used in a robot system having a vision sensor, capable of accommodating an error in the shape of a workpiece and reducing man-hours required for a teaching operation.
According to the present invention, there is provided a generating device of a processing robot program, by which three-dimensional models of a robot, a workpiece and a vision sensor are displayed on a display and the robot processes the workpiece, the generating device comprising: a processing line assigning part for assigning a processing line on the three-dimensional model of the workpiece on the display; a processing line dividing part for dividing the processing line into a plurality of line segments; a detection area determining part for determining a plurality of detection areas, each including each segment obtained by the processing line dividing part, within a graphic image obtained by capturing the three-dimensional model of the workpiece by using the three-dimensional model of the vision sensor as a virtual camera; a teaching point generating part for generating a teaching point by which each segment of the processing line divided by the processing line dividing part is processed; a detection model generating part for generating an image detection model in each detection area based on the graphic image, such that the vision sensor may detect each detection area of the graphic image determined by the detection area determining part; a detecting part for reading an image obtained by actually capturing a workpiece to be processed by using a vision sensor, and detecting the position and the orientation of a portion of the workpiece corresponding to the image detection model; a change calculating part for calculating an amount of change between the position and the orientation of each image detection model and the position and the orientation of each teaching point included in the detection area corresponding to the image detection model; and a correcting part for correcting the position and the orientation of the teaching point included in the detection area corresponding to the image detection model, based on the amount of change.
The generating device may further comprise a program generating part for generating an imager movement robot program wherein the program generating part being capable of assigning the three-dimensional model of the workpiece so as to move the robot to a position where the vision sensor mounted to the robot can capture the workpiece to be processed; moving the robot to a position and orientation so that the orientation of the vision sensor is parallel to a surface of the three dimensional model to be processed; calculating the position and orientation of the robot in which the vision sensor captures the center of the three dimensional model of the workpiece, based on the positional relationship between the three dimensional models of the vision sensor and the workpiece; and generating a teaching point by which the vision sensor captures the whole of the three dimensional model of the workpiece.
The generating device may further comprise an automatic adjusting part for automatically adjusting the position and orientation of the teaching point by detecting the height of the surface of the workpiece to be processed from a reference surface of the workpiece by means of the vision sensor.
The above and other objects, features and advantages of the present invention will be made more apparent by the following description of the preferred embodiments thereof, with reference to the accompanying drawings, wherein:
a shows an example in which the height of the position of the tool is adjusted;
b shows an example in which the orientation of the tool is adjusted; and
Concretely, a robot program generating device for processing according to the present invention may be a personal computer (hereinafter, referred to as a “PC”) as schematically shown in
A procedure carried out by PC 10 will be explained with reference to the flowchart shown in
In the next step S3, processing line 28 is divided into a plurality of line segments based on the shape of the processing line, as shown in
In the next step S4, in the layout as described above, a graphic image of workpiece 18 viewed from virtual camera 22 is indicated on the display. Then, detection areas are determined in the graphic image viewed from virtual camera 22 such that each segment of the processing line generated in step S3 is included in the detection areas (step S5). At this point, since a teaching point included in the processing line is corrected in each divided segment as described below, it is preferable that there is a one-on-one relationship between each detection area and each segment.
In the next step S6, in order to actually detect the detection areas obtained in step S5 by using a vision sensor such as a camera, image detection models, each including each detection area, are generated in graphic image 24 of workpiece 18 viewed from virtual camera 22, as shown in
In the next step S7, in order to generate a program by which a robot can actually process a workpiece, a processing program, including data of teaching points for processing the segments of processing line 28 of workpiece 18 as shown in
In the next step S8, a detection program is generated, by which a workpiece 18′ to be processed is actually imaged or captured by a vision sensor such as a camera 22′ corresponding to virtual camera 22, in the similar positional relationship of the layout as generated in step S1, as shown in
In the next step S9, a command line, for calculating and obtaining an amount of change or a difference between the detection model and the actually captured image of the workpiece by the vision sensor, in relation to the position and the orientation of each segment, is generated and added to the processing program. There are two methods for calculating and obtaining the amount of change, i.e., a method for obtaining correction data as the amount of change of the position and orientation, by a command in a detection program for detecting the position and orientation of each segment of the workpiece; and another method for generating a calculation program (for example, named as “CALC”) for calculating the position and orientation of each segment as shown in
Finally, in step S10, based on the amount of change calculated in step S9, a correction program is inserted into the processing program, the correction program being capable of correcting the teaching point for processing each segment such as a corner or a straight line. Due to this, an actual trajectory of the tool relative to the workpiece at each segment is corrected.
According to the present invention, the amount of change of the position and orientation is calculated by comparing the image detection model of the three-dimensional model of the workpiece obtained by the virtual camera to the image of the workpiece actually captured by the vision sensor, and then the teaching point is corrected based on the amount of change. Therefore, even when the actual workpiece has a shape error, the shape error may be accommodated and the workpiece may be correctly processed along a desired processing line, whereby a processing accuracy of the workpiece may be significantly improved.
In the above embodiment, the robot for carrying out processing and the vision sensor for capturing the workpiece are independently arranged. However, as in a preferred modification of
First, in step S21, a three-dimensional model of a workpiece is assigned in PC 10. This assignment may be executed, for example, by mouse-clicking a workpiece to be assigned among workpieces indicated on display 12.
In the next step S22, a robot 14 is moved relative to a assigned workpiece 18 such that a virtual camera 22 of a vision sensor attached to a front end of a hand of the robot is moved generally directly above workpiece 18 and the orientation of virtual camera 22 is parallel to a processing surface 34 of workpiece 18, as shown in
Then, a graphic image of the three-dimensional model of workpiece 18 viewed from virtual camera 22 is indicated on display 12 of PC 10 (step S23), and the horizontal position of virtual camera 22 is adjusted such that processing surface 34 of the workpiece is positioned at the center of the image (step S24). Concretely, as shown in
In the next step S25, as shown in
After the position and orientation of robot 14 by which virtual camera 22 can capture the whole of workpiece 18 are determined, an imager movement program for moving robot 14 to the determined position and orientation is generated. Further, a teaching point is generated in relation to the determined position and orientation (step S26).
Finally, a command or a program for capturing and detecting a workpiece to be imaged by using an actual vision sensor such as a camera is generated (step S27), and then the command or the program is inserted into the imager movement program.
Depending on the shape of a workpiece to be processed or a tool, it may be necessary to adjust the position and orientation of the tool at each teaching point. For example, in a case that workpiece 18 has a step portion as shown in
First, in step S31, a processing line 28 of a workpiece 18 is assigned similarly in step S2 as described above, and then a processing program including data of a teaching point on processing line is generated. Similarly to the example of
In the next step S32, a graphic image of the three-dimensional model of workpiece 18 viewed from virtual camera 22 is indicated on display 12 of PC 10. The positional relationship between the virtual camera and the workpiece may be the same as shown in
In the next step S33, an image detection model having a reference surface and a processing surface of workpiece 18 is generated, on a graphic image model 24 of the three-dimensional model of the workpiece viewed from virtual camera 22. Concretely, as illustrated in
In the next step S34, a command or a program is generated, by which a workpiece 18′ to be processed is actually imaged or captured by a vision sensor such as a camera 22′, as shown in
In the next step S35, a command or a program, for calculating the heights of the positions of the reference surface and the processing surface of the workpiece to be processed, is generated. Concretely, the difference of the sizes or the amount of change between an image of the workpiece actually capture by using vision sensor 22′ (
Finally, in step S36, the teaching point in the processing program is corrected based on the calculation result. In particular, as shown in
It should be understood by a person with ordinary skill in the art that the procedures as shown in
As described above, as shown in
Generating device 10 may further comprise a program generating part 10i for generating an imager movement robot program wherein the program generating part 10i being capable of assigning the three-dimensional model of the workpiece so as to move the robot to a position where the vision sensor mounted to the robot can capture the workpiece to be processed; moving the robot to a position and orientation so that the orientation of the vision sensor is parallel to a surface of the three dimensional model to be processed; calculating the position and orientation of the robot in which the vision sensor captures the center of the three dimensional model of the workpiece, based on the positional relationship between the three dimensional models of the vision sensor and the workpiece; and generating a teaching point by which the vision sensor captures the whole of the three dimensional model of the workpiece.
Generating device may further comprise an automatic adjusting part 10j for automatically adjusting the position and orientation of the teaching point by detecting the height of the surface of the workpiece to be processed from a reference surface of the workpiece by means of the vision sensor.
According to the generating device of the present invention, when the vision sensor is attached to the robot, the vision sensor attached to the robot may be used to generate a teaching point for capturing the workpiece, whereby man-hours required for the teaching operation may be significantly reduced.
By detecting the height of the position of the processing surface of the workpiece from the reference surface and automatically correcting the position and orientation of the teaching point based on the detection result, interference between the workpiece and the tool for processing the workpiece may be avoided.
While the invention has been described with reference to specific embodiments chosen for the purpose of illustration, it should be apparent that numerous modifications could be made thereto, by one skilled in the art, without departing from the basic concept and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2008-012736 | Jan 2008 | JP | national |