DETECTION DEVICE AND DETECTION METHOD
An imaging control unit of this detection device controls the imaging orientation of a three-dimensional camera such that one end of a workpiece enters the field of view of the three-dimensional camera, and then controls the imagining orientation of the three-dimensional camera such that the other end of the workpiece enters the field of view of the three-dimensional camera. A coordinate acquisition unit acquires the position coordinates of one end acquired by the three-dimensional camera from three-dimensional information pertaining to the one end, and acquires the position coordinates of another end acquired by the three-dimensional camera from three-dimensional information pertaining to the other end.
The present invention relates to a detection device and a detection method for detecting a position of a long workpiece.
BACKGROUND ARTA detection device and a detection method capable of detecting the positions of both ends of a long workpiece have been conventionally disclosed (see JP S63-072506 U, for example).
SUMMARY OF THE INVENTIONIn order to detect the positions of both ends of a long workpiece, it is necessary to move the detection sensor to the vicinity of each of one end and another end of the long workpiece. Therefore, it takes time to detect the positions of both ends of the long workpiece.
The present invention has been devised in order to solve the above problem, and an object of the present invention is to provide a detection device and a detection method capable of reducing the time required for detecting the positions of both ends of a long workpiece.
According to a first aspect of the present invention, there is provided a detection device that detects a position of a long workpiece, the detection device comprising: a three dimensional camera which is configured to acquire three dimensional information, and an imaging direction of which is configured to be changed; an imaging control unit configured to control the imaging direction of the three dimensional camera; and a coordinate acquisition unit configured to acquire position coordinates of the long workpiece from the three dimensional information acquired by the three dimensional camera, wherein the imaging control unit changes the imaging direction of the three dimensional camera so that one end of the long workpiece enters a field of view of the three dimensional camera, and then changes the imaging direction of the three dimensional camera so that another end of the long workpiece enters the field of view of the three dimensional camera, and the coordinate acquisition unit acquires position coordinates of the one end from the three dimensional information of the one end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the one end enters the field of view of the three dimensional camera, and acquires position coordinates of the other end from the three dimensional information of the other end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the other end enters the field of view of the three dimensional camera.
According to a second aspect of the present invention, there is provided a detection method for detecting a position of a long workpiece based on three dimensional information acquired by a three dimensional camera, the detection method comprising: an imaging step of acquiring the three dimensional information by changing an imaging direction of the three dimensional camera so that one end of the long workpiece enters a field of view of the three dimensional camera and then acquiring the three dimensional information by changing the imaging direction of the three dimensional camera so that another end of the long workpiece enters the field of view of the three dimensional camera; and a coordinate acquisition step of acquiring position coordinates of the one end from the three dimensional information of the one end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the one end enters the field of view of the three dimensional camera, and acquiring position coordinates of the other end from the three dimensional information of the other end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the other end enters the field of view of the three dimensional camera.
According to the present invention, the time required for detecting the positions of both ends of the long workpiece can be reduced.
[Configuration of Coordinate Detection Device]
The three dimensional camera 14 is, for example, a camera including a projection unit that projects a pattern on a subject, and an imaging unit that images the subject on which the pattern is projected. The three dimensional camera 14 acquires three dimensional information of a workpiece 24 placed on a table 20 as shown in
The coordinate acquisition unit 16 acquires position coordinates of the workpiece 24 in a three dimensional space, from the three dimensional information of the workpiece 24 acquired by the three dimensional camera 14. Acquisition of the position coordinates will be described in detail later.
The imaging control unit 18 controls the position of the three dimensional camera 14, and the imaging direction of the three dimensional camera 14. The imaging control unit 18 outputs, to a robot control device 26, a command value for the position of the three dimensional camera 14, and a command value for the imaging direction of the three dimensional camera 14. The robot control device 26 controls the robot 12 based on the command values input from the imaging control unit 18, to change the position of the three dimensional camera 14 and the imaging direction of the three dimensional camera 14.
The position detection device 10 includes a computer including an arithmetic processing unit and a storage (not shown). The arithmetic processing unit includes, for example, a processor such as a central processing unit (CPU) or a micro processing unit (MPU), and a memory including a non-transitory tangible computer-readable recording medium such as a ROM or a RAM. The storage is a non-transitory tangible computer-readable recording medium such as a hard disk or a solid-state drive (SSD). The coordinate acquisition unit 16 and the imaging control unit 18 are realized by, for example, the arithmetic processing unit executing a program stored in the storage.
[Acquisition of Position Coordinates of Workpiece]
The coordinate acquisition unit 16 acquires the position coordinates of the workpiece 24 in the three dimensional space, based on the three dimensional information acquired by the three dimensional camera 14, the information about the position of the three dimensional camera 14, and the information about the imaging direction of the three dimensional camera 14. The information about the position of the three dimensional camera 14 and the information about the imaging direction of the three dimensional camera 14 can be obtained from the command value for the position of the three dimensional camera 14 and the command value for the imaging direction of the three dimensional camera 14, which are output to the robot control device 26 by the imaging control unit 18. The information about the position of the three dimensional camera 14 and the information about the imaging direction of the three dimensional camera 14 may be obtained from position information of a tip of the arm 22 of the robot 12, and posture information of the robot 12. The position information of the tip of the arm 22 of the robot 12 and the posture information of the robot 12 are obtained from the robot control device 26.
The position detection device 10 of the present embodiment can detect the positions of both ends of the long workpiece 24. Further, the position detection device 10 can detect a midpoint of the long workpiece 24 in the axial direction thereof. The workpiece 24 corresponds to a long workpiece of the present invention.
As shown in
As shown in
As shown in
The coordinate acquisition unit 16 acquires the position coordinates of the Y-axis direction negative side end portion of the workpiece 24 in the workpiece coordinate system, from the three dimensional information of the Y-axis direction negative side end portion of the workpiece 24 acquired by the three dimensional camera 14, the information about the position of the three dimensional camera 14, and the information about the imaging direction of the three dimensional camera 14. For example, as shown in
The coordinate acquisition unit 16 acquires the position coordinates of the Y-axis direction positive side end portion of the workpiece 24 in the workpiece coordinate system, from the three dimensional information of the Y-axis direction positive side end portion of the workpiece 24 acquired by the three dimensional camera 14, the information about the position of the three dimensional camera 14, and the information about the imaging direction of the three dimensional camera 14. For example, as shown in
The coordinate acquisition unit 16 calculates the position coordinates of the midpoint of the workpiece 24 in the Y-axis direction in the workpiece coordinate system, based on the minimum Y-axis component value Ymin and the maximum Y-axis component value Ymax of the workpiece 24. The position coordinates (Xc, Yc, Zc) of the midpoint of the workpiece 24 are obtained as follows.
(Xc, Yc, Zc)=(0, (Ymax+Ymin)/2, 0)
Instead of the position coordinates of the midpoint of the workpiece 24 in the Y-axis direction in the workpiece coordinate system, the coordinate acquisition unit 16 may calculate the coordinates of an internally dividing point other than the midpoint of the workpiece 24 in the Y-axis direction in the workpiece coordinate system.
The coordinate acquisition unit 16 converts the position coordinates (Xc, Yc, Zc) of the midpoint of the workpiece 24 in the workpiece coordinate system into position coordinates in a user coordinate system used for control of the robot 12. The workpiece coordinate system corresponds to a first coordinate system of the present invention, and the user coordinate system corresponds to a second coordinate system of the present invention.
[Workpiece Position Detection Process]
In step S1, the imaging control unit 18 performs control such that the three dimensional camera 14 is positioned above the workpiece 24 in the vertical direction, and the process proceeds to step S2.
In step S2, the imaging control unit 18 performs control such that the imaging direction of the three dimensional camera 14 is directed downward in the vertical direction, and the process proceeds to step S3.
In step S3, the coordinate acquisition unit 16 sets the workpiece coordinate system from the three dimensional information of the workpiece 24 acquired by the three dimensional camera 14, the information about the position of the three dimensional camera 14, and the information about the imaging direction of the three dimensional camera 14, and the process proceeds to step S4.
In step S4, the coordinate acquisition unit 16 determines whether or not both ends of the workpiece 24 are within the field of view of the three dimensional camera 14, based on the three dimensional information acquired by the three dimensional camera 14. When both ends of the workpiece 24 are within the field of view of the three dimensional camera 14 (step S4: YES), the process proceeds to step S7, and when at least one end of the workpiece 24 is not within the field of view of the three dimensional camera 14 (step S4: NO), the process proceeds to step S5.
In step S5, the imaging control unit 18 controls the imaging direction of the three dimensional camera 14 so that the Y-axis direction negative side end portion of the workpiece 24 (one end of the workpiece 24) enters the field of view of the three dimensional camera 14, and the process proceeds to step S6. The imaging control unit 18 controls the imaging direction of the three dimensional camera 14 based on the three dimensional information acquired by the three dimensional camera 14.
In step S6, the imaging control unit 18 controls the imaging direction of the three dimensional camera 14 so that the Y-axis direction positive side end portion of the workpiece 24 (the other end of the workpiece 24) enters the field of view of the three dimensional camera 14, and the process proceeds to step S7. The imaging control unit 18 controls the imaging direction of the three dimensional camera 14 based on the three dimensional information acquired by the three dimensional camera 14.
In step S7, the coordinate acquisition unit 16 acquires the Y-axis component value Ymin as the position information of the Y-axis direction negative side end portion of the workpiece 24 (one end of the workpiece 24), and the process proceeds to step S8.
In step S8, the coordinate acquisition unit 16 acquires the Y-axis component value Ymax as the position information of the Y-axis direction positive side end portion of the workpiece 24 (the other end of the workpiece 24), and the process proceeds to step S9.
In step S9, the coordinate acquisition unit 16 calculates the position coordinates of the midpoint of the workpiece 24 in the workpiece coordinate system, based on the Y-axis component value Ymin and the Y-axis component value Ymax, and the process proceeds to step S10.
In step S10, the coordinate acquisition unit 16 converts the position coordinates of the midpoint of the workpiece 24 in the workpiece coordinate system into position coordinates in the user coordinate system, and the workpiece position detection process ends.
[Operational Effect]
The position detection device 10 of the present embodiment detects the positions of both ends of the workpiece 24 using the three dimensional information of the workpiece 24 acquired by the three dimensional camera 14. The position detection device can also detect the positions of both ends of the workpiece 24 using two dimensional information of the workpiece 24 acquired by a two dimensional camera 28 (
The position of the two dimensional camera 28 is moved to above the workpiece 24 in the vertical direction as shown in
In order for the two dimensional camera 28 to obtain the two dimensional information of both ends of the workpiece 24, it is necessary to increase the distance between the two dimensional camera 28 and the workpiece 24. As a result, as shown in
As described above, whether the positions of both ends of the workpiece 24 can be detected using the two dimensional information of the workpiece 24 acquired by the two dimensional camera 28 depends on the motion range of the arm 22 of the robot 12. In addition, even when the positions of both ends of the workpiece 24 can be detected by moving the two dimensional camera 28 within the motion range of the arm 22 of the robot 12, it takes time to move the two dimensional camera 28, and therefore, there is a problem that it takes a long time to detect the positions of both ends of the workpiece 24.
Therefore, in the position detection device 10 of the present embodiment, the position of the workpiece 24 is detected using the three dimensional information of the workpiece 24 acquired by the three dimensional camera 14. The imaging control unit 18 controls the imaging direction of the three dimensional camera 14 so that one end of the workpiece 24 enters the field of view of the three dimensional camera 14, and then controls the imaging direction of the three dimensional camera 14 so that the other end of the workpiece 24 enters the field of view of the three dimensional camera 14. The coordinate acquisition unit 16 acquires the position coordinates of one end of the workpiece 24 from the three dimensional information of the one end of the workpiece 24 acquired by the three dimensional camera 14, and acquires the position coordinates of the other end of the workpiece 24 from the three dimensional information of the other end of the workpiece 24 acquired by the three dimensional camera 14. As a result, the position detection device 10 can detect the positions of both ends of the long workpiece 24. Further, the position detection device 10 can detect the positions of both ends of the workpiece 24 in a short time.
In the position detection device 10 of the present embodiment, the coordinate acquisition unit 16 calculates the position coordinates of the midpoint of the workpiece 24 in the longitudinal direction thereof, based on the position coordinates of one end of the workpiece 24 and the position coordinates of the other end of the workpiece 24. As a result, the position detection device 10 can detect the position of the midpoint of the long workpiece 24 in the longitudinal direction thereof.
In the position detection device 10 of the present embodiment, the coordinate acquisition unit 16 calculates the position coordinates of the midpoint of the workpiece 24 in the longitudinal direction thereof in the workpiece coordinate system in which the longitudinal direction of the workpiece 24 is the Y-axis direction, and converts the calculated position coordinates of the midpoint into the position coordinates in the user coordinate system used for control of the robot 12. As a result, the position detection device 10 can detect the position of the midpoint of the workpiece 24 in the longitudinal direction thereof in the user coordinate system.
[Technical Concepts Obtainable from Embodiment]
The present invention provides the detection device (10) that detects the position of the long workpiece (24), the detection device including: the three dimensional camera (14) which is configured to acquire the three dimensional information, and the imaging direction of which is configured to be changed; the imaging control unit (18) configured to control the imaging direction of the three dimensional camera; and the coordinate acquisition unit (16) configured to acquire the position coordinates of the long workpiece from the three dimensional information acquired by the three dimensional camera, wherein the imaging control unit changes the imaging direction of the three dimensional camera so that one end of the long workpiece enters the field of view of the three dimensional camera, and then changes the imaging direction of the three dimensional camera so that another end of the long workpiece enters the field of view of the three dimensional camera, and the coordinate acquisition unit acquires the position coordinates of the one end from the three dimensional information of the one end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the one end enters the field of view of the three dimensional camera, and acquires the position coordinates of the other end from the three dimensional information of the other end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the other end enters the field of view of the three dimensional camera.
In the above-described detection device, the coordinate acquisition unit may calculate the position coordinates of the internally dividing point of the long workpiece in the longitudinal direction thereof, based on the position coordinates of the one end and the position coordinates of the other end.
In the above-described detection device, the coordinate acquisition unit may calculate the position coordinates of the midpoint of the long workpiece in the longitudinal direction thereof.
In the above-described detection device, the long workpiece may be a workpiece gripped by the robot (12), and the coordinate acquisition unit may calculate the position coordinates of the internally dividing point in the first coordinate system in which at least the longitudinal direction of the long workpiece is set as the coordinate axis direction, and convert the position coordinates of the internally dividing point in the first coordinate system into the position coordinates in the second coordinate system used for control of the robot.
In the above-described detection device, the three dimensional camera may be fixed to the arm (22) of the robot, or may be rotatably held by the arm in a manner so that the imaging direction is changed.
The present invention provides the detection method for detecting the position of the long workpiece based on three the dimensional information acquired by the three dimensional camera, the detection method including: the imaging step of acquiring the three dimensional information by changing the imaging direction of the three dimensional camera so that one end of the long workpiece enters the field of view of the three dimensional camera and then acquiring the three dimensional information by changing the imaging direction of the three dimensional camera so that another end of the long workpiece enters the field of view of the three dimensional camera; and the coordinate acquisition step of acquiring the position coordinates of the one end from the three dimensional information of the one end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the one end enters the field of view of the three dimensional camera, and acquiring the position coordinates of the other end from the three dimensional information of the other end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the other end enters the field of view of the three dimensional camera.
The above-described detection method may further include the internally dividing point acquisition step of calculating the position coordinates of the internally dividing point of the long workpiece in the longitudinal direction thereof, based on the position coordinates of the one end and the position coordinates of the other end that are acquired in the coordinate acquisition step.
In the above-described detection method, the internally dividing point acquisition step may include calculating the position coordinates of the midpoint of the long workpiece in the longitudinal direction thereof.
In the above-described detection method, the long workpiece may be a workpiece gripped by the robot, and the internally dividing point acquisition step includes calculating the position coordinates of the internally dividing point in the first coordinate system in which at least the longitudinal direction of the long workpiece is set as the coordinate axis direction, and converting the position coordinates of the internally dividing point in the first coordinate system into the position coordinates in the second coordinate system used for control of the robot.
Claims
1. A detection device that detects a position of a long workpiece, the detection device comprising:
- a three dimensional camera which is configured to acquire three dimensional information, and an imaging direction of which is configured to be changed;
- an imaging control unit configured to control the imaging direction of the three dimensional camera; and
- a coordinate acquisition unit configured to acquire position coordinates of the long workpiece from the three dimensional information acquired by the three dimensional camera, wherein
- the imaging control unit changes the imaging direction of the three dimensional camera so that one end of the long workpiece enters a field of view of the three dimensional camera, and then changes the imaging direction of the three dimensional camera so that another end of the long workpiece enters the field of view of the three dimensional camera, and
- the coordinate acquisition unit acquires position coordinates of the one end from the three dimensional information of the one end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the one end enters the field of view of the three dimensional camera, and acquires position coordinates of the other end from the three dimensional information of the other end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the other end enters the field of view of the three dimensional camera.
2. The detection device according to claim 1, wherein
- the coordinate acquisition unit calculates position coordinates of an internally dividing point of the long workpiece in a longitudinal direction thereof, based on the position coordinates of the one end and the position coordinates of the other end.
3. The detection device according to claim 2, wherein
- the coordinate acquisition unit calculates position coordinates of a midpoint of the long workpiece in the longitudinal direction thereof.
4. The detection device according to claim 2, wherein
- the long workpiece is a workpiece gripped by a robot, and
- the coordinate acquisition unit calculates position coordinates of the internally dividing point in a first coordinate system in which at least the longitudinal direction of the long workpiece is set as a coordinate axis direction, and converts the position coordinates of the internally dividing point in the first coordinate system into position coordinates in a second coordinate system used for control of the robot.
5. The detection device according to claim 1, wherein
- the three dimensional camera is fixed to an arm of a robot, or is rotatably held by the arm in a manner so that the imaging direction is changed.
6. A detection method for detecting a position of a long workpiece based on three dimensional information acquired by a three dimensional camera, the detection method comprising:
- an imaging step of acquiring the three dimensional information by changing an imaging direction of the three dimensional camera so that one end of the long workpiece enters a field of view of the three dimensional camera and then acquiring the three dimensional information by changing the imaging direction of the three dimensional camera so that another end of the long workpiece enters the field of view of the three dimensional camera; and
- a coordinate acquisition step of acquiring position coordinates of the one end from the three dimensional information of the one end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the one end enters the field of view of the three dimensional camera, and acquiring position coordinates of the other end from the three dimensional information of the other end acquired by the three dimensional camera when the imaging direction of the three dimensional camera is changed so that the other end enters the field of view of the three dimensional camera.
7. The detection method according to claim 6, further comprising an internally dividing point acquisition step of calculating position coordinates of an internally dividing point of the long workpiece in a longitudinal direction thereof, based on the position coordinates of the one end and the position coordinates of the other end that are acquired in the coordinate acquisition step.
8. The detection method according to claim 7, wherein
- the internally dividing point acquisition step includes calculating position coordinates of a midpoint of the long workpiece in the longitudinal direction thereof.
9. The detection method according to claim 7, wherein
- the long workpiece is a workpiece gripped by a robot, and
- the internally dividing point acquisition step includes calculating position coordinates of the internally dividing point in a first coordinate system in which at least the longitudinal direction of the long workpiece is set as a coordinate axis direction, and converting the position coordinates of the internally dividing point in the first coordinate system into position coordinates in a second coordinate system used for control of the robot.
Type: Application
Filed: Jul 8, 2021
Publication Date: Sep 7, 2023
Inventor: Tadanori SUZUKI (Yamanashi-ken)
Application Number: 18/015,344