1. Field of the Invention
The present invention relates to a processing program generating device that generates a processing program, with an offline programming device using a work to be processed and a robot model, corrects the processing program, and generates a final processing program to be used by a robot to execute the processing.
2. Description of the Related Art
In a system that uses a robot for processing a work, for example, removing flashes from a work such as a machine part an arc welding, an offline programming device is employed to generate a processing program using a shape model of the work and a robot model. However, when processing the actual work, the position and a posture of the actual work are different from those of the work prepared by the offline programming device. Therefore, a visual sensor or the like is used to acquire images of the position and the posture of the work, thereby obtaining a positional deviation and a posture deviation of the work based on the obtained images. A processing program generated by the offline programming device is corrected by using these deviations, thereby generating an actual processing program for the processing.
When generating a processing program of a robot by the offline programming device, and also when instructing the processing program using the robot directly, it is necessary to teach each teaching point. Therefore, when the robot processes a work having a complex shape, an extremely large number of teaching steps are necessary for generating the processing program. This makes it difficult to generate the processing program. Particularly when plural robots are used to process the work, the teaching operation becomes very difficult.
There is also another method. After the offline programming device generates a processing program, the visual sensor detects a position and a posture of the work. Deviations between the position and the posture of the work prepared by the processing program and the detected position and the detected posture of the work are corrected so as to generate an actual processing program. In this case, there is a possibility that the instruction to move the robot in excess of a stroke limit (i.e., a movable range) of each axis of the robot in the course of the processing is included. This causes a risk of interrupting the actual processing of the work. Conventionally, there is no method of confirming whether the work is within a permissible range of disposition when the work is processed by the robot. Consequently, it is possible to generate a processing program causing an interruption of the processing in the middle of the processing.
Further, conventionally, an expensive tool such as a turntable for moving the work to be processed is necessary. Depending on the work, the tool must be replaced, which results in an increase in the processing cost.
In order to solve the above problems of the conventional technique, it is an object of the present invention to provide a processing program generating device that can easily generate a processing program of a robot, can execute the processing program without interrupting the processing, and does not require an expensive tool.
According to a first aspect of the present invention, there is provided a processing program generating device that generates a processing program for processing a work with a robot, the processing program generating device including: a display means for displaying a shape model of the work on a display screen; a means for assigning both or one of vertexes and an edge line of the shape model of the work displayed on the screen; a means for assigning a posture of a processing tool; a means for generating a route based on both or one of the vertexes and the edge line that are assigned, and generating a provisional processing program so that the processing tool becomes in the assigned posture of the processing tool in the route; a visual sensor that acquires an image of an area of the work processed by the processing tool, and detects a position and a posture of the work; and a means for correcting the generated provisional processing program based on the position and the posture of the work detected by the visual sensor, thereby generating an actual processing program to be used to process the actual work.
According to a second aspect of the present invention, there is provided a processing program generating device that generates a processing program for processing a work with a robot, the processing program generating device including: a display means for displaying a shape model of the work on a display screen; a means for assigning a surface of the work to be processed on the displayed screen, and inputting a processing start point, a processing direction, a pitch amount, and a pitch direction; a means for setting a posture of a processing tool; a means for generating a route which moves on the assigned surface from the processing start point while shifting the route in an input processing direction by the pitch amount, and generating a provisional processing program so that the processing tool becomes in the posture of the processing tool set in each route; a visual sensor that acquires an image of an area of the work processed by the processing tool, and detects a position and a posture of the work; and a means for correcting the generated provisional processing program based on the position and the posture of the work detected by the visual sensor, thereby generating an actual processing program to be used to process the actual work.
According to a third aspect of the present invention, there is provided the processing program generating device according to the first aspect, wherein the means for generating the provisional processing program sets the assigned vertexes as teaching points, sets points at both ends of the assigned edge line as teaching points, sets a straight line route between the teaching point of the assigned vertexes and the other teaching point, sets an edge line route between the assigned teaching points at both ends of the edge line, thereby sequentially obtaining a continuous route in the assigned order of the vertexes and the edge line, and generates the provisional processing program for the generated route so that the processing tool becomes in the assigned posture of the processing tool.
According to a fourth aspect of the present invention, there is provided the processing program generating device according to any one of the first to the third aspects, wherein the means for generating the actual processing program to be used to process the actual work corrects coordinate positions and the posture of the teaching points prepared by the generated provisional processing program, or the points of origin and the posture in a coordinate system that defines the teaching points prepared by the provisional processing program, thereby generating the actual processing program to be used to process the actual work. According to a fifth aspect of the present invention, there is provided the processing program generating device, according to any one of the first to the fourth aspects, wherein the visual sensor includes a camera, and the camera is fitted to a robot that has the processing tool. According to a sixth aspect of the present invention, there is provided the processing program generating device according to any one of the first to the fifth aspects, wherein the processing tool is fitted to plural robots, and each robot processes one work. According to a seventh aspect of the present invention, there is provided the processing program generating device according to any one of the first to the sixth aspects, the processing program generating device further including: a means for simulating the operation of the generated actual processing program to be used to process the actual work, and checking whether the processing can be carried out normally in all the routes; and a means for generating an alarm when an abnormality is detected.
According to an eighth aspect of the present invention, there is provided the processing program generating device according to any one of the first to the sixth aspects, the processing program generating device further including: a means for simulating the operation of the generated actual processing program to be used to process the actual work, and checking whether the work is within a permissible moving range of each axis of the robot in all the routes; and a means for moving the work to a processable position when it is detected that the work exceeds the permissible moving range. According to a ninth aspect of the present invention, there is provided the processing program generating device according to the eighth aspect, the processing program generating device further including: a first robot that has the processing tool and processes the work; and a second robot that holds the work, wherein the second robot constitutes the means for moving the work to the processable position. According to a tenth aspect of the present invention, there is provided the processing program generating device according to the eighth aspect, wherein the work is mounted on a movable carriage, and the carriage constitutes the means for moving the work to the processable position.
According to an eleventh aspect of the present invention, there is provided the processing program generating device according to any one of the first to the tenth aspects, the processing program generating device further including: a means for simulating the operation of the generated actual processing program to be used to process the actual work, and checking the occurrence of interference between the robot and other objects in all the routes; and a means for correcting the position and the posture at the teaching points prepared by the processing program to a position and a posture of avoiding interference when the interference is detected.
According to the present invention, a provisional processing program is generated by assigning vertexes and an edge line of a work shape, based on work shape data and the like that is generated by a computer-aided design system (CAD). Alternatively, a provisional processing program for processing a surface is generated by setting the surface, a processing direction, a processing pitch and a pitch direction. Therefore, in the present invention, the provisional processing program can be generated easily. Further, because the actual processing program is generated from the provisional processing program based on the position and the posture of the actual work that are imaged by the visual sensor, the processing program can be generated easily. Further, because a robot or a carriage is used to change both or one of a position and a posture of the work, both or one of the position and the posture of the work can be corrected so that the work can be processed within a stroke limit of each axis of the robot, without using special tools. Further, it is possible to prevent the robot from interfering with other objects.
These and other objects, features and advantages of the present invention will be more apparent in light of the detailed description of exemplary embodiments thereof as illustrated by the drawings.
In the drawings,
a is an explanatory diagram of a generated processing route;
b is an explanatory diagram of a processing program for generating a processing route;
Processing program generating devices according to embodiments of the present invention are explained below with reference to the drawings.
The two robots 2 and 3, two visual sensors 4 and 5, and a personal computer (PC) 1 as an offline programming device are connected to each other in a local area network (LAN) using a communication line 10. Robot control units 2a and 3a of the robots 2 and 3 respectively are connected to the communication line 10, and control robot mechanism parts 2b and 3b respectively. Processing tools 8 and 9, and cameras 4b and 5b of the visual sensors 4 and 5, consisting of cameras and image processing units respectively, are fitted to the front ends of the arms of the robot mechanism parts 2b and 3b respectively, thereby making it possible to acquire images of the processing areas of the work 6. Image processing units 4a and 5a are connected to the cameras 4b and 5b respectively. The image processing units 4a and 5a are connected to the communication line 10. The work 6 to be processed by the processing tools 8 and 9 is mounted on the carriage 7. Although not shown in
The personal computer (PC) 1 as the offline programming device, the robot control units 2a and 3a of the robots 2 and 3 respectively, and the image processing unit 4a of the visual sensor 4 are connected to the communication line 10. The processing tool 8 and the camera 4b of the visual sensor 4 are fitted to the front end of the arm of the robot mechanism part 2b of the robot 2. The hand 11 is fitted to the front end of the arm of the robot mechanism part 3b of the robot 3 so that the hand 11 holds the work 6. In the second embodiment, a processing program is generated in a similar manner to that of the first embodiment, except for the following. While the carriage 7 moves the work 6 in the first embodiment, the robot 3 moves the work 6 in the second embodiment. With this arrangement, according to the second embodiment, when the robot 2 that is adapted to process the work with the processing tool 8 exceeds the stroke limit or generates interference with other objects, the robot 3 moves the work 6 to enable the robot 2 to process the work 6. In the first embodiment, the carriage 7 moves the work 6 in this case.
A method of generating a provisional processing program and a unit that generates this program according to the first and the second embodiments are explained below with reference to
In the present invention, the assigning unit 101 of the offline programming device 1 assigns vertexes, an edge line, and a surface of a shape model of the work in the order of the processing. The offline programming device 1 generates a provisional processing program based on this assignment.
Next, the assigning unit 101 sequentially assigns an edge line (i.e., a straight line) 43 and an edge line (i.e., a straight line) 44 to set teaching points P4 and P1. As a result, the provisional processing program generating unit 105 generates a provisional program in which a line that connects between the teaching line P1 and the teaching line P2 is taught as an arc processing route, a line that connects between the teaching point P2 and the teaching point P3 is taught as a straight line route, a line that connects between the teaching point P3 and the teaching point P4 is taught as a straight line route, and a line that connects between the teaching point P4 and the teaching point P1 is taught as a straight line route.
When mixed vertexes-and-edge lines are assigned, a processing route is generated by connecting between the teaching points based on the assigned order. When a vertex is assigned first and another vertex is assigned next, a processing route is generated by connecting between these vertexes with a straight line. When an edge line and a vertex are assigned, a processing route of an edge line is generated between both ends of the edge line, and a straight line processing route is generated between a teaching point at one end of the edge line and the assigned vertex. When a vertex and an edge line are assigned, it is sometimes unclear which one of both ends of the edge line is to be connected to the teaching point of the vertex with a straight line. In this case, an end point of the edge line that is to be connected to the assigned vertex is further assigned as a vertex.
In order to assign a surface, the input unit 102 assigns a processing start point, and inputs a processing direction, a processing pitch, and a pitch direction. Based on this, a processor of the offline programming device 1 generates a route that moves from a processing start point P1 as a teaching point to the input processing direction. In this case, a point P2 that is before the cross point of the extension of the route and the edge line of the work by an input pitch amount is taught as an end point of the route. Next, a route that moves to the input pitch direction by an input processing pitch amount is formed, and an end point P3 of this route is set as a teaching point. Next, a route that moves from this teaching point to a direction opposite to the input processing direction is generated. A point P4 that is before the cross point of the extension of the route and the edge line of the work by an input pitch amount is taught as an end point of the route, in the manner as described above. Thereafter, this operation is continued. When a route that moves by a processing pitch crosses the edge line of the work during the generation of this route, the processing program for processing the surface ends without generating the route that moves by this processing pitch.
In the example shown in
When the posture assigning unit 103 is used to assign the input of a posture of a processing tool, the image of the processing tool is displayed on the screen of the display unit 104. The posture of the processing tool can be set while visually observing the posture on the screen. First, a normal line A of a surface formed by the processing route at this teaching point is obtained. An angle α around this normal line A is obtained. A tangent B to the processing route is obtained. An angle β around the tangent direction is obtained. A normal line C on the surface formed by the tangent B and the normal line A is obtained. An angle γ around the normal line C is set. Based on these settings, the posture of the processing tool is determined, and is input.
First, the work shape data generated by the CAD device or the like is read. Further, model data of the robot and model data of a peripheral unit are also read (step S1). Based on the read data, at least the image 6′ of the work shape model is displayed on the display screen of the display unit 104 of the offline programming device 1. The assigning unit 101 assigns vertexes, an edge line, or a surface to the displayed image 6′ of the work shape model to assign a processing part, in the manner as described above (step S2). In assigning a surface, the input unit 102 inputs a processing start point, a processing direction, a processing pitch, and a pitch direction, in the manner as described above. Further, an image of a processing tool at the processing starting teaching point in a posture input state, is displayed on the display unit 104. The posture assigning unit 103 inputs angles α, β, and γ for determining a posture of the processing tool, thereby setting the processing tool posture, in the manner as described above (step S3).
Based on the assigned vertexes, the edge line, or the surface and the input setting data, the processing program generating unit 105 generates a processing route between the teaching points in the input order, thereby generating a provisional processing program that holds a setting processing tool posture to the processing route (step S4).
Next, the processor of the offline programming device 1 outputs an instruction to the robot control units 2a and 3a to acquire images of the work 6 to be processed, detects a position and a posture of the work 6, and calculates correction data (step S5). In the first embodiment, the following explanation is carried out based on the assumption that the processing program of the robot 2 is generated.
The robot control unit 2a receives the instruction to acquire images of the work, moves the robot mechanism part 2b to a predetermined imaging position, and outputs an imaging instruction to the image processing unit 4a of the visual sensor 4. The image processing unit 4a acquire images of the work with a camera to detect a position and a posture of the work, and transmits data of the image to the offline programming device 1. The processor of the offline programming device 1 calculates a deviation between the position and the posture of the work shape model that is input at step S1 and the detected position and the detected posture of the work, and obtains correction data of the coordinate values of each teaching points, in the conventional method. Alternatively, the processor obtains correction values of the points of origin and the posture in the coordinate system that represents the position and the posture of the work shape model that is input at step S1 (step S5).
Based on the obtained correction values, the actual work processing program generating unit 106 corrects the provisional processing program obtained at step S4, and generates the actual processing program for actually processing the work 6 (step S6). An accessing point to the processing starting teaching point and a leaving point from the processing end teaching point are added to the start and the end of the processing program of the corrected processing route, based on the parameters of a speed, a distance, and a direction set in advance. Further, a move instruction from the accessing point to the processing start point and a move instruction from the processing end point to the leaving point are added. A processing tool start instruction to start the processing is added to the processing start point, and a processing tool end instruction to end the processing is added to the processing end point.
a and
The processing program for actually processing the work is generated in the manner as described above. According to the first and the second embodiments, a simulation unit 107 further simulates the operation of the generated processing program as shown in
On the other hand, when an abnormality is detected at step S8, the processor decides whether a program change is set valid or invalid (step S11). When the program change is set valid, the checking unit 108 decides whether the execution of the program change is selected (YES or NO) (step S12). On the other hand, when the program change is not set valid, or when the program change is not selected even when the program change is set valid, the checking unit 108 decides whether the moving of the work is set valid (step S13). When the moving of the work is set valid, the checking unit 108 decides whether the execution of the work moving is selected (YES or NO) (step S14). When neither the change of the program nor the moving of the work is set valid, or when the changing of the program and the moving of the work are not selected even when these are set valid, the checking unit 108 detects these facts, and makes an alarm unit 109 generate an alarm (step S16) to indicate that the execution of the processing program will cause an occurrence of abnormality.
When the checking unit 110 finds that the moving of the work is set valid and that the instruction to move the work is input at step S14, the processor executes the processing of step S15. The processor outputs a move instruction to move the work from a target position of the processing route in which abnormality occurs (i.e., a front end position of the processing tool on the orthogonal coordinates) to the abnormality occurrence position (i.e., a position on the orthogonal coordinates), and makes the work moving units 3 and 7 move the work 6. In this case, according to the first embodiment shown in
Coming back to step S5 again, the processing following step S5 is carried out repeatedly. In other words, the visual sensors 4 and 5 acquire images of the work 6 to obtain correction data. The actual work processing program generating unit 106 corrects the provisional processing program based on the correction data, thereby generating the processing program. Then, the simulation unit 107 simulates the processing operation of the processing program.
On the other hand, when the execution of the changing of the processing program is selected at step S12, “0” is first stored into the register which stores a rotation amount R of the processing tool (step S17). A posture adjusting unit 113 rotates the processing tool around the axis of the processing tool (i.e., around a Z axis of the tool coordinate system) by a rotation amount ΔR, thereby changing each axial position of the robot and the shape data of the robot (step S18). The checking unit 112 decides whether the abnormality is cancelled. In other words, the checking unit 112 decides whether each axis of the robot is within the stroke limit or whether the robot is interfering with other object (such as a peripheral unit and the work) (step S19).
When the abnormality is not cancelled, the posture adjusting unit 113 adds the ΔR to the register that stores the rotation amount R (step S20), and decides whether the rotation amount reaches 360 degrees or above (step S21). When the rotation amount does not reach 360 degrees, the process returns to step S8. The posture adjusting unit 113 rotates the processing tool around the axis of the processing tool by the set rotation amount ΔR, and judges whether the abnormality is cancelled. Thereafter, these processing are repeated. When the rotation amount reaches 360 degrees at step S21, the posture adjusting unit 113 decides that the abnormality is not cancelled based on the change of the processing program by changing the posture of the processing tool, and outputs an alarm (step S22), thereby ending the processing.
When cancellation of the abnormality is detected at step S19, after returning to step S7, the operation of the program is simulated.
As described above, when the processing program is generated, the processing operation of the processing program is simulated. When the processing operation of the processing program is simulated to the end of the program without detecting abnormality (step S9), the processing program is downloaded to the robot control units 2a and 3a (step S10). Then, the processing ends.
In the above embodiments, the work 6 can be moved by mounting the work on the carriage 7 or by making the robot hold the work 6, thereby correcting the work position. However, when the carriage 7 is not present or when only one robot is available, a hand can be fitted to the front end of the arm of one robot instead of the processing tool that has been fitted to the front end of the arm. The robot fitted with this hand moves the work. Thereafter, the processing tool can be fitted to the front end of the arm of the robot again in place of the hand, and the processing can be proceeded.
Although the invention has been shown and described with exemplary embodiments thereof, it should be understood, by those skilled in the art, that the foregoing and various other changes, omissions and additions may be made therein and thereto without departing from the spirit and the scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2004-225977 | Aug 2004 | JP | national |