Calibration method, system, and computer-readable storage medium
Patent Information
- Application Number
- CN202311256322.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-09-26
AI Technical Summary
[0003]但是在目前的飞拍技术中,由于机器人的作业速度过快,导致最终的放料精度不够准确
[0008]本申请的有益效果是:本申请的标定方法,相机在预设拍摄点处采用定拍技术,可以保证相机每次拍摄时获取的图像中的值更为精确,再利用相机坐标系与机器人目标坐标系之间的对应关系以及公式确定目标位置,使得机器人将抓取的待放工件放料时,与提前示教的标准工件的位置相同,从而提高放料的精度。
Smart Images

Figure CN117301055B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics, and in particular to a calibration method, system, and computer-readable storage medium. Background Technology
[0002] In industrial robot gripping and unloading applications, if high loading accuracy is required while minimizing disruption to the overall cycle time, a "flying camera" technique is necessary. This technique utilizes vision technology to ensure the workpiece is positioned correctly during the robot's high-speed gripping and movement.
[0003] However, in current aerial photography technology, the robot's operating speed is too fast, resulting in insufficient accuracy in the final material placement. Summary of the Invention
[0004] This application provides a calibration method, system, apparatus, and computer-readable storage medium that can improve the accuracy of feeding.
[0005] To address the aforementioned technical problems, this application provides a calibration method, comprising: acquiring a first position and a second position, wherein the first position is the position of a first target point on a standard workpiece grasped by a robot at a preset shooting point, in the camera coordinate system; and the second position is the position of a second target point on a workpiece to be placed at the preset shooting point, in the camera coordinate system; acquiring the offset between the camera coordinate system and the robot target coordinate system; determining a third position based on the first position and the offset; determining a fourth position based on the second position and the offset; and determining a target position using the following formula: Wherein, T is the third position, T' is the fourth position, F is the position of the robot's tool center point in the target coordinate system when the standard workpiece is grasped at the preset shooting point, F1 is the position of the robot's tool center point in the target coordinate system when the standard workpiece is placed on the placement point, and F1' is the target position, the target coordinate system does not change with the movement of the robot; the robot is controlled to place the workpiece to be placed on the placement point according to the target position, wherein the position of the robot's tool center point when the workpiece to be placed is placed on the placement point is the target position.
[0006] To address the aforementioned technical problems, a second aspect of this application provides a calibration system, including a calibration device and a camera positioned at a preset shooting point, the camera being communicatively connected to the calibration device; the camera is used to: capture a first image of a standard workpiece positioned at the preset shooting point, and capture a second image of a workpiece to be placed at the preset shooting point; the calibration device is used to: determine a first position based on the first image, and determine a second position based on the second image, wherein the first position is the position of a first target point on the standard workpiece in the camera coordinate system, and the second position is the position of a second target point on the workpiece to be placed in the camera coordinate system; the calibration device is further used to: obtain the offset between the camera coordinate system and the robot target coordinate system; determine a third position based on the first position and the offset; determine a fourth position based on the second position and the offset; and determine the target position using the following formula: Wherein, T is the third position, T' is the fourth position, F is the position of the robot's tool center point in the target coordinate system when the standard workpiece is grasped at the preset shooting point, F1 is the position of the robot's tool center point in the target coordinate system when the standard workpiece is placed on the placement point, and F1' is the target position, the target coordinate system does not change with the movement of the robot; the robot is controlled to place the workpiece to be placed on the placement point according to the target position, wherein the position of the robot's tool center point when the workpiece to be placed is placed on the placement point is the target position.
[0007] To address the aforementioned technical problems, a third aspect of this application provides a computer-readable storage medium storing program data thereon, wherein the program data, when executed by a processor, implements the method described in any of the preceding claims.
[0008] The beneficial effects of this application are: the calibration method of this application uses a fixed-shot technique at a preset shooting point, which can ensure that the values in the image acquired by the camera each time it takes a shot are more accurate. Furthermore, it utilizes the correspondence between the camera coordinate system and the robot target coordinate system, as well as the formula... Determining the target position ensures that when the robot places the gripped workpiece, its position matches that of the pre-taught standard workpiece, thereby improving the accuracy of the placement. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 A flowchart illustrating one embodiment of the calibration method of this application; Figure 2 (a) in the figure is a schematic diagram of the workpiece at the preset shooting point; Figure 2 (b) is a schematic diagram of the workpiece at the unloading point; Figure 2 (c) in the diagram is a schematic diagram of the final placement target of the workpiece at the unloading point; Figure 2 (d) in the figure is a schematic diagram of the process of the workpiece to be placed coinciding with the standard workpiece at the preset shooting point; Figure 3 This is a flowchart illustrating an embodiment corresponding to step S120 of this application; Figure 4 This is a flowchart illustrating an embodiment corresponding to step S220 of this application; Figure 5 This is a schematic diagram of one embodiment of the calibration system of this application; Figure 6 This is a schematic diagram of one embodiment of the calibration device of this application; Figure 7 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0010] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0011] Please see Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the calibration method of this application. The calibration method includes: S110: Obtain the first position and the second position, wherein the first position is the position of the first target point on the standard workpiece in the camera coordinate system when the standard workpiece grasped by the robot is at the preset shooting point, and the second position is the position of the second target point on the workpiece to be placed in the camera coordinate system when the workpiece to be placed is at the preset shooting point.
[0012] Specifically, steps S110-S160 are executed by a calibration device that controls the movement of the robot. This calibration device can be any kind of equipment, such as a robot control cabinet or a computer, and there are no restrictions on it.
[0013] The robot's end flange connects to a tool used to grip workpieces. Each time the robot grips a workpiece from its gripping position, its pose remains fixed. That is, the pose of the first joint axis is the same each time the robot grips a workpiece, followed by the second joint axis, the third joint axis, and so on. The pose of the end flange in the target coordinate system is also the same each time the robot grips a workpiece. The target coordinate system does not change with the robot's movement; it can be the robot's base coordinate system or the world coordinate system. For ease of explanation, the target coordinate system will be used as the base coordinate system in the following description.
[0014] Meanwhile, the robot's speed and trajectory remain unchanged throughout the material handling process from picking up to unloading. Therefore, as long as the end flange is not driven to move relative to other parts of the robot during its movement, the pose of the end flange in the target coordinate system will be the same each time the robot moves to the same position.
[0015] In step S110, the robot grasps a standard workpiece and moves it to a preset shooting point to obtain the position of the first target point on the standard workpiece in the camera coordinate system, which is the first position. The first target point is any point on the standard workpiece that is manually determined; for ease of subsequent observation and calculation, the vertex of the upper left corner of the standard workpiece is used as the first target point. The robot then grasps a workpiece to be placed and moves it to the preset shooting point to obtain the position of the second target point on the workpiece to be placed in the camera coordinate system, which is the second position. The second target point is the vertex of the upper left corner of the workpiece to be placed, which is manually determined.
[0016] The standard workpiece refers to the workpiece in the standard position when the robot is gripping and releasing the material.
[0017] S120: Obtain the offset between the camera coordinate system and the robot target coordinate system.
[0018] Specifically, after calibrating the camera coordinate system, the camera coordinate system is obtained. It should be noted that this camera coordinate system is related to the camera itself and is independent of other factors. The origin of the camera coordinate system is the optical center of the camera, the x-axis and y-axis are parallel to the X and Y axes of the image, and the z-axis is the camera's optical axis, which is perpendicular to the image plane. The offset between the camera coordinate system and the robot's base coordinate system is then obtained.
[0019] S130: Determine the third position based on the first position and the offset.
[0020] Specifically, based on the position and offset of the first target point in the camera coordinate system, the position of the first target point in the base coordinate system, i.e., the third position, is obtained.
[0021] S140: Determine the fourth position based on the second position and the offset.
[0022] Specifically, based on the position and offset of the second target point in the camera coordinate system, the position of the second target point in the base coordinate system, i.e., the fourth position, is obtained.
[0023] S150: Determine the target location using a preset formula.
[0024] Specifically, the preset formula is as follows: Where T is the third position, T' is the fourth position, F is the position of the robot's tool center point in the target coordinate system when the standard workpiece is gripped at the preset shooting point, F1 is the position of the robot's tool center point in the target coordinate system when the standard workpiece is placed on the unloading point, and F1' is the target position, the target coordinate system does not change with the movement of the robot.
[0025] Points F and F1 are obtained beforehand through teaching. Understandably, each time the robot places a workpiece, it needs to ensure that the workpiece is in the standard position.
[0026] Among them, combined Figure 2 (a) in Figure 2 (d) in Figure 2 (a) in the image is a schematic diagram of the workpiece at the preset shooting point. Figure 2 (b) in the diagram is a schematic diagram of the workpiece at the unloading point. Figure 2 (c) in the diagram is a schematic diagram of the final placement target of the workpiece at the unloading point. Figure 2 (d) in the diagram illustrates the process of the workpiece to be placed coinciding with the standard workpiece at the preset shooting point. The black workpiece is the standard workpiece shown in advance, and the white workpiece is the workpiece to be placed during the actual material handling and placement process.
[0027] Based on the above diagram, the following four formulas can be obtained: Formula 1: Where F is the position of the robot's tool center point in the base coordinate system when the standard workpiece is at the preset shooting point, T' is the position of the second target point in the base coordinate system when the workpiece to be placed is at the preset shooting point, and λ represents the correspondence between F and T'. In other words, Formula 1 is an equation established between the second target point of the workpiece to be placed and the tool center point on the standard workpiece when the workpiece is at the preset shooting point.
[0028] Formula 2: In this equation, F' represents the position of the new tool center point after the workpiece to be placed coincides with the standard workpiece at the preset shooting point, T represents the position of the first target point in the base coordinate system when the standard workpiece is at the preset shooting point, and λ represents the correspondence between F' and T. In other words, Formula 2 is an equation established between the new tool center point and the first target point of the standard workpiece after the workpiece to be placed coincides with the standard workpiece at the preset shooting point.
[0029] Formula 3: , where x represents the transformation relationship from F to F'.
[0030] Formula 4: Where F1 is the position of the robot's tool center point in the base coordinate system when the standard workpiece is placed on the unloading point, F1' is the target position, and x represents the transformation relationship from F1 to F1'.
[0031] This yields the following four formulas: Formula 1: ; Formula 2: ; Formula 3: ; Formula 4:
[0032] Formula 1 can be converted to: Formula 5: ; Then, substituting Formula 5 into Formula 2, we get: Formula Six: ; Substituting Formula 3 into Formula 6 yields: Formula 7: ; Formula 7 can be converted to ; In turn, one can obtain That is, each time the robot releases material, it can ensure that the position of the workpiece to be released at the release point is the same as the position of the standard workpiece, based on the calculated target position F1'.
[0033] S160: Control the robot to place the workpiece to be placed on the unloading point according to the target position. When the workpiece is placed on the unloading point, the position of the robot's tool center point is the target position.
[0034] As can be seen from the above, the calibration method of this application employs a fixed-shot technique at a preset shooting point, which ensures that the values in the images acquired by the camera each time it takes a shot are more accurate. Furthermore, it utilizes the correspondence between the camera coordinate system and the robot target coordinate system, as well as the formula... Determining the target position ensures that when the robot places the gripped workpiece, its position matches that of the pre-taught standard workpiece, thereby improving the accuracy of the placement.
[0035] In one implementation, please refer to Figure 3 , Figure 3 This is a flowchart illustrating one embodiment of step S120 in this application. Step S120 specifically includes: S210: Obtain the first preset position of the preset point on the standard workpiece in the target coordinate system.
[0036] Specifically, the preset point can be any point on the standard workpiece, and its first preset position in the target coordinate system can be obtained.
[0037] S220: Obtain the second preset position of the preset point in the camera coordinate system.
[0038] Further, please refer to Figure 4 , Figure 4 This is a flowchart illustrating one embodiment of step S220 in this application. Step S220 specifically includes: S310: Controls the standard workpiece to rotate around a pivot point that passes through a preset point.
[0039] Specifically, after the robot picks up a standard workpiece, it controls the standard workpiece to rotate around an axis that passes through a preset point.
[0040] S320: During the rotation of the standard workpiece, the camera at the preset shooting point takes multiple pictures of the standard workpiece to obtain multiple images.
[0041] Specifically, during the process of the robot controlling the rotation of the standard workpiece, the standard workpiece is photographed multiple times using a camera located at a preset shooting point to obtain multiple images.
[0042] S330: Identify the same fixed point on a standard workpiece in multiple images and obtain multiple positions of the fixed point in the camera coordinate system.
[0043] Specifically, after obtaining multiple images, the same fixed point on the standard workpiece in the multiple images is identified. This fixed point can be any point on the standard workpiece, and multiple positions of this fixed point in the camera coordinate system are obtained.
[0044] S340: Perform circle fitting based on multiple positions to obtain the second target position of the target point.
[0045] Specifically, after obtaining multiple positions of the fixed point in the camera coordinate system, a circle fitting formula is used to obtain the second preset position of the target point.
[0046] S230: Determine the offset based on the first preset position and the second preset position.
[0047] Specifically, after obtaining the first preset position and the second preset position, the offset is determined.
[0048] In one embodiment, step S230 specifically includes: S410: Subtract the first preset position and the second preset position to obtain the offset.
[0049] Specifically, after obtaining the first preset position and the second preset position, the difference between the two is calculated to obtain the offset.
[0050] In other embodiments, the offset can also be calculated by adding the first preset position and the second preset position, and this is not a limitation.
[0051] In one application scenario, a preset point P is determined on a standard workpiece, and the first preset position P1 (x0, y0) of the preset point P in the target coordinate system is obtained. A fixed point D is determined on the standard workpiece, where the upper left corner vertex of the standard workpiece can be identified as the fixed point D. The standard workpiece is controlled to rotate three times around the axis passing through the preset point P. During the rotation of the standard workpiece, at each designated position, a camera at a preset shooting point will take a picture of the standard workpiece, obtaining four images. The same fixed point D on the standard workpiece is identified in these four images, and multiple positions D1, D2, D3, and D4 of the fixed point D in the camera coordinate system are obtained. Using the circle fitting formula, the process of least squares circle fitting is existing technology and will not be described in detail here. After substituting the positions of D1-D4, the second preset position P2 (x1, y1) of the preset point P is obtained. The difference between the second preset position P2 and the first preset position P1 is calculated to obtain the offset A (△x, △y), which is the offset between the camera coordinate system and the target coordinate system.
[0052] In one embodiment, step S130 specifically includes: adding the first position and the offset to calculate the third position of the first position in the target coordinate system.
[0053] Specifically, after obtaining the first position, the offset is added to the first position to calculate the third position of the first position in the robot's base coordinate system.
[0054] Step S140 specifically includes: adding the second position and the offset to calculate the fourth position.
[0055] Specifically, after obtaining the second position, the offset is added to the second position to calculate the fourth position of the second position in the robot's base coordinate system.
[0056] In one embodiment, prior to step S220, the method further includes: S510: The camera coordinate system is calibrated using a multi-point method.
[0057] Specifically, the "six-point method" can be used to calibrate the camera coordinate system. Of course, other methods can also be used to calibrate the camera coordinate system, and no restrictions are imposed here.
[0058] Please see Figure 5 , Figure 5 This is a schematic diagram of one embodiment of the calibration system of this application. The calibration system 100 includes a calibration device 110 and a camera 120 located at a preset shooting point. The camera 120 is communicatively connected to the calibration device 110. The camera 120 is used to capture images of a standard workpiece located at the preset shooting point to obtain a first image, and to capture images of a workpiece to be placed at the preset shooting point to obtain a second image. The calibration device 110 and the camera 120 cooperate to complete the steps in the above calibration method. Detailed steps can be found in the above embodiment and will not be repeated here.
[0059] The calibration device 110 can be any kind of equipment, such as a robot control cabinet or a computer, without any limitation.
[0060] Please see Figure 6 , Figure 6 This is a schematic diagram of one embodiment of the calibration device of this application. The calibration device 200 includes: a first determining module 210, a second determining module 220, a third determining module 230, a fourth determining module 240, a fifth determining module 250, an acquisition module 260, and a control module 270.
[0061] The first determining module 210 is used to determine a first position based on the first image, wherein the first position is the position of a first target point on a standard workpiece in the camera coordinate system.
[0062] The second determining module 220 is used to determine the second position based on the second image, wherein the second position is the position of the second target point on the workpiece to be placed in the camera coordinate system.
[0063] The third determining module 230 is connected to the first determining module 210 and is used to determine the third position based on the first position and the offset.
[0064] The fourth determining module 240 is connected to the second determining module 220 and is used to determine the fourth position based on the second position and the offset.
[0065] The fifth determining module 250 is connected to the third determining module 230 and the fourth determining module 240, and is used to determine the target position using the following formula: Where T is the third position, T' is the fourth position, F is the position of the robot's tool center point in the target coordinate system when the standard workpiece is gripped at the preset shooting point, F1 is the position of the robot's tool center point in the target coordinate system when the standard workpiece is placed on the unloading point, and F1' is the target position, the target coordinate system does not change with the movement of the robot.
[0066] The acquisition module 260 is connected to the fifth determination module 250 and is used to acquire the offset between the camera coordinate system and the target coordinate system.
[0067] The control module 270 is connected to the fifth determining module 250 and is used to control the robot to place the workpiece to be placed on the unloading point according to the target position. When the workpiece to be placed is placed on the unloading point, the position of the robot's tool center point is the target position.
[0068] The first determining module 210, the second determining module 220, the third determining module 230, the fourth determining module 240, the fifth determining module 250, the acquisition module 260, and the control module 270 cooperate with each other to implement the steps performed by the calibration device 200 in the above-described calibration method implementation. For detailed steps, please refer to the above content, which will not be repeated here.
[0069] Please see Figure 7 , Figure 7 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 300 stores program data 310, which, when executed by a processor, implements the calibration method in any of the above embodiments.
[0070] Specifically, the computer-readable storage medium 300 can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or a device that can store program data 310. Alternatively, it can be a server that stores the program data 310, which can send the stored program data 310 to other devices for execution, or it can run the stored program data 310 itself.
[0071] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A calibration method, characterized in that, The calibration method includes: Obtain a first position and a second position, wherein the first position is the position of a first target point on the standard workpiece grasped by the robot at a preset shooting point in the camera coordinate system, and the second position is the position of a second target point on the workpiece to be placed at the preset shooting point in the camera coordinate system; Obtain the offset between the camera coordinate system and the robot target coordinate system; The third position is determined based on the first position and the offset. The fourth position is determined based on the second position and the offset. Determine the target location using the following formula Where T is the third position, T' is the fourth position, F is the position of the robot's tool center point in the target coordinate system when the standard workpiece is grasped at the preset shooting point, F1 is the position of the robot's tool center point in the target coordinate system when the standard workpiece is placed on the unloading point, and F1' is the target position, the target coordinate system does not change with the movement of the robot; According to the target location The robot is controlled to place the workpiece to be placed on the unloading point, wherein the position of the tool center point of the robot is the target position when the workpiece is placed on the unloading point.
2. The method according to claim 1, characterized in that, The step of obtaining the offset between the camera coordinate system and the robot target coordinate system includes: Obtain the first preset position of the preset point on the standard workpiece in the target coordinate system; Obtain the second preset position of the preset point in the camera coordinate system; The offset is determined based on the first preset position and the second preset position.
3. The method according to claim 2, characterized in that, The step of obtaining the second preset position of the target point in the camera coordinate system includes: Control the standard workpiece to rotate around the axis passing through the preset point; During the rotation of the standard workpiece, the standard workpiece is photographed multiple times using a camera located at the preset shooting point to obtain multiple images; Identify the same fixed point on the standard workpiece in multiple images to obtain multiple positions of the fixed point in the camera coordinate system; The second preset position of the preset point is obtained by performing circle fitting based on the multiple positions.
4. The method according to claim 2, characterized in that, Before obtaining the second preset position of the preset point in the camera coordinate system, the method further includes: The camera coordinate system is calibrated using a multi-point method.
5. The method according to claim 2, characterized in that, The step of determining the offset based on the first preset position and the second preset position includes: The offset is obtained by subtracting the first preset position and the second preset position.
6. The method according to claim 1, characterized in that, The target coordinate system is the robot's base coordinate system.
7. The method according to claim 1, characterized in that, The step of determining the third position based on the first position and the offset includes: The first position is added to the offset to obtain the third position of the first position in the target coordinate system; The step of determining the fourth position based on the second position and the offset includes: The second position is added to the offset to obtain the fourth position of the second position in the target coordinate system.
8. A calibration system, characterized in that, It includes a calibration device and a camera at a preset shooting point, wherein the camera is communicatively connected to the calibration device; The camera is used to: capture a first image of a standard workpiece located at the preset shooting point, and capture a second image of a workpiece to be placed located at the preset shooting point; The calibration device is used to: determine a first position based on the first image, and determine a second position based on the second image, wherein the first position is the position of a first target point on the standard workpiece in the camera coordinate system, and the second position is the position of a second target point on the workpiece to be placed in the camera coordinate system; The calibration device is also used to: obtain the offset between the camera coordinate system and the robot target coordinate system; The third position is determined based on the first position and the offset. The fourth position is determined based on the second position and the offset. The target location can be determined using the following formula: Where T is the third position, T' is the fourth position, F is the position of the robot's tool center point in the target coordinate system when the standard workpiece is grasped at the preset shooting point, F1 is the position of the robot's tool center point in the target coordinate system when the standard workpiece is placed on the unloading point, and F1' is the target position, the target coordinate system does not change with the movement of the robot; The robot is controlled to place the workpiece to be placed on the unloading point according to the target position, wherein the position of the tool center point of the robot is the target position when the workpiece is placed on the unloading point.
9. The calibration system according to claim 8, characterized in that, The calibration device is also used for: Obtain the first preset position of the preset point on the standard workpiece in the target coordinate system; Obtain the second preset position of the preset point in the camera coordinate system; The offset is determined based on the first preset position and the second preset position.
10. A computer-readable storage medium storing program data thereon, characterized in that, When the program data is executed by the processor, the method as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Method and device for quickly calibrating material tray positions of machine, and storage medium
CN111037559A
Motion control method for robot vision flying photography
CN113103215A