Machining apparatus, controller of machining apparatus, and control method of machining apparatus

The processing machine uses a depth camera and control units to process workpieces based on real samples, addressing the lack of three-dimensional data by determining cutting amounts from depth images, ensuring accurate machining without pre-defined data and reducing computational and storage needs.

JP2025103946APending Publication Date: 2025-07-09KOMATSU LTD

Patent Information

Application Number
JP2023221709
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-07-09

AI Technical Summary

Technical Problem

Existing control devices for processing machines require three-dimensional data to control the machining process, which may not be available for certain target shapes.

Method used

A processing machine equipped with a depth camera, a target specifying unit, a position measuring unit, an alignment unit, a cutting amount determining unit, and a tool control unit to process a workpiece based on a real sample without pre-defined three-dimensional data, using depth images to determine cutting amounts and tool movements.

Benefits of technology

Enables machining of a workpiece according to a target shape represented by a sample, ensuring accurate cutting based on actual samples without the need for pre-defined three-dimensional data, reducing calculation and storage requirements while maintaining high precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025103946000001_ABST
    Figure 2025103946000001_ABST
Patent Text Reader

Abstract

To machine a workpiece without preparing a machining program.SOLUTION: A target specifying unit specifies a target shape on the basis of a first depth image showing a sample which represents a target shape of a workpiece and is imaged by a depth camera. A position measurement unit calculates a three-dimensional position of a surface of a workpiece on the basis of a second depth image showing the workpiece imaged by the depth camera. A positioning unit calculates a three-dimensional position of a target shape, which is obtained when the workpiece is superposed on the target shape, on the basis of three-dimensional data representing the target shape of the workpiece and the three-dimensional position of the workpiece. A notching quantity determination unit determines a notching quantity for each of a plurality of points on a surface of a workpiece on the basis of a difference in a line-of-sight direction between a three-dimensional position of the surface of the workpiece when the workpiece is seen from a predetermined viewpoint and a three-dimensional position of a surface of the target shape. A tool control unit moves a tool on the basis of the determined notching quantities.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a processing machine, a control device for a processing machine, and a control method for a processing machine. It relates to.

Background Art

[0002] A control device for a processing machine reads a processing program used for processing a workpiece and drives the processing machine by executing the program to cut the workpiece into a desired shape. On the other hand, Patent Document 1 discloses a technique capable of processing a workpiece without preparing a processing program.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] According to the control device according to Patent Document 1, in order to control a processing machine, it is necessary to prepare three-dimensional data representing a target shape. On the other hand, although a sample of the target shape is available, there may be no three-dimensional data. An object of the present disclosure is to provide a processing machine, a control device for a processing machine, and a control method for a processing machine that can process a workpiece according to a target shape represented by the sample based on a real sample.

Means for Solving the Problems

[0005] According to one aspect of the present invention, a processing machine includes a tool for machining a workpiece, a depth camera installed so that the workpiece enters an imaging range and for imaging the depth of a subject, a target specifying unit for specifying the target shape based on a first depth image obtained by the depth camera imaging a sample representing the target shape of the workpiece, a position measuring unit for calculating the three-dimensional position of the surface of the workpiece based on a second depth image obtained by the depth camera imaging the workpiece, an alignment unit for calculating the three-dimensional position of the target shape when the workpiece and the target shape are superimposed based on the target shape and the three-dimensional position of the workpiece, a cutting amount determining unit for determining the cutting amount at each of a plurality of points on the surface of the workpiece based on the difference in the line-of-sight direction between the three-dimensional position of the surface of the workpiece and the three-dimensional position of the surface of the target shape when the workpiece is viewed from a predetermined viewpoint, and a tool control unit for moving the tool based on the determined cutting amount.

Advantages of the Invention

[0006] According to the above aspect, based on an actual sample, the workpiece can be machined according to the target shape represented by the sample.

Brief Description of the Drawings

[0007]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Embodiments for Carrying Out the Invention

[0008] 〈First Embodiment〉 《Configuration of Machine Tool 1》 Hereinafter, embodiments will be described in detail with reference to the drawings. FIG. 1 is a perspective view of a machine tool according to a first embodiment. The machine tool 1 includes a table 10, a jig 20, a plurality of stereo cameras 30, a plurality of projectors 31, a robot arm 40, a tool 60, and a control device 70. In other embodiments, the machine tool 1 may be, for example, a machining center. The machine tool 1 according to the first embodiment recognizes the shape of a sample S prepared by a user and cuts out the shape of the sample S from a workpiece W. The sample S represents the target shape of cutting.

[0009] The table 10 is the base of the machine tool 1. The jig 20 is provided on the table 10. The jig 20 supports the workpiece W by sandwiching it.

[0010] The stereo camera 30 captures a depth image of a subject included in the imaging range. The stereo camera 30 is an example of a depth camera. The stereo camera 30 is provided such that the installation area of the work W is included in the imaging range. The stereo camera 30 is installed, for example, on the inner wall of the processing machine 1 so as to overlook the table 10. The stereo camera 30 is preferably fixed with a jig made of a material that is less likely to cause thermal expansion so that its relative position with respect to the table 10 does not change. A plurality of stereo cameras 30 are arranged so as to complement each other's blind spots. In the example shown in FIG. 1, the processing machine 1 is provided with four stereo cameras 30 and can capture depth images from four directions. Note that in other embodiments, the number of stereo cameras 30 may be one or more. Also, depth images may be measured from two directions or one direction instead of four directions. The stereo camera 30 is attached to the four corners of the ceiling of a substantially rectangular parallelepiped housing that covers the processing machine 1. Note that since the stereo camera 30 only needs to be fixed to the processing machine 1, it may be fixed not only to the housing but also to, for example, four pillars.

[0011] The projector 31 projects a random dot pattern onto the imaging range of the stereo camera 30. The random dot pattern is a pattern in which dots of light are arranged irregularly. The random dot pattern is an example of an aperiodic pattern. The projector according to other embodiments may project other aperiodic patterns such as a pattern in which a plurality of curves are arranged irregularly. A plurality of projectors 31 are provided, for example, in the vicinity of each of the plurality of stereo cameras 30. A plurality of projectors 31 are arranged so as to complement each other's blind spots. By photographing a subject onto which the random dot pattern is projected, the stereo camera 30 can maintain the accuracy of stereo matching even when the subject has a flat portion, a periodic shape, or a pattern.

[0012] FIG. 2 is a perspective view showing the configuration of the robot arm 40 according to the first embodiment. The robot arm 40 movably supports a tool 60. The tool 60 is supported at the tip of the robot arm 40. The tool 60 cuts a workpiece W. In other embodiments, the tool 60 may grind the workpiece W. The robot arm 40 may be, for example, a six-axis vertical articulated robot. The robot arm 40 includes a base 41, a first arm 42, a second arm 43, a third arm 44, a fourth arm 45, a fifth arm 46, and a spindle 47. The base 41 is fixedly mounted on the table 10 so as to be rotatable about a first axis O1 extending in the vertical direction. The first arm 42 is rotatably connected to the first axis O1 about a second axis O2 orthogonal to the first axis O1. The second arm 43 is rotatably connected to the first arm 42 about a third axis O3 parallel to the second axis O2. The third arm 44 is rotatably connected to the second arm 43 about a fourth axis O4 parallel to the third axis O3. The fourth arm 45 is rotatably connected to the third arm 44 about a fifth axis O5 extending in the axial direction of the third arm 44. The fifth arm 46 is rotatably connected to the fourth arm 45 about a sixth axis O6 orthogonal to the fifth axis O5. The spindle 47 is provided at the tip of the fifth arm 46 and rotatably supports the tool 60.

[0013] The robot arm 40 includes a first motor 51, a second motor 52, a third motor 53, a fourth motor 54, a fifth motor 55, a sixth motor 56, and a seventh motor 57. The first motor 51 rotates the base 41. The second motor 52 rotates the first arm 42 with respect to the base 41. The third motor 53 rotates the second arm 43 with respect to the first arm 42. The fourth motor 54 rotates the third arm 44 with respect to the second arm 43. The fifth motor 55 rotates the fourth arm 45 with respect to the third arm 44. The sixth motor 56 rotates the fifth arm 46 with respect to the fourth arm 45. The seventh motor 57 rotates the spindle 47. In addition, an encoder (not shown) is provided for each motor to measure the rotation angle of each arm.

[0014] The robot arm 40 is provided with a driver 58. The driver 58 drives each motor of the robot arm 40 according to a control instruction. The driver 58 calculates the position and orientation of the tip of the spindle 47 based on the rotation angle measured by the encoder. The driver 58 specifies the position and orientation of the spindle 47 in the base coordinate system and the tool coordinate system. The base coordinate system is a coordinate system with the center of the bottom surface of the base 41 as the origin, and is represented by a Zb axis extending in the vertical direction and Xb and Yb axes orthogonal to the Zb axis. The tool coordinate system is a coordinate system with the tip of the spindle 47 as the origin, and is represented by a Zt axis extending in the axial direction of the spindle 47 and Xt and Yt axes orthogonal to the Zt axis. When the driver 58 receives a control instruction indicating a movement amount related to parallel movement or rotation along a coordinate axis, it calculates the angles of the respective motors for moving the spindle 47 by the movement amount indicated by the control instruction along the coordinate axis indicated by the control instruction, and controls each motor. Further, when the driver 58 receives a control instruction indicating a coordinate system and a position and orientation in the coordinate system, it calculates the angles of the respective motors for moving the spindle 47 to the position indicated by the control instruction, and controls each motor.

[0015] The control device 70 controls the robot arm 40 based on the depth image captured by the stereo camera 30 and the position of the tip of the robot arm 40.

[0016] 《Configuration of Control Device 70》 FIG. 3 is a schematic block diagram showing the configuration of the control device 70 according to the first embodiment. The control device 70 includes a data acquisition unit 71, a storage unit 72, a target specification unit 73, a position measurement unit 74, a positioning unit 75, a display control unit 76, a difference calculation unit 77, a cut amount determination unit 78, a path generation unit 79, a tool control unit 80, and a correction unit 81.

[0017] The data acquisition unit 71 acquires a depth image from the stereo camera 30 and measurement values of the angles of the respective arms from the robot arm 40. The depth image is obtained by associating a depth indicating the distance from the camera with each pixel constituting the image captured by one of the cameras serving as the main camera of the stereo camera 30. The data acquisition unit 71 acquires, from the stereo camera 30, a first depth image in which the sample S placed on the work W is imaged and a second depth image in which the work W is imaged.

[0018] The storage unit 72 stores tool data which is three-dimensional data indicating the shape of the tool 60 and matching data which is three-dimensional data indicating the shape of the work W before processing. The tool data and the matching data may be, for example, CAD data. The storage unit 72 also stores the position and orientation in the base coordinate system of the stereo camera 30.

[0019] Based on the first depth image acquired from the stereo camera 30, the target specification unit 73 specifies the three-dimensional shape of the sample S and generates target data which is three-dimensional data representing the target shape of the work W. Specifically, the target specification unit 73 according to the first embodiment specifies the three-dimensional shape of the sample S by the following procedure. First, the target specification unit 73 generates point cloud data in the base coordinate system based on the first depth image generated by at least one stereo camera 30 and the position and orientation in the base coordinate system of the stereo camera 30. The point cloud data represents the shape in which the work W and the sample S are integrated. Next, the target specification unit 73 calculates the difference between the height of the shape represented by the point cloud data and the height of the work W indicated by the matching data stored in the storage unit 72. The target specification unit 73 sets, as the target data, the shape obtained by removing the bottom portion of the shape represented by the point cloud data by the calculated height. Thereby, the target specification unit 73 can generate the target data such that the cutting amount from the work W is minimized.

[0020] The position measurement unit 74 specifies the three-dimensional position of the workpiece W based on the depth image acquired from the stereo camera 30. Specifically, the position measurement unit 74 according to the first embodiment specifies the three-dimensional position of the workpiece W in the following procedure. First, the position measurement unit 74 generates point cloud data in the base coordinate system based on the depth image generated by at least one stereo camera 30 and the position and orientation of the stereo camera 30 in the base coordinate system. Next, the position measurement unit 74 performs matching of the matching data stored in the storage unit 72 with respect to the point cloud data. The position measurement unit 74 can perform matching, for example, by the ICP algorithm. Thereby, the position measurement unit 74 specifies the position and orientation in the base coordinate system of the matching data as the three-dimensional position of the workpiece W.

[0021] The alignment unit 75 arranges the target data generated by the target specification unit 73 at the three-dimensional position of the workpiece W measured by the position measurement unit 74. That is, the alignment unit 75 determines the position and orientation in the base coordinate system of the target shape represented by the target data. The alignment unit 75 generates a depth image corresponding to the stereo camera 30 from the aligned target shape. That is, the alignment unit 75 generates a depth image when projecting the target shape of the workpiece W from the viewpoint of the stereo camera 30 based on the position and orientation of the stereo camera 30 in the base coordinate system stored in the storage unit 72 and the position and orientation of the target shape in the base coordinate system. Hereinafter, the depth image generated by the alignment unit 75 is referred to as a target depth image. The alignment unit 75 is an example of a target depth calculation unit that calculates the depth of the surface of the target shape with respect to the stereo camera 30 based on the three-dimensional position of the target shape.

[0022] The display control unit 76 renders a target image P1 representing the target shape of the workpiece W as viewed from one of the cameras serving as the main camera for each of the stereo cameras 30 based on the target depth image generated by the alignment unit 75. The target image P1 may be, for example, a line drawing obtained by rendering the outline of a three-dimensional model or a translucent image. The display control unit 76 causes the display to display a display screen in which the image captured by the stereo camera 30 (captured image P0) and the target image P1 corresponding to the stereo camera 30 are superimposed. FIG. 4 is an example of the display screen according to the first embodiment. Note that the display control unit 76 does not necessarily have to display the alignment and the like on the display screen. As shown in FIG. 4, the target image P1 is displayed so as to be included in the workpiece W shown in the captured image P0. The captured image P0 may be a composite of the images captured by the four stereo cameras 30.

[0023] The depth difference calculation unit 77 calculates the depth difference for each pixel between the second depth image acquired by the stereo camera 30 and the target depth image generated by the alignment unit 75. Note that the depth difference calculation unit 77 calculates the depth difference after converting the coordinate systems of the second depth image and the target depth image into the base coordinate system so that one axis of the coordinate system representing the second depth image coincides with the direction in which the tool 60 faces (vertically downward).

[0024] The cutting amount determination unit 78 determines the cutting amount at the position corresponding to each pixel of the workpiece W based on the depth difference of each pixel and the maximum cutting amount of the tool 60. The pixels of the workpiece W represent points on the surface of the workpiece W. Specifically, the cutting amount determination unit 78 determines the cutting amount according to the following procedure. First, the cutting depth determination unit 78 identifies the maximum value of the depth differences calculated by the difference calculation unit 77. The cutting depth determination unit 78 determines the expected number of scans by adding 1 to the integer part of the value obtained by dividing the maximum value of the depth differences by the maximum cutting depth. In other embodiments, instead of the maximum cutting depth, a predetermined cutting depth smaller than the maximum cutting depth set by the operator in advance may be used to determine the expected number of scans. The expected number of scans is the number of scans until the cutting is completed when the workpiece W can be cut as planned. Note that due to the influence of control errors of the robot arm 40, deflection of the tool 60, etc., the actual number of scans does not necessarily match the expected number of scans. The cutting depth determination unit 78 determines the cutting depth at the position corresponding to the pixel where the depth difference is equal to or greater than the maximum cutting depth as the maximum cutting depth. The cutting depth determination unit 78 determines the cutting depth at the position corresponding to the pixel where the depth difference is less than the maximum cutting depth as the amount obtained by dividing the depth difference by the number of scans. Thereby, for the positions corresponding to the pixels where the depth difference is less than the maximum cutting depth, high-precision cutting can be achieved by repeatedly performing cutting with a small cutting depth. In other embodiments, the cutting depth determination unit 78 may determine the cutting depth at the position corresponding to each pixel by other methods. For example, the cutting depth determination unit 78 according to other embodiments may determine the cutting depth as the amount obtained by dividing the depth difference by the number of scans regardless of the magnitude of the depth difference. Also, the cutting depth determination unit 78 according to other embodiments may determine the cutting depth at the position corresponding to the pixel where the depth difference is less than the maximum cutting depth as the cutting depth corresponding to the depth difference. Note that the cutting depth determination unit 78 may decimate the pixels of the second depth image and calculate the cutting depth only for the remaining pixels. In this case, the cutting depth determination unit 78 may calculate the cutting depth by interpolation using the moving average for the decimated pixels.

[0025] The path generation unit 79 determines a path, which is the movement path of the tip of the tool 60, based on the second depth image acquired from the stereo camera 30 and the cutting depth determined by the cutting depth determination unit 78. The path generation unit 79 determines the position of the tip of the tool 60 during cutting by adding the cutting depth determined by the cutting depth determination unit 78 to the depth of each pixel in the second depth image, and determines the path of the tool 60 according to a predetermined path planning algorithm. Examples of path planning algorithms include Dijkstra's algorithm, A* algorithm, PRM method, RRT method, RRT* method, etc. The path generation unit 79 may generate a smooth path by interpolating the position of the tip of the tool 60 with a NURBS curve.

[0026] The tool control unit 80 generates a movement instruction to be output to the driver 58 of the robot arm 40 so as to move the tool according to the path generated by the path generation unit 79. First, the tool control unit 80 generates a movement instruction to direct the posture of the tool 60 (the rotation angle around each axis in the base coordinate system) downward vertically, and transmits it to the driver 58. After that, the tool control unit 80 generates a movement instruction based on the path generated by the path generation unit 79 and transmits it to the driver 58. At this time, the tool control unit 80 corrects the position in the Zt-axis direction to a position in front of the tip position of the tool 60 indicated by the path by the length of the tool 60.

[0027] The correction unit 81 corrects the deviation between the instruction of the tool control unit 80 and the machining position of the robot arm 40 after cutting for one pass by the tool control unit 80. Specifically, the correction unit 81 searches for the deviation amount d of the Xb axis and the deviation amount d of the Yb axis in the direction such that the SAD (Sum of Absolute Difference) shown in the following formula (1) is minimized. x and the deviation amount d in the Yb-axis direction y to search.

[0028]

Equation

[0029] In Equation (1), x is the component of the Xb axis in the base coordinate system, and y is the component of the Yb axis in the base coordinate system. h is the length of the smallest rectangle enclosing the path in the Xb axis direction, and w is the length of the smallest rectangle enclosing the path in the Yb axis direction. p(x, y) is the cutting instruction amount at the position (x, y) in the base coordinate system. δ is a constant to prevent division by zero. I(x, y) is the depth difference at the position (x, y) between the second depth image captured before processing and the second depth image captured after processing, that is, the actual cutting amount. The d at which SAD is minimized in Equation (1) x , d y Since x and y represent the deviation between the instruction of the tool control unit 80 and the machining position of the robot arm 40, the correction unit 81 corrects the control deviation by subtracting the calculated deviation amount from the subsequent movement instruction. In addition, in order to prevent over-cutting, when there is a portion where the actual cutting amount is larger than the cutting instruction amount, the correction unit 81 may add a significantly large penalty value to SAD.

[0030] 《Control of the Machine Tool 1》 FIG. 5 is a flowchart (Part 1) showing a control method of the machine tool 1 by the control device 70 according to the first embodiment. FIG. 6 is a flowchart (Part 2) showing a control method of the machine tool 1 by the control device 70 according to the first embodiment. An operator places the workpiece W on the table 10 and further places the sample S on the workpiece W. At this time, the operator places the sample S so as to fit inside the workpiece W in a plan view from above. When the operator inputs a specific instruction for the target shape, the control device 70 starts measuring the sample S.

[0031] First, the data acquisition unit 71 instructs the projector 31 to project a random dot pattern and acquires a depth image from the stereo camera 30 (step S1). The depth image is the first depth image in which the workpiece W and the sample S are imaged. The target identification unit 73 generates point cloud data in the base coordinate system based on the first depth image and the position and orientation of the stereo camera 30 stored in the storage unit 72 in the base coordinate system (step S2). The target identification unit 73 merges the generated four pieces of point cloud data (step S3).

[0032] The target specifying unit 73 calculates the difference between the height of the shape represented by the point cloud data obtained in step S3 and the height of the work W indicated by the matching data stored in the storage unit 72 (step S4). The target specifying unit 73 removes the bottom portion of the shape represented by the point cloud data obtained in step S3 by the amount of the height calculated in step S4 to generate target data (step S5). The target specifying unit 73 determines whether the target shape indicated by the target data generated in step S5 can be included in the shape of the work W indicated by the matching data stored in the storage unit 72 (step S6). If the target shape cannot be included in the shape of the work W (step S6: NO), the display control unit 76 causes an error indicating that the sample S protrudes from the work W to be displayed on the display (step S7). The control device 70 returns the process to step S1 and waits again for an instruction to specify the target shape. The user adjusts the position of the sample S and inputs an instruction to specify the target shape to the control device 70.

[0033] On the other hand, if the target shape can be included in the shape of the work W (step S6: YES), the display control unit 76 renders the target data and displays it on the display (step S8). The control device 70 waits for an instruction to specify the target shape or an instruction to start processing (step S9). The user checks the target data displayed on the display, and if there is no problem, removes the sample S from above the work W and inputs an instruction to start processing to the control device 70 (step S9: instruction to start processing). On the other hand, if there is a problem with the target data displayed on the display, the user adjusts the position of the sample S and inputs an instruction to specify the target shape to the control device 70 again (step S9: instruction to specify the target shape).

[0034] When a machining start instruction is input, the data acquisition unit 71 instructs the projector 31 to project a random dot pattern and acquires a depth image from the stereo camera 30 (step S10). The depth image is a second depth image in which the workpiece W is imaged. Next, the position measurement unit 74 generates point cloud data in the base coordinate system based on the second depth image generated by the stereo camera 30 and the position and orientation of the stereo camera 30 stored in the storage unit 72 in the base coordinate system of the stereo camera 30 (step S11). The position measurement unit 74 merges the four pieces of generated point cloud data (step S12).

[0035] The position measurement unit 74 identifies the three-dimensional position of the workpiece W by performing matching of the matching data stored in the storage unit 72 with respect to the merged point cloud data (step S13). Next, the alignment unit 75 arranges the target data generated in step S5 at the three-dimensional position of the workpiece W identified in step S13 in the virtual space (step S14). Next, the alignment unit 75 generates a target depth image corresponding to the stereo camera 30 from the aligned target shape (step S15). The alignment unit 75 records the generated target depth image in the storage unit 72.

[0036] Based on the target depth image corresponding to the stereo camera 30 generated in step S15, the display control unit 76 renders a target image representing the target shape of the workpiece W as viewed from one of the cameras of the stereo camera 30 (step S16). The display control unit 76 records the generated target image in the storage unit 72. The display control unit 76 causes the display to display a display screen in which the image captured by one of the cameras of the stereo camera 30 and the target image generated in step S15 are superimposed (step S17). Thereafter, every time the display control unit 76 acquires an image captured by the stereo camera 30 at a constant frame rate, the display control unit 76 updates the display screen by superimposing the image and the target image stored in the storage unit 72 and causes the display to display it. Thereby, the operator can compare the shape of the workpiece W with the target shape in real time.

[0037] Next, the control device 70 selects one stereo camera 30 at a time (step S18) and executes the processes from step S19 to step S31 below.

[0038] The data acquisition unit 71 acquires a new depth image (second depth image) from the stereo camera 30 selected in step S18 (step S19). The difference calculation unit 77 reads the posture of the stereo camera 30 selected in step S18 from the storage unit 72 and converts the coordinate systems of the second depth image and the target depth image into the base coordinate system (step S20). That is, the difference calculation unit 77 aligns one axis of the coordinate system representing the second depth image with the direction in which the tool 60 faces (vertically downward direction). Next, the difference calculation unit 77 calculates the depth difference for each pixel between the second depth image and the target depth image (step S21).

[0039] Next, the depth cut amount determination unit 78 determines the expected number of scanning times by adding 1 to the integer part of the value obtained by dividing the maximum value of the calculated depth difference by the maximum cut amount of the tool 60 (step S22). The depth cut amount determination unit 78 determines the cut amount at the position corresponding to each pixel of the second depth image based on the depth difference, the maximum cut amount of the tool 60, and the expected number of scanning times (step S23). Specifically, the depth cut amount determination unit 78 determines the cut amount at the position corresponding to the pixel whose depth difference is greater than or equal to the maximum cut amount as the maximum cut amount. The depth cut amount determination unit 78 determines the cut amount at the position corresponding to the pixel whose depth difference is less than the maximum cut amount as the amount obtained by dividing the depth difference by the expected number of scanning times. Alternatively, the cut amount at the position corresponding to the pixel whose depth difference is less than the maximum cut amount may be determined as the amount obtained by dividing the depth difference by the maximum cut amount.

[0040] The path generation unit 79 generates a path of the tool 60 based on the second depth image and the cut amount determined by the depth cut amount determination unit 78 (step S24). When a correction amount is recorded in the storage unit 72, the path generation unit 79 corrects the path based on the correction amount. Next, the tool control unit 80 issues a movement instruction for moving the tool according to the path generated in step S24 and outputs it to the driver 58 of the robot arm 40 (step S25). As a result, the robot arm 40 moves the tool according to the path and cuts the workpiece.

[0041] Next, the data acquisition unit 71 acquires a new second depth image from the stereo camera 30 selected in step S18 (step S26). Next, the difference calculation unit 77 calculates the depth difference for each pixel between the second depth image acquired in step S26 and the target depth image (step S27).

[0042] The control device 70 determines whether the depth difference for all pixels is less than a predetermined allowable error (step S28). If the depth difference for at least one pixel is not less than the predetermined allowable error (step S28: NO), the control device 70 determines to continue cutting the surface imaged by the stereo camera 30 selected in step S18.

[0043] When continuing cutting, the correction unit 81 calculates the actual cutting amount at the position corresponding to each pixel of the second depth image by obtaining the depth difference between the second depth image used for path generation and the newly acquired second depth image for each pixel of the second depth image (step S29). Next, the correction unit 81 searches for the deviation amount of the machining position using the above-described formula (1) based on the cutting instruction amount indicated by the instruction output to the driver 58 in step S25 and the actual cutting amount (step S30). The correction unit 81 updates the correction amount by adding the obtained deviation amount to the correction amount stored in the storage unit 72 (step S31). When the correction amount is not recorded in the storage unit 72, the correction unit 81 records the obtained deviation amount in the storage unit 72 as the correction amount. Then, the control device 70 returns the process to step S22 and performs cutting again based on the second depth image acquired in step S26 and the depth difference calculated in step S27.

[0044] When the depth difference for all pixels is less than the predetermined allowable error (step S28: YES), the control device 70 selects the next stereo camera 30 and executes the processes from step S19 to step S31. When the processing from step S19 to step S31 is completed for all the stereo cameras 30, the control device 70 determines that the machining of the workpiece W is finished and ends the processing. That is, when the difference from the target shape is less than the allowable error as seen from the plurality of stereo cameras 30 provided to supplement blind spots, the control device 70 ends the machining of the workpiece W.

[0045] 《Function and Effect》 Thus, the machine tool 1 according to the first embodiment machines the workpiece W in the following procedure. The control device 70 specifies the target shape based on the first depth image in which the sample S is captured. The control device 70 calculates the three-dimensional position of the surface of the workpiece W based on the second depth image in which the workpiece W is captured. The control device 70 calculates the three-dimensional position of the target shape when the workpiece W and the target shape are superposed based on the target shape and the three-dimensional position of the workpiece W. The cutting amount at each of a plurality of points on the surface of the workpiece W is determined based on the difference in the line-of-sight direction between the three-dimensional position of the surface of the workpiece W and the three-dimensional position of the surface of the target shape when the workpiece W is viewed from a predetermined viewpoint (vertically upward). The control device 70 moves the tool 60 based on the determined cutting amount. Thereby, the machine tool 1 according to the first embodiment can machine the workpiece according to the target shape represented by the sample based on the actual sample.

[0046] In addition, the control device 70 of the machine tool 1 according to the first embodiment calculates the depth of the surface of the target shape based on the three-dimensional position of the target shape with reference to the stereo camera 30, and determines the cutting amount based on the depth of the workpiece W in the second depth image and the calculated depth of the target shape. Thereby, the machine tool 1 according to the first embodiment does not need to convert the second depth image into three-dimensional data again every time cutting is advanced in order to determine the cutting amount. Specifically, once the point cloud data is generated in step S11 shown in FIG. 5, the control device 70 does not need to generate the point cloud data in the loop from step S18 to step S31 or the loop from step S22 to step S31 in the selected stereo camera 30. The target shape of the workpiece W does not change from the start to the end of machining. Therefore, if the control device 70 generates a target depth image before machining in step S17 and records it in the storage unit 72, the conversion from the point cloud data to the target depth image can be omitted by using the target depth image stored in the storage unit 72 in the calculation of the depth difference in steps S21 and S27 thereafter. Note that the three-dimensional data is data representing the positions of a plurality of points in a three-axis orthogonal coordinate system. The point cloud data is an example of the three-dimensional data. The depth image is data in which depth is associated with each point on the two-dimensional plane. Since the depth represents the distance from the viewpoint of the camera, it is not necessarily orthogonal to the two-dimensional plane. Since the conversion from the depth image to the three-dimensional data requires a large amount of calculation, by reducing the calculation of the three-dimensional data according to the above procedure, the machine tool 1 can quickly machine the workpiece W. In addition, since the three-dimensional data has a large capacity, it is necessary to secure a large storage area in the storage unit 72. However, by using the depth image instead of the three-dimensional data as in the first embodiment, the data amount can be suppressed. Note that in other embodiments, although the amount of calculation increases, the depth difference may be calculated using the three-dimensional data instead of the depth image.

[0047] Further, the control device 70 of the machine tool 1 according to the first embodiment determines the cutting amount for each pixel on the surface of the workpiece W again based on the difference between the three-dimensional position of the surface of the workpiece W after cutting by the tool 60 and the three-dimensional position of the surface of the target shape. In this way, by recalculating the shape of the workpiece W each time cutting is performed, the control device 70 can always recognize the error between the actual shape and the target shape and perform cutting of the workpiece W while reducing the error.

[0048] <Second Embodiment> The machine tool 1 according to the first embodiment identifies the target shape based on the first depth image obtained by imaging the sample S placed on the workpiece W. In contrast, the machine tool 1 according to the second embodiment captures only the sample S as the first depth image and identifies the target shape based on this. The configuration of the machine tool 1 according to the second embodiment is the same as that of the first embodiment.

[0049] FIG. 7 is a flowchart showing a control method of the machine tool 1 by the control device 70 according to the second embodiment. The operator installs the sample S without installing the workpiece W on the table 10. When the operator inputs an instruction to specify the target shape, the control device 70 starts measuring the sample S.

[0050] First, the data acquisition unit 71 instructs the projector 31 to project a random dot pattern and acquires a depth image from the stereo camera 30 (step S101). The depth image is the first depth image in which only the sample S is imaged. The target identification unit 73 generates point cloud data in the base coordinate system based on the first depth image and the position and orientation of the stereo camera 30 stored in the storage unit 72 (step S102). The target identification unit 73 merges the four generated point cloud data (step S103).

[0051] The target specifying unit 73 calculates the height of the shape represented by the point cloud data obtained in step S103 (step S104). Next, the target specifying unit 73 specifies the base shape by cutting off the height of the point cloud data obtained in step S103 from the shape of the workpiece W represented by the matching data stored in the storage unit 72 (step S105). That is, the base shape represents the shape of the bottom of the workpiece W. Next, the target specifying unit 73 rotates the point cloud data obtained in step S103 around an axis extending in the height direction, and searches for a posture that fits inside the base shape in a plan view from above (step S106). When there is no posture in which the target shape fits inside the base shape (step S106: NO), the display control unit 76 causes the display to display an error indicating that the sample S protrudes from the workpiece W (step S107). The control device 70 returns the process to step S1 and waits again for an instruction to specify the target shape. The user considers changing the sample S.

[0052] On the other hand, when there is a posture in which the target shape fits inside the base shape (step S106: YES), the target specifying unit 73 generates target data by combining the base shape and the shape indicated by the point cloud data according to the posture (step S108). The control device 70 waits for a machining start instruction (step S109). The subsequent processing is the same as that after step S10 of the first embodiment.

[0053] As described above, the machine tool 1 according to the second embodiment can specify the target shape and machine the workpiece W without placing the sample S on the workpiece W.

[0054] <Other Embodiments> Although one embodiment has been described in detail with reference to the drawings above, the specific configuration is not limited to the above, and various design changes and the like are possible. That is, in other embodiments, the order of the above-described processes may be appropriately changed. Also, some processes may be executed in parallel. The control device 70 according to the above-described embodiment may be configured by a single computer, or the configuration of the control device 70 may be divided and arranged among a plurality of computers, and the plurality of computers may function as the control device 70 by cooperating with each other. At this time, the control device 70 may have a part of the function of the driver 58 of the robot arm 40, or the driver 58 may have a part of the function of the control device 70.

[0055] The machine tool 1 according to the above-described embodiment includes the stereo camera 30 as a depth camera, but is not limited thereto. For example, in other embodiments, a TOF camera, LiDAR, a three-dimensional scanner, or the like may be used as the depth camera. Further, in other embodiments, the machine tool 1 may include a plurality of single cameras instead of the stereo camera 30, and the captured images of two adjacent cameras among the plurality of single cameras may be subjected to stereo matching processing and used as a stereo camera. In addition, in other embodiments, the machine tool 1 may include only one depth camera. For example, the machine tool 1 according to other embodiments may include a depth camera directly above the workpiece W and perform machining with the tool 60 directed in the line-of-sight direction of the depth camera. Further, in other embodiments, the depth camera may be a combination of a camera and a depth measurement device.

[0056] Further, the control device 70 according to the above-described embodiment converts the depth image into the base coordinate system to determine the cutting amount and create the path, but is not limited thereto. For example, the control device 70 according to other embodiments may generate the tool path without converting the depth image by aligning the direction of the tool 60 with the line-of-sight direction of the stereo camera 30. Further, although the amount of calculation increases in other embodiments, three-dimensional data may be generated from the depth image to determine the cutting amount. When converting the depth image, the arm that supports the tool 60 does not necessarily have a high degree of freedom like the robot arm 40. For example, the arm may translate the tool 60 without changing the angle of the tool 60.

[0057] Further, the control device 70 according to the above-described embodiment specifies the three-dimensional position of the workpiece W based on the matching data representing the shape of the workpiece W before processing, but is not limited thereto. For example, the control device 70 according to another embodiment may specify the three-dimensional position of the workpiece W based on the difference between the second depth image before the installation of the workpiece W and the second depth image after the installation of the workpiece W. Further, in another embodiment, since the portion of the workpiece W held by the jig 20 is not processed, by performing matching between the shape (surface, side, etc.) of the held portion of the workpiece W shown in the second depth image and the shape of the target data, the three-dimensional position of the workpiece W may be specified and the target data may be aligned with the three-dimensional position. Further, in another embodiment, the operator may perform alignment manually.

[0058] Also, the control device 70 according to the above-described embodiment performs cutting on the second depth image captured by one stereo camera 30 until the depth difference becomes less than the allowable error, and then performs cutting based on the next stereo camera 30, but is not limited thereto. For example, in another embodiment, the control device 70 may switch the target stereo camera 30 every time a cut of one pass is performed. That is, the control device 70 according to another embodiment may perform the processes from step S19 to step S27 for all the stereo cameras 30 and then determine the end of the processing in step S28.

[0059] 〈Computer Configuration〉 FIG. 8 is a schematic block diagram showing the configuration of a computer according to at least one embodiment. The computer 900 includes a processor 901, a main memory 902, a storage 903, and an interface 904. The above control device 70 is implemented in a computer 900. The operations of each of the above-described processing units are stored in a storage 903 in the form of a program. The processor 901 reads the program from the storage 903, expands it in the main memory 902, and executes the above processing according to the program. Further, the processor 901 secures a storage area corresponding to each of the above-described storage units in the main memory 902 according to the program. Examples of the processor 901 include a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), and a microprocessor.

[0060] The program may be for realizing a part of the functions to be exhibited by the computer 900. For example, the program may exhibit functions by combining with other programs already stored in the storage or by combining with other programs implemented in other devices. In other embodiments, the computer 900 may include, in addition to or instead of the above configuration, a custom LSI (Large Scale Integrated Circuit) such as a PLD (Programmable Logic Device). Examples of the PLD include a PAL (Programmable Array Logic), a GAL (Generic Array Logic), a CPLD (Complex Programmable Logic Device), and an FPGA (Field Programmable Gate Array). In this case, part or all of the functions realized by the processor 901 may be realized by the integrated circuit. Such an integrated circuit is also included as an example of a processor.

[0061] Examples of the storage 903 include a magnetic disk, a magneto-optical disk, an optical disk, a semiconductor memory, and the like. The storage 903 may be an internal medium directly connected to the bus of the computer 900, or may be an external medium connected to the computer 900 via the interface 904 or a communication line. Also, when this program is distributed to the computer 900 via a communication line, the computer 900 that has received the distribution may expand the program in the main memory 902 and execute the above processing. In at least one embodiment, the storage 903 is a non-transitory tangible storage medium.

[0062] Also, the program may be for realizing a part of the functions described above. Further, the program may be a so-called difference file (difference program) that realizes the above-described functions in combination with other programs already stored in the storage 903.

Description of Reference Numerals

[0063] 1... Machine tool 10... Table 20... Fixture 30... Stereo camera 31... Projector 40... Robot arm 60... Tool 70... Control device 71... Data acquisition unit 72... Storage unit 73... Target identification unit 74... Position measurement unit 75... Alignment unit 76... Display control unit 77... Difference calculation unit 78... Depth of cut determination unit 79... Path generation unit 80... Tool control unit 81... Correction unit S... Sample W... Workpiece

Claims

1. A tool for machining a workpiece, A depth camera installed so that the workpiece enters the imaging range and imaging the depth of the subject, A target specifying unit that specifies the target shape based on a first depth image obtained by imaging a sample representing the target shape of the workpiece by the depth camera, A position measuring unit that calculates the three-dimensional position of the surface of the workpiece based on a second depth image obtained by imaging the workpiece by the depth camera, An alignment unit that calculates the three-dimensional position of the target shape when the target shape and the workpiece are superimposed based on the target shape and the three-dimensional position of the workpiece, A cutting amount determination unit that determines the cutting amount at each of a plurality of points on the surface of the workpiece based on the difference in the line-of-sight direction between the three-dimensional position of the surface of the workpiece and the three-dimensional position of the surface of the target shape when the workpiece is viewed from a predetermined viewpoint, A tool control unit that moves the tool based on the determined cutting amount A processing machine comprising.

2. Comprising a projector that projects an image of an aperiodic pattern into the imaging range of the depth camera, The depth camera is a stereo camera, and images the subject when the projector projects the image. The processing machine according to claim 1.

3. The first depth image is a depth image obtained by imaging the sample placed on the workpiece, The target specifying unit specifies the target shape by removing the bottom of the three-dimensional shape in which the workpiece and the sample are integrated, which is specified from the first depth image, in the height direction. The processing machine according to claim 1.

4. The target specifying unit specifies the target shape by removing the bottom in the height direction by the difference between the height of the target shape in the first depth image and the height of the workpiece. The processing machine according to claim 3.

5. The target specifying unit specifies the target shape by adding the shape of the bottom of the workpiece under the three-dimensional shape of the sample specified from the first depth image. The processing machine according to claim 1.

6. A control device for a processing machine comprising a tool for machining a workpiece, a depth camera installed so that the workpiece enters the imaging range and imaging the depth of the subject, and an actuator for driving the tool, A target specifying unit that specifies the target shape based on a first depth image obtained by imaging a sample representing the target shape of the workpiece by the depth camera, A position measurement unit that calculates the three-dimensional position of the surface of the workpiece based on a second depth image obtained by the depth camera capturing the workpiece; An alignment unit that calculates the three-dimensional position of the target shape when the workpiece and the target shape are superimposed based on the target shape and the three-dimensional position of the workpiece; A cutting amount determination unit that determines the cutting amount at each of a plurality of points on the surface of the workpiece based on the difference in the line-of-sight direction between the three-dimensional position of the surface of the workpiece and the three-dimensional position of the surface of the target shape when the workpiece is viewed from a predetermined viewpoint; A tool control unit that controls the actuator based on the determined cutting amount A control device for a machine tool comprising the same.

7. A control method for a machine tool comprising a tool for machining a workpiece, a depth camera installed so that the workpiece is within the imaging range and capturing the depth of the subject, and an actuator for driving the tool, the method comprising: A step of specifying the target shape based on a first depth image obtained by the depth camera capturing a sample representing the target shape of the workpiece; A step of calculating the three-dimensional position of the surface of the workpiece based on a second depth image obtained by the depth camera capturing the workpiece; A step of calculating the three-dimensional position of the target shape when the workpiece and the target shape are superimposed based on the target shape and the three-dimensional position of the workpiece; A step of determining the cutting amount at each of a plurality of points on the surface of the workpiece based on the difference in the line-of-sight direction between the three-dimensional position of the surface of the workpiece and the three-dimensional position of the surface of the target shape when the workpiece is viewed from a predetermined viewpoint; A step of controlling the actuator based on the determined cutting amount A control method for a machine tool comprising the same.

Citation Information

Patent Citations

  • Working machine, working machine controller and method of controlling working machine

    JP2023113305A

Cited By

  • Machining machine, machining control device and machining control method

    DE112024003933T5