Robot zero position recovery method, electronic equipment and storage medium

By using standard robots and faulty robot cameras in industrial robots to acquire visually marked images, determine each position and iteratively adjust the initial position, the problem of robot zero position loss is solved, and the rapid recovery of zero position and the improvement of positioning accuracy is achieved.

CN119635661AActive Publication Date: 2025-03-18SHANGHAI JIEKA ROBOT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In industrial robot applications, the loss of the robot's zero position will lead to a decrease in positioning accuracy. It is difficult for the existing technology to quickly restore the zero position and it needs to be returned to the factory for maintenance, which is time-consuming and labor-intensive.

Method used

By controlling the standard robot and the faulty robot to move to the reference position, the camera is used to acquire visually marked images, determine each position, and iteratively adjust the initial position according to the posture deviation to make it consistent with the standard zero position attitude.

Benefits of technology

It realizes rapid recovery of the zero position of the robot, avoids the time and cost of returning to the factory for maintenance, and improves the robot positioning accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119635661A_ABST
    Figure CN119635661A_ABST
Patent Text Reader

Abstract

The invention provides a robot zero position recovery method, electronic equipment and a storage medium, and the method comprises the steps: controlling a camera on a standard robot to collect a first image of a preset visual mark, and determining a first pose of the visual mark under a camera coordinate system according to the first image; controlling a camera on the fault robot to collect a second image of the visual mark, and determining a second pose of the visual mark under the camera coordinate system according to the second image; determining the posture deviation of the second posture relative to the first posture according to the first posture and the second posture, and determining a posture norm according to the posture deviation; determining whether an initial attitude corresponding to the second attitude is taken as a target zero attitude according to the attitude norm; and if not, iteratively adjusting the initial attitude according to the attitude deviation and the initial attitude, so that the initial attitude after the iteration adjustment is finished is consistent with the standard zero attitude. And rapid recovery of the zero position of the robot is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot technology, and in particular to a robot zero-position recovery method, electronic equipment and storage medium. Background Art

[0002] In the process of industrial robot application, in order to improve the reliability and stability of industrial robot application, the zero point is generally set for the industrial robot. The zero point is the initial position of the robot operation model and the reference of the robot coordinate system. Without the zero point, the robot has no way to determine its own position. When the robot is running, the robot often collides with the workpiece or the environment, causing the mechanical position to shift, resulting in the loss of the zero position (zero position) (that is, the zero position has shifted). The loss of the zero point will affect the positioning accuracy of the robot end.

[0003] In the prior art, the robot needs to be returned to the factory for repair, but this is time-consuming and labor-intensive, so there is an urgent need for a method for quickly restoring the robot to zero position. Summary of the invention

[0004] The purpose of the present application is to provide a robot zero position recovery method, electronic device and storage medium to address the deficiencies in the above-mentioned prior art, so as to realize rapid recovery of the robot zero position.

[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a robot zero-position recovery method, the method comprising:

[0007] Controlling the standard robot to move to a preset reference position, and controlling the standard robot to be in a standard zero-position posture, wherein the standard robot is a robot without a zero-position error; controlling a camera on the standard robot to capture a first image of a preset visual mark, and determining a first position of the visual mark in a camera coordinate system according to the first image;

[0008] Control the faulty robot to move to the reference position, and control the faulty robot to be in an initial posture; control the camera on the faulty robot to capture a second image of the visual mark, and determine a second posture of the visual mark in the camera coordinate system according to the second image;

[0009] Determine, according to the first posture and the second posture, a posture deviation of the second posture relative to the first posture, and determine a posture norm according to the posture deviation;

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

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

[0012] Determining a posture deviation of the second posture relative to the first posture according to the first posture and the second posture, and determining a posture norm according to the posture 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 a pose difference corresponding to each pose parameter;

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

[0015] Optionally, determining the posture norm according to the posture difference corresponding to each posture parameter includes:

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

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

[0018] Optionally, determining whether to use the initial posture as a target zero-position posture according to the posture norm includes:

[0019] If the posture norm is less than or equal to a preset threshold, it is determined to use the initial posture corresponding to the second posture as the target zero-position posture.

[0020] Optionally, the iteratively adjusting the initial posture according to the posture deviation and the initial posture includes:

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

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

[0023] C. determining a current posture deviation of the third posture relative to the first posture according to the first posture and the third posture, and determining a current posture norm according to the current posture deviation;

[0024] D. Determine whether to use the new initial posture as the target zero-position posture according to the current posture norm. If so, end the iteration; if not, re-execute step A.

[0025] Optionally, adjusting the initial posture according to the posture deviation to obtain a new initial posture includes:

[0026] A difference matrix is ​​formed according to the posture difference corresponding to each posture parameter;

[0027] Transforming the difference matrix to obtain a transformation matrix, wherein the transformation matrix has the same coordinate system as the initial posture;

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

[0029] Optionally, determining the first pose of the visual marker in a camera coordinate system according to the first image includes:

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

[0031] The first two-dimensional coordinates are converted into a first pose in a camera coordinate system according to a parameter matrix of the camera.

[0032] Optionally, determining a second pose of the visual marker in a camera coordinate system according to the second image includes:

[0033] determining 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 a camera coordinate system according to a parameter matrix of the camera.

[0035] In a second aspect, an embodiment of the present application further provides a robot zero position recovery device, the device comprising:

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

[0037] A determination module, used for controlling the camera on the standard robot to collect a first image of a preset visual marker, and determining a first pose of the visual marker in a camera coordinate system according to the first image;

[0038] A control module, used for controlling the faulty robot to move to the reference position and controlling the faulty robot to be in an initial posture;

[0039] A determination module, used for controlling a camera on the faulty robot to capture a second image of the visual marker, and determining a second position and posture of the visual marker in a camera coordinate system according to the second image;

[0040] A determination module, configured to determine a posture deviation of the second posture relative to the first posture according to the first posture and the second posture, and determine a posture norm according to the posture deviation;

[0041] A determination module, used for determining whether to use the initial posture corresponding to the second posture as a target zero-position posture according to the posture norm;

[0042] The adjustment module is used for iteratively adjusting the initial posture according to the posture deviation and the initial posture, if not, so that the initial posture at the end of the iterative adjustment is consistent with the standard zero-position posture.

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

[0044] The determination 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 a pose difference corresponding to each pose parameter;

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

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

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

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

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

[0051] If the posture norm is less than or equal to a preset threshold, it is determined to use the initial posture corresponding to the second posture as the target zero-position posture.

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

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

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

[0055] C. determining a current posture deviation of the third posture relative to the first posture according to the first posture and the third posture, and determining a current posture norm according to the current posture deviation;

[0056] D. Determine whether to use the new initial posture as the target zero-position posture according to the current posture norm. If so, end the iteration; if not, re-execute step A.

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

[0058] A difference matrix is ​​formed according to the posture difference corresponding to each posture parameter;

[0059] Transforming the difference matrix to obtain a transformation matrix, wherein the transformation matrix has the same coordinate system as the initial posture;

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

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

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

[0063] The first two-dimensional coordinates are converted into a first pose in a camera coordinate system according to a parameter matrix of the camera.

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

[0065] determining 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 a camera coordinate system according to a parameter matrix of the camera.

[0067] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the application is running, 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 above.

[0068] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is read and executes the steps of the robot zero-position recovery method described in the first aspect above.

[0069] The beneficial effects of this application are:

[0070] The present application provides a robot zero-position recovery method, electronic device and storage medium, which first controls the camera on the standard robot to capture the first image of the preset visual mark, and determines the first pose of the visual mark in the camera coordinate system according to the first image, and controls the camera on the standard robot to capture the first image of the preset visual mark, and determines the first pose of the visual mark in the camera coordinate system according to the first image, and the first pose can be used as a reference pose, and then the faulty robot is controlled to move to the reference position, and the faulty robot is controlled to be in the initial pose, and the camera on the faulty robot is controlled to capture the second image of the visual mark, and determines the second pose of the visual mark in the camera coordinate system according to the second image, and determines the pose deviation of the second pose relative to the first pose according to the first pose and the second pose, and determines the pose norm according to the pose deviation, and determines whether to use the initial pose corresponding to the second pose as the target zero-position pose according to the pose norm. If not, it iteratively adjust the initial pose according to 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. By comparing the second pose of the visual mark collected by the faulty robot in the initial pose with the first pose of the visual mark collected by the standard robot in the 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 to make the iteratively adjusted initial pose consistent with the standard zero pose, thereby quickly restoring the zero position of the faulty robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0072] Figure 1 A schematic diagram of an exemplary scenario provided for an embodiment of the present application;

[0073] Figure 2 A schematic flow chart of a robot zero-position recovery method provided in an embodiment of the present application;

[0074] Figure 3 A schematic flow chart of another robot zero-position recovery method provided in an embodiment of the present application;

[0075] Figure 4 A schematic flow chart of another robot zero-position recovery method provided in an embodiment of the present application;

[0076] Figure 5 A schematic flow chart of another robot zero-position recovery method provided in an embodiment of the present application;

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

[0078] Figure 7 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0079] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0080] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

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

[0082] Optionally, the robot zero-position recovery method provided in the embodiment of the present application is applied to an electronic device, which may be a terminal device with computing and display capabilities, such as a mobile phone, a tablet computer, a laptop computer, a PDA, a desktop computer, or a server. Specifically, it may be applied to an application in a terminal device, such as an APP (application) of a mobile phone, an application system on a computer, etc.

[0083] The specific implementation process of the robot zero-position recovery provided in the embodiment of the present application is explained in detail below.

[0084] Figure 1An exemplary scenario diagram provided for an embodiment of the present application is as follows: Figure 1 As shown, the black solid line portion is a faulty robot, that is, a robot that has lost its zero position, and the black dotted line is a standard robot, that is, a robot with no error in its zero position. The robot zero position recovery method provided in the embodiment of the present application is used to restore the robot in the black solid line portion to the robot in the black dotted line portion, thereby restoring the lost zero position of the faulty robot. Figure 1 The right end opening frame portion in the figure is the robot end 3. The camera 1 is fixed to the robot end 3 through the connecting plate 2, and a preset visual marker is placed at the robot workstation. The visual marker is photographed by the camera to obtain an image of the visual marker.

[0085] Figure 2 The flowchart of a robot zero position recovery method provided in an embodiment of the present application is shown in FIG. 1 , wherein the execution subject of the method is the aforementioned electronic device. Figure 2 As shown, the method includes:

[0086] S101, controlling the standard robot to move to a preset reference position, and controlling the standard robot to be in a standard zero position posture.

[0087] The standard robot refers to a robot without zero position error. The preset reference position refers to a position where a preset visual mark can be photographed.

[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, wherein the reference position is, for example, the above-mentioned Figure 1 The dotted line position in the figure means that the standard zero-position posture of the robot is a posture without error, that is, Figure 1 The dotted line portion in is a schematic diagram of the standard robot at a preset reference position and a standard zero-position posture.

[0089] S102: Control a camera on the standard robot to capture a first image of a preset visual marker, and determine a first position of the visual marker in a camera coordinate system according to the first image.

[0090] Specifically, when the standard robot moves to the reference position and is in the standard zero position, the camera on the standard robot is controlled to shoot the visual mark on the workstation to obtain a first image of the visual mark, and a preset method is used based on the captured first image to obtain the first pose of the visual mark in the camera coordinate system, wherein the first pose can be represented by T0, for example, and the first pose is used as the visual reference pose.

[0091] S103, controlling the faulty robot to move to a reference position, and controlling the faulty robot to be in an initial posture.

[0092] Among them, the faulty robot refers to a robot with zero position loss, that is, a robot with zero position error.

[0093] Optionally, the faulty robot can be moved to the reference position where the standard robot previously photographed the visual mark, and the faulty robot can be adjusted to an initial posture through the assembly relationship between the components in the mechanical design of the robot, wherein the 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. Figure 1 The black solid line portion in the middle is a schematic diagram when the faulty robot moves to the reference position and is in the initial posture.

[0094] S104, controlling the camera on the faulty robot to capture a second image of the visual marker, and determining a second pose of the visual marker in the camera coordinate system according to 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 shoot the visual mark on the workstation to obtain a second image of the visual mark, and a preset method is used based on the captured second image to obtain a second posture of the visual mark in the camera coordinate system, wherein the second posture can be represented by T1, for example.

[0096] For example, a faulty robot Figure 1 The visual mark is photographed at the position of the black solid line in the figure to obtain a second image.

[0097] S105. Determine a posture deviation of the second posture relative to the first posture according to the first posture and the second posture, and determine a posture norm according to the posture deviation.

[0098] Optionally, since there is a difference between the robot posture when the first posture is obtained and the robot posture when the second posture is obtained, there is also a posture deviation between the first posture and the second posture. Then, the first posture is used as a reference posture, the posture deviation between the second posture and the first posture is calculated, and the posture norm is determined using a preset method according to the calculated posture deviation, and the posture norm also refers to the posture norm of the second posture relative to the first posture.

[0099] S106. Determine whether to use the initial posture corresponding to the second posture as the target zero-position posture according to the posture norm.

[0100] The initial posture corresponding to the second posture refers to the initial posture of the robot when the second posture is captured.

[0101] Specifically, the posture norm is a constant value, and a preset method can be used to determine whether to use the initial posture corresponding to the second posture as the target zero-position posture according to the posture norm and a preset threshold.

[0102] Optionally, if it is determined not to use the initial posture corresponding to the second posture as the target zero posture, the following S107 is executed; otherwise, the following S108 is executed.

[0103] S107, iteratively adjusting the initial posture according to the posture deviation and the initial posture, so that the initial posture at the end of the iterative adjustment is consistent with the standard zero-position posture.

[0104] Specifically, the initial posture of the robot can be iteratively adjusted based on the posture deviation between the second posture and the first posture and the initial posture of the robot when the second posture is photographed, so that the initial posture at the end of the iterative adjustment is consistent with the standard zero-position posture of the standard robot, that is, the initial posture is iteratively adjusted until the initial posture is restored to the standard zero-position posture.

[0105] Optionally, the iteratively adjusted initial posture obtained after multiple iterations may not be consistent with the standard zero-position posture. In this case, the iteration end condition is set to end the iteration when a preset number of iterations is reached, and recovery failure is displayed.

[0106] S108, determine the initial posture corresponding to the second posture as the target zero-position posture and end.

[0107] In this embodiment, the camera on the standard robot is first controlled to capture the first image of the preset visual mark, and the first pose of the visual mark in the camera coordinate system is determined according to the first image, and the camera on the standard robot is controlled to capture the first image of the preset visual mark, and the first pose of the visual mark in the camera coordinate system is determined according to the first image, and the first pose can be used as a reference pose, and then the faulty robot is controlled to move to the reference position, and the faulty robot is controlled to be in the initial pose, and the camera on the faulty robot is controlled to capture the second image of the visual mark, and the second pose of the visual mark in the camera coordinate system is determined according to the second image, and the pose deviation of the second pose relative to the first pose is determined according to the first pose and the second pose, and the pose norm is determined according to the pose deviation, and whether the initial pose corresponding to the second pose is used as the target zero-position pose is determined according to the pose norm. If not, the initial pose is iteratively adjusted according to 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. By comparing the second pose of the visual mark collected by the faulty robot in the initial pose with the first pose of the visual mark collected by the standard robot in the 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 to make the iteratively adjusted initial pose consistent with the standard zero pose, thereby quickly restoring the zero position of the faulty robot.

[0108] Figure 3 A flowchart of another robot zero position recovery method provided in an embodiment of the present application is shown as follows: Figure 3 As shown, in the above S105, determining the posture deviation of the second posture relative to the first posture according to the first posture and the second posture, and determining the posture norm according to the posture 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 corresponding to each pose parameter.

[0110] The first pose includes a first pose matrix, which includes translation parameters and rotation parameters, and the second pose includes a second pose matrix, which also includes translation parameters and rotation parameters. The pose parameters in the first pose matrix can be obtained by using T0 i,j , the pose parameters in the second pose matrix can be used, 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 corresponding pose parameter in the second pose matrix is ​​T1 i,j , then the calculated pose parameter is T0 i,jWith the pose parameter T1 i,j The difference between them is the pose parameter T0. i,j With the pose parameter T1 i,j The corresponding attitude difference, the calculated attitude difference is T1 i,j -T0 i,j .

[0112] For example, the parameter T0 at position (1,1) in the first pose matrix is 1,1 and the parameter T1 at the position (1,1) in the second pose matrix 1,1 The difference between them is T1 1,1 -T0 1,1 ; Parameter T0 at position (1,2) in the first pose matrix 1,2 and 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 ; Parameter T0 at position (2,1) in the first pose matrix 2,1 and 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 according to 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 A flowchart of another robot zero position recovery method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, in the above S202, determining the attitude norm according to the attitude difference corresponding to each attitude parameter may include:

[0116] S301. Calculate the square sum of the posture differences corresponding to all posture parameters to obtain a first parameter.

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

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

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

[0120]

[0121] Among them, ∥T1-T0∥ F is the attitude norm, T0 i,j is the pose parameter in the first pose matrix, T1 i,j is the corresponding pose parameter in the second pose matrix.

[0122] Optionally, determining whether to use the initial posture corresponding to the second posture as the target zero-position posture according to the posture norm in S106 may include:

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

[0124] Among them, if the posture norm is less than or equal to the preset threshold, it means that the initial posture corresponding to the second posture is consistent with the standard zero-position posture.

[0125] Figure 5 A flowchart of another robot zero position recovery method provided in an embodiment of the present application is shown as follows: Figure 5 As shown, in the above S107, iteratively adjusting the initial posture according to the posture deviation and the initial posture so that the initial posture at the end of the iterative adjustment is consistent with the standard zero-position posture may include:

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

[0127] Among them, the posture deviation can refer to the posture difference corresponding to each posture parameter mentioned above.

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

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

[0130] Specifically, when a new initial posture is obtained, the faulty robot controls the camera on the faulty robot to shoot the visual mark in the new initial posture to obtain a third image, and the third image is collected by the faulty robot in the new initial posture.

[0131] S403: Determine a current posture deviation of the third posture relative to the first posture according to the first posture and the third posture, and determine a current posture norm according to the current posture deviation.

[0132] It is worth noting that the process of determining the current posture deviation of the third posture relative to the first posture is the same as the process of determining the posture deviation of the second posture relative to the first posture in the above description, which is not repeated here. At the same time, the process of determining the current posture norm is also the same as the process of determining the posture norm of the second posture relative to the first posture in the above description, which is not repeated here.

[0133] S404: Determine whether to use the new initial posture as the target zero-position posture according to the current posture norm.

[0134] Optionally, if the current posture norm is less than or equal to a preset threshold, the new initial posture is determined to be the target zero-position posture, which means that the new initial posture is consistent with the standard zero-position posture, and the following S405 is executed and the iteration ends; if not, the following S406 is executed.

[0135] S405: Use the new initial posture as the target zero-position posture.

[0136] S406: Determine whether the number of iterations reaches a preset number.

[0137] If yes, then the process ends; if no, then the process returns to step S401, specifically, the initial posture is adjusted according to the current posture deviation and the initial posture obtained in S403 to obtain a new initial posture.

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

[0139] Optionally, in S401, adjusting the initial posture according to the posture deviation to obtain a new initial posture may include:

[0140] Specifically, a difference matrix can be formed according to the posture difference corresponding to each posture parameter. The difference matrix is ​​transformed to obtain a transformation matrix. Since the difference matrix is ​​the difference matrix of the visual marker under the camera coordinate, it is necessary to perform a coordinate system transformation on the difference matrix so that the transformed transformation matrix is ​​the same as the coordinate system of the initial posture. Then, the transformation matrix is ​​multiplied by the matrix corresponding to the initial posture to obtain a new initial posture.

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

[0142] Specifically, the first two-dimensional coordinates of the visual mark in the first image can be determined first. Specifically, the first image can be identified and analyzed to obtain the first two-dimensional coordinates of the visual mark in the first image. Then, the first two-dimensional coordinates are converted into the first position in the camera coordinate system according to the parameter matrix of the camera.

[0143] Optionally, determining the second position and posture of the visual marker in the camera coordinate system according to the second image in S104 may include:

[0144] Specifically, the second two-dimensional coordinates of the visual mark in the second image can be determined first. Specifically, the second image can be identified and analyzed to obtain the second two-dimensional coordinates of the visual mark in the second image. Then, the second two-dimensional coordinates are converted into the second posture in the camera coordinate system according to the parameter matrix of the camera.

[0145] Figure 6 A schematic diagram of a robot zero position recovery method provided in an embodiment of the present application, such as Figure 6 As shown, the device comprises:

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

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

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

[0149] A determination module 502 is used to control a camera on the faulty robot to capture a second image of the visual marker, and determine a second position and posture of the visual marker in a camera coordinate system according to the second image;

[0150] A determination module 502, configured to determine a posture deviation of the second posture relative to the first posture according to the first posture and the second posture, and determine a posture norm according to the posture deviation;

[0151] A determination module 502, configured to determine whether to use the initial posture corresponding to the second posture as a target zero posture according to the posture norm;

[0152] The adjustment module 503 is used for iteratively adjusting the initial posture according to the posture deviation and the initial posture if no, so that the initial posture at the end of the iterative adjustment is consistent with the standard zero-position posture.

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

[0154] The determination 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 a pose difference corresponding to each pose parameter;

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

[0157] Optionally, the determining module 502 is specifically configured to:

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

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

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

[0161] If the posture norm is less than or equal to a preset threshold, it is determined to use the initial posture corresponding to the second posture as the target zero-position posture.

[0162] Optionally, the adjustment module 503 is specifically configured to:

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

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

[0165] C. determining a current posture deviation of the third posture relative to the first posture according to the first posture and the third posture, and determining a current posture norm according to the current posture deviation;

[0166] D. Determine whether to use the new initial posture as the target zero-position posture according to the current posture norm. If so, end the iteration; if not, re-execute step A.

[0167] Optionally, the determining module 502 is specifically configured to:

[0168] A difference matrix is ​​formed according to the posture difference corresponding to each posture parameter;

[0169] Transforming the difference matrix to obtain a transformation matrix, wherein the transformation matrix has the same coordinate system as the initial posture;

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

[0171] Optionally, the determining module 502 is specifically configured to:

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

[0173] The first two-dimensional coordinates are converted into a first pose in a camera coordinate system according to a parameter matrix of the camera.

[0174] Optionally, the determining module 502 is specifically configured to:

[0175] determining 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 a camera coordinate system according to a parameter matrix of the camera.

[0177] Figure 7 FIG. 6 is a structural block diagram of an electronic device 600 provided in an embodiment of the present application. 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 communicates with the memory 602 through the bus 603. When the machine-readable instructions are executed by the processor 601, the method steps in the above method embodiment are performed.

[0179] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps in the above-mentioned robot zero-position recovery method embodiment are executed.

[0180] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0181] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.

[0182] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A robot zero position recovery method, characterized in that: The method comprises: Controlling the standard robot to move to a preset reference position, and controlling the standard robot to be in a standard zero-position posture, wherein the standard robot is a robot without a zero-position error; controlling a camera on the standard robot to capture a first image of a preset visual mark, and determining a first position of the visual mark in a camera coordinate system according to the first image; Control the faulty robot to move to the reference position, and control the faulty robot to be in an initial posture; control the camera on the faulty robot to capture a second image of the visual mark, and determine a second posture of the visual mark in the camera coordinate system according to the second image; Determine, according to the first posture and the second posture, a posture deviation of the second posture relative to the first posture, and determine a posture norm according to the posture deviation; Determine whether to use the initial posture corresponding to the second posture as the target zero-position posture according to the posture norm; if not, iteratively adjust the initial posture according to the posture deviation and the initial posture so that the initial posture at the end of the iterative adjustment is consistent with the standard zero-position posture.

2. The robot zero position recovery method according to claim 1, characterized in that: The first pose comprises a first pose matrix, and the second pose comprises a second pose matrix; Determining a posture deviation of the second posture relative to the first posture according to the first posture and the second posture, and determining a posture norm according to the posture 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 a pose difference corresponding to each pose parameter; The attitude norm is determined according to 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 according to the attitude difference corresponding to each attitude parameter includes: Calculate the sum of squares of the posture differences corresponding to all posture parameters to obtain the first parameter; The root mean square of the first parameter is used as the posture norm.

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

5. The robot zero position recovery method according to claim 2, characterized in that: The iteratively adjusting the initial posture according to the posture deviation and the initial posture comprises: A. adjusting the initial posture according to the posture deviation to obtain a new initial posture; B. controlling a camera on the faulty robot to capture a third image of the visual marker, and determining a third pose of the visual marker in the camera coordinate system according to the third image; C. determining a current posture deviation of the third posture relative to the first posture according to the first posture and the third posture, and determining a current posture norm according to the current posture deviation; D. Determine whether to use the new initial posture as the target zero-position posture according to the current posture norm. If so, end the iteration; if not, re-execute step A.

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

7. The robot zero position recovery method according to claim 1, characterized in that: The determining, according to the first image, a first pose of the visual marker in a camera coordinate system comprises: determining first two-dimensional coordinates of the visual marker in the first image; The first two-dimensional coordinates are converted into a first pose in a camera coordinate system according to a parameter matrix of the camera.

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

9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the steps of the robot zero-position recovery method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the robot zero-position recovery method according to any one of claims 1 to 8 are executed.

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

  • Visual application-based calibration and calibration method for industrial robot

    CN118003316A

  • Industrial robot with zero calibration block

    CN210633670U

  • Horizontal articulated robot, and calibration method of the horizontal articulated robot

    JP2013006242A