A control method of a robot system that includes a robot and a hand and takes out each of workpieces loaded in bulk in a case, the method comprising:
- an operation control step of changing a position and an orientation of the robot;
- an image capturing step of capturing an image of the workpieces with a three-dimensional sensor that acquires information about distances to the workpieces;
- a generation step of generating three-dimensional information including information about positions of measurement points set to the workpieces based on an output from the three-dimensional sensor;
- a detection step of detecting the positions and the orientations of the workpieces by implementing model matching in which the three-dimensional information about the workpieces is compared with three-dimensional shape data of the workpieces;
- a selection step of selecting a target workpiece to be taken out by the robot based on the positions and the orientations of the workpieces;
- a deletion step of deleting information about at least part of the measurement points included in the three-dimensional information;
- and
- a determination step of determining a state after the robot implements an operation of lifting the workpiece, wherein
- the generation step includes generating first three-dimensional information based on an output from the three-dimensional sensor that has captured an image of the workpiece before the robot implements an operation of gripping the target workpiece,
- the operation control step includes a step of controlling the robot so as to stop after implementing an operation of gripping and lifting the target workpiece selected based on the first three-dimensional information,
- the generation step includes generating second three-dimensional information based on an output from the three-dimensional sensor that has captured an image of the workpieces after the robot has implemented the operation of lifting the target workpiece,
- the deletion step includes a step of comparing a position of the measurement point in the first three-dimensional information with a position of the measurement point in the second three-dimensional information, a step of detecting, as a specified measurement point, the measurement point in the first three-dimensional information from which the measurement point in the second three-dimensional information is present within a predetermined distance range, and a step of generating third three-dimensional information in which information about the specified measurement point is deleted from the first three-dimensional information,
- the detection step includes a step of detecting a position and an orientation of a workpiece included in the third three-dimensional information,
- the determination step includes a step of determining whether or not the workpiece included in the third three-dimensional information matches the target workpiece, and
- the operation control step includes a step of controlling, when the workpiece included in the third three-dimensional information matches the target workpiece, the robot so as to convey the workpiece gripped by the hand to a predetermined conveyance destination position.