Device and method for obtaining the deviation amount of the working position of a tool

By using a camera to capture images of the target position during tool operation, the apparatus and method accurately determine the deviation between the target and working positions, addressing the inaccuracy of existing techniques.

JP7691218B2Active Publication Date: 2025-06-11FANUC LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2019120255
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2019-06-27
Publication Date
2025-06-11
Estimated Expiration
2039-06-27

Smart Images

  • Figure 0007691218000002
    Figure 0007691218000002
  • Figure 0007691218000003
    Figure 0007691218000003
  • Figure 0007691218000004
    Figure 0007691218000004
Patent Text Reader

Abstract

To obtain a technique which highly accurately acquires a deviation of a work position of a tool with respect to a target position of a workpiece on the basis of the actual work.SOLUTION: A device 50 for acquiring a deviation amount of a work position of a tool 16 with respect to a target position when performing the work on the target position of a workpiece by the tool 16 by moving the tool 16 with a movement machine 14 comprises: a camera 17 which is arranged in a prescribed positional relationship with respect to the tool 16 and images the target position at the first time point for making the tool 16 execute the operation for the work; and a deviation amount acquisition unit 52 which acquires the deviation amount between the work position at the first time point and the target position on the basis of the target position in the image data imaged by the camera 17 and information indicating the work position in the image data.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an apparatus and a method for obtaining a deviation amount of a working position of a tool with respect to a target position of a workpiece.

Background Art

[0002] Conventionally, in order to eliminate the deviation of the working position of a tool with respect to the target position of a workpiece, a technique is known in which the target position of the workpiece is imaged by a camera and the teaching point of a robot is corrected from the captured image data (for example, Patent Document 1).

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] There is a need for a technique for obtaining, with higher accuracy in accordance with actual work, the deviation of the working position of a tool with respect to the target position of a workpiece.

Means for Solving the Problems

[0005] In one aspect of the present disclosure, an apparatus for obtaining a deviation amount of a working position of a tool with respect to a target position when the tool is moved by a moving machine and work is performed on the target position of the workpiece with the tool includes: a camera that is disposed in a predetermined positional relationship with respect to the tool and images the target position at a first time point when causing the tool to execute an operation for work; and a deviation amount acquisition unit that acquires a deviation amount between the working position and the target position at the first time point based on information indicating a position of the target position in the image data captured by the camera and a position of the working position in the image data.

[0006] In another aspect of the present disclosure, a method for obtaining the deviation amount of the working position of a tool with respect to a target position when the tool is moved by a mobile machine and work is performed on the target position of the workpiece with the tool is as follows: A camera arranged in a predetermined positional relationship with respect to the tool images the target position at a first time point when the tool is caused to perform an operation for work, and based on the position of the target position in the image data captured by the camera and the information indicating the position of the working position in the image data, the deviation amount between the working position and the target position at the first time point is obtained.

Advantages of the Invention

[0007] According to the present disclosure, the deviation amount between the target position on the workpiece and the working position where the tool is estimated to actually perform work on the workpiece can be automatically and highly accurately obtained from the image data without the operator measuring it.

Brief Description of the Drawings

[0008]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Figure 21

Mode for Carrying Out the Invention

[0009] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. In the various embodiments described below, the same elements are denoted by the same reference numerals, and redundant descriptions are omitted. First, with reference to FIGS. 1 to 3, a mechanical system 10 according to an embodiment will be described. The mechanical system 10 includes a control device 12, a mobile machine 14, a tool 16, and a camera 17.

[0010] The control device 12 is a computer having a processor (CPU, GPU, etc.) 18 and a storage unit (ROM, RAM, etc.) 20, and controls the mobile machine 14, the tool 16, and the camera 17. The processor 18 is communicably connected to the storage unit 20 via a bus 19, and executes various operations while communicating with the storage unit 20.

[0011] As shown in FIG. 2, the mobile machine 14 is a vertically articulated robot and has a base portion 22, a swivel body 24, a lower arm portion 26, an upper arm portion 28, and a wrist portion 30. The base portion 22 is fixed on the floor of the work cell. The swivel body 24 is provided on the base portion 22 so as to be rotatable about a vertical axis. The lower arm portion 26 is provided on the swivel body 24 so as to be rotatable about a horizontal axis.

[0012] The upper arm portion 28 is rotatably provided at the tip of the lower arm portion 26. The wrist portion 30 is rotatably provided at the front end of the upper arm portion 28. A plurality of servo motors 31 (FIG. 1) are respectively incorporated in the base portion 22, the swivel body 24, the lower arm portion 26, the upper arm portion 28, and the wrist portion 30. The processor 18 sends commands to each servo motor 31, and each movable element (i.e., the swivel body 24, the lower arm portion 26, the upper arm portion 28, the wrist portion 30) of the mobile machine 14 is driven by the servo motor 31.

[0013] The tool 16 is attached to the wrist portion 30. In the present embodiment, the tool 16 is a spot welding gun. Specifically, as shown in FIG. 3, the tool 16 has a base portion 32, a fixed arm 34, a movable arm 36, a servo motor 38, a fixed electrode 44, and a movable electrode 46.

[0014] The base portion 32 is connected to the wrist portion 30. The base end 40 of the fixed arm 34 is fixed to the base portion 32, and the fixed electrode 44 is fixed to the tip 42 thereof. In the present embodiment, the fixed arm 34 extends in a substantially L-shaped curve from the base end 40 to the tip 42.

[0015] The movable arm 36 is provided on the base portion 32 so as to be movable along the axis A (so-called gun axis). In the present embodiment, the movable arm 36 is a rod-shaped member extending linearly, and the upper end portion (not shown) thereof is mechanically connected to the output shaft (not shown) of the servo motor 38 via a motion conversion mechanism 48, and the movable electrode 46 is fixed to the lower end thereof.

[0016] The motion conversion mechanism 48 includes, for example, a ball screw mechanism or a mechanism consisting of a timing belt and pulleys, and converts the rotational motion of the output shaft of the servo motor 38 into a reciprocating motion along the axis A. The movable arm 36 is reciprocated along the axis A by the servo motor 38 via this motion conversion mechanism 48.

[0017] The fixed electrode 44 and the movable electrode 46 are arranged to be aligned on the axis A. As the servo motor 38 moves the movable arm 36, the movable electrode 46 is moved along the axis A so as to approach and separate from the fixed electrode 44. The fixed electrode 44 and the movable electrode 46 are energized in response to a command from the processor 18. Thereby, the workpiece sandwiched between the fixed electrode 44 and the movable electrode 46 can be spot welded.

[0018] As shown in FIG. 2, a moving machine coordinate system C M is set in the moving machine 14. The moving machine coordinate system C M is a control coordinate system (so-called robot coordinate system) for automatically controlling each movable element of the moving machine 14. In the present embodiment, the origin of the moving machine coordinate system C M is arranged at the center of the base portion 22, the z-axis of the moving machine coordinate system C M is parallel to the vertical direction in the real space, and the moving machine coordinate system C M is set for the moving machine 14 so that the turning cylinder 24 is rotated around the z-axis of the moving machine coordinate system C M .

[0019] On the other hand, as shown in FIG. 3, a tool coordinate system C T is set in the tool 16. This tool coordinate system C T is a control coordinate system for automatically controlling the position of the tool 16 in the three-dimensional space. In this document, "position" may mean position and orientation. In the present embodiment, the origin of the tool coordinate system C T is located on the fixed electrode 44 (for example, the center of the upper surface), and the z-axis of the tool coordinate system C T coincides with (or is parallel to) the axis A, and the tool coordinate system C Tis set for the tool 16.

[0020] The processor 18 moves each movable element of the moving machine 14 in the moving machine coordinate system C so that the position of the tool 16 coincides with the position defined by the tool coordinate system C T In this way, the tool 16 is moved by the moving machine 14 and is arranged at an arbitrary position in the moving machine coordinate system C M In this way, the tool 16 is moved by the moving machine 14 and is arranged at an arbitrary position in the moving machine coordinate system C M at an arbitrary position in.

[0021] The camera 17 has an imaging sensor such as a CCD or CMOS and an optical system such as a focus lens, and is arranged in a predetermined positional relationship with respect to the tool 16. In the present embodiment, as shown in FIG. 3, the camera 17 is arranged at a position on the movable electrode 46 so that its line-of-sight direction D coincides with the axis A (that is, the z-axis of the tool coordinate system C T ). In the state shown in FIG. 3, the movable arm 36 is stationary and arranged at a predetermined position in the direction of the axis A (for example, the retracted position farthest from the fixed electrode 44).

[0022] The camera 17 images an object along the line-of-sight direction D and supplies the captured image data to the control device 12. A camera coordinate system C C is set for the camera 17. The camera coordinate system C C is a coordinate system that defines the coordinates of each pixel of the image data captured by the camera 17, and each pixel of the image data captured by the camera 17 is coordinated in the camera coordinate system C C .

[0023] Next, the operations performed by the tool 16 will be described with reference to FIGS. 1 to 4. The tool 16 performs spot welding operations on a plurality of target positions B n (n = 1, 2, 3,...) set on the workpiece W shown in FIG. 4. The workpiece W is, for example, a sheet metal for an automobile body. The processor 18 operates the moving machine 14 to place the tool 16 at the nth teaching point C n for performing the spot welding operation for the nth target position B n .

[0024] Specifically, the processor 18 sets the tool coordinate system C T such that its origin is located at the nth teaching point C n and its z-axis passes through the nth target position B n . Then, the processor 18 operates the moving machine 14 so that the position of the tool 16 coincides with the position defined by the set tool coordinate system C T .

[0025] In this way, the processor 18 places the tool 16 at the nth teaching point C n . When the tool 16 is placed at the nth teaching point C n , the nth target position B n is disposed between the movable electrode 46 and the fixed electrode 44. Note that the nth teaching point C n may coincide with the nth target position B n , or may be separated from the nth target position B n in a predetermined direction (e.g., the negative z-axis direction of the tool coordinate system C T ).

[0026] While placing the tool 16 at the nth teaching point C n , the processor 18 drives the servo motor 38 of the tool 16 to move the movable electrode 46 closer to the fixed electrode 44, and sandwiches the nth target position B n of the workpiece W between the movable electrode 46 and the fixed electrode 44. Note that the processor 18 may start the operation of moving the movable electrode 46 closer to the fixed electrode 44 when the tool 16 is placed at the nth teaching point C n .

[0027] Alternatively, the processor 18 may start the operation of moving the movable electrode 46 closer to the fixed electrode 44 while moving the tool 16 toward the nth teaching point C n . When the nth target position B n of the workpiece W is sandwiched between the movable electrode 46 and the fixed electrode 44, the processor 18 energizes the movable electrode 46 and the fixed electrode 44, and at the nth target position Bn Spot weld it. The processor 18 repeats such spot welding operations for all target positions B n thereof.

[0028] The processor 18 executes a series of operations for such spot welding operations according to a work program. This work program is constructed, for example, by teaching the movement machine 14 an operation of positioning the tool 16 at the nth teaching point C n and is stored in advance in the storage unit 20. The work program includes position information of the nth teaching point C n (coordinates in the moving machine coordinate system C M ), a positioning command for positioning the tool 16 at the nth teaching point C n , a welding start command for causing the movable electrode 46 and the fixed electrode 44 to perform spot welding, and the like.

[0029] Here, when the processor 18 performs an operation of sandwiching the nth target position B n between the movable electrode 46 and the fixed electrode 44 according to the work program, the working position where the movable electrode 46 and the fixed electrode 44 actually contact the workpiece W may deviate from the nth target position B n . Such a deviation is caused by, for example, minute vibrations generated in the tool 16 due to acceleration and deceleration when the movement machine 14 moves the tool 16.

[0030] Therefore, in the present embodiment, the processor 18 acquires the deviation amount of the working position of the tool 16 with respect to the nth target position B n . Hereinafter, the operation of acquiring the deviation amount in the machine system 10 will be described. As a preparation stage for the operation of acquiring the deviation amount, the operator marks each of the nth target positions B n of the workpiece W.

[0031] This mark is, for example, an engraving, a seal, or a coating provided on the workpiece W, and is for making the nth target position B n visually appear in the image captured by the camera 17. Note that the nth target position B nIf there are visible features (such as corners, recesses, etc.), the mark can also be omitted.

[0032] After setting the work W at a predetermined position with respect to the moving machine 14, the processor 18 operates the moving machine 14 according to the work program to move the tool 16 to the nth teaching point C n towards. Then, at time τ n when the processor 18 causes the tool 16 to execute an operation for spot welding work with respect to the nth target position B n the nth target position B n is imaged by the camera 17.

[0033] As an example, the time τ n when imaging with the camera 17 is set at the time when the movable electrode 46 and the fixed electrode 44 of the tool 16 come into contact with the work W. The time when the movable electrode 46 and the fixed electrode 44 come into contact with the work W is predictable. Specifically, the processor 18 receives a welding start command from the work program and transmits a command for moving the movable electrode 46 towards the fixed electrode 44 to the servo motor 38.

[0034] The time τ x from when the processor 18 transmits a command to the servo motor 38 until the servo motor 38 moves the movable electrode 46 and sandwiches the work W between the fixed electrode 44 can be predicted from the acceleration / deceleration characteristics of the servo motor 38 and the like. Therefore, the time τ n when the movable electrode 46 and the fixed electrode 44 come into contact with the work W can be determined as the time when a time τ x has elapsed since the time when the processor 18 transmitted a command to the servo motor 38.

[0035] As another example, the time τ n when imaging with the camera 17 can be set at the time when the processor 18 receives a welding start command from the work program and transmits a command for moving the movable electrode 46 to the servo motor 38. As still another example, the time τ ncan be set at the time of energizing the movable electrode 46 and the fixed electrode 44 sandwiching the workpiece W. The time of energization is, for example, the time when the processor 18 transmits a voltage supply command to a voltage source (not shown) that supplies voltage to the movable electrode 46 and the fixed electrode 44 (or the time after a predetermined time has elapsed from that time). The time τ when the camera 17 captures an image n is determined by the operator.

[0036] In this embodiment, the processor 18 n does not actually move the movable electrode 46 toward the fixed electrode 44 at this time τ. For example, the processor 18 may be configured to only recognize the timing of transmitting the command without actually transmitting a command for moving the movable electrode 46 to the servo motor 38. Alternatively, the processor 18 may transmit a pseudo command that does not actually operate the servo motor 38 to the servo motor 38.

[0037] Time τ n An example of imaging the image data captured by the camera 17 at time τ is shown in FIG. 5. In the image data 60 shown in FIG. 5, the nth target position B on the workpiece W n is shown. In FIG. 5, for reference, the fixed electrode 44 on the back side of the workpiece W is shown by a dotted line, and the tool coordinate system C T is illustrated.

[0038] As described above, in this embodiment, the camera 17 is arranged such that its line-of-sight direction D coincides with the axis A. In this case, the fixed electrode 44 (or the origin of the tool coordinate system C T ) is arranged at the center of the image data 60. Therefore, in the image data 60, the center point (central pixel) F n can be regarded as the working position where the movable electrode 46 and the fixed electrode 44 contact and sandwich the workpiece W when the movable electrode 46 is moved to the fixed electrode 44 during actual spot welding work.

[0039] The storage unit 20 is the center point F in the camera coordinate system C C n ​The coordinates of the nth target position B are stored in advance as information indicating the position of the work position in the image data 60. n is the center point (i.e., the working position of the tool 16) F n From the camera coordinate system C C The difference x in the positive direction of the x-axis C , the difference y in the positive direction of the y-axis C In other words, the nth target position B n is working position F n From, the difference E c (|E c |=(x C 2 +y C 2 ) 1 / 2 ) is shifted by x C , y C , and E c is a vector.

[0040] The processor 18 analyzes the image data 60 acquired from the camera 17 and detects the nth target position B n A pixel that captures the nth target position B n The center pixel of the image area of ​​the camera coordinate system C C Then, the processor 18 obtains the coordinates in the camera coordinate system C C The nth target position B n The coordinates of the work position (center point) F n Using the coordinates of and, the camera coordinate system C C Difference in x C and y C (or E c ) and calculate the difference x C and y C (or E c ) and the tool coordinate system C T and the camera coordinate system C C Using the known positional relationship with the tool coordinate system C T Working position F n and the nth target position B n The deviation between the

[0041] Here, since the camera 17 and the tool 16 are arranged in a known positional relationship with respect to each other, the tool coordinate system C T and the camera coordinate system C C Each parameter of the first transformation matrix (for example, a homogeneous transformation matrix) representing the positional relationship with can be obtained by calibrating the tool coordinate system C T and the camera coordinate system C C . By this calibration, the coordinates of the tool coordinate system C T and the coordinates of the camera coordinate system C C can be mutually converted via the first transformation matrix.

[0042] The processor 18 uses the first transformation matrix to convert the differences x C and y C in the camera coordinate system C C , or the difference E c into the displacement amounts x T and y T in the tool coordinate system C T , or the displacement amount E T . These displacement amounts x T , y T , and E T are vectors. Thus, the processor 18 can obtain the displacement amounts x n and y T (or E n ) between the working position F n in the tool coordinate system C T at time τ T and the nth target position B T .

[0043] As described above, the processor 18 is based on the position in the image data 60 of the nth target position B n and the position of the working position F n defined in the image data 60, and obtains the displacement amounts x n and y n (or E n ) between the working position F T at time τ T and the nth target position B T . Therefore, in the present embodiment, the processor 18 functions as the displacement amount acquisition unit 52.

[0044] The deviation amounts x T and y T (or E T ) thus obtained are not the deviation amounts between the target position B n and the working position F n when the tool 16 is placed at the n-th teaching point C n but are data accurately representing the deviation amounts between the target position B n and the working position F n at the time point τ n when causing the tool 16 to execute operations for spot welding work (for example, commands to the servo motor 38, contact of the movable electrode 46 with the workpiece W, energization of the movable electrode 46 and the fixed electrode 44).

[0045] Next, based on the obtained deviation amounts x T and y T (or E T ), the processor 18 corrects the position of the moving machine 14 so that the working position F n is arranged at the n-th target position B n . For example, in the case of the example shown in FIG. 5, the processor 18 automatically corrects the n-th teaching point C n specified in the work program to a position shifted by the deviation amount x n in the negative x-axis direction of the tool coordinate system C T and by the deviation amount y T in the positive y-axis direction of the tool coordinate system C T . Alternatively, the processor 18 corrects the n-th teaching point C T to a position shifted by the deviation amount E n in the tool coordinate system C T . T

[0046] In this way, the processor 18 corrects the position information of the n-th teaching point C n included in the work program, thereby updating the work program. Therefore, the processor 18 functions as a position correction unit 54 (FIG. 1) that corrects the position of the moving machine 14 (the n-th teaching point C n ).

[0047] As described above, in the present embodiment, at time point τ n the camera 17 that images the nth target position B n and the deviation amount acquisition unit 52 that acquires the deviation amounts x T and y T and E T acquire the deviation amounts x n and y n and E T of the working position F T of the tool 16 with respect to the nth target position B T . Therefore, the camera 17 and the deviation amount acquisition unit 52 constitute the device 50 (FIG. 1) that acquires the deviation amounts x n and y n and E T of the working position F T of the tool 16 with respect to the nth target position B T .

[0048] According to this device 50, from the image data 60, the nth target position B n on the workpiece W and the working position F n where the tool 16 is estimated to actually work on the workpiece W T the deviation amounts x T and y T and E

[0049] can be automatically and highly accurately obtained without the operator measuring them. C In addition, in the present embodiment, the storage unit 20 constitutes the device 50 and stores in advance the coordinates of the center point F n in the camera coordinate system C n as information indicating the position of the working position F n in the image data 60. According to this configuration, since it is not necessary to set or detect the position of the working position F T each time, the deviation amounts x T and y T and E

[0050] In addition, in the present embodiment, the position correction unit 54 constitutes the device 50 and the acquired deviation amount xT and y T (or E T ), the position of the moving machine 14 (the nth teaching point C n ) is corrected. According to this configuration, when the processor 18 executes a series of operations of the spot welding operation according to the updated work program, the working position F of the tool 16 n (the clamping position of the movable electrode 46 and the fixed electrode 44) can be arranged at the target position B n with higher precision. In addition, since the operator can be spared the work of manually correcting the teaching point C n , the work involved in teaching the moving machine 14 can be reduced.

[0051] Also, in the present embodiment, the processor 18 functions as a deviation amount acquisition unit 52, and the difference x in the camera coordinate system C C and y C (or E C ) is obtained, and the difference x c and y C (or E C ) and the known positional relationship (specifically, the first transformation matrix) between the tool coordinate system C c and the camera coordinate system C T are used to obtain the deviation amounts x C and y T (or E T ) in the tool coordinate system C T (or E T ). According to this configuration, the deviation amounts x T and y T (or E T ) in the control coordinate system can be obtained from the image data 60 with higher precision.

[0052] Also, in the present embodiment, the camera 17 is arranged at a position on the movable electrode 46 such that its line-of-sight direction D coincides with the axis A (that is, the z-axis of the tool coordinate system). In this case, the working position F of the tool 16 is arranged at the center point F of the image data 60 captured by the camera 17 n . n will be arranged.

[0053] According to this configuration, when the operator views the image data 60, the operator can intuitively grasp the magnitude and direction of the deviation from the nth target position B n to the working position F n . Further, when calibrating the tool coordinate system C T and the camera coordinate system C C , only the parameters of the line-of-sight direction D (the z-axis of the tool coordinate system) need to be considered, so that the calibration work can be simplified.

[0054] Note that the installation position of the camera 17 is not limited to the form shown in FIG. 3 (that is, the position of the movable electrode 46). Hereinafter, with reference to FIG. 6, other examples of the installation position of the camera 17 with respect to the tool 16 will be described. In the form shown in FIG. 6, the camera 17 is attached to the base portion 32 via the fixture 62 and is arranged in a predetermined positional relationship with respect to the tool 16.

[0055] Specifically, the camera 17 is fixed with respect to the tool 16 such that its line-of-sight direction D is parallel to the axis A, the line-of-sight direction D is offset from the axis A by a predetermined distance, and the fixed electrode 44 is included in the field of view of the camera 17. An example of imaging the image data obtained by imaging the nth target position B n at the time point τ n when causing the tool 16 to execute an operation for spot welding work by the camera 17 shown in FIG. 6 is shown in FIG. 7.

[0056] In the image data 64 shown in FIG. 7, when the movable electrode 46 is moved to the fixed electrode 44 during actual spot welding work, the working position F n wherein the movable electrode 46 and the fixed electrode 44 contact and sandwich the workpiece W (or the origin of the tool coordinate system C T ) will deviate from the center of the image data 64 (that is, the line-of-sight direction D).

[0057] At this time, the position of the working position F n in the image data 64 is determined by the camera 17 (specifically, the line-of-sight direction D) and the tool 16 (specifically, the fixed electrode 44, or the tool coordinate system C Tis determined according to the positional relationship with the origin). The storage unit 20 stores, in the image data 64, the working position F n as information indicating the position of, in the camera coordinate system C C the working position F n coordinates in the storage unit 20 in advance.

[0058] The processor 18 analyzes the image data 64 captured by the camera 17, and obtains the coordinates in the camera coordinate system C n of one pixel that depicts the nth target position B C and, using these coordinates and the coordinates of the working position F n stored in advance, determines the differences x C and y C in the camera coordinate system C C (or E c ).

[0059] Here, since the camera 17 and the tool 16 shown in FIG. 6 are arranged in a known positional relationship with respect to each other, each parameter of the second transformation matrix (for example, a homogeneous transformation matrix) representing the positional relationship between the tool coordinate system C T and the camera coordinate system C C can be obtained by calibrating the tool coordinate system C T and the camera coordinate system. By this calibration, the coordinates in the tool coordinate system C T and the coordinates in the camera coordinate system C C can be mutually converted via the second transformation matrix.

[0060] The processor 18 uses the second transformation matrix to convert the differences x C and y C in the camera coordinate system C C , or the difference E c into the displacement amounts x T and y T in the tool coordinate system C T , or the displacement amount E T . Thus, the processor 18 determines the displacement amounts x n and y n between the working position F n at time τ T and the nth target position B T (or ET ) can be obtained.

[0061] Fig. 8 shows still another example of the installation position of the camera 17 with respect to the tool 16. In the form shown in Fig. 8, the camera 17 is fixed with respect to the tool 16 in such a positional relationship that its line-of-sight direction D is inclined at a predetermined angle θ with respect to the axis A and the fixed electrode 44 is included in the field of view of the camera 17. At the time point τ when the tool 16 is made to execute an operation for spot welding work with the camera 17 shown in Fig. 8 n at the nth target position B n An example of imaging the image data obtained by the camera 17 is shown in Fig. 9.

[0062] The working position F in the image data 66 shown in Fig. 9 n (or the origin of the tool coordinate system C T ) is determined according to the positional relationship between the camera 17 and the tool 16. For example, when the camera 17 is arranged with respect to the tool 16 in such a positional relationship that its line-of-sight direction D passes through the origin of the tool coordinate system C T , the center point F of the image data 66 n can be regarded as the working position F n . The storage unit 20 stores in advance in the storage unit 20 the coordinates of the working position F n in the camera coordinate system C C as information indicating the position of the working position F n in the image data 66.

[0063] The processor 18 analyzes the image data 66 captured by the camera 17, obtains the coordinates in the camera coordinate system C n of one pixel that projects the nth target position B C , and uses these coordinates and the coordinates of the working position F n stored in advance to obtain the differences x C and y C in the camera coordinate system C C (or E c ).

[0064] Since the camera 17 and the tool 16 shown in Fig. 8 are arranged in a known positional relationship with respect to each other, the tool coordinate system C in Fig. 8T and the camera coordinate system C C Each parameter of the third transformation matrix (for example, a homogeneous transformation matrix) representing the positional relationship with is the tool coordinate system C T and the camera coordinate system can be obtained by calibrating. By this calibration, the coordinates of the tool coordinate system C T and the coordinates of the camera coordinate system C C can be mutually converted via the third transformation matrix.

[0065] The processor 18 uses the third transformation matrix to calculate the differences x C and y C in the camera coordinate system C, or the difference E C into the displacement amounts x c and y T in the tool coordinate system C, or the displacement amount E T and y T in the tool coordinate system C, or the displacement amount E T Thus, the processor 18 can obtain the displacement amounts x n and y n between the working position F n at time τ and the nth target position B T (or E T (or E T ).

[0066] Next, referring to FIGS. 10 and 11, a mechanical system 70 according to another embodiment will be described. The mechanical system 70 is different from the mechanical system 10 described above in that it further includes a light irradiation device 72. Note that the positional relationship between the camera 17 and the tool 16 in the present embodiment is the same as that shown in FIG. 6.

[0067] The light irradiation device 72 is, for example, a laser pointer, and outputs light (for example, laser light) that travels straight along the optical axis O. The light irradiation device 72 is disposed at a position on the movable electrode 46 such that its optical axis O coincides with the axis A (or the z-axis of the tool coordinate system C T ). In the state shown in FIG. 11, the movable arm 36 is stationary and disposed at a predetermined position in the direction of the axis A (for example, a retracted position farthest from the fixed electrode 44).

[0068] Next, the operation of obtaining the deviation amounts x T , y T , E T in the mechanical system 70 will be described. Similar to the above-described embodiment, the processor 18 operates the moving machine 14 according to a work program to move the tool 16 to the n-th teaching point C n and causes the tool 16 to execute an operation for spot welding at the time point τ n , and the n-th target position B n visible by a mark or the like is imaged by the camera 17.

[0069] Here, in the present embodiment, before imaging the n-th target position B n with the camera 17, the processor 18 operates the light irradiation device 72 to output light from the light irradiation device 72. An example of the imaged image data captured by the camera 17 at the time point τ n is shown in FIG. 12. In the image data 84 shown in FIG. 12, the light 86 irradiated from the light irradiation device 72 onto the surface of the workpiece W is shown together with the n-th target position B n on the workpiece W.

[0070] Since the light irradiation device 72 is arranged such that its optical axis O coincides with the axis A (the z-axis of the tool coordinate system CT), the position of the light 86 in the image data 84 can be regarded as indicating the working position F n where the movable electrode 46 and the fixed electrode 44 come into contact with and sandwich the workpiece W during actual spot welding operation.

[0071] The processor 18 acquires the coordinates in the camera coordinate system C C of one pixel (for example, the pixel at the center of the image area of the light 86) that shows the light 86 in the image data 84, and stores the coordinates in the storage unit 20 as information indicating the position of the working position F n in the image data 84. Further, the processor 18 analyzes the image data 84 captured by the camera 17 and acquires the coordinates in the camera coordinate system C n of one pixel that shows the n-th target position B C . Then, the processor 18 determines the working position F obtained from the light 86 shown in the image data 84n coordinates of and the nth target position B n Using the coordinates of and the camera coordinate system C C the difference x in C and y C (or E c ) is obtained.

[0072] Then, the processor 18 uses the second transformation matrix representing the positional relationship between the tool coordinate system C in FIG. 11 T and the camera coordinate system C C to convert the difference x C and y C in the camera coordinate system C C , or the difference E c into the deviation amounts x T and y T in the tool coordinate system C T , or the deviation amount E T . Thus, the processor 18 can obtain the deviation amounts x n and y n between the working position F n at time τ T and the nth target position B T (or E T ).

[0073] In the present embodiment, the camera 17, the storage unit 20, the deviation amount acquisition unit 52, the position correction unit 54, and the light irradiation device 72 constitute a device 80 (FIG. 10) for acquiring the deviation amounts x n , y n , E T of the working position F T of the tool 16 with respect to the nth target position B T . Then, when the camera 17 captures the image data 84, the light irradiation device 72 irradiates the work W with light for indicating the working position F n .

[0074] According to the present embodiment, it is not necessary to prepare in advance information indicating the position of the working position F n in the image data 84. From the light 86 captured in the image data 84, the information indicating the position of the working position F n in the image data 84 (that is, the camera coordinates of the pixel in which the light 86 is captured in the image data 84 CC can automatically acquire the coordinates) in

[0075] In the above-described embodiment, the camera 17 is at time point τ n at time point τ which is t time units before time point τ n -t, or at time point τ n at time point τ which is t time units after time point τ n +t, may further image the nth target position B n That is to say, the camera 17 may continuously image (i.e., video-record) the nth target position B at time points τ n including time point τ, in a plurality of temporally consecutive time points τ n -t, τ n , τ n +t, with a period of t. The continuous shooting period t can be determined according to the optical specifications of the camera 17, etc. n

[0076] Hereinafter, in the embodiment shown in FIG. 3, the case where the camera 17 continuously images the nth target position B at time points τ n -t, τ n , and τ n +t will be described. FIG. 13 shows an example of imaging the image data of the nth target position B at time point τ n -t. FIG. 14 shows an example of imaging the image data of the nth target position B at time point τ n +t. In FIGS. 13 and 14, for reference, the position of the nth target position B n in the image data 60 shown in FIG. 5 is indicated by a white dot G. n +t n n

[0077] As shown in FIG. 13, in the image data 90 imaged by the camera 17 at time point τ n -t, the nth target position B n is from the center point (i.e., the working position) F n of the image data 90 to the plus direction of the x-axis of the camera coordinate system C C by a difference x C ’, and to the plus direction of the y-axis by a difference y C ​​​Only, it is displaced. In other words, the nth target position B n is the working position F n from, the difference E c ’ (|E c ’| = (x C ’ 2 + y C ’ 2 ) 1 / 2 ) only, is displaced.

[0078] The processor 18, by the method described above, the difference x in the camera coordinate system C C and y C ’ or the difference E C ’ is obtained, and using the first transformation matrix, the difference x in the camera coordinate system C c and y C ’ or the difference E C ’ is converted into the displacement amounts x in the tool coordinate system C C and y c ’ or the displacement amount E T ’ and the displacement amounts x between the working position F at time τ T and y T ’ (or E T ’) at -t and the nth target position B n can be obtained. n and the nth target position B n and the displacement amounts x T and y T ’ (or E T ’)

[0079] On the other hand, as shown in FIG. 14, in the image data 92 captured by the camera 17 at time τ n + t, the nth target position B n is the center point (i.e., the working position) F of the image data 92 n from, in the positive x-axis direction of the camera coordinate system C C by the difference x C ”, in the positive y-axis direction by the difference y C ” only, is displaced. In other words, the nth target position B n is the working position F n from, the difference E c ” (|E c ”| = (x C ” 2 + y C ” 2 )1 / 2 ) is only offset.

[0080] The processor 18, by the method described above, determines the differences x C and y C ” in the camera coordinate system C C ” or the difference E c ”. Using the first transformation matrix, the differences x C and y C ” in the camera coordinate system C C ” or the difference E c ” are converted into the offset amounts x T and y T ” in the tool coordinate system C T ” or the offset amount E T ”. At time τ n + t, the offset amount between the working position F n and the nth target position B n can be obtained for x T and y T ” (or E T ”). Thus, at different times τ n - t, τ n , τ n + t, the offset amount may be different. In this embodiment, the processor 18 obtains the offset amount at different times τ n - t, τ n , τ n + t, respectively.

[0081] Here, there may be variations in the actual dimensions (e.g., thickness) of the work W to be processed. When variations occur in the dimensions of the work W, depending on these dimensions, the timing at which the movable electrode 46 and the fixed electrode 44 come into contact with and sandwich the work W during actual spot welding operations will also vary.

[0082] For example, assume that the nominal dimension of the thickness of the work W is a 0 , the dimensional tolerance is ±0.1, and the time τ n is set as the timing when the movable electrode 46 and the fixed electrode 44 come into contact with the work W of the nominal dimension a 0 . In this case, if the actual dimension is a 0It is +0.1 (that is, thicker than the nominal thickness dimension a 0 ), when the work W is clamped by the movable electrode 46 and the fixed electrode 44, the time point when the movable electrode 46 and the fixed electrode 44 contact the work W is the time point τ n earlier than the time point.

[0083] On the contrary, when the actual thickness dimension is a 0 -0.1 (that is, thinner than the nominal thickness dimension a 0 ), when the work W is clamped by the movable electrode 46 and the fixed electrode 44, the time point when the movable electrode 46 and the fixed electrode 44 contact the work W is the time point τ n later than the time point. Therefore, when the actual thickness dimension of the work W is thinner or thicker than the nominal thickness dimension a 0 , even if the nth target position B n is imaged at the time point τ n , the nth target position B n in the image data at this time may not indicate the position at the time when the movable electrode 46 and the fixed electrode 44 contact the work W.

[0084] Therefore, in the present embodiment, the camera 17 continuously shoots (records a video) the nth target position B n at different multiple time points τ n -t, τ n , τ n +t, and the processor 18 obtains the displacement amounts x T and y T (or E T ), x T ’ and y T ’(or E T ’), and x T ” and y T ”(or E T ) for each of the acquired multiple pieces of image data 60, 90, 92.

[0085] For example, the time point τ n -t corresponds to the time point when the movable electrode 46 and the fixed electrode 44 contact the work W with a dimension of a 0 +0.1, and the time point τ n +t corresponds to a 0Assuming that it corresponds to the time when the movable electrode 46 and the fixed electrode 44 come into contact with the workpiece W having a dimension of -0.1, the processor 18 determines the deviation amounts x 0 and y T with respect to the workpiece W having a nominal dimension a T (or E T ), and the deviation amounts x 0 ’ and y T ’(or E T ’), and the deviation amounts x T ” and y T ”(or E T ”) with respect to the workpiece W having a dimension of a T ± dimensional tolerance can be obtained respectively.

[0086] In this way, by obtaining the deviation amounts from the image data 60, 90, and 92 captured at a plurality of time points τ n -t, τ n , τ n +t, it is possible to obtain the deviation amounts corresponding to the dimensional variations of the workpiece W. As an example, the processor 18 may generate the images in Table 1 below and display them on a display (not shown) provided in the control device 12. TIFF0007691218000001.tif28153

[0087] By referring to Table 1, the operator can statistically analyze the deviation amount of the working position F n of the tool 16 with respect to the nth target position B n while considering the dimensional tolerance. In this embodiment, as an example, the case where the camera 17 captures the nth target position B n -t, τ n , τ n +t has been described. However, the nth target position B n may be continuously photographed at four or more time points including the time point τ 0 corresponding to the workpiece W having the nominal dimension a n . This allows for a more detailed analysis of the deviation amount. n

[0088] In the above-described embodiment, the case where the tool 16 is a spot welding gun has been described. However, the tool is not limited to a spot welding gun. Hereinafter, with reference to FIG. 15, a tool 96 according to another embodiment will be described. The tool 96 emits a laser beam along the optical axis P and performs laser processing on the work W n at the working position F. The tool 96 is a laser processing head that performs laser processing on the work W. The tool 96 is attached to the wrist portion 30 of the moving machine 14 instead of the above-described tool 16.

[0089] The processor 18 sends a laser oscillation command to a laser oscillator (not shown) provided outside the tool 96, and the laser oscillator supplies the laser beam to the tool 96 through an optical path such as an optical fiber. The tool 96 emits the laser beam from the emission port 96a along the optical axis P, and performs laser processing (laser cutting, laser welding, etc.) on the work W with the laser beam. For the tool 96, a tool coordinate system C T is set. In the present embodiment, the tool coordinate system C T is set for the tool 96 such that the origin thereof is located at the center of the emission port 96a and the z-axis of the tool coordinate system C T coincides with (or is parallel to) the optical axis P.

[0090] The processor 18 performs laser processing operations on each of the nth target positions B n (n = 1, 2,...) on the work W shown in FIG. 4, for example. Specifically, the processor 18 operates the moving machine 14 to move the tool 96 to the nth teaching point C n for performing the laser processing operation on the nth target position B. At this time, the processor 18 sets the tool coordinate system C n such that the origin thereof is located at the nth teaching point C T and the z-axis thereof (i.e., the optical axis P) passes through the nth target position B n . n Then, the processor 18 sends a laser oscillation command to the laser oscillator, emits the laser beam from the tool 96, and uses the laser beam to process the work W at the working position F

[0091] ​n Perform laser processing. That is, the working position F in this embodiment n is the position where the tool 96 irradiates the workpiece W with a laser beam (or the intersection of the optical axis P and the surface of the workpiece W).

[0092] The processor 18 repeats such laser processing operations for all target positions B n The processor 18 executes a series of operations for such laser processing according to a work program. This work program is stored in advance in the storage unit 20. The work program includes the position information of the nth teaching point C n , the positioning command for positioning the tool 96 to the nth teaching point C n , the laser oscillation command to the laser oscillator, and the like.

[0093] When the processor 18 arranges the tool 96 at the nth teaching point C n according to the work program and outputs a laser beam from the tool 96, the working position F where the laser beam is actually irradiated on the workpiece W n may deviate from the nth target position B n . Therefore, similar to the above-described embodiment, the apparatus 50 obtains the deviation amount of the working position F of the tool 96 with respect to the nth target position B n . n

[0094] As shown in FIG. 15, the camera 17 of the apparatus 50 is arranged in a predetermined positional relationship with respect to the tool 96. Specifically, the camera 17 is arranged at the exit port 96a of the tool 96 such that its line-of-sight direction D coincides with the optical axis P (that is, the z-axis of the tool coordinate system C T ).

[0095] When obtaining the deviation amount, the processor 18 operates the moving machine 14 according to the work program to move the tool 96 toward the nth teaching point C n . Then, the processor 18 sends a command to the camera 17, and at time τ when the tool 96 executes the operations for the laser processing with respect to the nth target position B n ​​n and the n-th target position B n is imaged by the camera 17.

[0096] As an example, the time point τ n in the present embodiment can be set at the time when the processor 18 transmits a laser oscillation command to the laser oscillator. As another example, the time point τ n can be set at the time when the laser light is actually emitted from the tool 96. The time τ y from the time when the processor 18 transmits a laser oscillation command to the laser oscillator until the tool 96 actually emits the laser light can be predicted from the specifications of the laser oscillator and the like. Therefore, the time point τ n when the laser light is actually emitted from the tool 96 can be determined as the time point after elapsing the time τ y from the time when the laser oscillation command is transmitted to the laser oscillator.

[0097] Thus, the camera 17 images the image data 60 in which the n-th target position B n appears as shown in FIG. 5 at the time point τ n . In the present embodiment, since the camera 17 is arranged in a positional relationship in which its line-of-sight direction D coincides with the optical axis P with respect to the tool 96, in the captured image data 60, the center point (central pixel) F n can be regarded as the working position F n where the laser light is irradiated onto the workpiece W during the actual laser processing operation. Then, the processor 18 functions as the deviation amount acquisition unit 52, and in the same manner as in the embodiment of FIG. 3, acquires the deviation amounts x T and y T (or E T ) from the image data 60. And the processor 18 functions as the position correction unit 54 in the same manner as in the embodiment of FIG. 3, and corrects the n-th teaching point C T and y T (or E T ) based on the deviation amounts x n .

[0098] In the embodiment shown in FIG. 15, the camera 17 may be arranged with respect to the tool 96 such that its line-of-sight direction D is parallel to the optical axis P and is offset from the optical axis P by a predetermined distance. In this case, the processor 18 uses the same method as in the embodiment shown in FIG. 6 to obtain the deviation amounts x T and y T (or E T ).

[0099] Alternatively, in the embodiment shown in FIG. 15, the camera 17 may be arranged with respect to the tool 96 such that its line-of-sight direction D is inclined with respect to the optical axis P at a predetermined angle θ. In this case, the processor 18 uses the same method as in the embodiment shown in FIG. 8 to obtain the deviation amounts x T and y T (or E T ).

[0100] Next, referring to FIGS. 16 to 18, the tool 98 according to still another embodiment will be described. The tool 98 is a robot hand that grips the nth part I n (n = 1, 2, 3, ···) and fits it into the nth hole H n formed in the workpiece W. The nth part I n is a rod-shaped (for example, cylindrical) member having a central axis Q. Further, the nth hole H n is formed at the nth target position B n on the workpiece W and has a central axis R n . For example, the nth target position B n may be defined as the opening center of the nth hole H n on the surface of the workpiece W. In this case, the axis R n passes through the nth target position B n .

[0101] Tool 98 is attached to the wrist portion 30 of the mobile machine 14 instead of the above-described tool 16. Specifically, the tool 98 includes a hand base 100 connected to the wrist portion 30, a plurality of finger portions 102 that are openably and closably provided on the hand base 100, and a drive portion 104 that opens and closes the plurality of finger portions 102. The drive portion 104 is, for example, an air cylinder or a motor, and can grip or release an object by opening and closing the finger portions 102.

[0102] For the tool 98, a tool coordinate system C T is set. In the present embodiment, the tool coordinate system C T is set for the tool 98 such that its origin is located at the gripping position of the finger portions 102 (or between the plurality of finger portions 102), and the z-axis of the tool coordinate system C T is orthogonal to the opening and closing direction of the finger portions 102.

[0103] Next, with reference to FIGS. 16 and 17, the fitting operation performed by the tool 98 will be described. The workpiece W may be fixed at a predetermined position by, for example, a jig or the like, or may be moved by a belt conveyor or the like. The processor 18 operates the mobile machine 14 to grip the nth part I n accommodated in a predetermined storage location with the tool 98. At this time, the tool 98 grips the nth part I T such that the z-axis of the tool coordinate system C n coincides with the axis Q.

[0104] Next, the processor 18 operates the mobile machine 14 to place the tool 98 at the nth teaching point C n for performing a fitting operation of fitting the nth part I n into the nth hole H. Specifically, the processor 18 sets the tool coordinate system C n such that its origin is arranged at the nth teaching point C T and its z-axis (that is, the axis Q) substantially coincides with the axis R n of the nth hole H n . n

[0105] Then, the processor 18 operates the moving machine 14 so that the position of the tool 98 coincides with the position defined by the set tool coordinate system C. As a result, the tool 98 and the nth part I held by the tool 98 T are arranged with respect to the workpiece W as shown in FIG. 16. Next, the processor 18 transmits a fitting start command to the moving machine 14. Then, the moving machine 14 moves the tool 98 in the negative z-axis direction of the tool coordinate system C n so that the nth part I held by the tool 98 T is fitted into the nth hole H n . As a result, as shown in FIG. 17, the nth part I is fitted into the nth hole H by the tool 98 n . n n

[0106] The processor 18 repeatedly executes such a fitting operation to fit a plurality of parts I n into a plurality of holes B n respectively. The processor 18 executes a series of operations for such a fitting operation according to a work program. This work program includes position information of the nth teaching point C n , a positioning command for positioning the tool 98 to the nth teaching point C n , a fitting start command, and the like.

[0107] Here, when the processor 18 performs a fitting operation of fitting the nth part I n into the nth hole H n , the working position where the nth part I engages with the workpiece W may deviate from the nth hole H n (that is, the nth target position B n ). Therefore, in the present embodiment, the apparatus 50 acquires the deviation amount of the working position of the tool 98 with respect to the nth target position B n in the same manner as in the above-described embodiment. n

[0108] ​​​As shown in FIG. 18, the camera 17 of the apparatus 50 is held (or fixed to) by the tool 98 so as to be disposed in a predetermined positional relationship with respect to the tool 98. Specifically, the camera 17 has its line-of-sight direction D along the axis Q of the n-th part I n (or the z-axis of the tool coordinate system C T ).

[0109] When acquiring the deviation amount, the processor 18 operates the moving machine 14 according to the work program to move the tool 98 toward the n-th teaching point C n . Then, the processor 18 sends a command to the camera 17 to image the n-th target position B n (the n-th hole H n ) at the time point τ n when causing the tool 98 to perform an operation for the fitting work with respect to the n-th target position B n .

[0110] As an example, the time point τ n in the present embodiment can be set at the time when the processor 18 sends a fitting start command to the moving machine 14. As another example, the time point τ n can be set at the time when the n-th part I n held by the tool 98 engages with the work W (or the tip of the n-th part I n reaches the surface of the work W).

[0111] From the time when the processor 18 sends a fitting start command until the n-th part I n held by the tool 98 engages with the work W, the time τ z can be predicted from the acceleration / deceleration characteristics of the servo motor 31 of the moving machine 14 and the like. Therefore, the time point τ n when the n-th part I n held by the tool 98 engages with the work W can be determined as the time point after elapse of the time τ z from the time when the fitting start command is sent.

[0112] Thus, the camera 17 images at the time point τn and image the n-th target position B n (the n-th hole H n ). An example of the image data captured by the camera 17 at this time is shown in FIG. 19. In the image data 106 shown in FIG. 19, the n-th hole H n formed in the workpiece W is imaged. As an example, the processor 18 analyzes the image data 106 to detect the center point of the n-th hole H n , and obtains the coordinates of the detected center point in the camera coordinate system C C as the coordinates of the n-th target position B n in the camera coordinate system C C .

[0113] Also, in the present embodiment, since the camera 17 is arranged in a positional relationship such that its line-of-sight direction D coincides with the axis Q (the z-axis of the tool coordinate system) with respect to the tool 98, the center point (central pixel) F n of the captured image data 106 can be regarded as the working position F n where the n-th component I n engages with the workpiece W during the actual fitting operation.

[0114] Then, the processor 18 functions as the deviation amount acquisition unit 52, and uses the coordinates of the n-th target position B C and the working position F n in the camera coordinate system C n to obtain the differences x C and y C (or E c ). Similar to the embodiment shown in FIG. 3, the deviation amounts x T and y T (or E T ) can be obtained from the image data 106. Then, the processor 18 functions as the position correction unit 54 in the same manner as the embodiment of FIG. 3, and corrects the n-th teaching point C T and y T (or E T ) based on the deviation amounts x n .

[0115] In the embodiment shown in FIG. 18, the camera 17 is arranged with respect to the tool 98 such that its line of sight direction D is parallel to the axis Q (the z-axis of the tool coordinate system C C ), and the line of sight direction D is offset from the axis Q by a predetermined distance. In this case, the processor 18 uses the same method as in the embodiment shown in FIG. 6 to obtain the deviation amounts x T and y T (or E T ).

[0116] Alternatively, in the embodiment shown in FIG. 18, the camera 17 may be arranged with respect to the tool 98 such that its line of sight direction D is inclined with respect to the axis Q at a predetermined angle θ. In this case, the processor 18 uses the same method as in the embodiment shown in FIG. 8 to obtain the deviation amounts x T and y T (or E T ).

[0117] In the above-described embodiment, the control device 12 controls the mobile machine 14 and the tools 16, 96, or 98. However, the present invention is not limited to this, and while the control device 12 controls the mobile machine 14, the tools 16, 96, or 98 may be controlled by a control device different from the control device 12. Such a configuration is shown in FIG. 20.

[0118] The machine system 110 shown in FIG. 20 includes a control device 12, a mobile machine 14, tools 16, 96, or 98, a camera 17, and a second control device 112. The second control device 112 is communicably connected to the control device 12. The second control device 112 includes a processor 114 and a storage unit 20 communicably connected to the processor 114 via a bus 116. The processor 114 controls the tools 16, 96, or 98. The processor 114 functions as the deviation amount acquisition unit 52 and the position correction unit 54 of the device 50. Further, the processor 114 sends a command to the camera 17 and controls the imaging operation of the camera 17.

[0119] Note that the deviation amount acquisition unit 52 may be provided separately from the control devices 12 or 112. Such a configuration is shown in FIG. 21. The machine system 120 shown in FIG. 21 includes a control device 12, a mobile machine 14, tools 16, 96, or 98, and a device 122. Similar to the above-described device 50, the device 122 acquires the deviation amount of the working position of the tools 16, 96, or 98 with respect to the n-th target position B n and includes a deviation amount acquisition unit 52 and a camera 17. The camera 17 is connected to the control device 12 and images the n-th target position B n at time point τ n . The deviation amount acquisition unit 52 may be composed of a single computer having a processor and a storage unit.

[0120] Note that in the above-described embodiment, the case where the processor 18 converts the differences x C and y C in the camera coordinate system C C , or the difference E c into the deviation amounts x T and y T in the tool coordinate system C T , or the deviation amount E T has been described. However, the present invention is not limited to this, and the processor 18 may convert the differences x C and y C in the camera coordinate system C C , or the difference E c into the mobile machine coordinate system C M (or the world coordinate system).

[0121] For example, after obtaining the deviation amount in the tool coordinate system C T , the processor 18 may convert the deviation amount in the tool coordinate system C T into the mobile machine coordinate system C M (or the world coordinate system). Alternatively, the operator may calibrate in advance the camera coordinate system C C and the mobile machine coordinate system C M (or the world coordinate system), and the processor 18 may use the differences x C , y C , and E C in the camera coordinate system C cConvert it to the moving machine coordinate system C M (or the world coordinate system), and the displacement amount in the moving machine coordinate system C M (or the world coordinate system) can be obtained.

[0122] In addition, the position of the tool coordinate system C T for the tools 16, 96, or 98 is not limited to the above-described embodiments and can be at any position. Also, in the embodiments shown in FIGS. 3, 6, or 8, the processor 18 may move the movable arm 36 when imaging the nth target position B n with the camera 17. The present disclosure has been described through the embodiments above, but the above embodiments do not limit the invention according to the claims.

Explanation of Reference Numerals

[0123] 10, 70, 110, 120 Machine system 12, 112 Control device 14 Moving machine 16, 96, 98 Tools 17 Camera 18, 114 Processors 20 Storage unit 50, 80, 122 Devices 52 Displacement amount acquisition unit 54 Position correction unit

Claims

1. An apparatus for obtaining the deviation amount of the working position of a tool with respect to a target position when moving the tool by a moving machine and performing work on the target position of a workpiece with the tool, comprising: a processor; a camera disposed in a predetermined positional relationship with respect to the tool, wherein the processor: causes the camera to image the target position at a first time point which is the time point when a command for causing the tool to execute an operation for the work is transmitted, or the time point when a predetermined time has elapsed from the time point of transmission, while not causing the tool to actually execute the operation; obtains the deviation amount between the working position and the target position at the first time point based on the position of the target position in the image data imaged by the camera and information indicating the position of the working position in the image data.

2. The apparatus according to claim 1, further comprising a storage unit for storing the information in advance.

3. The apparatus according to claim 1, further comprising a light irradiation device provided on the tool for irradiating the workpiece with light for indicating the working position when the camera images the image data, wherein the processor obtains the deviation amount using the position of the light in the image data as the information.

4. The tool is a welding gun having a fixed electrode and a movable electrode that moves along an axis so as to approach and separate from the fixed electrode, wherein the movable electrode abuts against the workpiece at the working position when performing the work, and the command is: a command for moving the movable electrode, or a command for supplying a voltage to energize the fixed electrode and the movable electrode.

5. The apparatus according to claim 4, wherein the camera is disposed such that the line-of-sight direction of the camera is parallel to the axis.

6. The apparatus according to claim 5, wherein the camera is disposed at the position of the movable electrode such that the line-of-sight direction coincides with the axis.

7. The tool is a laser processing head that emits laser light along an optical axis, and the command is a command for generating the laser light.

8. The apparatus according to claim 7, wherein the camera is disposed such that the line-of-sight direction of the camera coincides with the optical axis.

9. The tool is a robot hand that grips a component and fits the component into a hole provided at the target position, The device according to any one of claims 1 to 3, wherein the command is a command for moving the tool toward the hole by the moving machine.

10. The device according to claim 9, wherein the camera is arranged such that a line-of-sight direction of the camera is parallel to an axis of the component gripped by the tool.

11. The device according to any one of claims 1 to 10, wherein the processor corrects a position of the moving machine based on the obtained deviation amount so that the working position is arranged at the target position at the first time point.

12. The camera further images the target position at a second time point before or after the first time point, The device according to any one of claims 1 to 11, wherein the processor further obtains a second deviation amount between the tool and the target position at the second time point based on a position of the target position in second image data imaged by the camera at the second time point and information indicating a position of the working position in the second image data.

13. The processor obtains a difference between the target position and the working position in the camera coordinate system using coordinates of the target position in a camera coordinate system defining coordinates of the image data and coordinates of the working position in the camera coordinate system, The device according to any one of claims 1 to 12, wherein the deviation amount in the control coordinate system is obtained using a known positional relationship between the control coordinate system set for the tool or the moving machine and the camera coordinate system and the difference.

14. A method for obtaining a deviation amount of a working position of a tool with respect to a target position when performing work on the target position of a workpiece with the tool moved by a moving machine, wherein a processor causes a camera arranged in a predetermined positional relationship with respect to the tool to image the target position at a first time point that is a time point when a command for causing the tool to execute an operation for the work is transmitted or a time point when a predetermined time has elapsed since the transmission time point, and does not cause the tool to actually execute the operation. A method for obtaining a deviation amount between the working position and the target position at the first time point based on the position of the target position in the image data captured by the camera and information indicating the position of the working position in the image data.

Citation Information

Patent Citations

  • Weld teaching position correction system

    JP2009125839A

  • Laser welding device

    JP2018176164A