Image Processing Device
The image processing device optimizes imaging triggers and path generation for robot systems, addressing inefficiencies in bulk picking by automating trigger settings and interference detection, improving operational efficiency and compliance with production timelines.
Patent Information
- Application Number
- JP2020120452
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-07-14
- Publication Date
- 2024-08-16
- Estimated Expiration
- 2040-07-14
AI Technical Summary
Existing robot systems face inefficiencies in bulk picking operations due to the need for the robot to stop and wait for camera imaging, which disrupts takt times, and require manual adjustment of imaging triggers, making it difficult to meet strict production timelines and complicate program editing.
An image processing device dynamically adjusts imaging triggers based on the robot's movement out of the camera's field of view, allowing automated optimal timing without editing the robot program, and includes features for interference detection and path generation to ensure smooth picking operations.
This solution enhances the efficiency of bulk picking by optimizing imaging timing and reducing manual adjustments, ensuring timely operations and reducing program complexity, thereby meeting strict production requirements.
Smart Images

Figure 0007535400000005 
Figure 0007535400000030 
Figure 0007535400000018
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing device used to control a robot that performs a picking operation. [Background technology]
[0002] Conventionally, as disclosed in Patent Document 1, for example, there has been known a three-dimensional measuring device for measuring the three-dimensional shape of a workpiece placed in a workspace, controlling a hand attached to a robot to grasp the workpiece, and setting the operation of the robot so as to place the workpiece grasped by the hand at a predetermined placement position.
[0003] The three-dimensional measuring device in Patent Document 1 is provided separately from the robot controller, and is capable of performing high-precision three-dimensional measurements that are difficult for a robot controller to perform, and is capable of outputting to the robot controller the points that the hand should pass through, such as the approach position of the hand when grasping a workpiece and the grasping execution position where the hand grasps the workpiece, in order to realize various functions based on the measurement results.
[0004] That is, the three-dimensional measuring device, for example, captures an image of the workpiece and its surroundings with an imaging unit to obtain three-dimensional data, and then searches for the workpiece from the obtained three-dimensional data to determine the gripping posture, etc. Then, it calculates the coordinates of the gripping execution position where the workpiece is gripped, and outputs the calculated coordinates to the robot controller. The robot controller receives the coordinates, moves the hand, grips the workpiece with the hand, transports it to a predetermined placement position, and places it at the placement position. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2018-144159 A Summary of the Invention [Problem to be solved by the invention]
[0006] As described above, when using a robot to pick up a workpiece, the situation in the work space changes after the workpiece is grasped and transported in the work space, so it is necessary to capture an image of the work space with a camera and obtain new three-dimensional data each time a workpiece is transported.
[0007] Specifically, first, when the robot is in a position waiting for imaging by the camera (imaging standby position), an imaging trigger is issued and an image of the workpiece in the workspace is captured. The position of the workpiece that can be grasped is identified in the acquired image, and the target grasping execution position is calculated. After that, the robot is moved to the target grasping execution position via a position above a container, etc., and then a grasping operation is performed using the hand. Finally, the robot is moved to a placement position, where a placing operation of the hand is performed, and the robot returns to the imaging standby position and issues an imaging trigger again. This is the general procedure for bulk picking.
[0008] However, if a trigger is issued at the imaging standby position in this way, the robot must be stopped at the imaging standby position and wait for the time it takes for the camera to capture the image, calculate the workpiece position, and calculate the gripping position, and this waiting time was a problem in bulk picking, which has strict takt time requirements.
[0009] One possible solution is to issue the next imaging trigger the moment the robot reaches the placement position. By adopting this solution, there are fewer cases where the robot covers the workpiece container at the placement position, blocking imaging, and imaging and calculations can be completed by the time the robot returns to the imaging standby position, making it possible to meet strict tact requirements.
[0010] However, this method also has some problems. That is, since the position at which the imaging trigger is issued must usually be set with a margin of error compared to the ideal trigger position, there are cases where the robot movement time from the placement position to the imaging standby position is not long enough to perform various processes, resulting in lost time. If the timing at which the imaging trigger is issued is made earlier so that the robot movement time is long enough to perform various processes, the robot may cover the container, increasing the possibility that proper imaging cannot be performed, making it difficult to adjust the trigger issuing position. Moreover, in bulk picking, the hand movement path differs for each cycle, which also makes it difficult to adjust the trigger issuing position.
[0011] In addition, conventionally, the trigger position was determined using the robot program, and the path generation in the image processing device and the setting of the trigger position in the robot program were independent. Therefore, when a waypoint was added on the image processing device side, the trigger position had to be adjusted by modifying the robot program side. For example, if a trigger was to be issued at a place position, the robot program had to be directly edited, and the program had low versatility. In other words, it was not easy for the user to adjust the trigger position.
[0012] The present disclosure has been made in consideration of such points, and its purpose is to enable a user to set triggers without editing a robot program, and to enable a trigger to be automatically issued at the optimal timing within the settings. [Means for solving the problem]
[0013] In order to achieve the above object, the first disclosure is premised on an image processing device used to control a robot that cyclically executes a picking operation to grasp and sequentially remove specified workpieces from a plurality of workpieces stacked in a working space.
[0014] The image processing device includes an imaging unit that images the work space in which multiple workpieces are stacked in accordance with a trigger command and outputs the image data, and a processor that determines a workpiece to be grasped from among the workpieces stacked in the work space based on the image data output from the imaging unit, and sets a hand path from grasping the workpiece to placing it at a predetermined placement position.
[0015] The processor can dynamically change the imaging timing of the imaging unit for each cycle of the picking operation by determining the timing of issuing a trigger to cause the imaging unit to capture the next image based on the timing at which the hand moves out of the imaging field of view of the imaging unit during the path.
[0016] According to this configuration, when the imaging unit captures an image of the working space in response to a trigger command, the imaging unit outputs imaging data including the workpiece to the processor. The processor determines the workpiece to be grasped based on the imaging data output from the imaging unit, and generates a hand path from the workpiece to be grasped to a predetermined placement position. The hand moves along this path, completing one cycle of the picking operation.
[0017] The hand generally moves to outside the imaging field of view of the imaging unit during the path. The processor determines the timing of issuing a trigger to cause the imaging unit to capture the next image based on the timing at which the hand moves out of the imaging field of view. The imaging unit captures an image of the working space according to a trigger command issued at the determined issuance timing, so that the hand does not overlap the workpiece and the workpiece within the imaging field of view can be captured.
[0018] In the next cycle, the number of workpieces has been reduced, and the state of the workpieces in the working space is different from that in the previous cycle. Therefore, the path of the hand is also different from that in the previous cycle, and the timing at which the hand moves out of the imaging field of the imaging unit is also different from that in the previous cycle. According to the present disclosure, the imaging timing of the imaging unit can be dynamically changed for each cycle of the picking operation, and a trigger can be automatically issued at the optimal timing. This eliminates the need for the user to adjust the trigger position, improving convenience.
[0019] In a second disclosure, the processor can output coordinates on the path to a robot controller that controls a robot.
[0020] For example, in the case of a robot system equipped with a robot controller that controls a robot, the processor may be separate from the robot controller. In this case, the processor outputs coordinates to the robot controller, and the robot controller controls the robot to move to the coordinates on the path output from the processor, thereby enabling the picking operation.
[0021] In addition to the embodiment in which the processor and the robot controller are separate, the present disclosure may also be implemented in a form in which the processor is built into the robot controller. In this case, a path is generated within the robot controller, and the robot controller controls the robot to move along the generated path.
[0022] In the third disclosure, the processor can output to the robot controller coordinates on the path at which the trigger should be issued and trigger issuance information for issuing the trigger at the coordinates.
[0023] According to this configuration, the processor outputs not only the coordinates on the path but also trigger issuance information that causes imaging to be performed at those coordinates, so that the user can track the trigger position that changes with each cycle without having to edit the robot program.
[0024] In the fourth disclosure, the processor can generate information about the route including coordinates of a plurality of successive waypoints on the route, and output the route information to the robot controller.
[0025] As mentioned above, the path is different for each cycle. On the path generated by the processor, there are points that the hand must pass through (way points), such as points where a grasping operation should be performed and points where a placing operation should be performed. By outputting these multiple way points to the robot controller, the robot controller can control the hand to pass through the multiple way points.
[0026] In the fifth disclosure, the processor can output to the robot controller the coordinates of a fixed via point having any one of the attributes of the hand's approach position, gripping execution position, and post-grasping retreat position, and attribute information indicating the attribute of the fixed via point.
[0027] According to this configuration, the coordinates of the fixed via points and attribute information indicating the attributes of the via points are output to the robot controller, so the user can edit the hand path settings without considering the correspondence with the robot controller, and can consider only the hand movements without being concerned with the movements of the robot itself. In other words, the user can create a robot program simply by describing the hand movements corresponding to each attribute information.
[0028] In a sixth disclosure, the image processing device includes a work model input unit that receives input of a work model and grip position information by the hand on the work model, a measurement unit that performs three-dimensional measurement of the working space in which a work exists, and a search unit that searches for a grip position of a work stacked in the working space based on the three-dimensional measurement result by the measurement unit and the work model input by the work model input unit. The interference determination unit can determine whether or not the hand will interfere with a surrounding object when gripping the grip position of the work searched by the search unit, and determine a posture of the hand that avoids interference with the surrounding object.
[0029] According to this configuration, when there is a graspable workpiece in the working space where the workpieces are piled up, it is possible to determine whether or not the hand will interfere with surrounding objects when attempting to grasp the graspable workpiece with the hand based on the grasp position information. If the hand interferes with a surrounding object, even if the search unit determines that the workpiece can be grasped, the actual picking operation cannot be performed, so the interference determination unit can determine a hand posture that does not interfere by changing the posture of the hand so that the picking operation is possible. Note that there may be cases where a hand posture that does not interfere does not exist. It is also possible to input multiple grasp positions by the hand on the workpiece model.
[0030] In the seventh disclosure, the processor can determine a plurality of via points where the hand can avoid interference with surrounding objects based on the judgment result by the interference judgment unit, and generate a path for the hand that connects the via points.
[0031] With this configuration, the robot can be caused to perform a picking operation along a path that does not cause the hand to interfere with surrounding objects.
[0032] In the eighth disclosure, the processor can set a virtual three-dimensional figure whose outer shape is the edge of the imaging field of view of the imaging unit and determine whether the hand interferes with the three-dimensional figure, and determine that the timing when the hand does not interfere with the three-dimensional figure is the timing when the hand moves outside the imaging field of view of the imaging unit.
[0033] According to this configuration, by using an algorithm for determining whether the hand interferes with the virtual three-dimensional figure, it is possible to determine the timing when the hand will not interfere with the three-dimensional figure. Since the outer shape of the three-dimensional figure is the edge of the imaging field of view, when the hand does not interfere with the three-dimensional figure, it means that the hand is located outside the imaging field of view of the imaging unit. Therefore, it is possible to easily determine the timing when the hand will move outside the imaging field of view of the imaging unit.
[0034] In the ninth disclosure, the processor can accept input of a frame that surrounds the area in which the work is stacked in a planar view, and set the three-dimensional figure whose underside has the shape of the frame and whose shape extends toward the light receiving surface of the imaging unit.
[0035] For example, when the workpieces are contained in a container, the area in which the workpieces are stacked is limited to the inside of the container. In this case, when the user inputs a frame that surrounds the internal space of the container in a plan view, the shape of the frame becomes the shape of the bottom surface of a virtual three-dimensional figure. Then, by setting a three-dimensional figure that extends from the bottom surface toward the light receiving surface of the imaging unit, the field of view of the imaging unit is set in an appropriate shape that reflects the area in which the workpieces are stacked. The shape of the frame is not particularly limited, and can be, for example, a rectangle, a circle, or the like.
[0036] In the tenth disclosure, when the processor determines whether or not the hand will interfere with the three-dimensional figure, it can set a divided via point that divides the space between adjacent via points among the multiple via points, and use the divided via point.
[0037] According to this configuration, it is possible to precisely determine the timing at which the hand moves out of the imaging field of view of the imaging unit.
[0038] In the eleventh disclosure, the processor can determine the timing of issuing a trigger between the gripping execution position of the hand and the placement position of the workpiece, and output the robot position corresponding to that timing as the trigger position.
[0039] In the twelfth disclosure, the image processing device is provided with an editing screen generation unit that, when there are multiple via points on the route, generates an editing screen that indicates the order in which the multiple via points are to be passed and enables individual editing of the multiple via points, and a display unit that displays the editing screen generated by the editing screen generation unit. Effect of the Invention
[0040] As described above, according to the present disclosure, the timing of issuing the next imaging trigger is determined based on the timing at which the hand moves out of the imaging field of view, thereby dynamically changing the imaging timing for each cycle of the picking operation. This allows the user to set triggers without editing the robot program, and the trigger can be automatically issued at the optimal timing within the set triggers. [Brief description of the drawings]
[0041] [Figure 1] FIG. 1 is a schematic diagram showing how a bulk picking operation is performed using a robot system. [Figure 2A] 1 is a schematic diagram showing an example of gripping a workpiece with a robot hand. FIG. [Figure 2B] 1A to 1C are schematic diagrams showing an example of gripping a workpiece having a cavity from its inner surface. [Figure 2C] 13A and 13B are schematic diagrams showing an example of gripping a plate-shaped workpiece by suction. [Diagram 3] FIG. [Figure 4] FIG. 2 is a perspective view of the tip of an arm to which a hand is attached. [Diagram 5] FIG. 1 is a block diagram showing a schematic configuration of a robot system. [Figure 6] FIG. 2 is a block diagram showing a detailed configuration of the robot system. [Figure 7] FIG. 2 is a perspective view showing an example of a sensor unit. [Figure 8] 11 is a flowchart showing an example of a procedure for a hand attachment position calculation process performed by the image processing device. [Figure 9] 13 is a flowchart showing an example of a procedure for registering a work model. [Figure 10] 11 is a flowchart illustrating an example of a procedure for registering a hand model and a gripping position. [Figure 11] 11 is a flowchart showing an example of a calibration procedure. [Figure 12]FIG. 13 is a diagram showing an example of a user interface screen displayed when setting a central robot position. [Figure 13] FIG. 13 is a diagram showing an example of a user interface screen displayed when setting a detection tool. [Figure 14] FIG. 13 is a diagram showing an example of a user interface screen displayed when calculating a tool center. [Figure 15] FIG. 13 is a diagram showing an example of a user interface screen displayed when calibration is performed. [Figure 16] FIG. 13 is a diagram showing an example of a movement interval setting window. [Figure 17] FIG. 13 is a diagram showing an example of a robot operation check window. [Figure 18] FIG. 13 is a diagram showing an example of a user interface screen that is displayed when there is no problem after an operation check. [Figure 19] FIG. 13 is a diagram showing an example of a user interface screen that is displayed when a problem is found after an operation check. [Figure 20] FIG. 13 is a diagram showing an example of a user interface screen displayed when imaging a hand. [Figure 21] FIG. 13 is a diagram showing an example of an error display window that displays errors of six variables individually. [Figure 22] FIG. 9 is a view corresponding to FIG. 8 according to another embodiment. [Figure 23] 13 is a flowchart showing an example of a procedure for determining interference. [Figure 24] 13 is a flowchart showing an example of a procedure for operating a robot after interference determination is completed. [Diagram 25] FIG. 13 is a diagram illustrating an example of a user interface for route setting. [Figure 26] FIG. 13 is a diagram showing an example of an attribute information input window. [Figure 27] FIG. 13 is a diagram showing an example of a window for setting the position of a fixed via point. [Figure 28] FIG. 13 is a diagram showing an example of an operation / collision determination setting window. [Figure 29]FIG. 2 is a process sequence diagram of the image processing device, the robot controller, and the robot. [Figure 30A] 13 shows an example of a main program displayed on a display unit when attribute information can be associated and registered on a user interface. [Figure 30B] 13 shows an example of an action program displayed on the display unit when attribute information can be associated and registered on the user interface. [Diagram 31] 13 shows an example of a main program displayed on the display unit when attribute information cannot be associated and registered on the user interface. [Diagram 32] FIG. 27 is a diagram equivalent to FIG. 25 in which a fixed via point (designated position) is added before the approach position. [Diagram 33] FIG. 30B is a diagram equivalent to FIG. 30A when a fixed via point is added. [Diagram 34] 13 is a diagram showing a data array of via points and attribute information when the attribute information is processed on the robot controller side. FIG. [Diagram 35] 13 is a diagram showing a data arrangement of via points and attribute information when the attribute information is processed on the image processing device side. FIG. [Diagram 36] FIG. 30B is a diagram corresponding to FIG. 30A in the case where attribute information is processed on the image processing device side. [Figure 37] FIG. 37 is a diagram equivalent to FIG. 35 when via point data is included in the command array. [Figure 38] 13 is a flowchart showing an example of a method for calculating an imaging trigger position. [Figure 39] FIG. 13 is a diagram illustrating an example of a user interface for specifying an area. [Diagram 40] FIG. 13 is a diagram showing an example of the display of a window for specifying four sides of a container. [Diagram 41] FIG. 13 is a diagram showing an example of a display of a window for specifying the depth of a container. [Diagram 42] 11 is a conceptual diagram illustrating a method for calculating an imaging trigger position. FIG. [Diagram 43] FIG. 13 is a diagram showing a procedure for specifying a starting point. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0042] Hereinafter, the embodiments of the present invention will be described in detail with reference to the drawings. Note that the following description of the preferred embodiments is merely illustrative in nature and is not intended to limit the present invention, its applications, or its uses.
[0043] FIG. 1 is a schematic diagram showing a configuration example of a robot system 1000 according to an embodiment of the present invention. FIG. 1 shows an example of a bulk picking operation in which a predetermined workpiece WK that can be grasped is sequentially taken out from a plurality of workpieces WK piled up in a work space in a manufacturing plant for various products, etc., using a robot RBT, and transported to a stage STG installed in a predetermined location and placed on the stage STG. This bulk picking operation is repeatedly performed until there are no more workpieces WK that can be grasped. In other words, when a picking operation including an operation of grasping a predetermined workpiece WK that can be grasped, transporting it to a predetermined position, and placing it is set as one cycle, this cycle is performed multiple times, so it can also be said that the robot RBT is configured to perform a cycle of picking operations in which the predetermined workpieces are grasped and taken out sequentially.
[0044] The robot system 1000 includes a robot RBT and a robot controller 6 that controls the robot RBT. In addition to the robot RBT and the robot controller 6, the robot system 1000 shown in this figure also includes a robot setting device 100, a sensor unit 2, a display unit 3, an operation unit 4, and a robot operation tool 7 as shown in FIG.
[0045] The robot RBT shown in FIG. 1 is a general-purpose industrial robot, and includes a base unit BS that is fixed to the floor of a factory or the like. The robot RBT is also called a manipulator, for example, and is configured to be capable of six-axis control. This robot RBT includes an arm unit ARM that extends from the base unit BS, and a robot hand HND (hereinafter simply referred to as "hand") as an end effector provided at the tip of the arm unit ARM. The arm unit ARM can be configured as a multi-joint type having multiple joints as movable parts. The hand HND can be moved to a desired position within a movable range by the operation of each joint of the arm unit ARM and the rotational operation of the arm unit ARM itself.
[0046] The hand HND is configured to be able to grip the workpiece WK. The hand HND includes a hand HND1 having a structure for pinching and gripping the outside of the workpiece WK as shown in FIG. 2A, a hand HND2 having a structure for holding the workpiece WK2 having a hollow portion by inserting a claw portion into the inside of the workpiece WK2 and spreading it as shown in FIG. 2B, and a hand HND3 for sucking and holding a plate-shaped workpiece WK3 as shown in FIG. 2C, and any of the end effectors can be used. In this specification, the term "hold" is used to include all examples such as a method for pinching the outside of the workpiece WK shown in FIG. 2A, a method for inserting a claw portion into a hollow portion and spreading it, and a method for sucking.
[0047] As shown in FIG. 3, a flange FLG is fixed to the tip of the hand HND. As described above, there are various types of hands HND, and they need to be changed according to the workpiece WK. Therefore, in order to allow the user to freely replace the hand HND, the hand HND is detachably attached to the flange FLG as shown in FIG. 4. The attachment position and posture of the hand HND to the flange FLG are specified to be as designed. For example, a guide pin (not shown) or the like can be provided so that the attachment position and posture of the hand HND to the flange FLG are as designed. However, even if a guide pin or the like is provided, the hand HND is not necessarily attached to the flange FLG according to the designed values at the site where the picking work is actually performed, and the attachment position and posture of the hand HND may deviate from the designed values.
[0048] (Description of the coordinate system) In the robot system 1000 according to the present embodiment, there are a robot coordinate system, a camera coordinate system, a flange coordinate system, and a tool coordinate system. The robot coordinate system is a three-dimensional coordinate system with the origin at point OR as shown in FIG. 1, for example, a coordinate system with the attachment position of the robot RBT as the origin. The robot coordinate system is a coordinate system that is the reference for the positions of each part of the robot RBT (flange FLG, arm ARM, etc.). FIG. 1 shows an example in which the origin OR of the robot coordinate system is the center of the base of the robot RBT, but this is not limiting, and for example, the center of the upper surface of the base part BS may be the origin OR of the robot coordinate system. In addition, generally, the robot coordinates indicate the position of the flange FLG in the robot coordinate system.
[0049] In this embodiment, the sensor unit 2 may be configured to include a so-called camera, and is configured to be able to capture an image within a predetermined imaging field of view, as will be described in detail later. A camera coordinate system (image capture unit coordinate system) is defined as a coordinate system that serves as a reference for each point in an image captured by the sensor unit 2. As an example of the camera coordinate system, X and Y have an origin OC directly below the sensor unit 2, and Z has an origin OC at the center of the measurement range of the sensor unit 2, but is not limited to this.
[0050] The flange coordinate system is a three-dimensional coordinate system with the center of the mounting surface of the flange FLG as the origin OF, as shown in Fig. 3. The hand HND can also be called the tool, and the tool coordinate system is a three-dimensional coordinate system with the tip of the tool as the origin OT, as shown in Fig. 4. The origin OT of the tool coordinate system is not limited to the tip of the tool, and may be any position on the tool.
[0051] (Robot Control) The robot RBT is controlled by a robot controller 6 shown in Fig. 1. The robot controller 6 controls the operation of the arm section ARM and the opening and closing operation of the hand HND. The robot controller 6 also acquires information required for controlling the robot RBT from a robot setting device 100 shown in Fig. 5. For example, the three-dimensional shape of the workpiece WK, which is a large number of parts randomly placed in the container BX shown in Fig. 1, is acquired using a sensor section 2 including a three-dimensional camera, lighting, etc., and the position and posture of the workpiece WK are detected by the robot setting device 100, and the robot controller 6 acquires this information.
[0052] The operation unit 4 shown in Fig. 5 is used to set interference detection during picking operation, which will be described later, and various settings related to image processing. The display unit 3 is used to check various settings, the operating state of the robot RBT, the operating state of the robot setting device 100, and the attachment state of the hand HND. Furthermore, an image processing device 300 (shown in Fig. 6) provided inside the robot setting device 100 performs, for example, three-dimensional search, interference detection, and calculation of a grasping solution.
[0053] On the other hand, the robot controller 6 is a well-known member configured to control the robot RBT according to a signal output from the robot setting device 100. Also, the robot operation tool 7 sets the operation of the robot RBT. Note that, although the operation unit 4 and the robot operation tool 7 are separate members in the example of Fig. 5, they may be a common member.
[0054] The sensor unit 2 is a component called a robot vision or the like, and can also be called an imaging unit that images an image-capturing object. In this embodiment, at least the hand HND and the workpiece WK are the image-capturing objects of the sensor unit 2. When capturing an image of the workpiece WK, the container BX may be included as an image-capturing object. Also, when capturing an image of the hand HND, the flange FLG and the arm unit ARM may be included as image-capturing objects.
[0055] The sensor unit 2 is connected to the robot controller 6 and configured to be able to receive a trigger command output from the robot controller 6. The sensor unit 2 captures an image of the field of view range in accordance with the trigger command output from the robot controller 6, and outputs the captured image data to the processor 300A. The trigger command may be simply called a trigger, or may be called a trigger signal.
[0056] It becomes possible to obtain three-dimensional shape data indicating the three-dimensional shape of the bulk workpieces WK from the images captured by the sensor unit 2. Three-dimensional shape data indicating the three-dimensional shape of the container BX can also be obtained from the images captured by the sensor unit 2. Similarly, three-dimensional shape data indicating the three-dimensional shape of the hand HND, three-dimensional shape data indicating the three-dimensional shape of the flange FLG, etc. can also be obtained from the images captured by the sensor unit 2.
[0057] The above three-dimensional shapes can be obtained by, for example, a pattern projection method, a stereo method, a lens focusing method, a light section method, an optical radar method, an interference method (white light interference method), a TOF method, and the like, and any of these methods may be used. Each method is well known in the art, and therefore a detailed description is omitted. In this embodiment, the phase shift method, which is one of the pattern projection methods, is used, in which a pattern light having a periodic illuminance distribution is irradiated onto an object to be imaged, and the light reflected by the surface of the object to be imaged is received.
[0058] The sensor unit 2 can also be called a shape measuring device that measures the shape of the workpiece WK, which is the measurement target, and is equipped with a measurement unit 2a (shown in FIG. 6) that performs three-dimensional measurement of the working space in which the workpiece WK exists. Therefore, the sensor unit 2 can also measure the shapes of the hand HND, the workpiece WK, and the container BX. The sensor unit 2 can be a part of the robot setting device 100, but can also be configured as a separate member. The specific configuration of the sensor unit 2 is determined according to the three-dimensional shape measurement technology.
[0059] In this example, the sensor unit 2 includes a camera, lighting, a projector, etc., in addition to the measurement unit 2a. For example, when measuring the three-dimensional shape of the workpiece WK using the phase shift method, the sensor unit 2 includes a projector (light-projecting unit) PRJ and multiple cameras (light-receiving units) CME1, CME2, CME3, and CME4, as shown in FIG. 7. The projector PRJ is a member for irradiating light onto an object to be imaged. The cameras CME1, CME2, CME3, and CME4 are members having imaging elements that receive light projected by the projector PRJ and reflected by the surface of the object to be imaged. The light source of the light-projecting unit can be composed of, for example, multiple light-emitting diodes, a liquid crystal panel, an organic EL panel, a digital micromirror device (DMD), etc.
[0060] The sensor unit 2 may be configured with a plurality of members such as the cameras CME1, CME2, CME3, and CME4 and the projector PRJ, or may be configured as an integrated unit. For example, the sensor unit 2 may be a three-dimensional imaging head formed by integrating the cameras CME1, CME2, CME3, and CME4 and the projector PRJ into a head shape.
[0061] Moreover, the generation of the three-dimensional shape data itself can be performed by the measurement unit 2a of the sensor unit 2. In this case, the measurement unit 2a may be provided with an image processing IC or the like that realizes a function of generating three-dimensional shape data. Alternatively, the generation of the three-dimensional shape data may not be performed on the sensor unit 2 side, but the raw image captured by the sensor unit 2 may be transferred to the image processing device 300, and the image may be processed by a measurement unit (not shown) in the image processing device 300 to generate three-dimensional shape data such as a three-dimensional image. The sensor unit 2 can output the three-dimensional shape data, which is the captured data, to the determination unit 305 described later, etc.
[0062] The robot setting device 100 performs three-dimensional search, interference determination, gripping solution calculation, etc., based on the three-dimensional shape data of the workpiece WK obtained by the sensor unit 2. This robot setting device 100 can be configured with a general-purpose computer with a dedicated image processing program installed, a dedicated image processing controller, and dedicated hardware. Also, it can be configured with an image processing program installed on a dedicated computer with hardware such as a graphics board specialized for image inspection processing.
[0063] 5 shows an example in which the sensor unit 2, robot controller 6, etc. are configured as separate members from the robot setting device 100, but the present invention is not limited to this configuration, and for example, the sensor unit 2 and the image processing device 100 can be integrated, or the robot controller 6 can be incorporated into the robot setting device 100. In this way, the division of the members shown in FIG. 5 is just one example, and multiple members can also be integrated.
[0064] The sensor unit 2 is separate from the robot RBT. In other words, the sensor unit 2 is not provided on the arm ARM of the robot body 5, which is called an off-hand type. The sensor unit 2 may be provided on the arm ARM.
[0065] The display unit 3 can be configured, for example, with a liquid crystal monitor, an organic EL display, a CRT, etc. The operation unit 4 can be configured, for example, with various input devices such as a keyboard, a mouse, a pointing device, etc. The operation unit 4 and the display unit 3 can be integrated by making the display unit 3 a touch panel display.
[0066] For example, if the robot setting device 100 is configured with a computer on which an image processing program is installed, a graphical user interface (GUI) screen of the image processing program is displayed on the display unit 3. Various settings can be made from the GUI displayed on the display unit 3, and processing results such as various images and interference detection results can be displayed. In this case, the display unit 3 can also be used as a setting unit for making various settings, and the setting unit may include the operation unit 4.
[0067] The robot controller 6 controls the operation of the robot based on the information captured by the sensor unit 2. The robot operation tool 7 is a member for setting the operation of the robot RBT, and a pendant or the like can be used.
[0068] As shown in FIG. 1, a plurality of workpieces WK are randomly stored in a container BX. A sensor unit 2 is disposed above such a work space. The robot controller 6 determines the workpiece WK to be grasped from among the plurality of workpieces WK based on the three-dimensional shape of the workpiece WK obtained by the sensor unit 2, and also determines a candidate grasping position, and controls the robot RBT to grasp the workpiece WK to be grasped at the candidate grasping position. Then, while grasping the workpiece WK, the arm unit ARM is operated to move the workpiece WK to a predetermined placement position, for example, onto the stage STG, and the workpiece WK is placed in a predetermined posture. In other words, the robot controller 6 controls the operation of the robot RBT to grasp the workpiece WK to be picked, identified by the sensor unit 2 and the robot setting device 100, with the hand HND, place the grasped workpiece WK in a predetermined reference posture on a placement location (stage STG), and release the hand HND. The stage STG may be, for example, a conveyor belt or a pallet.
[0069] Here, in this specification, bulk picking is used to mean gripping and placing the workpieces WK randomly stacked in a container BX by the robot RBT and placing them in a predetermined position, as well as gripping and placing the workpieces WK stacked in a predetermined area without using a container BX, or gripping and placing the workpieces WK arranged and stacked in a predetermined posture one after another. In addition, the workpieces WK do not necessarily have to be stacked on top of each other, and the workpieces WK randomly placed on a plane without overlapping each other are also called bulk picking in this specification (for the same reason as when the workpieces WK are picked one after another and there is no overlapping at the end of the picking, it is still called bulk picking). Note that the present invention is not necessarily limited to bulk picking, and can also be applied to applications in which workpieces WK that are not stacked are gripped and transported.
[0070] 1, the sensor unit 2 is fixed above the work space, but the fixed position of the sensor unit 2 may be any position that can capture an image of the work space, such as diagonally above, to the side, below, or diagonally below the work space. Furthermore, the number of cameras and lights that the sensor unit 2 has is not limited to one, and may be multiple. Furthermore, the connection between the sensor unit 2, the robot RBT, and the robot controller 6 is not limited to a wired connection, and may be a well-known wireless connection.
[0071] When performing a bulk picking operation with the robot system 1000, teaching including settings for performing the bulk picking operation can be performed in advance. Specifically, which part of the workpiece WK the hand HND will grasp and in what posture are registered, as well as the grasping position and posture. Such settings can be performed with a robot operating tool 7 such as a pendant. Also, as described later, settings can be performed in the vision space without operating an actual robot.
[0072] The display unit 3 can also display the work model, which virtually represents the three-dimensional shape of the workpiece WK, and the end effector model, which is configured with three-dimensional CAD data and virtually represents the three-dimensional shape of the hand HND, in three-dimensional form in a virtual three-dimensional space. Furthermore, the display unit 3 can display the basic direction image of the work model as a six-sided view. This makes it possible to display each posture of the work model in a six-sided view and set the gripping position, making it easier to set the gripping position, which was previously a tedious task.
[0073] (Configuration of image processing device 300) As shown in FIG. 6, the robot setting device 100 includes an image processing device 300. The image processing device 300 can be configured to include a sensor unit 2, an operation unit 4, and a display unit 3. The image processing device 300 also includes a processor 300A including a microcomputer or the like. The processor 300A includes a work model input unit 301 for inputting a work model, and a registration unit 302 for registering a hand model. The processor 300A also includes a calibration execution unit 303, an acquisition unit 304 for acquiring coordinates of the robot RBT, a determination unit 305 for determining the position and posture of the hand HND attached to the flange FLG of the robot RBT, and a calculation unit 306 for calculating the attachment position of the hand HND. The processor 300A also includes a search unit 307 for searching the gripping position of the work WK, an interference determination unit 308 for determining whether the hand HND interferes with a surrounding object, a path generation unit 309, and an output unit 310 for outputting coordinate information and the like to the robot controller 6. The processes executed by each unit of the processor 300A will be specifically described below.
[0074] Fig. 8 is a flowchart showing an example of a procedure for interference determination by processor 300A. Step SA1 is a step for setting an environment for executing interference determination. The main procedure for this setting is as shown in the flowchart showing the procedure for registering a work model shown in Fig. 9 and the flowchart showing the procedure for registering a hand model and a gripping position shown in Fig. 10. Either the registration of the work model or the registration of the hand model and a gripping position may be performed first.
[0075] (Configuration of workpiece model input unit 301) The workpiece model input unit 301 shown in Fig. 6 is a part that accepts input of a workpiece model and gripping position information by the hand HND on the workpiece model. Specifically, the workpiece model and gripping position information can be input and registered according to the flowchart shown in Fig. 9.
[0076] Step SB1 after the start is a work model input step. The work model is a model representing the shape of the work WK used when executing the search process for the work WK described later, and can also be called a search model. When inputting the work model in step SB1, three-dimensional CAD data (CAD model) of the work WK can be read and temporarily stored in the storage unit 320 (shown in FIG. 6) of the image processing device 300. This three-dimensional CAD data can be, for example, data in a commonly used format, and can be read and used at any time.
[0077] In this embodiment, the STL format, which is the simplest format for three-dimensional CAD data, is used. The STL format is data that is composed only of an array of triangular polygon information (the coordinates of three points and the normal vectors of the faces). Alternatively, the work model may be composed of point cloud data having three-dimensional information. Alternatively, the work model may be composed of image data having height information, such as a height image or a distance image.
[0078] After inputting the workpiece model in step SB1, the process proceeds to step SB2, where the workpiece model is confirmed and registered. For example, the CAD data of the inputted workpiece model is displayed on the display unit 3, so that the user of the image processing device 300 can confirm whether or not it is the desired workpiece model. If it is found to be the desired workpiece model, the workpiece model is registered in the image processing device 200. If it is found not to be the desired workpiece model as a result of the confirmation, another three-dimensional CAD data is selected and input, and the workpiece model is confirmed again.
[0079] In step SB2, height image data of the six sides of the three-dimensional CAD model read in step SB1, that is, the three-dimensional CAD model viewed from each of the directions of "top", "bottom", "left", "right", "front" and "rear" is generated. First, six pieces of height image data are generated so as to be a plan view, a bottom view, a left side view, a right side view, a front view and a rear view of the CAD model. A height image is obtained from this height image data. "Top" corresponds to a height image viewed from the positive direction (plus side) of the Z axis, "bottom" corresponds to a height image viewed from the negative direction (minus side) of the Z axis, "left" corresponds to a height image viewed from the negative direction of the X axis, "right" corresponds to a height image viewed from the positive direction of the X axis, "front" corresponds to a height image viewed from the negative direction of the Y axis, and "rear" corresponds to a height image viewed from the positive direction of the Y axis. However, these are only examples, and a different coordinate system may be used, or height images viewed from the positive and negative directions of each axis may be used based on a coordinate system that is perpendicular to the straight line X=Y in the XY plane as an axis. Furthermore, when generating a height image from three-dimensional CAD data, it is not necessary for the height image to be viewed from a direction perpendicular to the axis of the CAD data ("top", "bottom", "left", "right", "front", "back"). For example, the posture (viewpoint) of the work model may be changed arbitrarily and the height image may be generated from the changed viewpoint.
[0080] Furthermore, since the CAD model is made up of three-dimensional CAD data, by converting the three-dimensional CAD data into height images when viewed from the positive and negative directions for each of the X, Y, and Z coordinates of the CAD model, height images can be obtained for the six sides of the CAD model.
[0081] It is also possible to delete height images that have the same appearance among the six height images generated as described above. To check whether the appearances match, height images of a total of six sides, viewed from above and below (positive and negative directions of the Z axis), from the front and back (positive and negative directions of the Y axis), and from the left and right (positive and negative directions of the X axis), are generated based on the height image data, and it is confirmed whether the height images match. Here, the images are rotated in 90° increments to check whether they match, and any side that appears to match another side is excluded from the search model registration targets. Such exclusion can be performed manually by the user of the image processing device 300, or automatically by the image processing device 300, or a combination of these.
[0082] To explain a specific example, if the workpiece WK is a rectangular parallelepiped, the height image viewed from above and the height image viewed from below of the three-dimensional CAD model will be the same, in which case one of them will be deleted. The height image viewed from the left and the height image viewed from the right of the three-dimensional CAD model will also be the same, so one of them will be deleted. Also, the height image viewed from the front and the height image viewed from the back of the three-dimensional CAD model will also be the same, so one of them will be deleted. Even if the workpiece WK has a complex shape, the height image viewed from one direction and the height image viewed from the other direction may be the same, in which case one of the height images can be deleted. If the workpiece WK is a cube, five of the six faces can be deleted.
[0083] As a result of deleting one of the images that becomes the same, the remaining height image data is stored. Information indicating whether the saved height image data is an image viewed from up, down, left, right, front, or back of the three-dimensional CAD model, i.e., information regarding direction, is added to the height image data, and this information regarding direction is associated with the height image data and stored in the storage unit 320 of the image processing device 300. This allows each height image data to be stored with the relationship information of each of the up, down, left, right, front, and back faces, so that multiple height image data of one work model viewed from different directions can be registered in the image processing device 300 in association with each other.
[0084] Therefore, when the height image data is read out from the storage unit 320, for example, height images viewed from six directions of the three-dimensional CAD model can be obtained in association with the height image data. As described above, it becomes possible to register a plurality of height image data viewed from different directions of the workpiece model as a search model of the workpiece WK. It is also possible to register a plurality of types of search models of the workpiece WK. Note that only the height image data may be saved without saving the face relationship information.
[0085] The above method is a method in the case where three-dimensional CAD data of the workpiece WK exists, but if there is no three-dimensional CAD data of the workpiece WK, multiple height image data of the workpiece model viewed from different directions may be registered as a search model. That is, the workpiece WK is placed on a plane with the surface to be registered facing upward, and three-dimensional measurement is performed. This three-dimensional measurement can be performed using the sensor unit 2 of the robot system 1000. The measurement data obtained by the sensor unit 2 is output, and height image data of the surface to be registered of the workpiece WK can be obtained based on the measurement data.
[0086] After obtaining a height image based on the height image data thus obtained, the height image is registered as a search model of the workpiece WK. After registration, it is determined whether or not the registration required for the search has been completed. This determination can be made by the user, but it may also be made by the image processing device 300. In other words, if the shapes of the workpiece WK viewed from each of the directions of up, down, left, right, front, and back are all different, it is preferable to obtain height images for all six faces, but if there are faces of the same shape, as in the case of the rectangle described above, it is not necessary to do this for all six faces. When the registration required for the search has been completed, the process ends.
[0087] (Configuration of registration unit 302) As shown in FIG. 6, the registration unit 302 is a part that registers a hand model showing the shape of the hand HND attached to the flange FLG of the robot RBT. The registration procedure of the hand model by the registration unit 302 is as shown in the flowchart in FIG. 10. Step SC1 after the start is a step of registering the hand model of the robot RBT. The hand model of the robot RBT is a model that represents the shape of the hand HND. When registering the hand model of the robot RBT, input of polygon data (three-dimensional CAD data) of the hand HND is accepted. In this step SC1, the polygon data of the hand HND is input, and the model represented by the input three-dimensional CAD data is registered as a hand model. When inputting the three-dimensional CAD data of the hand HND, input of origin position information of the three-dimensional CAD data is also accepted. Since the input of this origin position information is associated with the three-dimensional CAD data, it is not necessary for the user to input the information, and it can be input at the same time as inputting the three-dimensional CAD data of the hand HND.
[0088] When registering a hand model, in addition to the 3D CAD data, a hand model may be created by combining 3D parts such as a rectangular parallelepiped or a cylinder, and the created hand model may be registered. Also, a cable that is not included in the 3D CAD data may be created and registered.
[0089] In step SC2, the relative position and orientation of the hand model registered in step SC1 and the flange FLG of the robot RBT to which the hand model is attached is defined. Specifically, the positional relationship between the attachment surface of the hand model and the flange FLG of the robot RBT is defined so that they coincide with each other. At this time, input of the position and orientation of the hand HND based on the coordinates of the flange FLG can be accepted.
[0090] In step SC3 following step SC2, the tip coordinates of the hand model attached to the flange FLG of the robot RBT are specified. These tip coordinates can be obtained from the robot controller 6, but can also be set by the user. After that, in step SC4, it is confirmed whether the registration of the hand model has been completed.
[0091] After the hand model of the robot RBT is registered as described above, the process proceeds to step SC5. In step SC5, the surface of the work model to be grasped by the hand HND of the robot RBT is selected. The surface of the work model can be represented by a height image registered in the flowchart shown in FIG. 9, and the user selects a height image corresponding to a surface that can be grasped by the hand HND of the robot RBT from among a plurality of registered height images. When selecting a height image, the height images are displayed on the display unit 3, and the user can select from among these height images by operating the operation unit 4.
[0092] After selecting the height image in step SC5, the process proceeds to step SC6, where the position and posture of the hand HND when gripping the surface selected in step SC5 is registered. For example, the X-axis coordinate, Y-axis coordinate, Z-axis coordinate, rotation angle around the X-axis, rotation angle around the Y-axis, and rotation angle around the Z-axis can be individually input, and the hand model can be moved and placed at a desired position in the height image so as to correspond to the input values. This makes it possible to set which part of the work model the hand model will grip and in what posture, i.e., the gripping position and posture, while adjusting the position of the hand model. The gripping position and posture can also be set by directly operating the hand model with the mouse of the operation unit 4, in addition to inputting numerical values.
[0093] The gripping positions set here are gripping candidate positions gripped by the robot RBT. A plurality of gripping candidate positions gripped by the robot RBT can be set in association with each search model of the workpiece WK registered in advance. For example, two gripping candidate positions can be set in association with one search model, and four gripping candidate positions can be set in association with another search model. The set gripping candidate positions can be stored in the storage unit 320 in association with the search model.
[0094] In general, multiple grip candidate positions are often registered for one workpiece WK. This is because if multiple grip candidate positions are registered, the optimal solution can be selected from multiple grip solutions, and if the obtained grip candidate solution cannot be the final solution due to, for example, interference with other objects of the hand HND, the possibility of determining that gripping is possible increases if there are other grip candidate solutions. When multiple grip candidate positions are registered, if registration is performed from scratch each time, it becomes a hassle to register similar grip candidate positions, and the work becomes cumbersome. Therefore, by copying already registered grip candidate position information, changing some of the position parameters set in this grip candidate position, and making it possible to save it as a new grip candidate position, it becomes possible to easily register multiple grip candidate positions without much effort. It is also possible to read out existing grip candidate positions, appropriately modify the position parameters, and overwrite and save them.
[0095] When registering a candidate gripping position, the relative position and posture of the hand HND when gripping the workpiece WK are registered with respect to the origin of the search model. On the other hand, when gripping the workpiece WK with the actual hand HND, it is necessary to convert the coordinates of the three-dimensional space (vision space) in which the workpiece WK is imaged by the sensor unit 2 into robot coordinates that the robot controller 6 uses when actually operating the robot RBT.
[0096] Specifically, the position and orientation of the work model are obtained by the position (X, Y, Z) and orientation (Rx, Ry, Rz) in the vision space (note that the orientation (Rx, Ry, Rz) indicates the orientation expressed by the Euler angles of the ZYX system). Similarly, the orientation of the hand HND that grasps it is obtained as the position (X, Y, Z) and orientation (Rx, Ry, Rz) in the virtual three-dimensional space of the image processing device 300. In order for the robot controller 6 to operate the robot RBT based on the position and orientation in such a vision space, it is necessary to convert these to the position (X', Y', Z') and orientation (Rx', Ry', Rz') in the robot space. The process of calculating a conversion formula for converting the position and orientation calculated in this displayed coordinate system into the position and orientation of the coordinate system in which the robot controller 6 operates the hand HND is called calibration. This calibration will be described later.
[0097] In step SC7 of the flowchart shown in FIG. 10, it is determined whether or not the required number of gripping candidate positions have been registered. If there are many parts that can be gripped by the hand HND, the number of gripping candidate positions to be registered will be large, but since this is a matter for the user to decide, the user will make the decision in step SC7. If the result of the decision in step SC7 is NO and the required number of gripping candidate positions have not been registered and there are other gripping candidate positions to be registered, the process proceeds to step SC6 via step SC5, where other gripping candidate positions are set and registered. On the other hand, if the result of the decision in step SC7 is YES and the required number of gripping candidate positions have been registered, the process proceeds to step SC8.
[0098] In step SC8, a start position and a placement position are registered. The placement position is a position where the workpiece WK is placed by the robot hand HND, and can be set, for example, on the stage STG shown in Fig. 1. The start position and placement position can be set by inputting coordinates or the like as numerical values, but can also be set by directly operating the robot hand model with the mouse of the operation unit 4, for example.
[0099] When step SC8 is completed, the process proceeds to step SC9. In step SC9, the waypoints to be passed through while moving from the gripping execution position where the workpiece WK is gripped to the placement position are registered. One waypoint may be registered, or two or more waypoints may be registered. The waypoints may be registered at multiple locations on the route, and in this case, they may be named, such as waypoint 1, waypoint 2, ..., and stored in the storage unit 320. In this example, a case where the waypoints are registered by the user will be described, but this is not limiting, and the image processing device 300 may be configured to automatically calculate the waypoints and present them to the user, in which case step SC9 will be omitted.
[0100] The waypoint registered in step SC9 is a point through which the robot hand HND or the workpiece WK passes after the robot hand HND grasps the workpiece WK and before placing the workpiece WK on the placement position. The waypoint can be set by inputting coordinates or the like as numerical values, but can also be set by directly operating the robot hand model with the mouse of the operation unit 4, for example. When the waypoint is set, the operation of the robot hand HND is set so that a part of the robot hand HND or a part of the workpiece WK, or a point fixedly determined with respect to the robot hand HND passes through the waypoint while the robot hand HND grasps the workpiece WK and transports it from the start position to the placement position. The point fixedly determined with respect to the robot hand HND may be, for example, the origin of the flange coordinate system.
[0101] It is also possible to set the standby position of the robot hand HND, and to set waypoints on the forward path that the robot hand HND will take before gripping the workpiece WK in the container BX when the robot hand HND is at the standby position. The standby position and waypoints on the forward path of the robot hand HND can be set by inputting coordinates or the like as numerical values, but can also be set by directly operating the robot hand model with the mouse of the operation unit 4, for example.
[0102] The via point can be given in robot coordinates (X,Y,Z,Rx,Ry,Rz), or in the joint angle of the arm part ARM. By giving the joint angle of the arm part ARM, the robot arm position for collision detection is uniquely determined.
[0103] The shaft angle can be calculated from the robot coordinates such as the gripping position within the processor 300A, and the shaft angle can be transmitted to the robot controller 6. The specified position can be specified on the user interface using either the robot coordinates or the shaft angle. This mechanism for calculating the shaft angle from the robot coordinates is called "inverse kinematics," and like interference detection, this is a part of the path generation. After the above processing, the flow shown in FIG. 10 ends. After the above processing, step SA1 in the flow chart shown in FIG. 8 ends.
[0104] (Calibration execution steps) After step SA1 in the flowchart shown in Fig. 8, the process proceeds to step SA2, where the calibration execution unit 303 shown in Fig. 6 executes calibration. As described above, for example, the position and orientation of the workpiece WK detected by the sensor unit 2 are calculated based on the camera coordinate system, but when the workpiece WK is actually grasped by the robot RBT, the position and orientation based on the robot coordinate system are required. Information that converts the position and orientation in the camera coordinate system to the position and orientation in the robot coordinate system can be called calibration data.
[0105] As an example, the calibration data is expressed as a transformation matrix between two coordinate systems. To create this, a combination sequence of position and orientation values in each coordinate reference for the same position and orientation is required. Using these, the transformation matrix between the two coordinate systems can be estimated by solving an optimization problem with the transformation matrix as a variable.
[0106] One way to create the above combination sequence is to have the robot RBT hold the object to be detected, move it a set distance in the XYZ directions, and record the robot coordinates and the detected position at each point. Since the coordinate transformation matrix is calculated within this set range, it is desirable to make the range set here as large as possible so as to cover the entire range in which the detection target may exist when the robot RBT is in operation. This is because if coordinate transformation is performed outside the calculated range, there is a possibility that the deviation will be large.
[0107] However, if the set range is made large, problems may occur such as the set range being outside the movable range of the robot RBT, the robot RBT interfering with an obstacle, or the detection target being in the shadow of the robot RBT and unable to be detected by the sensor unit 2. Furthermore, if the positional relationship between the robot RBT and the sensor unit 2 is not known even roughly in the first place, it is not possible to determine whether the calibration range is appropriate or whether the hand HND will interfere with an obstacle.
[0108] In addition, it is possible to check in advance whether the robot RBT is outside its range of motion or whether there is interference with an obstacle. However, the problem of the detection target being in the shadow of the robot RBT cannot be checked unless the positional relationship between the robot RBT and the sensor unit 2 is known.
[0109] Therefore, the calibration execution unit 303 according to this embodiment executes calibration in a narrow range as a first stage, thereby calculating the positional relationship between the robot RBT and the sensor unit 2, and in a second stage, checks whether any problems will occur when calibration is executed in a wider range than the range executed in the first stage, using the information acquired in the first stage. As an example, calibration in a narrow range can be performed by reducing a wide range calibration set by the user by an arbitrary magnification and executing calibration in that range.
[0110] Tool center calculation data may be used to initially calculate the positional relationship between the robot RBT and the sensor unit 2. Tool center calculation is a calculation to obtain the offset between the detection point of the sensor unit 2 and the tool center point indicating the current location of the robot RBT. The offset to the tool center point can be calculated by rotating around the tool center and performing detection at each point.
[0111] The calibration of this embodiment will be described in detail below with reference to the flowchart shown in Fig. 11. In step SD1 after the start, the central robot position is set. Since this central robot position becomes the starting position when the calibration operation starts, step SD1 can also be called the starting position setting step.
[0112] In step SD1, the calibration execution unit 303 generates a user interface screen 50 shown in Fig. 12 and displays it on the display unit 3. The user interface screen 50 is provided with a coordinate display area 51 that displays the robot coordinates, a robot model display area 52 that displays the robot model, and a setting window 53. The coordinates of each point when performing calibration are displayed in the coordinate display area 51. In this example, points 0 to 4 are displayed, but by switching the display, it is possible to check the coordinates of all points (27 points in the example described later).
[0113] A three-dimensional model of the robot RBT performing the picking operation can be displayed in the robot model display area 52. The data on which this robot model is based can be obtained, for example, by reading in three-dimensional data of the robot RBT from an external source.
[0114] A start position setting button 53a, a detection tool setting button 53b, a tool center calculation button 53c, and a calibration start button 53d are provided in the setting window 53. Furthermore, the setting window 53 is also provided with an information display area 54 for displaying a message or an explanatory diagram for explaining a process or operation corresponding to an operated button among the buttons 53a to 53d.
[0115] When executing step SD1 shown in Fig. 11, the user operates start position setting button 53a in setting window 53 shown in Fig. 12. When the calibration execution unit 303 detects that start position setting button 53a has been operated, it displays an explanation regarding the setting of the start position in information display area 54 and also displays start position setting area 55 in setting window 53.
[0116] In the start position setting area 55, the user can select either "Robot coordinate system" or "Each axis." When "Robot coordinate system" is selected, the current coordinates (X, Y, Z, Rx, Ry, Rz) of the robot RBT (flange FLG) based on the robot coordinate system are obtained and registered as the start position. On the other hand, when "Each axis" is selected, the angle of each joint part of the robot arm ARM is obtained and the coordinates of the flange FLG calculated from this are registered as the start position. As it is a six-axis robot RBT, there are six variables, J1 to J6. The start position can be set by changing these variables.
[0117] Next, proceed to step SD2 of the flowchart shown in Fig. 11 to set the detection tool. The detection tool is an object used when performing calibration, and can be simply called a tool or a workpiece. The detection tool is an object that is held by the robot RBT and moved as described below, and the set detection tool can be detected by pattern matching to create calibration data.
[0118] 13, when the calibration execution unit 303 detects that the detection tool setting button 53b has been operated, it displays an explanation regarding the detection tool settings in the information display area 54, and also displays a detection tool setting area 56 in the setting window 53. In the detection tool setting area 56, it is possible to add or edit a detection tool.
[0119] Next, the process proceeds to step SD3 of the flowchart shown in FIG. 11, where a tool center calculation step is performed to calculate the center of the detection tool. As shown in FIG. 14, when the calibration execution unit 303 detects that the tool center calculation button 53c has been operated, it displays an explanation regarding the setting of the tool center calculation in the information display area 54 and displays a tool center calculation area 57 in the setting window 53. The tool center calculation is a calculation to obtain an offset between the detection point by the sensor unit 2 and the tool center point indicating the current position of the robot RBT, and the center of the detection tool can be used to obtain an offset between the detection tool detected by pattern matching and the flange FLG of the robot RBT. For example, the detection tool is rotated around its center and detection is performed at each point, so that the offset to the tool center point can be calculated. When setting the tool center calculation, the detection tool may be actually moved within the above-mentioned narrow range and provisionally set.
[0120] In the next step SD4, the movement interval is set. The movement interval is the interval at which the detection tool is moved during calibration. First, as shown in Fig. 15, when the calibration execution unit 303 detects that the calibration start button 53d has been operated, it displays an explanation regarding the input of the movement interval in the information display area 54 and also displays the calibration execution area 58 in the setting window 53.
[0121] The calibration execution area 58 is provided with a movement interval display area 58a for individually displaying the movement interval in the X-direction, Y-direction, and Z-direction, a setting button 58b, and an operation check button 58c. When the calibration execution unit 303 detects that the setting button 58b has been operated, it causes the display unit 3 to display a movement interval setting window 59 shown in FIG.
[0122] The movement interval setting window 59 is provided with a setting area 59a in which the movement intervals in the X, Y, and Z directions can be set individually. Each movement interval can be set by the user inputting, for example, a numerical value (unit: mm). The movement interval setting window 59 is also provided with a diagram display area 59b in which a plurality of points indicating the positions to which the detection tool is moved and the dimension between two adjacent points (movement interval) are displayed in a diagram.
[0123] The initial point (the point indicated as 1 in FIG. 16) is set at the center of the sensor unit 2. Based on the initial point and the moving interval input by the user, 27 points (9×3) to be measured are determined and displayed in the diagram display area 59b in FIG. 16. The set moving interval is displayed in the moving interval display area 58a shown in FIG. 15.
[0124] Then, the process proceeds to step SD5 in the flowchart shown in Fig. 11 to perform an operation check. The operation check verifies whether calibration can be performed correctly at the movement interval set in step SD4, based on the approximate positional relationship between the sensor unit 2 and the robot RBT determined by the tool center calculation in step SD3.
[0125] Prior to this check, an operation restriction area is set. When the calibration execution unit 303 detects that the operation check button 58c shown in FIG. 15 has been operated, it displays a robot operation check window 60 shown in FIG. 17 on the display unit 3. The operation restriction means, for example, when a fence exists around the robot RBT, restricting the operation range of the robot RBT to the area inside the fence so that the robot RBT does not come into contact with the fence. In the robot operation check window 60, the operation restriction area can be set individually in the X direction, Y direction, and Z direction. The operation restriction area is set by the user and is accepted by the calibration execution unit 303.
[0126] When the setting of the movement restriction area is completed, the user operates a robot movement check button 60a provided in a robot movement check window 60 shown in Fig. 17. When the calibration execution unit 303 detects that the robot movement check button 60a has been operated, the calibration execution unit 303 checks each check item, such as whether the robot RBT interferes with other objects within the movement restriction area, whether the detection tool is not in a shadow, whether the detection tool is within the imaging field of the sensor unit 2, etc., based on the approximate positional relationship between the sensor unit 2 and the robot RBT determined by the tool center calculation in step SD3. If the movement restriction area is not set, the above check items are checked for 27 points determined from the set movement interval.
[0127] When the operation check is completed, the process proceeds to step SD6 shown in Fig. 11 to determine whether or not there are any problems with the operation. If there are no problems with all of the above check items, the result is determined as YES in step SD6 and the process proceeds to step SD7. In step SD7, a confirmation result display window 61 is displayed as shown in Fig. 18, and the user is notified in the window 61 that there are no problems. Furthermore, points are displayed in the robot model display area 52 together with the robot model. The robot model display area 52 can also display information on a three-dimensional point cloud captured by the sensor unit 2, such as a workpiece WK or a container BX.
[0128] On the other hand, if there is a problem with even one of the above check items, the result is determined as NO in step SD6 and the process proceeds to step SD8. In step SD8, a confirmation result display window 61 is displayed as shown in FIG. 19, and the fact that there is a problem is specifically identified in the window 61 and notified to the user. In this case, too, information on the three-dimensional point cloud captured by the sensor unit 2 can be displayed in the robot model display area 52. Also, points with problems can be displayed in the robot model display area 52 in a form different from points without problems. In this case, a display form can be adopted in which the points with problems are highlighted.
[0129] In step SD9, the calibration execution unit 303 automatically calculates the position coordinates of the points so as to avoid problematic points. The calculation results are displayed and can be confirmed in the robot model display area 52 by the user operating the button 61a "Check recommended settings" in the window 61 shown in Fig. 19.
[0130] Next, the process proceeds to step SD10 in the flowchart shown in Fig. 11. That is, when the user operates the execute button 58d shown in Fig. 15, the calibration in step SD10 is executed, and in this calibration, for the position coordinates of a plurality of points, a conversion formula between the actual position coordinates of the hand HND and the position coordinates on the image displayed on the image processing device 300 is calculated. The method of coordinate conversion is not particularly limited, and can be, for example, affine conversion.
[0131]
number
[0132] As shown in (Equation 1), coefficients a, b, c, d, e, and f of a conversion equation having six degrees of freedom are calculated based on the actual position coordinates (x', y') of the hand HND and the position coordinates (x, y) on the image displayed on the image processing device 300. When there are more than six corresponding position coordinates, the least squares method may be used.
[0133] 15 is operated, the calibration execution unit 303 transmits a movement command including a movement instruction for the robot RBT and a destination position coordinate to the robot controller 6 so that the detected work passes through each point. The robot controller 6 moves the hand HND to the position coordinate included in the movement command.
[0134] The calibration execution unit 303 acquires coordinate values (x', y') that are the position coordinates of the hand HND that has been moved in response to a movement command from the robot controller 6. It is possible to adjust the positional deviation between the position coordinates of the moved hand HND and the position coordinates on the captured image of the detection tool.
[0135] The coordinate values (x', y') acquired by the calibration execution unit 303 are the coordinate values acquired from the robot controller 6 at each position to which the hand HND moves in response to a movement command from the image processing device 300, but the movement target coordinates of the hand HND that are set in advance in the image processing device 300 may also be used as the above coordinate values.
[0136] The calibration execution unit 303 controls the operation of the sensor unit 2 so as to capture an image of the detection tool at each destination to which the hand HND has moved. This allows control to capture an image of an area corresponding to the position coordinates of the hand HND at the destination acquired from the robot controller 6, thereby making it possible to detect the coordinate values (x, y) that are the actual position coordinates of the detection tool based on the captured image.
[0137] The calibration execution unit 303 detects coordinate values (x, y) that are the position coordinates of the detection tool based on the images of the detection tool captured at each movement destination, and calculates a conversion rule between the two coordinates based on the acquired multiple coordinate values (x', y') and the detected multiple coordinate values (x, y). Specifically, the coordinate values are substituted into the above (Equation 1) to find the coefficients a, b, c, d, e, and f.
[0138] The order of movement of the detection tool is not particularly limited, but may be, for example, the order as displayed in the diagram display area 59b in Fig. 16. That is, after the detection tool is moved so as to pass through a plurality of points in a plane having the same height, the detection tool can be moved so as to similarly pass through a plurality of points in a plane having a different height.
[0139] In this manner, the calibration execution step of step SA2 in the flowchart shown in Fig. 8 is completed. The calibration data can be stored in the storage unit 320 or the like.
[0140] (Hand imaging step) In step SA3 of the flow chart shown in FIG. 8, the hand HND attached to the flange FLG of the robot RBT is imaged by the sensor unit 2. For example, as shown in FIG. 4, in a state in which the hand HND is attached to the flange FLG, the robot RBT is controlled so that the flange FLG and the hand HND are within the imaging field of the sensor unit 2. Specifically, as shown in FIG. 20, the image processing device 300 displays a hand imaging window 71 on the user interface screen 70. The hand imaging window 71 displays an explanation of moving the robot RBT so that the hand HND is within the imaging field of the sensor unit 2. After that, when the sensor unit 2 is caused to perform imaging, an image including the flange FLG and the hand HND is acquired. The acquired image can be temporarily stored in the storage unit 320 and can be displayed in an image display area 72 provided on the user interface screen 70.
[0141] (Step to obtain robot coordinates during imaging) In step SA4 of the flowchart shown in Fig. 8, the acquisition unit 304 shown in Fig. 6 acquires the coordinates of the robot RBT when the image of the hand HND is captured by the sensor unit 2. The coordinates of the robot RBT may be acquired only when the image of the hand HND is captured by the sensor unit 2, or the current position of the robot RBT may be continuously acquired even while the image of the hand HND is not captured by the sensor unit 2, and the coordinates of the robot RBT when the image of the hand HND is captured by the sensor unit 2 may be acquired from the position information. The acquired coordinates of the robot RBT may be stored in the memory unit 320.
[0142] (Hand model loading step) In step SA5 of the flowchart shown in Fig. 8, first, the hand model registered in step SC1 of the flowchart shown in Fig. 10 is read. The read hand model is registered as a search model for the hand HND. This step needs to be executed only when there is a request to register a hand model, and can be omitted, for example, when the previously registered data is to be used as is.
[0143] (Hand position and orientation determination step) In step SA6 of the flowchart shown in Fig. 8, the determination unit 305 shown in Fig. 6 determines the position and posture of the hand HND attached to the flange FLG of the robot. First, the determination unit 305 reads the hand model registered in the registration unit 302, and also reads an image including the hand HND captured by the sensor unit 2. After reading the hand model and the image including the hand HND, the determination unit 305 performs pattern matching between the hand model and the image including the hand HND. The pattern matching method is a method also called, for example, three-dimensional matching or three-dimensional search.
[0144] By performing pattern matching, it is possible to determine whether a hand model is present in an image including an actual hand HND that is actually attached to the flange FLG, and if the actual hand HND is included in the image, the hand HND can be detected and the position and posture of the hand HND can be determined.
[0145] (Hand installation position calculation step) In step SA7 of the flowchart shown in Fig. 8, the calculation unit 306 shown in Fig. 6 calculates the attachment position of the hand HND with respect to the flange FLG, based on the coordinates of the robot RBT at the time of imaging acquired by the acquisition unit 304 and the position and orientation of the hand HND determined by the determination unit 305. At this time, six variables (X, Y, Z, Rx, Ry, Rz) in the camera coordinate system can be calculated as variables that determine the position and orientation of the hand HND.
[0146] Specifically, first, the six variables related to the position and orientation of the hand HND in the camera coordinate system are converted into six variables related to the position and orientation of the hand HND in the robot coordinate system using the robot-camera calibration data acquired in step SA2. This makes it possible to determine the coordinates of the robot RBT at the time of imaging.
[0147] If the coordinates of the robot RBT at the time of imaging are known, it is possible to know where the flange FLG of the robot RBT was located at the time of imaging. That is, the coordinates of the flange FLG can be acquired as the coordinates of the robot RBT. A difference is obtained between the position and posture of the origin of the flange FLG predicted from the coordinates of the robot RBT and the position and posture of the hand HND in the robot coordinate system. This difference becomes information indicating the position and posture of the hand HND based on the flange coordinate system. This difference can be set as the attachment error of the hand HND actually attached to the flange FLG. The attachment error of the hand HND becomes an error with respect to the design value. That is, when the hand HND is attached to the flange FLG with a deviation from the design value, it becomes possible to acquire the deviation, for example, as a specific numerical value. The calculation unit 306 can convert the position and posture of the hand HND imaged by the sensor unit 2 into the flange coordinate system by using the above calibration data. It is possible to calculate the error of the attachment position of the hand HND attached to the flange FLG from the origin position in the flange coordinate system.
[0148] Furthermore, the origin position of the hand HND can be calculated from the position and posture of the hand HND determined by the determination unit 305. The origin position of the hand HND can be, for example, the origin position of the three-dimensional CAD data of the hand HND. Furthermore, the position where the hand HND should be attached is specified by design values, and this position information can be acquired in advance. A difference is obtained between the calculated origin position of the hand HND and the coordinates of the robot indicating the previously specified position where the hand HND should be attached, and the attachment position of the hand HND attached to the flange FLG can be calculated according to the obtained difference.
[0149] (Error display) The calculation unit 306 calculates the above error for each position and posture variable of the hand HND. Since there are six variables (X, Y, Z, Rx, Ry, Rz) as described above, the calibration execution unit 303 can obtain the error for each of X, Y, Z, Rx, Ry, and Rz.
[0150] When the calibration execution unit 303 acquires the six errors, it displays an error display window 75 as shown in Fig. 21 on the user interface screen 70. The error display window 75 is provided with an error display area 75a that displays each of the errors of X, Y, Z, Rx, Ry, and Rz. The units of X, Y, and Z are mm, and the units of Rx, Ry, and Rz are degrees (°). The six variables can be displayed, for example, vertically or horizontally. That is, the image processing device 300 includes a display unit 3 that displays the error calculated by the calculation unit 306 for each variable, so that the user can grasp the error for each variable.
[0151] (Another embodiment) In the above-described embodiment, the shape of the hand HND is registered by the registration unit 302, but the position of the hand HND with respect to the robot RBT does not need to be registered, and the position of the hand HND is measured from an image captured by the sensor unit 2. Other embodiments besides this embodiment are also included in the present invention.
[0152] That is, in another embodiment, the shape of the hand HND is registered, and the position of the hand HND relative to the robot RBT is also registered. If the hand HND is attached to the robot RBT according to the design values, the image processing device 300 can know in advance in what position and orientation the hand HND should be detected. It is sufficient to reflect the difference between that position and orientation and the actually detected position and orientation.
[0153] A procedure according to another embodiment is shown in the flowchart of Fig. 22. In step SE1, a setting step is performed similarly to step SA1 in the flowchart of Fig. 8. At this time, the position of the hand HND relative to the robot RBT is also registered in the registration unit 302. Thereafter, step SE2 is the same as step SA2 in the flowchart of Fig. 8.
[0154] Step SE3 reads the hand model and provisionally sets the attachment position of the hand model to the robot RBT. Subsequent steps SE4, SE5, SE6, and SE7 are the same as steps SA3, SA4, SA5, and SA6 in the flowchart of FIG.
[0155] In step SE8, the attachment positions of the hand HND and the robot RBT are calculated based on the coordinates of the robot at the time of image capture acquired in step SE5 and the position and posture of the hand HND determined in step SE7. After that, in step SE9, the error with respect to the currently registered attachment position is reflected in the settings.
[0156] (Interference detection) Fig. 23 is a flowchart showing an example of a procedure for collision detection. Collision detection is performed after the process shown in the flowchart of Fig. 8 and the process shown in the flowchart of Fig. 22 are completed.
[0157] In step SF1 of the flowchart in Fig. 23, the sensor unit 2 performs three-dimensional measurement of the working space in which the workpiece WK exists as described above. The three-dimensional measurement generates height image data representing the height of each part of the area including the container BX and the workpiece WK. A height image can be obtained from the height image data. The height image is an image having height information, and is also called a distance image, three-dimensional image, etc.
[0158] After that, in step SF2, the workpiece WK is searched for in the working space based on the height image, which is the three-dimensional measurement result acquired in step SF1, and the workpiece model input by the workpiece model input unit 301. This is executed by the search unit 307 shown in FIG.
[0159] Specifically, first, the search unit 307 reads the work model stored in the storage unit 320. The search unit 307 performs a three-dimensional search on the height image to identify the posture and position of each work model using the read work model. That is, the height image is searched for the position and posture (X, Y, Z, Rx, Ry, Rz) in which each feature point of the work model most closely matches. Rx, Ry, and Rz respectively represent the rotation angle about the X axis, the rotation angle about the Y axis, and the rotation angle about the Z axis. Various methods for expressing such rotation angles have been proposed, and here, the ZYX system Euler angles can be used. In addition, the matching position and posture do not need to be one for each search model, and multiple positions and postures that match to a certain degree or more may be detected.
[0160] If the search unit 307 searches whether or not the workpiece WK exists in the height image and the search result is that the workpiece WK cannot be detected in the height image, the result is determined as NO in step SF3 shown in FIG. 23 and the process ends.
[0161] On the other hand, if the workpiece WK can be detected in the height image as a result of the three-dimensional search in step SF2, the process proceeds to step SF4, where interference is judged and a gripping solution is calculated. In this step SF4, the search unit 307 first searches for the gripping position of the workpiece WK. If no gripping position can be detected, it means that a gripping solution cannot be calculated, so the next step SF5 is judged as NO and the process ends, or an attempt is made to calculate a gripping solution for another workpiece WK.
[0162] If the gripping position can be detected in step SF4, the interference determination unit 308 shown in Fig. 6 determines whether the hand HND will interfere with surrounding objects when the robot RBT performs a picking operation. In other words, before the robot RBT executes a picking operation, a determination is made as to whether the hand HND will interfere with surrounding objects, thereby making it possible to determine a posture of the hand HND that avoids interference with surrounding objects. The surrounding objects are, for example, a container BX, a workpiece WK other than the object to be gripped, and other members that become obstacles during a picking operation.
[0163] In the interference determination step of step SF4, it is determined whether or not the three-dimensional point group indicated by the pixel data of each point of the height image interferes with the hand model. Before the interference determination, for one workpiece WK detected by the three-dimensional search, the position and posture at which the hand HND should be placed are calculated based on the position of this workpiece WK and the gripping posture of the registered workpiece model. At the calculated position, it is determined using the hand model whether or not the hand HND interferes with surrounding objects.
[0164] In this interference determination, it is possible to determine whether or not the three-dimensional point cloud interferes with the cross-sectional model by using the cross-sectional model of the hand model. For example, if all three-dimensional points are away from the cross-sectional model, it is determined that the three-dimensional point cloud, i.e., the height image and the hand model do not interfere with each other. On the other hand, if at least one three-dimensional point is inside the cross-sectional model or at least one three-dimensional point is in contact with the edge of the cross-sectional model, it is determined that the three-dimensional point cloud, i.e., the height image and the hand model interfere with each other. If there is no interference, it means that a grip solution can be calculated for this workpiece WK, and the process is terminated by determining YES in step SF5. On the other hand, if the three-dimensional point cloud and the hand model interfere with each other, it means that a grip solution cannot be calculated for this workpiece WK, and the process is terminated by determining NO in step SF5, or an attempt is made to calculate a grip solution for another grip position of the same workpiece WK or for another workpiece WK.
[0165] Furthermore, even if the grip position is the same, there are cases where interference with surrounding objects can be avoided by changing at least one of the position and posture of the hand HND, so when interference is determined, the interference determination unit 308 can execute interference determination for when the same grip position is gripped by changing at least one of the position and posture of the hand model. In this way, the interference determination unit 308 can determine the position and posture of the hand HND that avoids interference.
[0166] In the above procedure, when a gripping solution is obtained for any of the workpieces WK, the process of considering the gripping candidate positions is terminated at that point, and the workpiece WK is gripped at the gripping candidate position corresponding to the obtained gripping solution. However, this method is not limited to this, and for example, it may be configured so that the user determines which gripping candidate position to select after all grippable gripping candidate positions are obtained for one workpiece WK. In addition, it is also possible to focus on the height information of the workpieces WK placed, and select the workpieces WK placed at a high height, in other words, the workpieces WK located higher among the group of workpieces WK piled up in bulk, as the gripping candidate position.
[0167] (Route generation, control signal output, robot operation flow) When the interference determination shown in the flowchart of Fig. 23 is completed and it is determined that the hand HND will not interfere with surrounding objects, the process proceeds to step SG1 in the flowchart of Fig. 24. In step SG1, the path generating unit 309 shown in Fig. 6 generates a path for the hand HND.
[0168] Specifically, the path generating unit 309 determines a plurality of waypoints that allow the hand HND to avoid interference with surrounding objects based on the determination result by the interference determination unit 308, and generates a path connecting the waypoints, the path being a path from the current position of the robot hand HND to the gripping position via the approach position, and from the gripping position to the placement position. The path generated in this step SG1 may include a path that does not pass through the waypoints. In addition, the path generated by the path generating unit 309 may connect each of the waypoints in the shortest distance, and may also generate the shortest path from the current position of the robot hand HND to the placement position.
[0169] In step SG2, the output unit 310 outputs coordinates of the gripping execution position, placement position, via point, etc. to the robot controller 6. The robot controller 6 receives the coordinates of the gripping execution position, placement position, via point, etc. output from the output unit 310, generates a control signal, and outputs the generated control signal to the robot RBT. After that, in step SG3, the robot RBT operates according to the control signal to transport the workpiece WK along a predetermined path.
[0170] The points that the output unit 310 outputs to the robot controller 6 include fixed via points (fixed points set by the user, and approach positions, gripping positions, and retreat positions automatically calculated by the path generating unit 23) and intermediate via points in the path generation (points automatically calculated by the path generating unit 309). Regarding the via points to be output to the robot controller 6, it is possible to output both the axis values of the arm unit ARM and X, Y, Z, Rx, Ry, and Rz.
[0171] If the path generation unit 309 only outputs the approach position, the gripping position, and the like, it would be necessary to write a program on the robot controller 6 side to avoid obstacles such as the container BX, which would lead to a complex program and make it difficult for the user to customize the program. In contrast, as in this example, by having the path generation unit 309 plan the overall movement of the robot hand HND and being able to output several waypoints along the way to the robot controller 6, there is an advantage in that it is possible to simplify the program description on the robot controller 6 side.
[0172] However, since the number of via points through which the robot hand HND must pass cannot be determined without actually generating the motion path of the robot RBT, the robot controller 6 cannot identify the via points through which the robot hand HND must perform the grasping or placing motion.
[0173] Furthermore, when the user increases or decreases the number of fixed via points, unless the program is rewritten on the robot controller 6 side, a difference will occur between the number of via points output by the image processing device 300 and the number of via points expected by the program on the robot controller 6 side. Therefore, the user will have to go through the trouble of rewriting the program every time he or she increases or decreases the number of fixed via points.
[0174] Furthermore, each fixed via point has its own unique attribute, such as "a point where a gripping operation should be performed" or "a point where a placing operation should be performed." For example, if the image processing device 300 changes a via point, and the robot controller 6 does not follow suit, problems such as a gripping operation being performed in an unexpected place may occur, which also makes program creation difficult.
[0175] To address such a problem, in this example, the path generating unit 309 is configured to not only determine the gripping position of the robot hand HND of the workpiece WK arranged in the workspace based on the measurement results by the sensor unit 2 and the gripping information, but also to determine the coordinates of a fixed via point having any one attribute among the approach position of the robot hand HND for gripping the determined gripping position, the gripping position, and the retreat position after gripping.The output unit 310 outputs information including the coordinates of the fixed via point determined by the path generating unit 309 and attribute information indicating the attribute of the fixed via point to the robot controller 6 connected to the robot RBT.
[0176] In addition, the output unit 310 can output various information to the robot controller 6, such as a flag indicating whether a trigger can be executed at a specific location, the number of set path sections, a program loop behavior control flag (control such that a path starting from point A starts from a different point B from the second cycle), attributes of the set section (e.g., a grasping section), the robot operation speed in each section, whether a path different from the set normal path has been selected, parameters indicating the optimal trigger position, and the number of via points in each section.
[0177] The model of the robot RBT can be input to the image processing device 300. When the model of the robot RBT is input, a connection with the robot controller 6 that controls the input robot RBT becomes possible, and various data of the input robot RBT (such as the movable range of the arm section ARM) can be automatically read. In addition, the communication format can be automatically changed to a format according to the manufacturer of the robot RBT. That is, for example, information and communication formats of major robot RBTs manufactured by major robot RBT manufacturers are stored in the storage unit 320 or the like in advance, and the information can be read and used by the user's input operation, so that it is not necessary to input information of the robot RBT individually when setting up.
[0178] (Details of user settings when generating a route) FIG. 25 is a diagram showing an example of a user interface 80 for setting a path. The user interface 80 for setting a path is an editing screen that allows individual editing of a plurality of waypoints, and is generated by the editing generation unit 312 shown in FIG. 6 and displayed on the display unit 3. The user interface 80 for setting a path is provided with a robot display area 80a in which a three-dimensional image showing the selected robot RBT is displayed, a selection area 80b in which various setting operations are selected, and a sequence display area 80c showing the order of movement of the robot hand HND. In the sequence display area 80c, fixed waypoints such as a position above the box (container), an approach position, a gripping execution position, a retreat position, a place position, and an image capture standby position are displayed, as well as intermediate waypoints automatically calculated by the path generation unit 309, together with their names. The names can be names that are easy for the user to understand, such as "approach position", "retreat position", "grip position", and "designated position". The waypoints displayed in the sequence display area 80c are displayed in a state in which the relative positional relationship with the robot RBT can be grasped in the robot display area 80a.
[0179] The sequence display area 80c is configured to display multiple fixed via points when multiple fixed via points are determined, and to indicate the via order of the fixed via points. That is, in the sequence display area 80c, the "imaging standby position" where the robot hand HND starts its operation is positioned at the top, and multiple via points are displayed below it in the order of the via points. The display form of the fixed via points and the intermediate via points (hereinafter, these are also collectively referred to as via points) is not limited to the form shown in the figure, and may be, for example, a form in which they are arranged in order in the left-right direction. In addition, a curve or straight line that complements the fixed via points is a set of intermediate via points, and is therefore synonymous with an intermediate via point.
[0180] The sequence display area 80c is provided with an add button 80d and an insert button 80e that are operated when adding a via point. In addition, the sequence display area 80c is also provided with an edit button 80f that is operated when editing a via point and an operation speed setting button 80g that is operated when setting an operation speed. When the user operates the add button 80d or the insert button 80e, the via point can be added or inserted at a desired position. When a via point is added, as shown in FIG. 26, the route generation unit 309 generates an attribute information input window 81 for inputting attribute information of the via point, and displays it superimposed on the sequence display area 80c. This attribute information input window 81 allows individual editing of multiple fixed via points. It is also possible to delete unnecessary fixed via points.
[0181] The attribute information includes the approach position of the robot hand HND, the gripping execution position, the retreat position after gripping, the place position, the relative position, etc. The attribute information input window 81 displays the attribute information in a form in which any one of them can be selected. In other words, one piece of attribute information can be associated with one fixed via point. The input unit for inputting the attribute information of the via point can be constituted by the operation unit 4 capable of performing input operations on the attribute information input window 81.
[0182] When the OK button 81a in the attribute information input window 81 is pressed, the selected contents are reflected and the fixed via point and the attribute information are stored in the storage unit 320 in an associated state, whereas when the Cancel button 81b is pressed, the selected contents are discarded. When the OK button 81a or the Cancel button 81b is pressed, the attribute information input window 81 is closed.
[0183] When an edit button 80f shown in FIG. 25 is pressed, the path generating unit 309 generates a position setting window 82 shown in FIG. 27 and displays it superimposed on the path setting user interface 80. The position setting window 82 is provided with a name display area 82a for displaying the name of the fixed via point to be edited, and a position and orientation designation area 82b for designating the position of the fixed via point and the orientation of the robot hand HND at the fixed via point. The name displayed in the name display area 82a can be changed. In the position and orientation designation area 82b, it is possible to select whether to designate the position and orientation in Cartesian coordinates or in the angle of each axis, and also to designate the image capture standby position. The image capture standby position is a position where the robot hand HND can be retreated to a place that is not within the field of view of the sensor unit 2 when the sensor unit 2 images the workpiece WK.
[0184] When the Next button 82c in the position setting window 82 is operated, the path generating unit 309 generates an action / collision determination setting window 83 shown in Fig. 28 and displays it superimposed on the path setting user interface 80. The action / collision determination setting window 83 is provided with an action setting area 83a and a collision determination setting area 83b. In the action setting area 83a, it is possible to select whether or not to generate a path that passes through a via point.
[0185] When no path is generated, it is possible to select whether to move by each axis interpolation operation or linear interpolation operation. Each axis interpolation operation is a linear movement in the axis angle space, but in the real three-dimensional space, it is a start that draws a curve. Linear interpolation operation is the opposite. In this embodiment, all coordinates are internally managed by the angle of each axis, so strictly speaking, linear interpolation movement is realized by a set of each axis interpolation operation in a small section. In this case, multiple path points are generated that can be considered to be sufficiently straight (each axis is interpolated between the generated path points). Although this is determined at the time of setting, there will be via points that are not explicitly set by the user, as in the case of path generation. Note that even when no path is generated, interference judgment is performed, but since it is not possible to generate a path that avoids interference, if there is interference on this path, path generation is not possible overall. For example, when a path is generated, the path generation unit 309 can automatically generate a path that passes through via points and display it in the robot display area 80a. When a path is automatically generated, via points on the way are automatically generated.
[0186] In the interference determination setting area 83b, the margin information to be used for interference determination can be input as a numerical value (mm). If the distance between the robot hand HND and an obstacle is less than the input numerical value, it is determined that interference will occur.
[0187] 29 is a process sequence diagram of the path generation unit 309, the robot controller 6, and the robot RBT. In the process sequence diagram, in S100, the robot controller 6 requests a path generation result from the path generation unit 309. Upon receiving this request, the path generation unit 309 generates a path and causes the output unit 310 to output to the robot controller 6 information such as the number of fixed via points, the number of via points between the fixed via points, the attributes of the fixed via points, the coordinates of the via points, and the presence or absence of special evacuation.
[0188] Here, the number of fixed via points can be dynamically changed. For example, if the number of fixed via points increases on the route setting user interface 80 shown in Fig. 25, the number of fixed via points transmitted to the robot controller 6 increases, and if the number of fixed via points decreases on the route setting user interface 80, the number of fixed via points transmitted to the robot controller 6 decreases. In this embodiment, attribute information for each fixed via point is output, but as an alternative example, an index of the fixed via point corresponding to each attribute information can also be output.
[0189] S101 in FIG. 29 is a process that is repeated for the number of fixed via points. In this process, first, in S102, the robot controller 6 identifies a desired fixed via point. Then, in S103, a command is issued to the robot RBT to move to the via point. In S104, an attribute is determined based on attribute information associated with the current fixed via point. In S105, an action execution file according to the attribute determined in S104 is called. The action execution file is, for example, grasping, placing, etc. Then, in S106, an action is issued to the robot RBT. Then, in S102, another fixed via point is identified. S102 to S106 are repeated for the number of fixed via points, thereby allowing the workpiece WK to be transported.
[0190] (Robot controller pseudo program) Next, the robot controller pseudo program will be described. The robot controller pseudo program has a method (first method) in which attribute information of a fixed via point is registered and output in association with the fixed via point in the image processing device 300, and the attribute information is processed on the robot controller 6 side, and a method (second method) in which the attribute information of the fixed via point is processed on the image processing device 300 side and converted into a command to the robot RBT, and the robot controller 6 side executes the received command one by one. Specific examples of the first method and the second method will be described below.
[0191] (Example of the first method) First, an example of a main program for a case in which attribute information of a fixed via point can be registered in association with the fixed via point on a user interface is shown in Fig. 30A. In this example, the sensor unit 2 is made to perform measurement, and if there is no measurement result, the program is terminated, whereas if there is a measurement result, the subsequent process is executed. For example, the path generation result is received, the robot hand HND is moved to the fixed via point and intermediate via point, the attribute of the current fixed via point is determined, and an action according to the attribute is issued. Here, as shown in Fig. 30B, an action program is called as a separate program and executed.
[0192] Examples of the separate program include a program for making the robot hand HND grip the workpiece WK, a program for placing the workpiece WK, and a program for making the sensor unit 2 capture an image of the working space. For example, the user may create in advance a program for gripping the workpiece WK, a program for placing the workpiece WK, and a trigger issuing program for making the sensor unit 2 capture an image of the working space, and the robot controller 6 may determine attribute information assigned to the waypoint and execute a program according to the attribute information. With this configuration, it may be possible to set the gripping timing of the workpiece WK, the placing timing of the workpiece WK, the trigger issuing timing of the sensor unit 2, and the like from the image processing device 300.
[0193] On the other hand, a case where attribute information cannot be associated and registered on a user interface will be described. When way points are set in the order shown in the order display area 80c in Fig. 25, a main program is generated as shown in an example in Fig. 31. Fixed way points 1 to 5 of the main program shown in Fig. 31 correspond to the "approach position", "holding position", "escape position", and two "designated positions" in the order display area 80c in Fig. 25, respectively, and actions are issued based on the attribute information of each way point.
[0194] As shown in FIG. 32, a fixed via point (designated position) can be added before the approach position, and how the main program changes in this case will be described. FIG. 32 shows a form in which a "designated position" shown in black has been added to the sequence display area 80c. When adding a "designated position", the user inputs attribute information using the attribute information input window 81 shown in FIG. 26, so the added "designated position" is associated with the attribute information. In this case, the main program erases "HAND OPEN" written on line 11 as shown in FIG. 33, and rewrites "HAND OPEN" on line 16. Then, the process is increased by the amount of the via point added on line 33. Note that the grip position is "HAND CLOSE".
[0195] In this manner, the image processing device 300 registers and outputs the way points in association with the attribute information, and the robot controller 6 interprets and processes the attribute information associated with the way points. In this example, the robot program can be simplified by having two arrays, one for the way points and the other for the attribute information associated with them. An example of how data is held in this case is shown in Fig. 34.
[0196] (Example of the second method) Next, a second method will be described in which the image processing device 300 processes the attribute information of the fixed via point and converts it into a command, and the robot controller 6 executes the command one by one. In this case, the image processing device 300 transmits command information and position information of the via point to the robot controller 6, so that the robot controller 6 has a data array as shown in Fig. 35. In Fig. 35, "via point" requests tracing the via point, and "hand" requests operating the robot hand HND.
[0197] The robot controller 6 can decide what to do next by referring to the command array shown in Fig. 35. The main program in this case is shown in Fig. 36, where after a Move command is issued to the robot RBT on line 11, a hand action is issued to the robot hand HND on line 13. Also, via point data may be included in the command array as shown in Fig. 37.
[0198] (Sensor imaging timing) As shown in FIG. 6, the processor 300A includes an imaging timing setting unit 310. The imaging timing setting unit 310 determines the timing of issuing a trigger (imaging trigger) for the sensor unit 2 to capture an image, and the output unit 310 outputs the timing of issuing the imaging trigger to the robot controller 6 so that imaging is performed at the determined timing. That is, the imaging timing setting unit 310 determines the timing of issuing a trigger for the sensor unit 2 to capture the next image based on the timing at which the hand HND moves out of the imaging field of the sensor unit 2 in the middle of the moving path generated by the path generating unit 309. Since the moving path of the hand HND is different for each cycle, the imaging timing of the sensor unit 2 is different for each cycle. That is, the imaging timing setting unit 310 is configured to dynamically change the imaging timing of the sensor unit 2 for each cycle of the picking operation. The path generated by the path generating unit 309 may be the shortest path, in which case it is easy to determine the timing of issuing the trigger by the processor 300A.
[0199] By doing as described below, it is possible to calculate the optimum imaging trigger position, and furthermore, the calculated optimum imaging trigger position can be transmitted to the robot controller 6, and imaging processing can be executed at the optimum timing by a uniform robot program, following the changing imaging trigger position.
[0200] (Calculation of optimal imaging trigger position) First, the calculation of the optimal imaging trigger position will be explained. In calculating the optimal imaging trigger position, an interference detection algorithm is used to automatically calculate the fastest timing at which the robot RBT does not overlap the imaging target, and the position of the robot RBT at the obtained timing is set as the imaging trigger issuing position. Below, an example of a calculation method of the optimal imaging trigger position will be specifically explained according to the flowchart shown in FIG.
[0201] After the start, in step SH1, the user specifies an area in which the workpieces WK are piled up in plan view. In this embodiment, since the workpieces WK are piled up in a container BX as shown in Fig. 1, the inside of the container BX (also called a box) corresponds to the area in which the workpieces WK are piled up. In step SH1, the imaging timing setting unit 311 shown in Fig. 6 generates a user interface 85 for area specification shown in Fig. 39 and displays it on the display unit 3.
[0202] The user interface 85 for area designation is provided with an image display area 86 for displaying an image including the container BX captured by the sensor unit 2. In this image display area 86, images after processing using various image filters can be displayed. By looking at the image displayed in the image display area 86, the user can grasp the shape of the container BX, and if a workpiece WK is present, can also grasp the workpiece WK. Furthermore, the user interface 85 for area designation displays a selection window 87 for allowing the user to select a method for designating the above-mentioned area.
[0203] Methods for specifying the above-mentioned area include, for example, a method for specifying the four sides of the container BX, and a method for specifying the position and size of the container BX numerically, and explanatory texts and diagrams for these two methods are displayed in the selection window 87. The above-mentioned area may be specified by a method other than the above-mentioned two methods, in which case it is sufficient to increase the number of options. The selection window 87 is provided with buttons and the like for the user to select one of the above-mentioned two methods.
[0204] When the imaging timing setting unit 311 detects that a method of specifying the four sides of the container BX has been selected, it generates a four-side designation window 88 for specifying the four sides of the container BX, as shown in Figure 40, and displays it on the area designation user interface 85.
[0205] The four-side designation window 88 is a window for allowing the user to designate each of the four sides of the container BX in plan view. In the four-side designation window 88, an instruction to designate two points on the first side (corresponding to the upper side in FIG. 40) of the container BX, an instruction to designate two points on the second side (corresponding to the right side in FIG. 40) of the container BX, an instruction to designate two points on the third side (corresponding to the lower side in FIG. 40) of the container BX, and an instruction to designate two points on the fourth side (corresponding to the left side in FIG. 40) of the container BX are displayed. When the user designates the four sides as instructed, the imaging timing setting unit 311 draws four straight lines 1 to 4 in the image display area 86. The area surrounded by a rectangular frame 2000 (shown in FIG. 42) formed by the four straight lines 1 to 4 is specified as the area where the workpieces WK are piled up. That is, the imaging timing setting unit 311 accepts the input of the frame 2000 surrounding the area where the workpieces WK are piled up in plan view. The above designation can be made by the user clicking the mouse.
[0206] The method of inputting the area where the workpieces WK are to be piled up is not limited to the above-mentioned method, and may include, for example, a method in which the user specifies the four vertices of the container BX, a method in which the coordinates of the vertices constituting the surface are stored as fixed values, a method in which a well-known search algorithm is used to identify the position of the container BX and, based on the result, the coordinates of the four vertices of the top surface of the container BX are identified, etc. Once the four vertices are identified, a rectangular frame 2000 having those four vertices is determined, and the area within the rectangular frame 2000 can be identified as the area where the workpieces WK are to be piled up.
[0207] After the area where the workpieces WK are piled up in a plan view is specified, the depth of the container BX is specified. The image capture timing setting unit 311 generates a depth specification window 89 shown in FIG. 41 and displays it on the area specification user interface 85. Also, an image of the container BX viewed from diagonally above is displayed in the image display area 86. The depth specification window 89 is provided with a numerical input area 89a in which the depth of the container BX can be inputted as a numerical value, and a re-specify button 89b. When the image capture timing setting unit 311 detects that the re-specify button 89b has been pressed, it accepts the specification of the bottom position of the container BX on the image display area 86. This specification can also be made by clicking the mouse or the like. When the bottom position of the container BX is specified, the depth of the container BX can be obtained by calculating the difference with the top position of the container BX.
[0208] Then, the process proceeds to step SH2 of the flowchart shown in FIG. 38. In step SH2, the designation of the starting point for performing the optimum trigger calculation within the path of the hand HND is accepted. For example, assume that the path of the hand HND has been generated as shown by the dashed line in FIG. 42. Within this path, the coordinates can be specified in the order of the image capture standby position Pw, the container upper position Pu, the grip execution position Pg, the placement position Pp, and the image capture standby position Pw. When the user designates the grip execution position Pg, the coordinates of that position are registered as the coordinates of the starting point. The image capture timing setting unit 311 calculates the fastest timing at which the robot RBT does not overlap the image capture target (for example, the workpiece WK or the container BX) on the path of transition to the grip execution position Pg designated as the starting point, and sets that timing as the optimum trigger timing. Since the purpose is to determine the fastest timing at which the robot RBT does not overlap the image capture target, the point at which the robot RBT overlaps the image capture target is usually designated as the starting point.
[0209] The user can specify the starting point. The specification of the starting point will be specifically described with reference to FIG. 43. The sequence display area 80c in FIG. 43 shows the set route of the hand HND. In the sequence display area 80c, an image capture waiting position, an empty position above the box, an approach position, a gripping position, a retreat position, an empty position above the box, and a place position are specified as waypoints. The processor 300A generates a route to trace these multiple waypoints in order. These waypoints may be edited, for example, by clicking an add button, an insert button, or a delete button displayed in the sequence display area 80c to add a new waypoint or delete an already set waypoint.
[0210] The processor 300A accepts the selection of any one of the multiple waypoints set in the sequence display area 80c. For example, when the selection of a place position is accepted as a waypoint, a detailed setting window 90 relating to the place position can be superimposed on the sequence display area 80c. This detailed setting window 90 may be displayed for each of the multiple waypoints set in the sequence display area 80c. The detailed setting window 90 superimposed on the sequence display area 80c accepts operation settings, interference determination settings, and trigger settings. In the operation settings, it is possible to set whether or not to generate a path. When "generate path" is selected, the processor 300A generates multiple divided waypoints through which the hand HND should pass between the position above the box and the place position. The path generated by the processor 300A may be generated so that the robot RBT and the hand HND do not interfere with surrounding objects and the movement distance between the multiple waypoints listed in the sequence display area 80c is shorter, or the processor 300A may generate multiple movement path candidates and set the shortest path from the multiple movement path candidates as the movement path. The route to be generated is not limited to the route from the position above the box to the placement position, but may be a route from the image capture standby position through multiple waypoints and back to the image capture standby position. A route may be generated within a range corresponding to the section selected in the sequence display area 80c. The interference determination setting accepts the setting of a margin when determining whether the robot RBT or the hand HND will interfere with surrounding objects. The trigger setting also includes a selection area 90a for selecting whether or not to capture an image in this section. When "capture an image in this section" is selected, a mark 90b is displayed in the sequence display area 80c as shown on the right of FIG. 43.
[0211] In addition, when "imaging in this section" is selected, "imaging at an automatically set position" and "imaging at the end point of the section" may be further selected. When "imaging at an automatically set position" is selected, for example, a trigger may be issued at the earliest timing when the robot RBT does not overlap the imaging target, or an attribute called trigger issuance timing may be assigned to the way point or division way point when the robot RBT and the imaging target do not overlap. When "imaging at the end point of the section" is selected, for example, a trigger may be issued at the end point of the section linked to the window 90, or an attribute called trigger issuance timing may be assigned to the way point or division way point corresponding to the end point of the section linked to the window 90. In FIG. 43, the place position of section 5 is selected from among the multiple way points displayed in a list, and section 5 is the section linked to the window 90. The end point of section 5 may also be the place position.
[0212] In addition, when an attribute called trigger issuance timing is assigned to a way point or a divided way point, the robot controller 6 judges the attribute information assigned to the way point and the divided way points received from the processor 300A. A program corresponding to the attribute information may be created in advance, and the program corresponding to the attribute information may be executed, so that the robot controller 6 may be configured to dynamically follow the trigger issuance timing that may change for each picking operation without editing the program of the robot controller 6.
[0213] The starting point can be automatically specified. For example, since it is determined that the robot RBT covers the container BX at the gripping execution position Pg, that position may be automatically specified as the starting point.
[0214] Next, the process proceeds to step SH3 in the flowchart of FIG. 38. In step SH3, the imaging timing setting unit 311 sets a virtual line of sight obstacle. In this embodiment, a virtual solid figure 3000 is set as a virtual line of sight obstacle as shown in FIG. 42. The virtual solid figure 3000 is a figure whose outer shape is the edge of the imaging field of view of the sensor unit 2. The position of the bottom surface of this solid figure 3000 coincides with the position of the frame 2000. In addition, the shape of the bottom surface of the solid figure 3000 coincides with the shape of the frame 2000. The solid figure 3000 is a shape that extends from the frame 2000 toward the light receiving surface of the sensor unit 2. Specifically, the solid figure 3000 is a quadrangular pyramid formed by four virtual straight lines extending from the four vertices of the frame 2000 to the center of the light receiving surface of the sensor unit 2, and the four straight lines that form the frame 2000. The shape of the solid figure 3000 is not particularly limited, and may be a different shape depending on the shape of the container BX, etc.
[0215] Then, the process proceeds to step SH4 in the flowchart shown in Fig. 38. In step SH4, the path is divided into small segments from the starting point specified in step SH2. In the embodiment shown in Fig. 42, a plurality of divided via points Pd are set to divide the interval from the gripping execution position Pg, which is a via point, to the placement position Pp, which is the next via point. There may be only one divided via point Pd between the gripping execution position Pg and the placement position Pp, but the more the number, the more preferable since this improves the accuracy of the interference determination.
[0216] After setting the division via point Pd, the process proceeds to step SH5 of the flowchart shown in FIG. 38. In step SH5, the image capture timing setting unit 311 uses an interference determination algorithm to detect the timing at which the hand HND on the path does not interfere with the solid figure 3000. Specifically, in the interference determination, the division via point Pd set in step SH4 is used to determine whether the hand HND interferes with the solid figure 3000. When each division via point Pd is located inside the solid figure 3000 and when it is in contact with the outer surface of the solid figure 3000, it is determined that the hand HND interferes with the solid figure 3000, and in other cases, it is determined that the hand HND does not interfere with the solid figure 3000. Interference determination is performed on the multiple division via points Pd in order from the point closest to the grip execution position Pg. As a result, it is assumed that a division via point Pt that does not interfere with the solid figure 3000 is found.
[0217] In step SH6 of the flow chart shown in Fig. 38, when a division via point Pt that does not interfere with the three-dimensional figure 3000 is found, it is determined that when the hand HND is located at that point Pt, it will not interfere with the three-dimensional figure 3000 and it is also determined that it is the timing for the hand HND to move out of the imaging field of the sensor unit 2. As the optimal trigger position is denoted as point Pt in Fig. 42, the optimal trigger position can be determined with high accuracy by utilizing interference determination.
[0218] After the optimal trigger position is determined, the output unit 310 outputs the information to the robot controller 6. At this time, for example, it is assumed that the output unit 310 transmits route information as "several successive waypoints" as shown in the following example. Pw=[J1,J2,J3,J4,J5,J6] Pu = [J1, J2, J3, J4, J5, J6] · · Pp=[J1,J2,J3,J4,J5,J6] In addition to this via point information, information about which via point the trigger via point is can be sent. Assuming that the robot program is written to trace the route by tracing the via points from the front to the back, a program can be added to that process to check whether "the order of the via point just traveled = the number of the trigger via point" and a program like the one below can be written to issue a trigger if the condition is met.
[0219] Pseudocode: For i=0 To n-1 Move via point [i] If i = t Trigger firing Endif Endfor t: The trigger timing information that was sent. In this case, it is assumed that an integer indicating the number of the trigger via point from the beginning is included. n: The number of waypoints that must be traveled, also typically sent externally. Waypoint i: The location information of the ith waypoint that must be traveled to, which is usually sent from outside.
[0220] When determining the earliest timing at which the robot RBT is no longer covered by the image capture target, a method other than the interference determination may be used. For example, light is emitted from each of the four sides of the container BX, and if the light is blocked, it is determined that the robot RBT is covered by the image capture target, and if the light is not blocked, it is determined that the robot RBT is not covered by the image capture target. Such a method can be called ray tracing.
[0221] (Effects of the embodiment) As described above, according to this embodiment, first, when the sensor unit 2 captures an image of the workspace in accordance with an imaging trigger command, imaging data including the workpiece WK is output from the sensor unit 2 to the processor 300A. The processor 300A determines the workpiece WK to be grasped based on the imaging data output from the sensor unit 2, and generates a movement path for the hand HND from the workpiece WK to be grasped to a predetermined placement position. The hand HND moves along this movement path, completing one cycle of the picking operation.
[0222] The hand HND moves to outside the imaging field of view of the sensor unit 2 during the movement path. The timing of this movement outside the imaging field of view is determined by the imaging timing setting unit 311. The processor 300A determines the timing of issuing a trigger to cause the sensor unit 2 to capture the next image based on the timing of the hand HND moving outside the imaging field of view. The sensor unit 2 captures an image of the working space according to a trigger command issued at the determined issuance timing, so that the hand HND does not overlap the workpiece WK and the workpiece WK within the imaging field of view can be imaged.
[0223] In the next cycle, the number of workpieces WK has been reduced, and the state of the workpieces WK in the workspace is different from that in the previous cycle. Therefore, the movement path of the hand HND is also different from that in the previous cycle, and the timing at which the hand HND moves out of the imaging field of the sensor unit 2 is also different from that in the previous cycle. In this embodiment, the imaging timing of the sensor unit 2 can be dynamically changed for each picking operation cycle to automatically issue a trigger at the optimal timing. This eliminates the need for the user to adjust the trigger position, improving convenience.
[0224] The above-described embodiment is merely illustrative in all respects and should not be construed as limiting. Furthermore, all modifications and variations within the scope of the claims are within the scope of the present invention. [Industrial Applicability]
[0225] As described above, the image processing device according to the present invention can be used to control a robot that performs a picking operation, for example. [Explanation of symbols]
[0226] 2 Sensor section (imaging section) 300 Image processing device 300A Processor 312 Editing and Generation Unit HND Hand RBT Robot WK Work
Claims
1. An image processing device used to control a robot that performs a cycle of picking operations to grasp and sequentially pick up predetermined workpieces from among a plurality of workpieces stacked in a working space, an imaging unit that images the working space in which a plurality of workpieces are piled up in accordance with a trigger command and outputs the image data; a processor that determines a workpiece to be grasped from among the workpieces piled up in the working space based on the imaging data output from the imaging unit, and sets a path of a hand from grasping the workpiece to placing it on a predetermined placement position; The processor is an image processing device that dynamically changes the imaging timing of the imaging unit for each cycle of the picking operation by determining an issuance timing of a trigger for causing the imaging unit to capture an image next based on a timing when the hand moves out of an imaging field of the imaging unit during the path, The image processing device is characterized in that the processor generates information including the coordinates of a plurality of consecutive waypoints to set the route, generates trigger issuance information that identifies one of the consecutive waypoints that corresponds to the timing of issuing the trigger, and outputs the coordinates of the consecutive waypoints including the waypoint that corresponds to the timing of issuing the trigger and the trigger issuance information to a robot controller that controls the robot.
2. 2. The image processing device according to claim 1, The processor is an image processing device that outputs to the robot controller the coordinates of a fixed via point having any one of the attributes of the hand's approach position, gripping execution position, and post-grasping retreat position, and attribute information indicating the attribute of the fixed via point.
3. 3. The image processing device according to claim 2, The image processing device includes: a work model input unit that receives input of a work model and gripping position information of the hand on the work model; A measurement unit that performs three-dimensional measurement of the working space in which a workpiece exists; a search unit that searches for a gripping position of a workpiece stacked in the working space based on a three-dimensional measurement result by the measurement unit and the workpiece model input by the workpiece model input unit; and an interference determination unit that determines whether the hand will interfere with a surrounding object when grasping the workpiece at the grasping position searched by the search unit, and determines a posture of the hand that avoids interference with the surrounding object.
4. 4. The image processing device according to claim 3, The processor is an image processing device that determines a plurality of via points along which the hand can avoid interference with surrounding objects based on the judgment result by the interference judgment unit, and generates a path for the hand that connects the via points.
5. 5. The image processing device according to claim 1, The processor sets a virtual three-dimensional figure whose outer shape is the edge of the imaging field of view of the imaging unit, determines whether the hand interferes with the three-dimensional figure, and determines the timing when the hand does not interfere with the three-dimensional figure as the timing when the hand moves outside the imaging field of view of the imaging unit.
6. 6. The image processing device according to claim 5, The processor is an image processing device that receives input of a frame that surrounds the area in which the work is stacked in a planar view, and sets the three-dimensional figure whose bottom surface has the shape of the frame and whose shape extends toward the light receiving surface of the imaging unit.
7. 7. The image processing device according to claim 5, When determining whether or not the hand will interfere with the three-dimensional figure, the processor sets divided via points that divide the space between adjacent via points among a plurality of via points set on the path, and uses the divided via points.
8. 8. The image processing device according to claim 1, The processor is an image processing device that determines the timing of issuing a trigger between the gripping execution position of the hand and the placement position of the workpiece, and outputs the position of the robot corresponding to that timing as the trigger position.
9. 9. The image processing device according to claim 1, The image processing device includes: an edit screen generating unit that generates an edit screen in which, when a plurality of via points exist on the route, an order of via points is indicated and an edit screen on which the plurality of via points can be individually edited; a display unit that displays the edit screen generated by the edit screen generation unit.
10. An image processing device used to control a robot that performs a cycle of picking operations to grasp and sequentially pick up predetermined workpieces from among a plurality of workpieces stacked in a working space, comprising: an imaging unit that images the working space in which a plurality of workpieces are piled up in accordance with a trigger command and outputs the image data; a processor that determines a workpiece to be grasped from among the workpieces piled up in the working space based on the imaging data output from the imaging unit, and sets a path for a hand to grasp the workpiece and place it on a predetermined placement position; an edit screen generating unit that generates an edit screen in which, when a plurality of via points exist on the route, an order of via points is indicated and an edit screen on which the plurality of via points can be individually edited; a display unit that displays the edit screen generated by the edit screen generation unit; Equipped with The image processing device is characterized in that the processor dynamically changes the imaging timing of the imaging unit for each picking operation cycle by determining the timing of issuing a trigger to cause the imaging unit to capture the next image based on the timing at which the hand moves out of the imaging field of view of the imaging unit during the path.
11. 11. The image processing device according to claim 10, The processor, An image processing device that determines the timing of issuing the trigger in a section on the route that corresponds to a waypoint selected on the editing screen.
Citation Information
Patent Citations
Robot setting device, robot system, robot setting method, robot setting program and recording medium readable by computer as well as equipment with the same recorded
JP2018144159A
Robot control device, robot control method, and robot control program
JP2019214100A
