Hand-eye system calibration method, device and equipment
By installing the calibration plate at the end of the K-axis of the robotic arm, repeated disassembly operations are avoided, the calibration process of the hand-eye system is simplified, the calibration efficiency is improved, and the accuracy of the calibration information is ensured through the automatic inspection function, solving the existing technical problems Low calibration efficiency and collision problems.
Patent Information
- Application Number
- CN202011287100.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-17
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-11-17
AI Technical Summary
The calibration process of the existing hand-eye system is complex and inefficient. Especially when the calibration information needs to be checked frequently, the calibration plate needs to be repeatedly disassembled and installed, resulting in low efficiency, and the calibration plate and the robot arm body are prone to collision.
The calibration plate is fixedly installed at the end of the K-axis of the robot arm instead of the end of the N-axis, which avoids repeated disassembly operations and improves calibration efficiency. Calibration information is obtained through preset inspection poses and camera shooting, and the calibration results are automatically verified. , determine whether recalibration is needed, and reduce the probability of collision between the calibration plate and the robotic arm.
It simplifies the calibration process of the hand-eye system, improves calibration efficiency, facilitates automatic inspection and updating of calibration information, reduces the risk of collision between the calibration plate and the robotic arm, and improves the stability and reliability of the system.
Smart Images

Figure CN112489133B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer vision technology, and in particular to a method, device and equipment for calibrating a hand-eye system. Background Art
[0002] The hand-eye system is widely used in logistics, warehousing, sorting, depalletizing and other scenarios. The hand-eye system is a robot vision system composed of a camera and a robotic arm. An end picker (such as a hand gripper or suction cup actuator) is set at the end of the robotic arm to move or pick objects. The camera can provide visual information to guide the movement trajectory of the end of the robotic arm.
[0003] In practical applications, it is necessary to use a calibration plate to calibrate the hand-eye system to determine the transformation relationship between the robot coordinate system and the camera coordinate system. Taking a six-axis robot as an example, an end picker is installed at the end of the sixth axis of the robot. The existing hand-eye calibration process is as follows: remove the end picker installed at the end of the sixth axis of the robot, and install the calibration plate at the end of the sixth axis of the robot. Then, after the calibration is completed, remove the calibration plate and reinstall the end picker to the end of the sixth axis of the robot.
[0004] In the process of implementing the present application, the inventors found that there are at least the following problems in the prior art: the operation process of the above-mentioned hand-eye calibration method is complicated and the efficiency is low. Summary of the invention
[0005] The embodiments of the present application provide a hand-eye system calibration method, device and equipment to improve the calibration efficiency of the hand-eye system.
[0006] In a first aspect, an embodiment of the present application provides a calibration method for a hand-eye system, wherein the hand-eye system includes a robotic arm and a camera, wherein the robotic arm includes N axes, and a calibration plate is provided at the end of the Kth axis of the robotic arm, where K is a natural number less than N, and the method includes:
[0007] Controlling the end of the Nth axis of the robotic arm to move to a preset inspection posture;
[0008] photographing the calibration plate by the camera to obtain a first calibration plate image, and acquiring first calibration information according to the first calibration plate image;
[0009] If the error between the first calibration information and the second calibration information stored in the preset storage space is greater than a preset threshold, a first calibration process is performed on the hand-eye system.
[0010] In a possible implementation, obtaining first calibration information according to the first calibration plate image includes:
[0011] According to the posture of the end of the N-th axis, the posture of the end of the K-th axis is obtained;
[0012] The first calibration information is acquired according to the posture of the K-th axis end and the first calibration plate image.
[0013] In a possible implementation, performing a first calibration process on the hand-eye system includes:
[0014] Determine a plurality of calibration poses corresponding to the end of the K-th axis;
[0015] Controlling the end of the K-th axis to run to each of the calibration postures, and when the end of the K-th axis runs to each of the calibration postures, photographing the calibration plate by the camera to obtain a second calibration plate image;
[0016] A calibration result is obtained according to the multiple calibration postures and the second calibration plate image collected when the K-th axis end moves to each of the calibration postures.
[0017] In a possible implementation manner, determining a plurality of calibration poses corresponding to the end of the K-th axis includes:
[0018] According to the field of view of the camera and the current position and posture of the K-th axis end, a plurality of marked position and postures corresponding to the K-th axis end are determined.
[0019] In a possible implementation, determining a plurality of calibration poses corresponding to the K-th axis end according to the field of view of the camera and the current pose of the K-th axis end includes:
[0020] Acquire the current posture of the N-th axis end, and determine the current posture of the K-th axis end according to the current posture of the N-th axis end;
[0021] The current position and posture of the K-th axis end is randomly adjusted within the field of view of the camera to generate multiple calibration position and postures corresponding to the K-th axis end.
[0022] In a possible implementation manner, controlling the K-th axis end to move to each of the calibration postures includes:
[0023] Determining the target pose of the N-th axis end according to each of the marked poses corresponding to the K-th axis end;
[0024] Control the Nth axis end to move to the target posture.
[0025] In a possible implementation manner, before the end of the Nth axis of the robotic arm is controlled to move to a preset inspection posture, the method further includes:
[0026] After performing a second calibration process on the hand-eye system, controlling the end of the Nth axis to move to the preset inspection posture;
[0027] photographing the calibration plate by the camera to obtain a third calibration plate image, and acquiring the second calibration information according to the third calibration plate image;
[0028] The second calibration information is stored in the preset storage space.
[0029] In a possible implementation manner, the robotic arm includes six axes, and the calibration plate is disposed at the end of a fourth axis of the robotic arm.
[0030] In a second aspect, an embodiment of the present application provides a calibration device for a hand-eye system, wherein the hand-eye system includes a robotic arm and a camera, wherein the robotic arm includes N axes, and a calibration plate is provided at the end of the Kth axis of the robotic arm, where K is a natural number less than N, and the device includes:
[0031] An inspection module, used to control the end of the Nth axis of the robotic arm to move to a preset inspection posture;
[0032] The inspection module is further configured to photograph the calibration plate through the camera to obtain a first calibration plate image, and obtain first calibration information according to the first calibration plate image;
[0033] The calibration module is used to perform a first calibration process on the hand-eye system if an error between the first calibration information and the second calibration information stored in the preset storage space is greater than a preset threshold.
[0034] In a possible implementation manner, the inspection module is specifically used for:
[0035] According to the posture of the end of the N-th axis, the posture of the end of the K-th axis is obtained;
[0036] The first calibration information is acquired according to the posture of the K-th axis end and the first calibration plate image.
[0037] In a possible implementation manner, the calibration module is specifically used for:
[0038] Determine a plurality of calibration poses corresponding to the end of the K-th axis;
[0039] Controlling the end of the K-th axis to run to each of the calibration postures, and when the end of the K-th axis runs to each of the calibration postures, photographing the calibration plate by the camera to obtain a second calibration plate image;
[0040] A calibration result is obtained according to the multiple calibration postures and the second calibration plate image collected when the K-th axis end moves to each of the calibration postures.
[0041] In a possible implementation manner, the calibration module is specifically used for:
[0042] According to the field of view of the camera and the current position and posture of the K-th axis end, a plurality of marked position and postures corresponding to the K-th axis end are determined.
[0043] In a possible implementation manner, the calibration module is specifically used for:
[0044] Acquire the current posture of the N-th axis end, and determine the current posture of the K-th axis end according to the current posture of the N-th axis end;
[0045] The current position and posture of the K-th axis end is randomly adjusted within the field of view of the camera to generate multiple calibration position and postures corresponding to the K-th axis end.
[0046] In a possible implementation manner, the calibration module is specifically used for:
[0047] Determining the target pose of the N-th axis end according to each of the marked poses corresponding to the K-th axis end;
[0048] Control the Nth axis end to move to the target posture.
[0049] In a possible implementation manner, the inspection module is further used for:
[0050] After performing a second calibration process on the hand-eye system, controlling the end of the Nth axis to move to the preset inspection posture;
[0051] photographing the calibration plate by the camera to obtain a third calibration plate image, and acquiring the second calibration information according to the third calibration plate image;
[0052] The second calibration information is stored in the preset storage space.
[0053] In a possible implementation manner, the robotic arm includes six axes, and the calibration plate is disposed at the end of a fourth axis of the robotic arm.
[0054] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to execute the method as described in any one of the first aspects.
[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspects is implemented.
[0056] The calibration method, device and equipment of the hand-eye system provided in the embodiment of the present application, wherein the hand-eye system includes a mechanical arm and a camera, the mechanical arm includes N axes, and a calibration plate is provided at the end of the Kth axis of the mechanical arm, and the method includes: controlling the end of the Nth axis of the mechanical arm to run to a preset inspection posture, photographing the calibration plate through the camera to obtain a first calibration plate image, and obtaining first calibration information according to the first calibration plate image, and if the error between the first calibration information and the second calibration information stored in the preset storage space is greater than a preset threshold, the hand-eye system is subjected to a first calibration process. In the above process, by setting the calibration plate at the end of the Kth axis, the operation of repeated disassembly during calibration is avoided, and the calibration efficiency is improved. Furthermore, the calibration plate can be installed on the mechanical arm for a long time, so that the calibration information of the hand-eye system can be conveniently automatically inspected to determine whether the calibration result has increased errors due to long-term operation, thereby quickly deciding whether to re-calibrate the hand-eye. In addition, by setting the calibration plate at the end of the Kth axis, the probability of collision between the calibration plate and the mechanical arm body can also be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1 This is a schematic diagram of the architecture of the hand-eye system in the embodiment of the present application;
[0059] Figure 2 It is a schematic diagram of the operation flow of hand-eye calibration in the prior art;
[0060] Figure 3 A schematic diagram of a hand-eye system provided in an embodiment of the present application;
[0061] Figure 4 A schematic diagram of a flow chart of a hand-eye system calibration method provided in one embodiment of the present application;
[0062] Figure 5 A schematic flow chart of a hand-eye system calibration method provided in another embodiment of the present application;
[0063] Figure 6 A schematic diagram of a flow chart for calibrating a hand-eye system provided in yet another embodiment of the present application;
[0064] Figure 7 A schematic diagram of the structure of a calibration device for a hand-eye system provided in one embodiment of the present application;
[0065] Figure 8 A schematic diagram of the structure of an electronic device provided for one embodiment of the present application.
[0066] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0067] 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 the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0068] First, the terms involved in the embodiments of the present application are explained:
[0069] Hand-eye calibration: When the end of the robotic arm is in different postures, the external parameters of the camera relative to the calibration plate are calibrated. Based on the external parameters of the camera relative to the calibration plate and the posture of the end of the robotic arm, the external parameters of the camera relative to the end of the robotic arm are calculated.
[0070] End picker: The end actuator of the robot arm, usually a gripper or suction cup.
[0071] Forward kinematics equation: refers to the equation for calculating the posture of the end of the robot arm based on the axis angle of the robot arm. In this embodiment, the postures of the K-th axis and the N-th axis are calculated respectively.
[0072] Inverse kinematics equation: refers to the equation for calculating the axis angle of the robot arm based on the posture of the end of the robot arm. In this embodiment, the posture calculation is based on the K-th axis and the N-th axis respectively.
[0073] The hand-eye system is a robot vision system composed of a camera and a robotic arm. The end of the robotic arm is equipped with an end picker (such as a hand gripper or suction cup actuator) to move or pick objects. The camera can provide visual information to guide the movement trajectory of the end of the robotic arm.
[0074] In some hand-eye systems, the camera can be installed at the end of the robot arm and move with the end of the robot arm. This scenario can also be called the Eye-in-Hand scenario. In this scenario, the camera coordinate system always changes relative to the robot arm coordinate system, while the camera's position relative to the end of the robot arm is constant.
[0075] In other hand-eye systems, the camera can be installed in a fixed position outside the robot arm. This scenario can also be called the Eye-to-Hand scenario. In this scenario, the camera coordinate system is constant relative to the robot arm coordinate system, while the camera's position relative to the end of the robot arm is always changing.
[0076] The embodiment of the present application is applicable to the eye-to-hand scenario. Figure 1 Describe the architecture of the hand-eye system.
[0077] Figure 1 Schematic diagram of the architecture of the hand-eye system in the embodiment of the present application. Figure 1 As shown in FIG. 1 , the hand-eye system includes: a robotic arm, a camera, and a controller. The robotic arm can also be called a manipulator. The robotic arm is usually a multi-axis robotic arm, such as a three-axis robotic arm, a four-axis robotic arm, a five-axis robotic arm, a six-axis robotic arm, etc. The more axes a robotic arm has, the more degrees of freedom it has, and the more flexible the actions it can perform. Figure 1 The six-axis robot arm is used as an example. Figure 1 , the end of the sixth axis of the robot arm is equipped with an end picker ( Figure 1 The end picker can be an actuator such as a hand gripper or a suction cup.
[0078] Figure 1 In the hand-eye system shown, the robotic arm is equivalent to the hand of the robot, and the camera is equivalent to the eye of the robot. The robotic arm is connected to the controller in communication. The camera is connected to the controller in communication. After the camera captures an image including the target object, it sends the image to the controller. The controller calculates the position information of the target object in the robotic arm coordinate system using the conversion relationship between the camera coordinate system and the robotic arm coordinate system. Furthermore, the controller can calculate the motion trajectory of the end of the robotic arm based on the position information of the target object in the robotic arm coordinate system, and control the end of the robotic arm to reach a specific position so that the end picker can grasp the target object.
[0079] In practical applications, a calibration plate is needed to calibrate the hand-eye system. The purpose of hand-eye calibration is to obtain the transformation relationship between the camera coordinate system and the robotic arm coordinate system. In the prior art, when performing hand-eye calibration, the calibration plate is usually installed at the end of the sixth axis of the robotic arm. The principle of the calibration is as follows.
[0080] Assume that the transformation relationship between the robot coordinate system and the camera coordinate system is matrix X, the transformation relationship between the robot coordinate system and the robot end mechanism is matrix A, the transformation relationship between the robot end mechanism and the calibration plate is matrix Z, and the transformation relationship between the camera and the calibration plate is matrix B. The robot controls the calibration plate to reach n calibration positions. At these n positions, the postures of the robot end are A 1 , ..., A n, the position of the calibration plate relative to the camera is B 1 , ..., B n . Among them A i , B i It is known that X and Z are fixed values. From this, the following equation can be obtained:
[0081]
[0082] According to the above equation, eliminating Z, we can get:
[0083]
[0084] By combining and solving the above equations, X can be obtained, thereby obtaining the transformation relationship between the robot coordinate system and the camera coordinate system.
[0085] Although the above existing hand-eye calibration method can realize hand-eye calibration, the operation process is complicated and the efficiency is low. Figure 2 The operation process of existing hand-eye calibration is described.
[0086] Figure 2 FIG. 1 is a schematic diagram of the operation flow of hand-eye calibration in the prior art. Figure 2 As shown, when the hand-eye system is operating normally, it is necessary to install an end pick-up at the end of the sixth axis of the robot arm. When hand-eye calibration is required, it is necessary to disassemble the end pick-up installed at the end of the sixth axis of the robot arm, and install the calibration plate at the end of the sixth axis of the robot arm. Then, after the calibration is completed, the calibration plate is removed, and the end pick-up is reinstalled at the end of the sixth axis of the robot arm. It can be seen that the above-mentioned hand-eye calibration process requires multiple manual disassembly and installation, and the operation process is complicated, resulting in low calibration efficiency. Furthermore, in some application scenarios, when it is necessary to quickly check the calibration information of the hand-eye system, it is necessary to repeat the above installation and disassembly process to check whether the calibration information is accurate, and the inspection efficiency is low.
[0087] In addition, when the calibration plate is installed at the end of the sixth axis of the robot arm, the calibration plate and the robot arm body are prone to collision due to the flexible and changeable posture of the end of the sixth axis, thus limiting the size of the calibration plate and the movement space of the robot arm.
[0088] In order to solve at least one of the above technical problems, the embodiment of the present application improves the installation position of the calibration plate, and fixes the calibration plate to an axis different from the end picker. The hand-eye system of this embodiment includes a robotic arm and a camera. The camera is set at a fixed position outside the robotic arm. The robotic arm includes N axes, the end of the Nth axis of the robotic arm is provided with an end picker, and the end of the Kth axis of the robotic arm is provided with a calibration plate. K is a natural number less than N. Figure 3 Schematic diagram of the hand-eye system provided in the embodiment of the present application. Figure 3As shown, taking a six-axis robot arm as an example, the sixth axis of the robot arm is provided with an end picker ( Figure 3 The calibration plate can be set on any axis except the sixth axis.
[0089] Optional, see Figure 3 The calibration plate can be set at the end of the fourth axis of the robot arm. Since the posture of the fourth axis end of the robot arm is relatively stable, setting the calibration plate at the end of the fourth axis can reduce the probability of collision between the calibration plate and the robot body.
[0090] In this embodiment, since the calibration plate and the end picker are installed on different axes, the two do not interfere with each other. During the hand-eye calibration, there is no need to perform a series of operations such as disassembling the end picker, installing the calibration plate, disassembling the calibration plate, and installing the end picker, thereby improving the hand-eye calibration efficiency. Furthermore, in the embodiment of the present application, the calibration plate can be installed on the robot arm for a long time, so that the calibration information of the hand-eye system can be conveniently automatically checked to determine whether the calibration information has increased errors due to long-term operation, thereby quickly deciding whether the hand-eye calibration needs to be re-performed.
[0091] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0092] Figure 4 A flow chart of a hand-eye system calibration method provided in one embodiment of the present application. The method of this embodiment can be executed by a controller and can be used to Figure 3 The hand-eye system shown in Figure 1 is calibrated. Figure 4 As shown, the method of this embodiment may include:
[0093] S401: Control the end of the Nth axis of the robot arm to run to a preset inspection posture.
[0094] S402: photographing the calibration plate with a camera to obtain a first calibration plate image, and acquiring first calibration information according to the first calibration plate image;
[0095] S403: If the error between the first calibration information and the second calibration information stored in the preset storage space is greater than a preset threshold, a first calibration process is performed on the hand-eye system.
[0096] This embodiment can be applied to a scenario where the calibration information of the hand-eye system is automatically checked to determine whether the hand-eye system needs to be recalibrated.
[0097] The preset inspection posture refers to a posture specified in advance for inspecting the calibration information of the hand-eye system.
[0098] Specifically, before the execution of this embodiment, the hand-eye system has been calibrated. After the calibration is completed, the end of the Nth axis of the robot arm is controlled to run to the preset inspection posture, and then the calibration plate is photographed by the camera to obtain the calibration plate image, and the second calibration information is obtained according to the calibration plate image. The second calibration information is stored in the preset storage space. Among them, the second calibration information indicates the position information of the calibration plate in the camera coordinate system when the end of the Nth axis of the robot arm runs to the preset inspection posture after the calibration is completed.
[0099] In this embodiment, when the calibration information of the hand-eye system needs to be checked, the end of the Nth axis of the robot arm can be controlled to run to the preset test posture, the calibration plate is photographed by the camera to obtain a first calibration plate image, and the first calibration information is obtained according to the first calibration plate image. The first calibration information indicates the position information of the calibration plate in the camera coordinate system in the current scene.
[0100] Furthermore, by comparing the first calibration information with the second calibration information stored in the preset storage space, it can be determined whether recalibration is required. Specifically, if the error between the first calibration information and the second calibration information is greater than the preset threshold, it means that the calibration error of the hand-eye system has increased due to long-term operation, and therefore, the hand-eye system is recalibrated. If the error between the first calibration information and the second calibration information is less than or equal to the preset threshold, it means that the current calibration information of the hand-eye system is not much different from the calibration information after the last calibration, and in this case, there is no need to recalibrate.
[0101] It should be noted that this embodiment does not limit the implementation process of the calibration process, and a possible calibration process method can be found in the detailed description of the subsequent embodiments.
[0102] Optionally, the preset inspection posture in this embodiment may include one or more inspection postures. When multiple inspection postures are included, for each inspection posture, when the end of the Nth axis of the control robot arm runs to the inspection posture, the calibration plate can be photographed by a camera to obtain a first calibration plate image, and the first calibration information can be obtained based on the first calibration plate image. In this way, after traversing multiple inspection postures, the first calibration information corresponding to the multiple inspection postures can be obtained.
[0103] Correspondingly, the preset storage space stores second calibration information corresponding to multiple inspection postures. When performing the comparison, the first calibration information and the second calibration information corresponding to each inspection posture can be compared to determine the error value corresponding to the inspection posture. Finally, the multiple error values corresponding to the multiple inspection postures are summed or averaged. If the calculated result is greater than the preset threshold, the hand-eye system is recalibrated.
[0104] Optionally, the preset test postures include five test postures, four of which correspond to four vertices of the square, and the other corresponds to the center point of the square. In this way, the uniformity of the test posture distribution is ensured, thereby ensuring the accuracy of the test result.
[0105] The present embodiment provides a calibration method for a hand-eye system, wherein the hand-eye system includes a robotic arm and a camera, the robotic arm includes N axes, and a calibration plate is provided at the end of the Kth axis of the robotic arm. The method includes: controlling the end of the Nth axis of the robotic arm to run to a preset inspection posture, photographing the calibration plate through a camera to obtain a first calibration plate image, and obtaining first calibration information based on the first calibration plate image, and if the error between the first calibration information and the second calibration information stored in the preset storage space is greater than a preset threshold, the hand-eye system is subjected to a first calibration process. In the above process, by setting the calibration plate at the end of the Kth axis, the operation of repeated disassembly during calibration is avoided, and the calibration efficiency is improved. Furthermore, the calibration plate can be installed on the robotic arm for a long time, so that the calibration information of the hand-eye system can be conveniently automatically inspected to determine whether the calibration result has increased errors due to long-term operation, thereby quickly deciding whether to re-calibrate the hand-eye. In addition, by setting the calibration plate at the end of the Kth axis, the probability of collision between the calibration plate and the robotic arm body can also be reduced.
[0106] Based on the above embodiments, the calibration process of the hand-eye system is described in detail below with reference to a specific example.
[0107] In this embodiment, it is assumed that after a calibration process is completed, five test poses are determined. For example, the four corners and the center of a square are determined, a total of five points, and these five points are used as the five test poses corresponding to the end of the N-th axis. Turn on the camera and ensure that when the end of the N-th axis runs to these five test poses, the calibration plate is in the camera field of view.
[0108] The Nth axis end is controlled to run to the first test posture. According to the posture of the Nth axis end, the axis angle of the robot arm is calculated by the inverse kinematics equation; then the posture of the Kth axis end is calculated by the forward kinematics equation according to the axis angle of the robot arm. The calibration plate is photographed by a camera to obtain the calibration plate image, and then, according to the calibration plate image and the posture of the Kth axis end, the second calibration information corresponding to the first test posture is determined.
[0109] The N-th axis end is controlled to run to the second inspection posture. According to the posture of the N-th axis end, the axis angle of the robot arm is calculated by the inverse kinematics equation; then the posture of the K-th axis end is calculated by the forward kinematics equation according to the axis angle of the robot arm. The calibration plate is photographed by a camera to obtain the calibration plate image, and then, according to the calibration plate image and the posture of the K-th axis end, the second calibration information corresponding to the second inspection posture is determined.
[0110] Control the end of the N-axis to run to the third inspection posture, and use a similar process to determine the second calibration information corresponding to the third inspection posture; control the end of the N-axis to run to the fourth inspection posture, and use a similar process to determine the second calibration information corresponding to the fourth inspection posture; control the end of the N-axis to run to the fifth inspection posture, and use a similar process to determine the second calibration information corresponding to the fifth inspection posture.
[0111] The second calibration information corresponding to each of the above five inspection postures is stored in a preset storage space.
[0112] When the calibration information of the hand-eye system needs to be checked, for example, when the hand-eye system has been running for a long time, or when the current calibration information of the hand-eye system is suspected to be inaccurate based on the operation of the hand-eye system, the following method can be used: Figure 5 The process shown performs automatic inspection and automatic calibration of the hand-eye system.
[0113] Figure 5 A flow chart of a hand-eye system calibration method provided in another embodiment of the present application. Figure 5 As shown, the method of this embodiment includes:
[0114] S501: Obtain five preset inspection postures.
[0115] The five verification postures are postures corresponding to the four corners and the center of the square mentioned above.
[0116] S502: Take out an unverified inspection pose from the five inspection poses.
[0117] S503: Control the end of the Nth axis to run to the inspection posture.
[0118] S504: Acquire the posture of the end of the K-th axis, and photograph the calibration plate with a camera to obtain an image of the calibration plate, and acquire first calibration information corresponding to the inspection posture according to the calibration plate image and the posture of the end of the K-th axis.
[0119] Specifically, the posture of the end of the K-th axis can be obtained as follows: according to the posture of the end of the N-th axis, the axis angle of the robot arm is calculated by the inverse kinematics equation; then the posture of the end of the K-th axis is calculated by the forward kinematics equation according to the axis angle of the robot arm.
[0120] S505: Compare the first calibration information corresponding to the inspection posture with the second calibration information corresponding to the inspection posture stored in a preset storage space to determine the error value corresponding to the inspection posture.
[0121] S506: Determine whether the five test postures have been traversed. If yes, execute S507, if not, return to execute S502.
[0122] S507: Obtain the inspection error of the hand-eye system according to the error values corresponding to the five inspection postures.
[0123] For example, the sum of the error values corresponding to the five inspection postures can be used as the inspection error, or the average of the error values corresponding to the five inspection postures can be used as the inspection error.
[0124] S508: Determine whether the inspection error is greater than a preset threshold.
[0125] If yes, then S509 is executed. If no, then no recalibration is required, and the last calibration result can continue to be used.
[0126] S509: Calibrate the hand-eye system.
[0127] Through this embodiment, the calibration error of the hand-eye system can be automatically checked, and when the calibration error is detected to be large, the hand-eye system is automatically calibrated, thereby improving the calibration efficiency of the hand-eye system.
[0128] Based on any of the above embodiments, Figure 6 The calibration process of the hand-eye system is described.
[0129] Figure 6 A schematic diagram of a flow chart of a hand-eye system calibration process provided in another embodiment of the present application. Figure 6 As shown, the method of this embodiment includes:
[0130] S601: Determine multiple calibration poses corresponding to the end of the K-th axis.
[0131] Before S601, the camera is turned on and the robot arm is controlled to run so that the calibration plate of the Kth axis of the robot arm is approximately located in the center of the camera field of view.
[0132] Optionally, multiple calibration poses corresponding to the K-th axis end can be determined according to the camera's field of view and the current pose of the K-th axis end. Exemplarily, multiple calibration poses can be obtained by adjusting the current pose of the K-th axis end, and it is ensured that the obtained multiple calibration poses do not exceed the camera's field of view.
[0133] In one possible implementation, the current pose of the end of the N-th axis is obtained, and based on the current pose of the end of the N-th axis, the current pose of the end of the K-th axis is determined, and the current pose of the end of the K-th axis is randomly adjusted within the field of view of the camera to generate multiple calibration poses corresponding to the end of the K-th axis.
[0134] S602: Control the end of the K-th axis to run to each calibration posture, and when the end of the K-th axis runs to each calibration posture, use a camera to shoot the calibration plate to obtain a second calibration plate image.
[0135] Optionally, the K-axis end can be controlled to run to each calibration posture in the following manner: according to each calibration posture corresponding to the K-axis end, the target posture of the N-axis end is determined, and the N-axis end is controlled to run to the target posture, so that the K-axis end runs to the calibration posture.
[0136] S603: Obtain a calibration result according to the multiple calibration poses and the second calibration plate image collected when the end of the K-th axis moves to each calibration pose.
[0137] The calibration result corresponding to each calibration pose and the second calibration plate image corresponding to the calibration pose is calculated and obtained. Then, the calibration result of this calibration process is obtained according to the calibration results corresponding to the multiple calibration poses.
[0138] Optionally, after obtaining the calibration result, it can also be determined whether the calibration result is within the standard error range. If so, it is determined that the calibration result is usable. If not, it is determined that the calibration result is unusable and needs to be recalibrated.
[0139] In one example, when it is determined that the hand-eye system needs to be calibrated, the current posture of the N-th axis of the robot is obtained, the axis angles of the N axes of the robot are calculated by the inverse kinematics equation, and then the posture of the end of the K-th axis is calculated based on the forward kinematics equation and the axis angles of the N axes. According to the field of view of the camera, the posture of the end of the K-th axis is randomly adjusted within the field of view to obtain the calibration posture corresponding to the end of the K-th axis. According to the calibration posture corresponding to the end of the K-th axis, the axis angles of the N axes of the robot are calculated by the inverse kinematics equation, and then the target posture corresponding to the end of the N-th axis of the robot is calculated by the forward kinematics equation and the axis angles of the N axes. The end of the N-th axis of the robot is controlled to run to this target posture, and the calibration plate is photographed by the camera to obtain the calibration plate image, and the calibration plate image and the current calibration posture of the end of the K-th axis are stored.
[0140] The above process is executed repeatedly until the preset number of cycles is reached. After the cycle is completed, multiple calibration poses and multiple calibration plate images are obtained and the calibration results are calculated. If the calibration result is within the standard error range, it means that the calibration result is available and the calibration result is stored.
[0141] When the hand-eye system is running, the position of the target object in the robot arm coordinate system is determined based on the image of the target object taken by the camera and the calibration result, and then the operation trajectory of the robot arm is determined, so that the end picker at the end of the robot arm can grasp the target object.
[0142] Through this embodiment, automatic calibration of the hand-eye system can be achieved without the user having to manually adjust the posture of the robotic arm to perform calibration, thereby improving the calibration efficiency of the hand-eye system.
[0143] Figure 7 A schematic diagram of the structure of a hand-eye system calibration device provided in one embodiment of the present application. The hand-eye system calibration device of this embodiment can be in the form of software and / or hardware. The device can be set in Figure 1 In the controller. Figure 7 As shown, the hand-eye system calibration device 10 provided in this embodiment may include: a verification module 11 and a calibration module 12.
[0144] The inspection module 11 is used to control the end of the Nth axis of the robot arm to move to a preset inspection posture;
[0145] The inspection module 11 is further configured to photograph the calibration plate through the camera to obtain a first calibration plate image, and obtain first calibration information according to the first calibration plate image;
[0146] The calibration module 12 is configured to perform a first calibration process on the hand-eye system if an error between the first calibration information and the second calibration information stored in the preset storage space is greater than a preset threshold.
[0147] In a possible implementation manner, the inspection module 11 is specifically used for:
[0148] According to the posture of the end of the N-th axis, the posture of the end of the K-th axis is obtained;
[0149] The first calibration information is acquired according to the posture of the K-th axis end and the first calibration plate image.
[0150] In a possible implementation manner, the calibration module 12 is specifically used for:
[0151] Determine a plurality of calibration poses corresponding to the end of the K-th axis;
[0152] Controlling the end of the K-th axis to run to each of the calibration postures, and when the end of the K-th axis runs to each of the calibration postures, photographing the calibration plate by the camera to obtain a second calibration plate image;
[0153] A calibration result is obtained according to the multiple calibration postures and the second calibration plate image collected when the K-th axis end moves to each of the calibration postures.
[0154] In a possible implementation manner, the calibration module 12 is specifically used for:
[0155] According to the field of view of the camera and the current position and posture of the K-th axis end, a plurality of marked position and postures corresponding to the K-th axis end are determined.
[0156] In a possible implementation manner, the calibration module 12 is specifically used for:
[0157] Acquire the current posture of the N-th axis end, and determine the current posture of the K-th axis end according to the current posture of the N-th axis end;
[0158] The current position and posture of the K-th axis end is randomly adjusted within the field of view of the camera to generate multiple calibration position and postures corresponding to the K-th axis end.
[0159] In a possible implementation manner, the calibration module 12 is specifically used for:
[0160] Determining the target pose of the N-th axis end according to each of the marked poses corresponding to the K-th axis end;
[0161] Control the Nth axis end to move to the target posture.
[0162] In a possible implementation manner, the inspection module 11 is further used for:
[0163] After performing a second calibration process on the hand-eye system, controlling the end of the Nth axis to move to the preset inspection posture;
[0164] photographing the calibration plate by the camera to obtain a third calibration plate image, and acquiring the second calibration information according to the third calibration plate image;
[0165] The second calibration information is stored in the preset storage space.
[0166] In a possible implementation manner, the robotic arm includes six axes, and the calibration plate is disposed at the end of a fourth axis of the robotic arm.
[0167] The hand-eye system calibration device provided in this embodiment can be used to execute the technical solution in any of the above method embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.
[0168] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device can be used as a controller. Figure 8 As shown, the electronic device 20 of this embodiment includes: a processor 21 and a memory 22; wherein the memory 22 is used to store a computer program; the processor 21 is used to execute the computer program stored in the memory to implement the hand-eye system calibration method in the above embodiment. For details, please refer to the relevant description in the above method embodiment.
[0169] Optionally, the memory 22 may be independent or integrated with the processor 21 .
[0170] When the memory 22 is a device independent of the processor 21 , the electronic device 20 may further include: a bus 23 for connecting the memory 22 and the processor 21 .
[0171] Optionally, the electronic device 20 may further include a communication component 24 for communicating with a robotic arm, a camera, etc.
[0172] The electronic device provided in this embodiment can be used to execute the technical solution in any of the above method embodiments. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0173] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program, and the computer program is used to implement the technical solution in any of the above method embodiments.
[0174] An embodiment of the present application further provides a chip, including: a memory, a processor, and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to execute the technical solution in any of the above method embodiments.
[0175] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0176] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0177] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0178] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application.
[0179] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0180] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0181] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0182] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0183] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0184] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0185] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0186] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for calibrating a hand-eye system, characterized in that: The hand-eye system includes a robotic arm and a camera, the robotic arm includes N axes, a calibration plate is provided at the end of the Kth axis of the robotic arm, K is a natural number less than N, and the method includes: Controlling the end of the Nth axis of the robotic arm to move to a preset inspection posture; The calibration plate is photographed by the camera to obtain a first calibration plate image, and first calibration information is acquired according to the first calibration plate image, where the first calibration information indicates position information of the calibration plate in the camera coordinate system in the current scene; If an error between the first calibration information and the second calibration information stored in the preset storage space is greater than a preset threshold, a first calibration process is performed on the hand-eye system, wherein the second calibration information is position information of the calibration plate in the camera coordinate system after the hand-eye system is calibrated; Before controlling the end of the Nth axis of the robot arm to move to a preset inspection posture, the method further includes: After performing a second calibration process on the hand-eye system, controlling the end of the Nth axis to move to the preset inspection posture; photographing the calibration plate by the camera to obtain a third calibration plate image, and acquiring the second calibration information according to the third calibration plate image; Storing the second calibration information in the preset storage space; Acquiring first calibration information according to the first calibration plate image includes: According to the posture of the end of the N-th axis, the posture of the end of the K-th axis is obtained; The first calibration information is acquired according to the posture of the K-th axis end and the first calibration plate image.
2. The method according to claim 1, characterized in that Performing a first calibration process on the hand-eye system includes: Determine a plurality of calibration poses corresponding to the end of the K-th axis; Controlling the end of the K-th axis to run to each of the calibration postures, and when the end of the K-th axis runs to each of the calibration postures, photographing the calibration plate by the camera to obtain a second calibration plate image; A calibration result is obtained according to the multiple calibration postures and the second calibration plate image collected when the K-th axis end moves to each of the calibration postures.
3. The method according to claim 2, characterized in that Determining a plurality of calibration poses corresponding to the end of the K-th axis includes: According to the field of view of the camera and the current position and posture of the K-th axis end, a plurality of marked position and postures corresponding to the K-th axis end are determined.
4. The method according to claim 3, characterized in that: Determining a plurality of calibration poses corresponding to the K-th axis end according to the field of view of the camera and the current pose of the K-th axis end, including: Acquire the current posture of the N-th axis end, and determine the current posture of the K-th axis end according to the current posture of the N-th axis end; The current position and posture of the K-th axis end is randomly adjusted within the field of view of the camera to generate multiple calibration position and postures corresponding to the K-th axis end.
5. The method according to claim 2, characterized in that: Controlling the end of the K-th axis to move to each of the calibration postures, including: Determining the target pose of the N-th axis end according to each of the marked poses corresponding to the K-th axis end; Control the Nth axis end to move to the target posture.
6. The method according to any one of claims 1 to 5, characterized in that: The mechanical arm includes six axes, and the calibration plate is arranged at the end of the fourth axis of the mechanical arm.
7. A hand-eye system calibration device, characterized in that: The hand-eye system includes a robotic arm and a camera, the robotic arm includes N axes, a calibration plate is provided at the end of the Kth axis of the robotic arm, K is a natural number less than N, and the device includes: An inspection module, used to control the end of the Nth axis of the robotic arm to move to a preset inspection posture; The inspection module is further configured to obtain a first calibration plate image by photographing the calibration plate through the camera, and obtain first calibration information according to the first calibration plate image; the first calibration information indicates position information of the calibration plate in the camera coordinate system in the current scene; A calibration module, configured to perform a first calibration process on the hand-eye system if an error between the first calibration information and the second calibration information stored in a preset storage space is greater than a preset threshold; the second calibration information is position information of the calibration plate in the camera coordinate system after the hand-eye system is calibrated; The inspection module is further used for controlling the Nth axis end of the robot arm to run to the preset inspection posture after performing a second calibration process on the hand-eye system before controlling the Nth axis end of the robot arm to run to the preset inspection posture; photographing the calibration plate by the camera to obtain a third calibration plate image, and obtaining the second calibration information according to the third calibration plate image; and storing the second calibration information in the preset storage space; The inspection module is specifically used to obtain the position and posture of the K-th axis end according to the position and posture of the N-th axis end; and to obtain the first calibration information according to the position and posture of the K-th axis end and the first calibration plate image.
8. An electronic device, characterized in that include: A memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Robot hand and eye calibration method and device
CN110193849A
Camera automatic calibration optimization method and related system and device
CN111899305A
