A robot hand-eye calibration method based on Aruco code matrix and its application

By using the Aruco code matrix and the bisection iteration method in robot hand-eye calibration, the solution of the rotation and translation matrices is simplified, the problems of error accumulation and complex algorithms in the existing technology are solved, and high-precision and efficient robot hand-eye calibration is achieved.

CN118544368BActive Publication Date: 2024-09-27WESTLAKE INTERACTIVE ROBOT TECHNOLOGY (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411030998.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-09-27
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

The existing robot hand-eye calibration methods are complex and have large error accumulation, making it difficult to achieve the expected accuracy. In particular, the checkerboard and Aruco code methods require a large amount of shooting data and complex algorithms, which limits the application of robots in precision tasks.

Method used

A lightweight hand-eye calibration method based on the Aruco code matrix is ​​adopted. By placing multiple Aruco codes on the horizontal plane and using the bisection method to iteratively correct the rotation and translation matrices, the hand-eye calibration process is simplified and complex algorithms and error accumulation are avoided.

Benefits of technology

It achieves high-precision robot hand-eye calibration, simplifies the calibration process, reduces the amount of data collection, improves the reliability and efficiency of the calibration results, and is suitable for different angles and environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118544368B
    Figure CN118544368B
Patent Text Reader

Abstract

This solution provides a robot hand-eye calibration method and application based on the Aruco code matrix, which is suitable for a robot equipped with a camera and a robotic arm, and the camera and the robotic arm are separated. At least three different Aruco codes are placed on a horizontal plane, and multiple Aruco codes are arranged along the same calibration line; the robot is moved in sequence to different orientation axes of the robot base coordinate system, and the orientation axes are respectively parallel to the calibration line. Whenever one of its orientation axes is parallel to the calibration line, the hand-eye calibration rule is used to calibrate the robot's hand-eye corresponding to the current orientation axis. No complicated calculation formula is required, and it is a lightweight hand-eye calibration method. It is also easier to understand and track the reasons for the failure of hand-eye calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot hand-eye calibration, and in particular to a robot hand-eye calibration method and application based on Aruco code matrix. Background Art

[0002] Robot hand-eye calibration is a key research area, which is mainly used to improve the accuracy and efficiency of robot systems when performing precision tasks. This process involves calculating and correcting the relative position and orientation between the end effector (i.e., "hand") of the robot arm and its visual system (i.e., "eye"), and converting the three-dimensional coordinates of the target point observed by the depth camera based on the depth camera coordinate system into the robot base coordinate system. Therefore, the essence of robot hand-eye calibration is to solve the transformation matrix T between the robot base coordinate system and the camera coordinate system, that is, to solve the rotation relationship R (rx, ry, rz) and the translation vector t (x, y, z). Accurate hand-eye calibration is crucial for robots to perform complex operations such as assembly, welding or surgery.

[0003] The conventional method is to use chessboard and Aruco code to achieve hand-eye calibration:

[0004] The checkerboard method is to fix the camera outside the robot arm and keep the camera motionless during calibration. Print or buy a standard checkerboard, fix the checkerboard at the end of the robot arm, and then move the end of the robot arm. Each time the end of the robot arm moves, the camera is triggered to shoot once. Shoot multiple times in succession and solve the coordinate transformation matrix between the camera and the robot arm according to the images taken at different angles. However, this method has many defects: 1. The calibration process is very complicated and has certain requirements for the shooting angle. It is usually better to have the checkerboard occupy about half of the screen area, but this limits the range of movement of the robot arm during calibration (a larger range of movement will cause the checkerboard to be outside the screen), and considering the calibration accuracy, it is often necessary to shoot as many different perspectives as possible. 2. The accuracy of the checkerboard and the instability of opencv (the recognition of the checkerboard depends on the built-in algorithm of opencv) and the accuracy of the robot arm will cause error accumulation, which ultimately leads to the calibration result being usually not ideal. 3. The algorithm is complex and requires a good data foundation.

[0005] The Easy_handEye method is to print an Aruco code, fix the Aruco code on the end of the robot arm, move the end of the robot arm, trigger the camera to shoot once each time the end of the robot arm moves, and shoot multiple times continuously to solve the coordinate transformation matrix between the camera and the robot arm based on images taken at different angles. However, this method also has the following defects: 1. It also requires the collection of a large amount of photo data for calculation. Generally speaking, the more images collected, the more accurate the calibration result. 2. Considering the accuracy of the depth camera and the robot arm itself, errors will also accumulate during the calibration process. 3. Complex algorithms require a good data foundation.

[0006] In general, the above methods all require taking a large number of photos at different angles and relying on complex algorithms such as SVD or Lie group to iteratively solve the optimal transformation matrix T. They have high requirements for shooting angles and algorithms. This is why the robots on the market still cannot achieve the expected accuracy after hand-eye calibration and still require manual fine-tuning. Summary of the invention

[0007] The embodiment of the present application provides a robot hand-eye calibration method and application based on the Aruco code matrix, which can quickly and accurately achieve hand-eye calibration without configuring a complex system environment or complex algorithms.

[0008] In the first aspect, as shown in FIG1 , the embodiment of the present application provides a robot hand-eye calibration method based on the Aruco code matrix, which is applicable to a robot provided with a camera and a robotic arm, and the camera and the robotic arm are separately arranged, comprising the following steps:

[0009] At least three different Aruco codes are placed on a horizontal plane, and the multiple Aruco codes are arranged along the same calibration line;

[0010] The robot is moved in sequence to different orientations of the robot base coordinate system, and the orientation axes are respectively set parallel to the calibration line. Whenever one of its orientation axes is set parallel to the calibration line, the hand-eye calibration of the robot corresponding to the current orientation axis is performed according to the hand-eye calibration rule.

[0011] The hand-eye calibration rule is as follows: obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system, iterate the rotation component of the rotation relationship of the robot base coordinate system through bisection until the position difference of all Aruco codes in the same orientation plane parallel to the current orientation axis is less than the set threshold, and correct the robot's rotation matrix with the current rotation component; move the robot's arm to a horizontal plane to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, obtain the difference between the robot end and the Aruco code relative to the same orientation plane, and use the difference to correct the robot's translation matrix.

[0012] In the second aspect, the embodiment of the present application provides a robot hand-eye calibration method based on the Aruco code matrix, which is applicable to a robot provided with a camera and a robot arm, and the camera and the robot arm are separately arranged, and the camera is parallel to the Y direction of the robot base coordinate, and includes the following steps:

[0013] At least three different Aruco codes are placed on a horizontal plane, and the multiple Aruco codes are arranged along the same calibration line;

[0014] Move the robot in sequence until the X-axis or Y-axis of the robot base coordinate system is parallel to the calibration line, and whenever one of its orientation axes is parallel to the calibration line, perform hand-eye calibration of the robot corresponding to the current orientation axis according to the hand-eye calibration rule;

[0015] The hand-eye calibration rule is as follows: obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system, iterate the rotation component of the rotation relationship of the robot base coordinate system through the binary search method until the position difference of all Aruco codes in the same orientation plane parallel to the current orientation axis is less than the set threshold, and correct the robot's rotation matrix with the current rotation component; move the robot's arm to a horizontal plane to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, obtain the difference between the robot end and the Aruco code relative to the same orientation plane, and correct the robot's translation matrix with the difference;

[0016] Place any Aruco on a horizontal plane to read the Y1 value of the current Aruco along the Y axis, then place the robot arm in the same position to read the Y2 value of the robot arm along the Y axis at this time, and take the difference between the Y1 value and the Y2 value to correct the translation matrix of the robot.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, characterized in that a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the robot hand-eye calibration methods based on the Aruco code matrix.

[0018] The main contributions and innovations of the present invention are as follows:

[0019] The embodiment of the present application provides a robot hand-eye calibration method and application based on the Aruco code matrix, which aims to use the principle that the rotation matrix R (rx, ry, rz) and the translation matrix t (x, y, z) of the robot base coordinate system will affect the coordinate position of the Aruco code in the robot base coordinate system to varying degrees, and cleverly use the rotation matrix R (rx, ry, rz) and the translation matrix t (x, y, z); to solve the influence relationship and then realize the hand-eye calibration. Different from the traditional method of solving the rotation matrix R (rx, ry, rz) and the translation matrix t (x, y, z) at one time, the hand-eye calibration method provided by this scheme does not require complex calculation formulas, and is a lightweight hand-eye calibration method. It is also easier to understand and track the reasons for the failure of hand-eye calibration. In addition, the calibration accuracy of the hand-eye calibration method is higher, which greatly avoids the error accumulation caused by the accuracy of the camera and the accuracy of the robot arm, and the environment configuration is simple and does not require the configuration of a complex system environment.

[0020] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0022] Figure 1 It is a flow chart of a robot hand-eye calibration method based on the Aruco code matrix according to an embodiment of the present application.

[0023] Figure 2 It is a logical schematic diagram of a robot hand-eye calibration method based on the Aruco code matrix according to an embodiment of the present application.

[0024] Figure 3 It is a schematic diagram of the robot's coordinate position in the RVIZ coordinate system.

[0025] Figure 4 It is a schematic diagram showing that the X-axis of the robot base coordinate system is parallel to Aruco.

[0026] Figure 5 is based on Figure 4 Schematic diagram of the coordinate position of Aruco in the RVIZ coordinate system.

[0027] Figure 6 is based on Figure 4 Schematic diagram of the coordinate position of the calibrated Aruco in the RVIZ coordinate system.

[0028] Figure 7is based on Figure 4 The coordinate position relationship diagram between the calibrated robot and Aruco in the RVIZ coordinate system.

[0029] Figure 8 It is a schematic diagram showing that the Y axis of the robot base coordinate system is parallel to Aruco.

[0030] Fig. 9 is based on Figure 8 Schematic diagram of the coordinate position of Aruco in the RVIZ coordinate system.

[0031] Fig.10 is based on Fig. 9 The coordinate position relationship diagram between the calibrated robot and Aruco in the RVIZ coordinate system.

[0032] Fig.11 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0034] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0035] Embodiment 1

[0036] This solution provides a robot hand-eye calibration method based on the Aruco code matrix. The robot hand-eye calibration method realizes the robot hand-eye calibration by shooting straight lines arranged with multiple Aruco codes in the X, Y and Z directions. It can not only avoid the error accumulation caused by camera accuracy and robot arm accuracy, but also does not require complex algorithm derivation to achieve lightweight hand-eye calibration.

[0037] Specifically, the present invention provides a robot hand-eye calibration method based on the Aruco code matrix, which is applicable to a robot provided with a camera and a robotic arm, and the camera and the robotic arm are separately arranged, and includes the following steps:

[0038] At least three different Aruco codes are placed on a horizontal plane, and the multiple Aruco codes are arranged along the same calibration line;

[0039] The robot is moved in sequence to different orientations of the robot base coordinate system, and the orientation axes are respectively set parallel to the calibration line. Whenever one of its orientation axes is set parallel to the calibration line, the hand-eye calibration of the robot corresponding to the current orientation axis is performed according to the hand-eye calibration rule.

[0040] The hand-eye calibration rule is as follows: obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system, iterate the rotation component of the rotation relationship of the robot base coordinate system through bisection until the position difference of all Aruco codes in the same orientation plane parallel to the current orientation axis is less than the set threshold, and correct the robot's rotation matrix with the current rotation component; move the robot's arm to a horizontal plane to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, obtain the difference between the robot end and the Aruco code relative to the same orientation plane, and use the difference to correct the robot's translation matrix.

[0041] This solution is applicable to the hand-eye calibration of robots whose cameras and robotic arms are not installed on the same rigid body, that is, the hand-eye calibration of robots with eyes outside the hand (eye-to-hand), such as robots with a depth camera installed on the head and equipped with one or more robotic arms. It should be noted that since the camera of such robots with eyes outside the hand is set far away from the robotic arm, the camera and the robotic arm each have their own coordinate system. Therefore, before using such robots for mechanical control, the three-dimensional coordinates of the target point observed by the camera need to be rotated and translated so that the target coordinates based on the depth camera coordinate system are converted into coordinates based on the robot base coordinate system. Therefore, the hand-eye calibration of the robot is essentially to solve the transformation matrix between the robot base coordinate system and the camera coordinate system. More specifically, it is to solve the rotation matrix between the robot base coordinate system and the camera coordinate system. The matrix R (rx, ry, rz) and the translation matrix t (x, y, z), in the robot base coordinate system, the rotation matrix R (rx, ry, rz) and the translation matrix t (x, y, z) also correspond to the X-axis, Y-axis and Z-axis of the robot base coordinate system for rotation or translation: rx is the rotation around the X-axis of the robot base coordinate system, x is the translation based on the X-axis, ry is the rotation around the Y-axis of the robot base coordinate system, y is the translation based on the Y-axis; rz is the rotation around the Z-axis of the robot base coordinate system, and z is the translation based on the Z-axis.

[0042] like Figure 3As shown in the figure, when the base of the robot is used as the robot base coordinate system, the robot base coordinate system is provided with X-axis, Y-axis and Z-axis. In the figure, red indicates the direction of the X-axis, green indicates the direction of the Y-axis, and blue indicates the direction of the Z-axis. Since the camera on the head of the robot usually has only two degrees of freedom, that is, looking down (based on the rotation in the Y direction) and swinging left and right (based on the rotation in the Z direction), and the camera is usually installed parallel to the Y direction of the robot base coordinate, the default value of rx in the rotation matrix R (rx, ry, rz) is 0°.

[0043] In the robot base coordinate system, the Aruco code and the robot key point positions recognized by the camera can be displayed on a visual page according to the rotation matrix R (rx, ry, rz) and the translation matrix t (x, y, z). However, the rotation matrix R (rx, ry, rz) and the translation matrix t (x, y, z) will affect the coordinate position of the Aruco code in the robot base coordinate system to varying degrees. This solution cleverly uses the rotation matrix R (rx, ry, rz) and the translation matrix t (x, y, z) to solve the influence relationship and then realize the hand-eye calibration. Different from the traditional method of solving the rotation matrix R (rx, ry, rz) and the translation matrix t (x, y, z) at one time, the hand-eye calibration method provided by this solution does not require complex calculation formulas, and is also easier to understand and track the reasons for the failure of hand-eye calibration.

[0044] Specifically, according to the relationship of trigonometric functions, the only parameters that affect the transformation of the Aruco code in the Z-axis direction are ry in the rotation matrix R (rx, ry, rz) and z in the translation matrix t (x, y, z); however, the changes in rz and z have the same distance for multiple Aruco codes on the same calibration line, and the change in the pitch angle in the ry direction has different effects on the heights of the three Aruco codes. The Aruco code at a close distance has the least effect, and the Aruco code at a distance has the greatest effect. This is the key point of the different "degrees" of influence on the coordinate position. Therefore, when multiple Aruco codes on the calibration line are placed on a horizontal plane, theoretically, the height of the Aruco code relative to the Z-axis direction of the robot base coordinate system should be consistent. However, due to the rotation relationship R (rx, ry, rz) and the translation vector t (x, y, z), simply adjusting the z value cannot make the three Aruco codes display at a horizontal height in the robot base coordinate system. Therefore, only one parameter ry needs to be adjusted so that the correct ry value can be obtained when and only when all Aruco heights are consistent. Note that although all Aruco heights are consistent at this time, the height value is not correct. At this time, only z needs to be adjusted so that the actual height of the Aruco code on the horizontal plane can be obtained by moving the robot's machine end to the horizontal plane, or by measuring the height from the desktop to the ground through laser distance measurement.

[0045] Similarly, the parameters that affect the transformation of the Aruco code in the X-axis direction are only rz in the rotation matrix R (rx, ry, rz) and x in the translation matrix t (x, y, z); the parameters that affect the transformation of the Aruco code in the Y-axis direction are only rx in the rotation matrix R (rx, ry, rz) and y in the translation matrix t (x, y, z).

[0046] Specifically, in the step of "placing at least three different Aruco codes on a horizontal plane, and the multiple Aruco codes are arranged along the same calibration line", at least three different Aruco codes are arranged along the same calibration line and placed in a plane horizontal to the ground plane. The reason why at least three Aruco codes are required in this solution is that at least three Aruco codes can determine a unique direction in a spatial coordinate system.

[0047] This solution generates different Aruco codes on a conventional Aruco code generation website. Here, different Aruco codes refer to Aruco codes that can be recognized by the camera as different identities, and different Aruco codes can be marked with different digital tags. In a specific embodiment of this solution, Aruco codes with digital tags of 567, 572 and 572 are generated.

[0048] In addition, the size of the three different Aruco codes placed on the horizontal plane in this solution is not particularly limited, as long as they can be accurately recognized by the camera.

[0049] In the step of "moving the robot in sequence until the orientation axes of different orientations of the robot base coordinate system are respectively set parallel to the calibration line, and whenever one of its orientation axes is set parallel to the calibration line, the hand-eye calibration rule is used to perform the hand-eye calibration of the robot corresponding to the current orientation axis", the orientation axes of different orientations of the robot base coordinate system refer to the X-axis, Y-axis and Z-axis of the robot base coordinate system. When the X-axis of the robot base coordinate system is set parallel to the calibration line, the rotation relationship R (rx, ry, The robot’s rotation relationship R (rx, ry, rz) and the translation vector t (x, y, z) are calibrated according to the hand-eye calibration rule. When the robot’s base coordinate system’s Z axis is parallel to the calibration line, the robot’s rotation relationship R (rx, ry, rz) and the translation vector t (x, y, z) are calibrated according to the hand-eye calibration rule.

[0050] The robot hand-eye calibration method based on Aruco code matrix provided in this solution moves the robot so that the three orientation axes are respectively set parallel to the calibration line, and realizes the hand-eye calibration corresponding to each orientation axis. The advantage of this is that the camera can be calibrated in a larger field of view. Different from the one-time calibration of the rotation relationship R (rx, ry, rz) and the translation vector t (x, y, z), the hand-eye calibration method provided in this solution does not require complex algorithm derivation, and can quickly read the problems in the positioning calibration process when the calibration results are not ideal, and perform secondary calibration.

[0051] In some embodiments, the calibration order of the three orientation axes of the robot base coordinate system is not limited. Correspondingly, according to any selection of the order of X-axis-Y-axis-Z-axis, the order of X-axis-Z-axis, the order of Y-axis-X-axis-Z-axis, the order of Y-axis-Z-axis, the order of Z-axis-X-axis, the order of Z-axis-X-axis-Y-axis, and the order of Z-axis-Y-axis-X-axis, the robot is moved in sequence until the three orientation axes of the robot base coordinate system are respectively set parallel to the calibration line. Of course, whenever the hand-eye calibration corresponding to a certain orientation axis is completed, the hand-eye calibration of the current axis will not be performed to avoid repeated and meaningless calibration. About the hand-eye calibration rules proposed in this scheme:

[0052] The hand-eye calibration rule is as follows: obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system, iterate the rotation component of the rotation relationship of the robot base coordinate system through the binary search method until the position difference of all Aruco codes in the same orientation plane parallel to the current orientation axis is less than the set threshold, and correct the robot's rotation matrix with the current rotation component; move the robot's arm to a horizontal plane to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, obtain the difference between the robot end and the Aruco code relative to the same orientation plane, and correct the robot's translation matrix with the difference;

[0053] When the X-axis of the robot base coordinate system is set parallel to the calibration line, the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained, and the rotation component ry of the rotation relationship of the robot base coordinate system is iterated by binary search until the position difference of all Aruco codes in the same orientation plane parallel to the X-axis is less than the set threshold, that is, until the height difference of all Aruco codes in the Z-axis direction is less than the set threshold, and the value of ry at this time, that is, the actual pitch angle value of the camera, can be retained to obtain the ry of the rotation matrix, and the ry in the rotation matrix can be corrected with the rotation component; the robot arm of the mobile robot is placed on a horizontal table to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, and the difference between the robot end and the Aruco code in the same orientation plane relative to the X-axis is obtained, that is, the difference z between the robot end and the Aruco code in the Z-axis direction is obtained, and the translation matrix of the robot is corrected with z.

[0054] For example, Figure 4 This is a schematic diagram of setting the X axis of the robot base coordinate system parallel to the calibration line. Figure 5 is based on Figure 4 The coordinate position of the Aruco code in the robot base coordinate system. It can be seen that if the X-axis of the robot base coordinate system is set parallel to the calibration line, since the ry of the rotation matrix and the z of the translation matrix are not adjusted, it can be seen that the heights of different Aruco codes along the Z-axis direction on the calibration line are inconsistent. The rotation component ry of the rotation relationship of the robot base coordinate system is iterated by binary division until the height difference of all Aruco codes in the same orientation plane parallel to the X-axis is less than the set threshold. The coordinate position diagram of the calibrated Aruco code in the robot base coordinate system is shown in Figure 6 As shown, from Figure 7 It can be seen that when the robot arm is placed on a horizontal plane, the height of the robot arm in the Z-axis direction in the robot base coordinate system is higher than the height of the Aruco code. The height difference between the two is used to correct the z in the translation matrix so that the height of the robot arm in the Z-axis direction in the robot base coordinate system is the same as the height of the Aruco code.

[0055] When the Y axis of the robot base coordinate system is set parallel to the calibration line, the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained, and the rotation component rz of the rotation relationship of the robot base coordinate system is iterated by binary search until the position difference of all Aruco codes in the same orientation plane parallel to the Y axis is less than the set threshold, that is, until the position difference of all Aruco codes in the X-axis direction is less than the set threshold, and the rz in the rotation matrix is ​​corrected with the rotation component rz; the robot arm of the mobile robot is placed on a horizontal table and is on the same straight line with the calibration line, and the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained again, and the difference between the robot end and the Aruco code in the same orientation plane relative to the Y axis is obtained, that is, the difference x between the robot end and the Aruco code in the Z-axis direction is obtained, and the translation matrix of the robot is corrected with x.

[0056] For example, Figure 8 This is a schematic diagram of the robot base coordinate system with the Y axis parallel to the calibration line. Fig. 9 is based on Figure 8 The coordinate position of the Aruco code in the robot base coordinate system. It can be seen that if the Y axis of the robot base coordinate system is set parallel to the calibration line, since the rz of the rotation matrix and the x of the translation matrix are not adjusted, it can be seen that the positions of different Aruco codes on the calibration line along the X axis are inconsistent. After calibrating rz, the robot arm is placed on a horizontal table and on the same straight line as the calibration line. It can be seen that Fig.10As shown in the figure, the coordinate values ​​of the Aruco code and the end of the robot arm in the X direction should actually be consistent, but because x is not determined, there is a deviation between the end of the robot arm in the robot base coordinate system and the X value of the Aruco code. The difference x between the robot end and the Aruco code in the X-axis direction is obtained, and the translation matrix of the robot is corrected with x.

[0057] When the Z axis of the robot base coordinate system is set parallel to the calibration line, the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained, and the rotation component rx of the rotation relationship of the robot base coordinate system is iterated by binary search until the position difference of all Aruco codes in the same orientation plane parallel to the Z axis is less than the set threshold, that is, until the position difference of all Aruco codes in the Y-axis direction is less than the set threshold, and the rx in the rotation matrix is ​​corrected with the rotation component rx; the robot arm of the mobile robot overlaps the position of any Aruco code to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, and the difference between the robot end and the Aruco code in the same orientation plane relative to the Y axis is obtained, that is, the difference y between the robot end and the Aruco code in the Y-axis direction is obtained, and the translation matrix of the robot is corrected with y.

[0058] In some embodiments, the relevant ROS node is started to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system.

[0059] In some embodiments, the rotation component of the rotation relationship of the robot base coordinate system is iterated from -180° to 180° by dichotomy. Of course, the threshold value is set differently according to the actual calibration accuracy. In some embodiments, the threshold value is set to 2 mm.

[0060] Embodiment 2

[0061] It should be noted that when the camera is usually installed parallel to the Y axis of the robot base coordinates, the rx in the rotation matrix R (rx, ry, rz) defaults to 0°. At this time, there is no need to calibrate the rx of the rotation relationship R (rx, ry, rz). In order to achieve calibration more efficiently, this scheme proposes a robot hand-eye calibration method based on the Aruco code matrix, which includes the following steps:

[0062] At least three different Aruco codes are placed on a horizontal plane, and the multiple Aruco codes are arranged along the same calibration line;

[0063] Move the robot in sequence until the X-axis or Y-axis of the robot base coordinate system is parallel to the calibration line, and whenever one of its orientation axes is parallel to the calibration line, perform hand-eye calibration of the robot corresponding to the current orientation axis according to the hand-eye calibration rule;

[0064] The hand-eye calibration rule is as follows: obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system, iterate the rotation component of the rotation relationship of the robot base coordinate system through the binary search method until the position difference of all Aruco codes in the same orientation plane parallel to the current orientation axis is less than the set threshold, and correct the robot's rotation matrix with the current rotation component; move the robot's arm to a horizontal plane to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, obtain the difference between the robot end and the Aruco code relative to the same orientation plane, and correct the robot's translation matrix with the difference;

[0065] Place any Aruco on a horizontal plane to read the Y1 value of the current Aruco along the Y axis, then place the robot arm in the same position to read the Y2 value of the robot arm along the Y axis at this time, and take the difference between the Y1 value and the Y2 value to correct the translation matrix of the robot.

[0066] Since the camera of the robot selected in this scheme is installed parallel to the Y-axis of the robot's base coordinate system, the robot of this scheme does not need to be calibrated for rx. At this time, it is preferred to move the robot in the order of X-axis-Y-axis-Z-axis or X-axis-Z-axis-Y-axis until the orientation axes of the robot's base coordinate system are parallel to the calibration line. The advantage of this is that the amount of calculation is minimized when performing the hand-eye calibration corresponding to the Z-axis.

[0067] In other words, in the embodiment of the present scheme, since rx defaults to 0°, there is no need to calibrate rx at this time, but only y needs to be calibrated. In addition, since only y is left undetermined in the rotation matrix R(rx,ry,rz) and the translation matrix t(x,y,z) at this time, the translation matrix can be simply corrected by using the difference between the Aruco code and the robot end along the Y-axis direction.

[0068] The contents of the second embodiment that are the same as those of the first embodiment will not be described in detail here.

[0069] like Figure 2 As shown, Figure 2 A hand-eye calibration process of a specific implementation example is given: first, a spirit level is used to adjust the horizontal tabletop to be level with the horizontal plane, three Aruco codes are placed on the same calibration line and the X-axis of the robot base coordinate system is made parallel to the calibration line, ry is iteratively solved using the bisection method and the robot arm is placed on the tabletop to solve z using the difference in the Z-axis direction; then the calibration line is made parallel to the Y-axis direction of the robot base coordinate system, yz is iteratively solved using the bisection method and the end of the robot arm is placed on the same straight line of the calibration line to solve x using the difference in the X-axis direction, and finally the robot arm is placed on any Aruco code to solve y using the difference in the Y-axis direction.

[0070] Embodiment 4

[0071] This embodiment also provides an electronic device, referring to Fig.11 , including a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the robot hand-eye calibration method based on the Aruco code matrix.

[0072] Specifically, the processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0073] Among them, the memory 404 may include a large capacity memory 404 for data or instructions. For example, but not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In appropriate cases, the memory 404 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 404 may be inside or outside the data processing device. In a specific embodiment, the memory 404 is a non-volatile memory. In a specific embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. In appropriate circumstances, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM may be a fast page mode dynamic random access memory 404 (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0074] The memory 404 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402 .

[0075] The processor 402 implements any one of the robot hand-eye calibration methods based on the Aruco code matrix in the above embodiments by reading and executing the computer program instructions stored in the memory 404 .

[0076] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408 , wherein the transmission device 406 is connected to the processor 402 , and the input / output device 408 is connected to the processor 402 .

[0077] The transmission device 406 can be used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0078] The input / output device 408 is used to input or output information. In this embodiment, the input information may be identification information of the Aruco code, etc., and the output information may be a rotation matrix and a translation matrix, etc.

[0079] Optionally, in this embodiment, the processor 402 may be configured to execute the following steps described in Embodiment 1 through a computer program:

[0080] The robot hand-eye calibration method based on the Aruco code matrix is ​​applicable to a robot provided with a camera and a robotic arm, and the camera and the robotic arm are separately arranged, and includes the following steps:

[0081] At least three different Aruco codes are placed on a horizontal plane, and the multiple Aruco codes are arranged along the same calibration line;

[0082] The robot is moved in sequence to different orientations of the robot base coordinate system, and the orientation axes are respectively set parallel to the calibration line. Whenever one of its orientation axes is set parallel to the calibration line, the hand-eye calibration of the robot corresponding to the current orientation axis is performed according to the hand-eye calibration rule.

[0083] The hand-eye calibration rule is as follows: obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system, iterate the rotation component of the rotation relationship of the robot base coordinate system through bisection until the position difference of all Aruco codes in the same orientation plane parallel to the current orientation axis is less than the set threshold, and correct the robot's rotation matrix with the current rotation component; move the robot's arm to a horizontal plane to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, obtain the difference between the robot end and the Aruco code relative to the same orientation plane, and use the difference to correct the robot's translation matrix.

[0084] Or the method shown in Example 2:

[0085] At least three different Aruco codes are placed on a horizontal plane, and the multiple Aruco codes are arranged along the same calibration line;

[0086] Move the robot in sequence until the X-axis or Y-axis of the robot base coordinate system is parallel to the calibration line, and whenever one of its orientation axes is parallel to the calibration line, perform hand-eye calibration of the robot corresponding to the current orientation axis according to the hand-eye calibration rule;

[0087] The hand-eye calibration rule is as follows: obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system, iterate the rotation component of the rotation relationship of the robot base coordinate system through the binary search method until the position difference of all Aruco codes in the same orientation plane parallel to the current orientation axis is less than the set threshold, and correct the robot's rotation matrix with the current rotation component; move the robot's arm to a horizontal plane to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, obtain the difference between the robot end and the Aruco code relative to the same orientation plane, and correct the robot's translation matrix with the difference;

[0088] Place any Aruco on a horizontal plane to read the Y1 value of the current Aruco along the Y axis, then place the robot arm in the same position to read the Y2 value of the robot arm along the Y axis at this time, and take the difference between the Y1 value and the Y2 value to correct the translation matrix of the robot.

[0089] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0090] In general, various embodiments may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the boxes, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

[0091] Embodiments of the present invention can be implemented by computer software, which is executable by a data processor of a mobile device, such as in a processor entity, or implemented by hardware, or implemented by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros can be stored in any device readable data storage medium, and they include program instructions for performing specific tasks. Computer program products can include one or more computer executable components configured to perform embodiments when the program is running. One or more computer executable components can be at least one software code or a part thereof. In addition, at this point, it should be noted that any box of the logic flow in the figure can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored in physical media such as memory chips or storage blocks implemented in processors, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and data variants thereof, CDs. Physical media are non-transient media.

[0092] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0093] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A robot hand-eye calibration method based on Aruco code matrix, applicable to a robot equipped with a camera and a robot arm, wherein the camera and the robot arm are separately arranged, characterized in that: The following steps are involved: At least three different Aruco codes are placed on a horizontal plane, and the multiple Aruco codes are arranged along the same calibration line; The robot is moved in sequence to different orientations of the robot base coordinate system, and the orientation axes are respectively set parallel to the calibration line. Whenever one of its orientation axes is set parallel to the calibration line, the hand-eye calibration of the robot corresponding to the current orientation axis is performed according to the hand-eye calibration rule. The hand-eye calibration rule is as follows: obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system, iterate the rotation component of the rotation relationship of the robot base coordinate system through the dichotomy method until the position difference of all Aruco codes in the same orientation plane parallel to the current orientation axis is less than the set threshold, and correct the robot's rotation matrix with the current rotation component; The robot arm of the mobile robot is placed on a horizontal plane to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, and the difference between the robot end and the Aruco code relative to the same orientation plane is obtained, and the translation matrix of the robot is corrected by the difference.

2. The robot hand-eye calibration method based on Aruco code matrix according to claim 1 is characterized in that: The orientation axes of different orientations of the robot base coordinate system refer to the X-axis, Y-axis and Z-axis of the robot base coordinate system. According to any selection of the order of X-axis-Y-axis-Z-axis, the order of X-axis-Z-axis, the order of Y-axis-X-axis-Z-axis, the order of Y-axis-Z-axis, the order of Z-axis-X-axis-Y-axis, and the order of Z-axis-Y-axis-X-axis, the robot is moved in sequence until the three orientation axes of the robot base coordinate system are set parallel to the calibration line.

3. The robot hand-eye calibration method based on Aruco code matrix according to claim 1 is characterized in that: When the X-axis of the robot base coordinate system is set parallel to the calibration line, the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained, and the rotation component ry of the rotation relationship of the robot base coordinate system is iterated by binary division until the position difference of all Aruco codes in the same orientation plane parallel to the X-axis is less than the set threshold. The rotation component is used to correct ry in the rotation matrix, and the robot arm is moved to a horizontal table to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again. The difference z between the robot end and the Aruco code in the same orientation plane relative to the X-axis is obtained, and the translation matrix of the robot is corrected with z.

4. The robot hand-eye calibration method based on Aruco code matrix according to claim 1 is characterized in that: When the Y axis of the robot base coordinate system is set parallel to the calibration line, the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained, and the rotation component rz of the rotation relationship of the robot base coordinate system is iterated by binary division until the position difference of all Aruco codes in the same orientation plane parallel to the Y axis is less than the set threshold, and the rz in the rotation matrix is ​​corrected with the rotation component rz; the robot arm of the mobile robot is placed on a horizontal table and on the same straight line with the calibration line, and the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained again, and the difference x between the robot end and the Aruco code in the same orientation plane relative to the Y axis is obtained, and the translation matrix of the robot is corrected with x.

5. The robot hand-eye calibration method based on Aruco code matrix according to claim 1 is characterized in that: When the Z axis of the robot base coordinate system is set parallel to the calibration line, the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained, and the rotation component rx of the rotation relationship of the robot base coordinate system is iterated by binary division until the position difference of all Aruco codes in the same orientation plane parallel to the Z axis is less than the set threshold, and the rotation component rx is used to correct the rx in the rotation matrix; the robot arm of the mobile robot overlaps the position of any Aruco code and obtains the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, and obtains the difference y between the robot end and the Aruco code in the same orientation plane relative to the Y axis, and uses y to correct the robot's translation matrix.

6. A robot hand-eye calibration method based on Aruco code matrix, applicable to a robot equipped with a camera and a robot arm, wherein the camera and the robot arm are separated, and the Y direction of the camera and the robot base coordinate are parallel, characterized in that: At least three different Aruco codes are placed on a horizontal plane, and the multiple Aruco codes are arranged along the same calibration line; Move the robot in sequence until the X-axis or Y-axis of the robot base coordinate system is parallel to the calibration line, and whenever one of its orientation axes is parallel to the calibration line, perform hand-eye calibration of the robot corresponding to the current orientation axis according to the hand-eye calibration rule; The hand-eye calibration rule is as follows: obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system, iterate the rotation component of the rotation relationship of the robot base coordinate system through the dichotomy method until the position difference of all Aruco codes in the same orientation plane parallel to the current orientation axis is less than the set threshold, and correct the robot's rotation matrix with the current rotation component; The robot arm of the mobile robot is placed on a horizontal plane to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again, and the difference between the robot end and the Aruco code relative to the same orientation plane is obtained, and the translation matrix of the robot is corrected by the difference; Place any Aruco on a horizontal plane to read the Y1 value of the current Aruco along the Y axis, then place the robot arm in the same position to read the Y2 value of the robot arm along the Y axis at this time, and take the difference between the Y1 value and the Y2 value to correct the translation matrix of the robot.

7. The robot hand-eye calibration method based on Aruco code matrix according to claim 6 is characterized in that: The robot is moved in sequence in the order of X-axis, Y-axis and Z-axis or in the order of X-axis, Z-axis and Y-axis until the orientation axes of the robot base coordinate system are respectively set parallel to the calibration lines.

8. The robot hand-eye calibration method based on Aruco code matrix according to claim 6 is characterized in that: When the X-axis of the robot base coordinate system is set parallel to the calibration line, the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained, and the rotation component ry of the rotation relationship of the robot base coordinate system is iterated by binary division until the position difference of all Aruco codes in the same orientation plane parallel to the X-axis is less than the set threshold. The rotation component is used to correct ry in the rotation matrix, and the robot arm is moved to a horizontal table to obtain the coordinate position of the Aruco code on the calibration line in the robot base coordinate system again. The difference z between the robot end and the Aruco code in the same orientation plane relative to the X-axis is obtained, and the translation matrix of the robot is corrected with z.

9. The robot hand-eye calibration method based on Aruco code matrix according to claim 6, characterized in that: When the Y axis of the robot base coordinate system is set parallel to the calibration line, the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained, and the rotation component rz of the rotation relationship of the robot base coordinate system is iterated by binary division until the position difference of all Aruco codes in the same orientation plane parallel to the Y axis is less than the set threshold, and the rz in the rotation matrix is ​​corrected with the rotation component rz; the robot arm of the mobile robot is placed on a horizontal table and on the same straight line with the calibration line, and the coordinate position of the Aruco code on the calibration line in the robot base coordinate system is obtained again, and the difference x between the robot end and the Aruco code in the same orientation plane relative to the Y axis is obtained, and the translation matrix of the robot is corrected with x.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the robot hand-eye calibration method based on the Aruco code matrix as described in any one of claims 1 or 6.