Robot zero position recovery method, electronic device and storage medium

By collecting visual marker images, calculating posture deviations, and iteratively adjusting, the time-consuming and labor-intensive maintenance problem after the robot loses its zero position is solved, enabling rapid recovery of the zero position and improving positioning accuracy.

CN119635661BActive Publication Date: 2025-10-28SHANGHAI JIEKA ROBOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510086999.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-10-28
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

In existing technologies, if an industrial robot loses its zero-point position, it needs to be returned to the factory for repair, which is time-consuming and labor-intensive, and affects the positioning accuracy of the robot's end effector.

Method used

By controlling standard and faulty robots to acquire images of visual markers, the pose in the camera coordinate system is determined, the pose deviation and pose norm are calculated, and the initial pose is iteratively adjusted to restore the zero position.

Benefits of technology

It enables rapid restoration of the robot to its zero position, simplifies the maintenance process, and improves the robot's positioning accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119635661B_ABST
    Figure CN119635661B_ABST
Patent Text Reader

Abstract

This application provides a robot zero-position recovery method, electronic device, and storage medium. The method includes: controlling a camera on a standard robot to acquire a first image of a preset visual marker, and determining a first pose of the visual marker in the camera coordinate system based on the first image; controlling a camera on a faulty robot to acquire a second image of the visual marker, and determining a second pose of the visual marker in the camera coordinate system based on the second image; determining the pose deviation of the second pose relative to the first pose based on the first pose and the second pose, and determining a pose norm based on the pose deviation; determining whether to use the initial pose corresponding to the second pose as the target zero-position pose based on the pose norm; if not, iteratively adjusting the initial pose based on the pose deviation and the initial pose, so that the initial pose at the end of the iterative adjustment is consistent with the standard zero-position pose. This achieves rapid zero-position recovery of the robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robotics technology, and more specifically, to a robot zero-position recovery method, electronic device, and storage medium. Background Technology

[0002] In industrial robot applications, to improve reliability and stability, a zero point is typically set. The zero point is the initial position of the robot's manipulator and serves as the reference point for the robot's coordinate system. Without a zero point, the robot cannot determine its own position. During robot operation, collisions with workpieces or the environment often cause mechanical position shifts, resulting in the loss of the zero point (zero position). This loss of the zero point affects the positioning accuracy of the robot's end effector.

[0003] In existing technologies, robots need to be returned to the factory for repair, but this is time-consuming and labor-intensive. Therefore, there is an urgent need for a method for rapid recovery of robots from zero position. Summary of the Invention

[0004] The purpose of this application is to address the shortcomings of the prior art by providing a robot zero-position recovery method, electronic device, and storage medium to achieve rapid recovery of the robot's zero position.

[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0006] In a first aspect, embodiments of this application provide a robot zero-position recovery method, the method comprising:

[0007] The standard robot is controlled to move to a preset reference position and to be in a standard zero-position posture. The standard robot is a robot without zero-position error. The camera on the standard robot is controlled to capture a first image of a preset visual marker and to determine the first pose of the visual marker in the camera coordinate system based on the first image.

[0008] The faulty robot is controlled to move to the reference position and to be in an initial posture; the camera on the faulty robot is controlled to acquire a second image of the visual marker and to determine the second pose of the visual marker in the camera coordinate system based on the second image;

[0009] Based on the first pose and the second pose, determine the pose deviation of the second pose relative to the first pose, and determine the pose norm based on the pose deviation.

[0010] Determine whether to use the initial pose corresponding to the second pose as the target zero pose based on the pose norm; if not, iteratively adjust the initial pose based on the pose deviation and the initial pose so that the initial pose at the end of the iterative adjustment is consistent with the standard zero pose.

[0011] Optionally, the first pose includes a first pose matrix, and the second pose includes a second pose matrix;

[0012] The step of determining the pose deviation of the second pose relative to the first pose based on the first pose and the second pose, and determining the pose norm based on the pose deviation, includes:

[0013] Calculate the difference between each pose parameter in the first pose matrix and the corresponding pose parameter in the second pose matrix to obtain the pose difference value corresponding to each pose parameter;

[0014] The attitude norm is determined based on the attitude difference corresponding to each attitude parameter.

[0015] Optionally, determining the attitude norm based on the attitude difference corresponding to each attitude parameter includes:

[0016] Calculate the sum of squares of the pose differences corresponding to all pose parameters to obtain the first parameter;

[0017] The root mean square of the first parameter is used as the attitude norm.

[0018] Optionally, determining whether to use the initial attitude as the target null attitude based on the attitude norm includes:

[0019] If the attitude norm is less than or equal to a preset threshold, then the initial attitude corresponding to the second pose is determined as the target zero attitude.

[0020] Optionally, the step of iteratively adjusting the initial attitude based on the attitude deviation and the initial attitude includes:

[0021] A. Adjust the initial posture according to the posture deviation to obtain a new initial posture;

[0022] B. Control the camera on the faulty robot to acquire a third image of the visual marker, and determine the third pose of the visual marker in the camera coordinate system based on the third image;

[0023] C. Based on the first pose and the third pose, determine the current pose deviation of the third pose relative to the first pose, and determine the current pose norm based on the current pose deviation.

[0024] D. Determine whether to use the new initial pose as the target zero pose based on the current pose norm. If yes, end the iteration; otherwise, repeat step A.

[0025] Optionally, adjusting the initial attitude based on the attitude deviation to obtain a new initial attitude includes:

[0026] A difference matrix is ​​formed based on the attitude differences corresponding to each attitude parameter;

[0027] The difference matrix is ​​transformed to obtain a transformation matrix, which has the same coordinate system as the initial attitude.

[0028] The transformation matrix is ​​multiplied by the matrix corresponding to the initial pose to obtain the new initial pose.

[0029] Optionally, determining the first pose of the visual marker in the camera coordinate system based on the first image includes:

[0030] Determine the first two-dimensional coordinates of the visual marker in the first image;

[0031] The first two-dimensional coordinates are converted into the first pose in the camera coordinate system based on the camera's parameter matrix.

[0032] Optionally, determining the second pose of the visual marker in the camera coordinate system based on the second image includes:

[0033] Determine the second two-dimensional coordinates of the visual marker in the second image;

[0034] The second two-dimensional coordinates are converted into a second pose in the camera coordinate system based on the camera's parameter matrix.

[0035] Secondly, embodiments of this application also provide a robot zero-position recovery device, the device comprising:

[0036] The control module is used to control the standard robot to move to a preset reference position and to control the standard robot to be in a standard zero-position posture. The standard robot is a robot without zero-position error.

[0037] The determination module is used to control the camera on the standard robot to acquire a first image of a preset visual marker, and to determine the first pose of the visual marker in the camera coordinate system based on the first image;

[0038] The control module is used to control the faulty robot to move to the reference position and to control the faulty robot to be in the initial posture;

[0039] The determination module is used to control the camera on the faulty robot to acquire a second image of the visual marker, and determine the second pose of the visual marker in the camera coordinate system based on the second image;

[0040] The determination module is used to determine the attitude deviation of the second pose relative to the first pose based on the first pose and the second pose, and to determine the attitude norm based on the attitude deviation.

[0041] The determination module is used to determine, based on the attitude norm, whether to take the initial attitude corresponding to the second pose as the target zero pose.

[0042] An adjustment module is used to iteratively adjust the initial attitude based on the attitude deviation and the initial attitude if not, so that the initial attitude at the end of the iterative adjustment is consistent with the standard zero-position attitude.

[0043] Optionally, the first pose includes a first pose matrix, and the second pose includes a second pose matrix;

[0044] The determining module is specifically used for:

[0045] Calculate the difference between each pose parameter in the first pose matrix and the corresponding pose parameter in the second pose matrix to obtain the pose difference value corresponding to each pose parameter;

[0046] The attitude norm is determined based on the attitude difference corresponding to each attitude parameter.

[0047] Optionally, the determining module is specifically used for:

[0048] Calculate the sum of squares of the pose differences corresponding to all pose parameters to obtain the first parameter;

[0049] The root mean square of the first parameter is used as the attitude norm.

[0050] Optionally, the determining module is specifically used for:

[0051] If the attitude norm is less than or equal to a preset threshold, then the initial attitude corresponding to the second pose is determined as the target zero attitude.

[0052] Optionally, the adjustment module is specifically used for:

[0053] A. Adjust the initial posture according to the posture deviation to obtain a new initial posture;

[0054] B. Control the camera on the faulty robot to acquire a third image of the visual marker, and determine the third pose of the visual marker in the camera coordinate system based on the third image;

[0055] C. Based on the first pose and the third pose, determine the current pose deviation of the third pose relative to the first pose, and determine the current pose norm based on the current pose deviation.

[0056] D. Determine whether to use the new initial pose as the target zero pose based on the current pose norm. If yes, end the iteration; otherwise, repeat step A.

[0057] Optionally, the determining module is specifically used for:

[0058] A difference matrix is ​​formed based on the attitude differences corresponding to each attitude parameter;

[0059] The difference matrix is ​​transformed to obtain a transformation matrix, which has the same coordinate system as the initial attitude.

[0060] The transformation matrix is ​​multiplied by the matrix corresponding to the initial pose to obtain the new initial pose.

[0061] Optionally, the determining module is specifically used for:

[0062] Determine the first two-dimensional coordinates of the visual marker in the first image;

[0063] The first two-dimensional coordinates are converted into the first pose in the camera coordinate system based on the camera's parameter matrix.

[0064] Optionally, the determining module is specifically used for:

[0065] Determine the second two-dimensional coordinates of the visual marker in the second image;

[0066] The second two-dimensional coordinates are converted into a second pose in the camera coordinate system based on the camera's parameter matrix.

[0067] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the application runs, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the robot zero-position recovery method described in the first aspect.

[0068] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is read and executes the steps of the robot zero-position recovery method described in the first aspect.

[0069] The beneficial effects of this application are:

[0070] This application provides a robot zero-position recovery method, electronic device, and storage medium. First, a camera on a standard robot is controlled to acquire a first image of a preset visual marker. Based on the first image, the first pose of the visual marker in the camera coordinate system is determined. This first pose can be used as a reference pose. Then, a faulty robot is controlled to move to a reference position and enter an initial pose. Next, a camera on the faulty robot is controlled to acquire a second image of the visual marker. Based on the second image, the second pose of the visual marker in the camera coordinate system is determined. Based on the first and second poses, the pose deviation of the second pose relative to the first pose is determined. The pose norm is determined based on the pose deviation. The pose norm is used to determine whether the initial pose corresponding to the second pose should be used as the target zero-position pose. Otherwise, based on the pose deviation and the initial pose, the initial pose is iteratively adjusted until the initial pose at the end of the iteration adjustment is consistent with the standard zero-position pose. By comparing the second pose of the visual marker acquired by the faulty robot in its initial pose with the first pose of the visual marker acquired by the standard robot in its standard zero pose, it is determined whether the initial pose is the target zero pose. If not, the initial pose of the faulty robot is iteratively adjusted so that the iteratively adjusted initial pose is consistent with the standard zero pose, thereby quickly restoring the zero position of the faulty robot. Attached Figure Description

[0071] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0072] Figure 1 This is an exemplary scenario diagram provided for an embodiment of this application;

[0073] Figure 2 A flowchart illustrating a robot zero-position recovery method provided in this application embodiment;

[0074] Figure 3 A flowchart illustrating another robot zero-position recovery method provided in this application embodiment;

[0075] Figure 4 A flowchart illustrating another robot zero-position recovery method provided in this application embodiment;

[0076] Figure 5 A flowchart illustrating another robot zero-position recovery method provided in this application embodiment;

[0077] Figure 6 A schematic diagram of an apparatus for a robot zero-position recovery method provided in an embodiment of this application;

[0078] Figure 7 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0079] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0080] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0081] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0082] Optionally, the robot zero-position recovery method provided in this application embodiment can be applied to an electronic device, such as a mobile phone, tablet computer, laptop computer, PDA, desktop computer, or other terminal device with computing power and display function, or it can be a server. Specifically, it can be applied to applications in terminal devices, such as mobile phone apps (APP) or computer application systems.

[0083] The following is a detailed explanation of the specific implementation process of robot zero-position recovery provided in the embodiments of this application.

[0084] Figure 1An exemplary scenario diagram provided for an embodiment of this application, such as... Figure 1 As shown, the solid black line represents the faulty robot, that is, the robot that has lost its zero position, while the dashed black line represents the standard robot, that is, the robot whose zero position has no error. Using the robot zero position recovery method provided in this application embodiment, the robot in the solid black line is restored to the robot in the dashed black line, thereby restoring the lost zero position of the faulty robot. Figure 1 The right-hand open frame is the robot end effector 3. The camera 1 is fixed to the robot end effector 3 via the connecting plate 2, and a preset visual marker is placed at the robot workstation. The camera takes a picture of the visual marker to obtain an image of the visual marker.

[0085] Figure 2 This is a flowchart illustrating a robot zero-position recovery method provided in an embodiment of this application. The execution subject of this method is as described above: electronic device. Figure 2 As shown, the method includes:

[0086] S101. Control the standard robot to move to the preset reference position and control the standard robot to be in the standard zero position posture.

[0087] Here, the standard robot refers to a robot without zero-position error. The preset reference position refers to the position where a preset visual marker can be captured.

[0088] Optionally, the robot can be controlled to move to a preset reference position, and the standard robot can be controlled to be in a standard zero-position posture, wherein the reference position is, for example, as described above. Figure 1 The dotted line in the diagram indicates that controlling the robot to be in the standard zero-position posture means that the zero-position posture of the standard robot is an error-free posture, i.e. Figure 1 The dashed line in the diagram represents a standard robot at a preset reference position and in a standard zero-position posture.

[0089] S102. Control the camera on the standard robot to acquire the first image of the preset visual marker, and determine the first pose of the visual marker in the camera coordinate system based on the first image.

[0090] Specifically, when the standard robot moves to the reference position and is in the standard zero position posture, the camera on the standard robot is controlled to take a picture of the visual mark on the workstation to obtain the first image of the visual mark. Based on the first image, the first pose of the visual mark in the camera coordinate system is obtained using a preset method. This first pose can be represented by T0, for example, and is used as the visual reference pose.

[0091] S103. Control the faulty robot to move to the reference position and control the faulty robot to the initial posture.

[0092] The faulty robot refers to a robot that has lost its zero position, that is, a robot with a zero position error.

[0093] Optionally, the faulty robot can be moved to the reference position where the visual markings were previously captured by the standard robot. The faulty robot can be adjusted to an initial posture through the assembly relationships between the components in the robot's mechanical design. This initial posture is only close to the standard zero-position posture, and there is an error between the initial posture and the standard zero position. For example... Figure 1 The solid black line in the middle represents a schematic diagram of the faulty robot moving to the reference position and in its initial posture.

[0094] S104. Control the camera on the faulty robot to acquire a second image of the visual marker, and determine the second pose of the visual marker in the camera coordinate system based on the second image.

[0095] Optionally, when the faulty robot moves to the reference position and is in the initial posture, the camera on the faulty robot is controlled to take a picture of the visual marker on the workstation to obtain a second image of the visual marker, and the second pose of the visual marker in the camera coordinate system is obtained by using a preset method based on the captured second image, wherein the second pose can be represented by T1 for example.

[0096] For example, a faulty robot in Figure 1 The visual markers were photographed at the locations indicated by the solid black lines in the image, resulting in a second image.

[0097] S105. Based on the first pose and the second pose, determine the pose deviation of the second pose relative to the first pose, and determine the pose norm based on the pose deviation.

[0098] Optionally, since there is a difference between the robot's posture when the first pose is obtained and the robot's posture when the second pose is obtained, there is also a posture deviation between the obtained first pose and the second pose. Therefore, the first pose is used as a reference pose, the posture deviation between the second pose and the first pose is calculated, and the posture norm is determined using a preset method based on the calculated posture deviation. This posture norm also refers to the posture norm of the second pose relative to the first pose.

[0099] S106. Determine whether to use the initial pose corresponding to the second pose as the target zero pose based on the pose norm.

[0100] The initial pose corresponding to the second pose refers to the robot's initial pose when the second pose is captured.

[0101] Specifically, if the attitude norm is a constant value, then a preset method can be used to determine whether to take the initial attitude corresponding to the second pose as the target zero pose based on the attitude norm and a preset threshold.

[0102] Optionally, if it is determined that the initial pose corresponding to the second pose is not to be used as the target zero pose, then S107 is executed below; otherwise, S108 is executed below.

[0103] S107. Based on the attitude deviation and the initial attitude, iteratively adjust the initial attitude so that the initial attitude at the end of the iterative adjustment is consistent with the standard zero attitude.

[0104] Specifically, the robot's initial pose can be iteratively adjusted based on the pose deviation between the second pose and the first pose, as well as the robot's initial pose when the second pose is captured, so that the initial pose at the end of the iterative adjustment is consistent with the standard zero pose of the standard robot. That is, the initial pose is iteratively adjusted until the initial pose is restored to the standard zero pose.

[0105] Optionally, the initial attitude after iterative adjustment may not be consistent with the standard zero attitude after multiple iterations. In this case, the iteration termination condition is set to end when the preset number of iterations is reached, and recovery failure is displayed.

[0106] S108. Determine that the initial pose corresponding to the second pose is the target zero pose and end.

[0107] In this embodiment, firstly, the camera on the standard robot is controlled to acquire a first image of a preset visual marker. Based on the first image, the first pose of the visual marker in the camera coordinate system is determined. This first pose can be used as a reference pose. Then, the faulty robot is controlled to move to a reference position and enter an initial pose. Next, the camera on the faulty robot is controlled to acquire a second image of the visual marker. Based on the second image, the second pose of the visual marker in the camera coordinate system is determined. Based on the first and second poses, the pose deviation of the second pose relative to the first pose is determined. The pose norm is determined based on the pose deviation. Based on the pose norm, it is determined whether the initial pose corresponding to the second pose should be used as the target zero-position pose. Otherwise, based on the pose deviation and the initial pose, the initial pose is iteratively adjusted until the initial pose at the end of the iterative adjustment is consistent with the standard zero-position pose. By comparing the second pose of the visual marker acquired by the faulty robot in its initial pose with the first pose of the visual marker acquired by the standard robot in its standard zero pose, it is determined whether the initial pose is the target zero pose. If not, the initial pose of the faulty robot is iteratively adjusted so that the iteratively adjusted initial pose is consistent with the standard zero pose, thereby quickly restoring the zero position of the faulty robot.

[0108] Figure 3 A flowchart illustrating another robot zero-position recovery method provided in this application embodiment is shown below. Figure 3 As shown, in step S105 above, determining the attitude deviation of the second pose relative to the first pose based on the first pose and the second pose, and determining the attitude norm based on the attitude deviation, may include:

[0109] S201. Calculate the difference between each pose parameter in the first pose matrix and the corresponding pose parameter in the second pose matrix to obtain the pose difference value corresponding to each pose parameter.

[0110] The first pose includes a first pose matrix, which contains translation and rotation parameters. The second pose includes a second pose matrix, which also contains translation and rotation parameters. For example, each pose parameter in the first pose matrix can be represented as T0. i,j The pose parameters in the second pose matrix can be, for example, T1. i,j , where i refers to the row sequence in the matrix and j refers to the column sequence in the matrix.

[0111] Specifically, if the pose parameter in the first pose matrix is ​​T0 i,j Then the pose parameters corresponding to the second pose matrix are T1. i,j Then the pose parameter is calculated as T0. i,jWith pose parameters T1 i,j The difference between them yields the pose parameter T0. i,j With pose parameters T1 i,j The corresponding attitude difference is then calculated as T1. i,j -T0 i,j .

[0112] For example, the parameter T0 at position (1,1) in the first pose matrix 1,1 The parameter T1 at position (1,1) in the second pose matrix 1,1 The difference between them is T1 1,1 -T0 1,1 The parameter T0 at position (1,2) in the first pose matrix 1,2 The parameter T1 at position (1,2) in the second pose matrix 1,2 The difference between them is T1 1,2 -T0 1,2 The parameter T0 at position (2,1) in the first pose matrix 2,1 The parameter T1 at position (2,1) in the second pose matrix 2,1 The difference between them is T1 2,1 -T0 2,1 .

[0113] S202. Determine the attitude norm based on the attitude difference corresponding to each attitude parameter.

[0114] Optionally, the attitude norm can be determined using a preset method based on the attitude difference corresponding to each attitude parameter.

[0115] Figure 4 This is a flowchart illustrating another robot zero-position recovery method provided in an embodiment of this application, as shown below. Figure 4 As shown, determining the attitude norm in S202 above based on the attitude difference corresponding to each attitude parameter may include:

[0116] S301. Calculate the sum of squares of the attitude differences corresponding to all pose parameters to obtain the first parameter.

[0117] Specifically, the sum of squares of the pose differences corresponding to all pose parameters is ∑ i,j (T1 i,j -T0 i,j ) 2 .

[0118] S302. Use the root mean square of the first parameter as the attitude norm.

[0119] Specifically, the attitude norm can be obtained using the following formula (i).

[0120]

[0121] Among them, ∥T1-T0∥ F Let T0 be the attitude norm. i,j T1 represents the pose parameters in the first pose matrix. i,j These are the pose parameters corresponding to the second pose matrix.

[0122] Optionally, determining whether to use the initial pose corresponding to the second pose as the target zero pose based on the pose norm in S106 above may include:

[0123] If the attitude norm is less than or equal to a preset threshold, the initial attitude corresponding to the second pose is taken as the target zero attitude; if the attitude norm is greater than the preset threshold, the initial attitude corresponding to the second pose is not taken as the target zero attitude.

[0124] If the pose norm is less than or equal to a preset threshold, it means that the initial pose corresponding to the second pose is consistent with the standard zero pose.

[0125] Figure 5 This is a flowchart illustrating another robot zero-position recovery method provided in an embodiment of this application, as shown below. Figure 5 As shown, in S107 above, the initial attitude is iteratively adjusted based on the attitude deviation and the initial attitude so that the initial attitude at the end of the iterative adjustment is consistent with the standard zero-position attitude. This may include:

[0126] S401. Adjust the initial attitude according to the attitude deviation to obtain a new initial attitude.

[0127] The attitude deviation can refer to the attitude difference between each of the aforementioned attitude parameters.

[0128] Optionally, the initial pose can be adjusted based on the pose deviation between the second pose and the first pose. Specifically, the pose parameters in the initial pose can be adjusted based on the pose difference corresponding to each pose parameter to obtain a new initial pose. For example, the pose parameter at position (i,j) in the initial pose can be adjusted based on the pose difference corresponding to the pose parameter at position (i,j) to obtain a new initial pose.

[0129] S402. Control the camera on the faulty robot to acquire the third image of the visual marker, and determine the third pose of the visual marker in the camera coordinate system based on the third image.

[0130] Specifically, when a new initial posture is obtained, the faulty robot controls the camera on the faulty robot to take pictures of the visual markers in the new initial posture to obtain a third image. This third image is acquired by the faulty robot in the new initial posture.

[0131] S403. Based on the first pose and the third pose, determine the current pose deviation of the third pose relative to the first pose, and determine the current pose norm based on the current pose deviation.

[0132] It is worth noting that the process of determining the current attitude deviation of the third pose relative to the first pose is the same as the process of determining the attitude deviation of the second pose relative to the first pose described above, and will not be repeated here. Similarly, the process of determining the current attitude norm is also the same as the process of determining the attitude norm of the second pose relative to the first pose described above, and will not be repeated here.

[0133] S404. Determine whether to use the new initial attitude as the target zero attitude based on the current attitude norm.

[0134] Optionally, if the current attitude norm is less than or equal to a preset threshold, then the new initial attitude is determined as the target zero attitude, indicating that the new initial attitude is consistent with the standard zero attitude. Then, S405 is executed and the iteration ends; otherwise, S406 is executed.

[0135] S405. Use the new initial attitude as the target zero attitude.

[0136] S406. Determine whether the number of iterations has reached the preset number.

[0137] If yes, then end; if no, return to step S401, specifically adjust the initial attitude based on the current attitude deviation and initial attitude obtained in S403, and obtain a new initial attitude.

[0138] In this embodiment, the faulty robot is restored to the standard zero position posture by iteratively adjusting the initial posture according to the posture deviation. The whole process is simple and fast.

[0139] Optionally, adjusting the initial attitude based on the attitude deviation in step S401 to obtain a new initial attitude may include:

[0140] Specifically, a difference matrix can be constructed based on the pose differences corresponding to each pose parameter. This difference matrix is ​​then transformed to obtain a transformation matrix. Since the difference matrix represents the visual markers in camera coordinates, a coordinate system transformation is required to ensure that the resulting transformation matrix is ​​in the same coordinate system as the initial pose. Finally, the transformation matrix is ​​multiplied by the matrix corresponding to the initial pose to obtain the new initial pose.

[0141] Optionally, determining the first pose of the visual marker in the camera coordinate system based on the first image in S102 above may include:

[0142] Specifically, the first two-dimensional coordinates of the visual marker in the first image can be determined first. Specifically, the first image can be processed by recognition and analysis to obtain the first two-dimensional coordinates of the visual marker in the first image. Then, based on the camera's parameter matrix, the first two-dimensional coordinates are converted into the first pose in the camera coordinate system.

[0143] Optionally, determining the second pose of the visual marker in the camera coordinate system based on the second image in S104 above may include:

[0144] Specifically, the second two-dimensional coordinates of the visual markers in the second image can be determined first. Specifically, the second image can be processed by recognition and analysis to obtain the second two-dimensional coordinates of the visual markers in the second image. Then, based on the camera's parameter matrix, the second two-dimensional coordinates are converted into a second pose in the camera coordinate system.

[0145] Figure 6 This is a schematic diagram of an apparatus for a robot zero-position recovery method provided in an embodiment of this application, as shown below. Figure 6 As shown, the device includes:

[0146] The control module 501 is used to control the standard robot to move to a preset reference position and to control the standard robot to be in a standard zero position posture. The standard robot is a robot without zero position error.

[0147] The determination module 502 is used to control the camera on the standard robot to acquire a first image of a preset visual marker, and to determine the first pose of the visual marker in the camera coordinate system based on the first image;

[0148] The control module 501 is used to control the faulty robot to move to the reference position and to control the faulty robot to be in the initial posture;

[0149] The determination module 502 is used to control the camera on the faulty robot to acquire a second image of the visual marker, and determine the second pose of the visual marker in the camera coordinate system based on the second image;

[0150] The determining module 502 is used to determine the attitude deviation of the second pose relative to the first pose based on the first pose and the second pose, and to determine the attitude norm based on the attitude deviation.

[0151] The determination module 502 is used to determine, based on the attitude norm, whether to take the initial attitude corresponding to the second pose as the target zero pose.

[0152] The adjustment module 503 is used to iteratively adjust the initial attitude based on the attitude deviation and the initial attitude if not, so that the initial attitude at the end of the iterative adjustment is consistent with the standard zero attitude.

[0153] Optionally, the first pose includes a first pose matrix, and the second pose includes a second pose matrix;

[0154] The determining module 502 is specifically used for:

[0155] Calculate the difference between each pose parameter in the first pose matrix and the corresponding pose parameter in the second pose matrix to obtain the pose difference value corresponding to each pose parameter;

[0156] The attitude norm is determined based on the attitude difference corresponding to each attitude parameter.

[0157] Optionally, the determining module 502 is specifically used for:

[0158] Calculate the sum of squares of the pose differences corresponding to all pose parameters to obtain the first parameter;

[0159] The root mean square of the first parameter is used as the attitude norm.

[0160] Optionally, the determining module is specifically used for:

[0161] If the attitude norm is less than or equal to a preset threshold, then the initial attitude corresponding to the second pose is determined as the target zero attitude.

[0162] Optionally, the adjustment module 503 is specifically used for:

[0163] A. Adjust the initial posture according to the posture deviation to obtain a new initial posture;

[0164] B. Control the camera on the faulty robot to acquire a third image of the visual marker, and determine the third pose of the visual marker in the camera coordinate system based on the third image;

[0165] C. Based on the first pose and the third pose, determine the current pose deviation of the third pose relative to the first pose, and determine the current pose norm based on the current pose deviation.

[0166] D. Determine whether to use the new initial pose as the target zero pose based on the current pose norm. If yes, end the iteration; otherwise, repeat step A.

[0167] Optionally, the determining module 502 is specifically used for:

[0168] A difference matrix is ​​formed based on the attitude differences corresponding to each attitude parameter;

[0169] The difference matrix is ​​transformed to obtain a transformation matrix, which has the same coordinate system as the initial attitude.

[0170] The transformation matrix is ​​multiplied by the matrix corresponding to the initial pose to obtain the new initial pose.

[0171] Optionally, the determining module 502 is specifically used for:

[0172] Determine the first two-dimensional coordinates of the visual marker in the first image;

[0173] The first two-dimensional coordinates are converted into the first pose in the camera coordinate system based on the camera's parameter matrix.

[0174] Optionally, the determining module 502 is specifically used for:

[0175] Determine the second two-dimensional coordinates of the visual marker in the second image;

[0176] The second two-dimensional coordinates are converted into a second pose in the camera coordinate system based on the camera's parameter matrix.

[0177] Figure 7 This is a structural block diagram of an electronic device 600 provided in an embodiment of this application. (See diagram below.) Figure 7 As shown, the electronic device may include: a processor 601 and a memory 602.

[0178] Optionally, a bus 603 may also be included, wherein the memory 602 is used to store machine-readable instructions executable by the processor 601. When the electronic device 600 is running, the processor 601 and the memory 602 communicate via the bus 603. When the machine-readable instructions are executed by the processor 601, the method steps in the above method embodiments are performed.

[0179] This application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the method steps described in the above-described robot zero-position recovery method embodiment.

[0180] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.

[0181] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0182] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for restoring the zero position of a robot, characterized in that, The method includes: The standard robot is controlled to move to a preset reference position and to be in a standard zero-position posture. The standard robot is a robot without zero-position error. The camera on the standard robot is controlled to capture a first image of a preset visual marker and to determine the first pose of the visual marker in the camera coordinate system based on the first image. The faulty robot is controlled to move to the reference position and to be in an initial posture; the camera on the faulty robot is controlled to acquire a second image of the visual marker and to determine the second pose of the visual marker in the camera coordinate system based on the second image; Based on the first pose and the second pose, determine the pose deviation of the second pose relative to the first pose, and determine the pose norm based on the pose deviation. Determine whether to use the initial pose corresponding to the second pose as the target zero pose based on the pose norm; if not, iteratively adjust the initial pose based on the pose deviation and the initial pose so that the initial pose at the end of the iterative adjustment is consistent with the standard zero pose.

2. The robot zero-position recovery method according to claim 1, characterized in that, The first pose includes a first pose matrix, and the second pose includes a second pose matrix; The step of determining the pose deviation of the second pose relative to the first pose based on the first pose and the second pose, and determining the pose norm based on the pose deviation, includes: Calculate the difference between each pose parameter in the first pose matrix and the corresponding pose parameter in the second pose matrix to obtain the pose difference value corresponding to each pose parameter; The attitude norm is determined based on the attitude difference corresponding to each attitude parameter.

3. The robot zero-position recovery method according to claim 2, characterized in that, Determining the attitude norm based on the attitude difference corresponding to each attitude parameter includes: Calculate the sum of squares of the pose differences corresponding to all pose parameters to obtain the first parameter; The root mean square of the first parameter is used as the attitude norm.

4. The robot zero-position recovery method according to claim 1, characterized in that, The step of determining whether to use the initial attitude as the target zero-position attitude based on the attitude norm includes: If the attitude norm is less than or equal to a preset threshold, then the initial attitude corresponding to the second pose is determined as the target zero attitude.

5. The robot zero-position recovery method according to claim 2, characterized in that, The step of iteratively adjusting the initial attitude based on the attitude deviation and the initial attitude includes: A. Adjust the initial posture according to the posture deviation to obtain a new initial posture; B. Control the camera on the faulty robot to acquire a third image of the visual marker, and determine the third pose of the visual marker in the camera coordinate system based on the third image; C. Based on the first pose and the third pose, determine the current pose deviation of the third pose relative to the first pose, and determine the current pose norm based on the current pose deviation. D. Determine whether to use the new initial pose as the target zero pose based on the current pose norm. If yes, end the iteration; otherwise, repeat step A.

6. The robot zero-position recovery method according to claim 5, characterized in that, The step of adjusting the initial attitude based on the attitude deviation to obtain a new initial attitude includes: A difference matrix is ​​formed based on the attitude differences corresponding to each attitude parameter; The difference matrix is ​​transformed to obtain a transformation matrix, which has the same coordinate system as the initial attitude. The transformation matrix is ​​multiplied by the matrix corresponding to the initial pose to obtain the new initial pose.

7. The robot zero-position recovery method according to claim 1, characterized in that, Determining the first pose of the visual marker in the camera coordinate system based on the first image includes: Determine the first two-dimensional coordinates of the visual marker in the first image; The first two-dimensional coordinates are converted into the first pose in the camera coordinate system based on the camera's parameter matrix.

8. The robot zero-position recovery method according to claim 1, characterized in that, Determining the second pose of the visual marker in the camera coordinate system based on the second image includes: Determine the second two-dimensional coordinates of the visual marker in the second image; The second two-dimensional coordinates are converted into a second pose in the camera coordinate system based on the camera's parameter matrix.

9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program executable by the processor, and the processor executing the computer program to implement the steps of the robot zero-position recovery method according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the robot zero-position recovery method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Robot zero calibration system and method based on binocular vision technology and LM algorithm

    CN115741720A

  • Method and device for quickly recovering zero position of robot, medium and robot

    CN115781664A