Mechanical arm control method and device, robot and storage medium
By calibrating and adjusting control parameters based on inherent joint errors, the precision of mechanical arms is improved, addressing the decline in control precision due to wear and tear, ensuring accurate positioning and functionality.
Patent Information
- Application Number
- CN202510407473.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-15
AI Technical Summary
The control accuracy of the robot arm is affected by the aging and wear of the device, resulting in attenuation of the control capability. In the prior art, the error calibration accuracy is poor.
By calibrating the inherent errors of each joint of the robot arm, adjusting the control parameters of the joints, and generating adjusted control parameters to control the motor movement, so that the end of the robot arm reaches the target position accurately.
Improves the control accuracy of the robot arm, ensures the accuracy of the end at the target position, and extends the service life of the robot arm.
Smart Images

Figure CN120307279A_ABST
Abstract
Description
Technical Field
[0001] This application relates to, but is not limited to, the field of manipulator control, and particularly relates to a control method, device, robot, and storage medium for a manipulator. Background Art
[0002] Currently, for the mechanical structure of a manipulator, especially a low-cost manipulator, the control ability of the manipulator will decay due to reasons such as device aging, wear, and possible bumps during use, thereby affecting the function and ending the life cycle in advance.
[0003] However, in related technologies, the accuracy of error calibration for a manipulator is poor, resulting in poor control accuracy of the manipulator. Summary of the Invention
[0004] In view of this, embodiments of this application at least provide a control method, device, robot, and storage medium for a manipulator, which can improve the control accuracy of the manipulator.
[0005] The technical solution of the embodiments of this application is implemented as follows:
[0006] In a first aspect, embodiments of this application provide a control method for a manipulator. The manipulator is disposed in a robot, and the manipulator has one joint or at least two joints, including:
[0007] Generating control parameters for each joint of the manipulator according to a received control instruction for the manipulator;
[0008] Adjusting the control parameters of each joint according to the inherent error of each joint to obtain the adjusted control parameters of each joint; wherein, the inherent error of each joint is obtained by calibrating the error of each joint;
[0009] Controlling the motors of each joint to work by using the adjusted control parameters of each joint so that the end of the manipulator moves to a target position.
[0010] In a second aspect, embodiments of this application provide a control device for a manipulator. The manipulator is disposed in a robot, and the manipulator has one joint or at least two joints, including:
[0011] A generating module, configured to generate control parameters for each joint of the manipulator according to a received control instruction for the manipulator;
[0012] An adjusting module, configured to adjust the control parameters of each joint according to the inherent error of each joint to obtain the adjusted control parameters of each joint; wherein, the inherent error of each joint is obtained by calibrating the error of each joint;
[0013] A control module, configured to control the motors of the respective joints to operate by using the adjusted control parameters of the respective joints, so that the end of the robotic arm moves to a target position.
[0014] In a third aspect, an embodiment of the present application provides a robot, including a robotic arm having one joint or at least two joints, a memory, and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, some or all of the steps in the above method are implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, some or all of the steps in the above method are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program or instruction. When the computer program or instruction is executed by a processor, some or all of the steps in the above method are implemented.
[0017] An embodiment of the present application provides a control method, device, robot, and storage medium for a robotic arm. The robotic arm is disposed in the robot and has one joint or at least two joints, including: generating control parameters for the respective joints of the robotic arm according to a received control instruction for the robotic arm; adjusting the control parameters of the respective joints according to the inherent errors of the respective joints to obtain the adjusted control parameters of the respective joints; and controlling the motors of the respective joints to operate by using the adjusted control parameters of the respective joints, so that the end of the robotic arm moves to a target position. The inherent error of each joint is obtained by calibrating the error of each joint. That is to say, in the embodiment of the present application, in the control of the robotic arm, after generating the control parameters of the respective joints of the robotic arm, it is necessary to use the calibrated inherent errors of the respective joints to adjust the control parameters of the respective joints, so as to control the motors of the respective joints by using the adjusted control parameters of the respective joints, so that the end of the robotic arm moves to the target position where it is desired to move under the action of the adjusted control parameters. In this way, through the calibration of each joint, the control parameters of each joint can be adjusted, thereby improving the control accuracy of the robotic arm. Description of the Drawings
[0018] Figure 1 is a schematic flowchart of an optional control method for a robotic arm provided by an embodiment of the present application;
[0019] Figure 2 is a schematic flowchart of an example of an optional control method for a robotic arm provided by an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of an optional random error provided by an embodiment of the present application;
[0021] Figure 4 A schematic diagram of an optional multi - robotic arm provided by an embodiment of the present application;
[0022] Figure 5 A schematic diagram of an optional target joint provided by an embodiment of the present application;
[0023] Figure 6 A schematic structural diagram of a control device for a robotic arm provided by an embodiment of the present application;
[0024] Figure 7 A schematic structural diagram of a robot provided by an embodiment of the present application. Detailed implementation manners
[0025] In order to make the technical solutions and advantages of the present application clearer, the technical solutions of the present application will be further elaborated in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.
[0026] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. The terms "first / second / third" involved are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0028] Aiming at the technical problem that the accuracy of a robot with multi - robotic arms becomes poor due to the aggravation of device aging and wear, an embodiment of the present application provides a control method for a robotic arm. Figure 1 A schematic flow diagram of a control method for a robotic arm provided by an embodiment of the present application, as Figure 1 shown, the control method for the robotic arm may include:
[0029] S101: Generate control parameters for each joint of the robotic arm according to the received control instruction for the robotic arm;
[0030] The control method of the robotic arm provided in the embodiments of the present application can be applied to a control device that is independent of the robotic arm and has the ability to control the robotic arm. Of course, it can also be applied to a control device integrated with the robotic arm, such as a robot with a robotic arm. Here, the embodiments of the present application do not make specific limitations in this regard.
[0031] Among them, the above-mentioned robotic arm is arranged in a robot and has one joint or at least two joints. Among them, each joint has a motor for controlling the arm corresponding to the joint.
[0032] Taking the robot as an example, after the robot receives a control instruction for the robotic arm, it can generate control parameters for each joint of the robotic arm according to the control instruction. Among them, the control parameter is mainly the rotation angle of the motor of each joint. After the robot determines the rotation angles of the motors of each joint, it rotates according to the rotation angles, so as to realize the movement of the end of the robotic arm.
[0033] S102: Adjust the control parameters of each joint according to the inherent error of each joint to obtain the adjusted control parameters of each joint;
[0034] Due to the aging and wear of the robotic arm itself, if the robot directly uses the above-mentioned control parameters of each joint to control the motors of each joint, it cannot move the end of the robotic arm to the desired target position. Therefore, in S102, the control parameters of each joint can be adjusted according to the pre-calibrated inherent error of each joint. Among them, the inherent error of each joint is used to adjust the control parameter of each joint respectively, so as to obtain the adjusted control parameters of each joint.
[0035] Among them, the inherent error of each joint is obtained by calibrating the error of each joint. That is to say, the inherent error of each above-mentioned joint is obtained by calibrating the error of each joint. In this way, the inherent error of each joint can be obtained separately by calibration.
[0036] For example, for the last joint of the robotic arm, the control parameter of this joint is to rotate 30 degrees in the direction of A. After adjustment, the adjusted control parameter can be to rotate 32 degrees in the direction of A. Then, at this time, the motor corresponding to this joint is controlled according to the adjusted control parameter.
[0037] S103: Control the motors of each joint to work by using the adjusted control parameters of each joint, so that the end of the robotic arm moves to the target position.
[0038] After obtaining the adjusted control parameters of each joint through the above S102, the robot can control the motors of each joint according to the adjusted control parameters of each joint, so as to move the end of the robotic arm to the desired target position.
[0039] That is to say, in the embodiments of the present application, through the error calibration of each joint, during the movement of the robotic arm, the control parameters of each joint can be adjusted. Thus, by using the adjusted control parameters of each joint, the end of the robotic arm can be moved to the desired position. In this way, the control accuracy of the robotic arm is further improved, which is beneficial to accurately performing tasks such as grasping or cleaning with the robotic arm.
[0040] In an alternative embodiment, in order to obtain the inherent errors of each joint, the above method may further include:
[0041] Controlling the target joint of the robotic arm to work to obtain the actual position of the end of the robotic arm;
[0042] Obtaining the motion model of the target joint from the preset motion model of the robotic arm;
[0043] Optimizing the motion model of the target joint based on the actual position to obtain the inherent error of the target joint.
[0044] It can be understood that the robot controls the target joint of the robotic arm to work. Here, the target joint can be any joint in the robotic arm. In practical applications, the joints of the robotic arm can be traversed in the connection order between the arms, so that the inherent error of each joint can be calibrated.
[0045] For the target joint, the robot controls the target joint to work. At this time, except for the target joint in the robotic arm, other joints remain stationary, so that the actual position of the end of the robotic arm can be obtained. Here, a sensor, such as a monocular sensor or a binocular sensor, can be set at the end of the robotic arm to obtain the actual position of the end through the sensor.
[0046] It should be noted that the above robot controlling the target joint to work can be that the robot controls the target joint to make the arm corresponding to the target joint move back and forth periodically to obtain the actual position of the end of the robotic arm. Here, the average value of all the actual positions obtained by the periodic motion can be taken, or the median selected from them can also be used as the actual position. Here, the embodiments of the present application do not make specific limitations on this.
[0047] In the calibration of the target joint, in addition to controlling the target joint to work to obtain the actual position of the end, it is also necessary to obtain the motion model of the target joint from the preset motion model of the robotic arm, so as to optimize the motion model of the target joint based on the actual position and obtain the inherent error of the target joint.
[0048] It should be noted that the motion model of each joint is stored in the motion model of the robotic arm. Among them, the motion model of the target joint is: the relationship between the inherent error of the target joint under the motion of the target joint and the position of the end of the robotic arm. That is to say, in the motion model of each joint, the inherent error of the target joint is used as the independent variable, and the position of the end of the robotic arm is used as the dependent variable. Of course, some constants and other parameters can also be included in this model. Here, the embodiments of the present application do not make specific limitations on this.
[0049] In this way, by optimizing the motion model of the target joint based on the actual position to obtain the inherent error of the target joint, the inherent error of each joint can be obtained, and only one joint is calibrated, which can improve the accuracy of the inherent error of each joint.
[0050] Furthermore, in order to construct the motion model of the robotic arm, in an alternative embodiment, the above method may further include:
[0051] Determine the relationship between the inherent error of each joint and the position of the end of the robotic arm;
[0052] Use the relationship between the inherent error of each joint and the position of the end of the robotic arm to construct the motion model of the robotic arm.
[0053] It can be understood that the relationship between the inherent error of each joint and the position of the end of the robotic arm can be determined first, and then the motion model of the robotic arm can be constructed using this relationship.
[0054] Among them, the position of the end of the robotic arm is: the position of the end of the arm corresponding to each joint of the robotic arm in the first joint coordinate system. That is to say, the relationship between the position of the end of the arm corresponding to each joint of the robotic arm in the joint coordinate system corresponding to the first arm and the inherent error of each joint is used as the motion model of each joint and added to the motion model of the robotic arm.
[0055] Since the motion model of each joint is: the relationship between the position of the end of the arm corresponding to each joint of the robotic arm in the joint coordinate system corresponding to the first arm and the inherent error of each joint, then, through the motion model of each joint, the error of each joint and its influence on the position of the end of the arm corresponding to each joint of the robotic arm in the joint coordinate system corresponding to the first arm can be known.
[0056] In this way, the influence of the error of each joint on the end of the arm of each joint is unified into a fixed coordinate system, making the calibration standard of the inherent error of each joint unified, which helps to adjust the control parameters of each joint during the operation of the robotic arm.
[0057] Further, in order to obtain the relationship between the inherent error of each joint and the position of the end of the robotic arm, in an alternative embodiment, the following formula can be used to determine the relationship between the inherent error of each joint and the position of the end of the robotic arm:
[0058]
[0059]
[0060] where, represents the position of the end of the arm controlled by the m joints when the m-th joint moves in the first joint coordinate system; P m+1 is the position coordinate of the end of the arm controlled by the m-th joint in the m-th joint coordinate system, is the rotation matrix corresponding to the desired angle of the m-th joint; is the inherent error of the m-th joint; where m is a positive integer greater than or equal to 2.
[0061] It can be understood that through the above formula, the relationship between the inherent error of each joint and the position of the end of the robotic arm can be obtained, enabling the establishment of a motion model between the inherent error of each joint and the end of the robotic arm, which helps to determine the inherent error of each joint for adjusting the control parameters of the robotic arm.
[0062] Further, in order to optimize the motion model of each joint, in an alternative embodiment, based on the actual position, optimizing the motion model of the target joint to obtain the inherent error of the target joint may include:
[0063] Taking the minimization of the error between the motion model of the target joint and the actual position as the goal, optimizing the motion model of the target joint to obtain the optimized motion model of the target joint, and determining the inherent error of the target joint from the optimized motion model of the target joint.
[0064] It can be understood that after knowing the motion model of the target joint and the actual position of the end of the robotic arm under the movement of the target joint, an optimization algorithm can be called to minimize the difference between the motion model of the target joint and the actual position of the end of the robotic arm under the movement of the target joint, so as to optimize the motion model of the target joint. In this way, the optimized motion model of the target joint can be obtained.
[0065] Since the independent variable included in this model is the inherent error of the target joint, here, after obtaining the optimized motion model of the target joint, the inherent error of the target joint can be determined from the optimized motion model of the target joint.
[0066] It should be noted that, in the above motion model of the target joint, in addition to including the inherent error of the target joint, it may also include the rotation matrix corresponding to the target joint, the position of the origin of the coordinate system of the target joint, etc. Here, the embodiments of the present application do not make specific limitations on this.
[0067] Among them, the above-mentioned optimization algorithm of the Levenberg-Marquardt method (LM) can be used to optimize the motion model of the target joint, and the convex optimization algorithm can also be used to optimize the motion model of the target joint. Here, the embodiments of the present application do not make specific limitations on this.
[0068] In this way, through the above optimization method, the obtained inherent error of the target joint is more accurate, thereby further improving the control accuracy of the robotic arm.
[0069] Further, in order to obtain the error between the motion model of the target joint and the actual position, in an optional embodiment, the following formula can be used to determine the error between the motion model of the target joint and the actual position:
[0070]
[0071] Among them, represents the actual position of the end of the robotic arm when the target joint moves; represents the position of the end of the robotic arm obtained under the motion model of the target joint movement; represents the error between the motion model of the target joint and the actual position; among them, the target joint is the i-th joint of the robotic arm; where i is a positive integer between greater than 1 and less than or equal to m.
[0072] It can be understood that through the above formula, the error between the motion model of the target joint and the actual position can be obtained, so that the error between the motion model and the actual position of each joint can be obtained, which helps to determine the inherent error of each joint for adjusting the control parameters of the robotic arm.
[0073] In order to calibrate the inherent error of the robotic arm at an appropriate time, in an optional embodiment, the above method may further include:
[0074] During the operation of the robotic arm, obtain the random error of the robotic arm;
[0075] When the random error meets the preset conditions, calibrate the errors of each joint of the robotic arm to obtain the inherent error of each joint.
[0076] Understandably, during the operation of the robotic arm, first obtain the random error of the robotic arm, and then determine whether the random error of the robotic arm meets the preset conditions. Only when the random error meets the preset conditions, perform error calibration on each joint of the robotic arm to obtain the inherent error of each joint.
[0077] When the random error does not meet the preset conditions, do not perform error calibration on each joint of the robotic arm, and use the calibrated inherent error to adjust the control parameters.
[0078] That is to say, in the calibration of the inherent error of the robotic arm, it is necessary to check whether the random error of the robotic arm meets the preset conditions. In this way, by setting the preset conditions, selectively calibrate the inherent error, while improving the control accuracy of the robotic arm, avoiding power consumption and resource waste caused by frequent calibration.
[0079] In order to achieve all-round error adjustment and compensation for the robotic arm, in an alternative embodiment, the above method may further include:
[0080] Use the random error to adjust the adjusted control parameters of each joint to update the adjusted control parameters of each joint.
[0081] Understandably, during the operation of the robotic arm, after obtaining the random error of the robotic arm, in addition to using the inherent error of each joint to adjust the control parameters of each joint, it is also necessary to use the random error to adjust the adjusted control parameters of each joint. Here, when using the random error to adjust the adjusted control parameters of each joint, the random error can be used to adjust one of the adjusted control parameters, multiple adjusted control parameters, or all of the adjusted control parameters of each joint. Here, the embodiments of the present application do not make specific limitations in this regard.
[0082] In this way, not only use the inherent error of each joint to adjust the control parameters of each joint, but also use the random error to adjust the adjusted control parameters of each joint, so that the obtained adjusted control parameters of each joint can move the end of the robotic arm to the target position more accurately, further improving the control accuracy of the robotic arm.
[0083] In order to determine the random error of the robotic arm, in an alternative embodiment, during the operation of the robotic arm, obtaining the random error of the robotic arm may include:
[0084] During the operation of the robotic arm, obtain the first position of the end of the robotic arm through the sensor on the end of the robotic arm;
[0085] Determine the difference between the first position and the second position as the random error.
[0086] Understandably, during the operation of the robotic arm, since a sensor is provided at the end of the robotic arm, the position of the end of the robotic arm, i.e., the first position, can be known through this sensor. The above sensor can be a monocular / binocular sensor, and Visual Simultaneous Localization and Mapping (VSLAM) is used to estimate the first position.
[0087] Then, the difference between the first position and the second position is used as the random error, where the second position is the position that the robotic arm is expected to reach during operation. That is to say, the difference between the actual position of the end of the robotic arm obtained and the position that the robotic arm is expected to reach during operation is calculated. The obtained difference can include distance and direction, and it is used as the random error.
[0088] In this way, by determining the random error during the operation of the robotic arm, it can be judged whether the robotic arm needs to be calibrated for inherent errors during the operation of the robotic arm, without specifically obtaining the random error through the control of the robotic arm, improving the calibration efficiency of the errors.
[0089] Furthermore, in order to achieve the calibration of the inherent errors, in an optional embodiment, when the random error meets a preset condition, error calibration is performed on each joint of the robotic arm to obtain the inherent errors of each joint, which may include:
[0090] When the random error is greater than a preset threshold, error calibration is performed on each joint of the robotic arm to obtain the inherent errors of each joint.
[0091] Understandably, the random error is compared with the preset threshold. Here, the preset threshold can be a preset distance, or a preset angle. Of course, it can also include both a preset distance and a preset angle. Here, the embodiments of the present application do not make specific limitations in this regard.
[0092] If it is a preset distance, then when the distance in the random error is greater than the preset distance, error calibration of each joint of the robotic arm is triggered, thereby calibrating the inherent errors of each joint. If it is a preset angle, then when the angle corresponding to the direction in the random error is greater than the preset angle, error calibration of each joint of the robotic arm is triggered, thereby calibrating the inherent errors of each joint. If it includes both a preset distance and a preset angle, then when the distance in the random error is greater than the preset distance and the angle corresponding to the direction in the random error is greater than the preset angle, error calibration of each joint of the robotic arm is triggered, thereby calibrating the inherent errors of each joint.
[0093] In this way, by having the distance in the random error greater than a preset distance, or the angle corresponding to the random error greater than a preset angle, the calibration of the inherent error is performed, making the calibration of the inherent error more effective and saving the power consumption of the robot and the rational utilization of resources.
[0094] In addition, to implement the calibration of the inherent error, in an optional embodiment, when the random error meets the preset conditions, error calibration is performed on each joint of the robotic arm to obtain the inherent error of each joint, which may include:
[0095] When the number of times the random error is greater than a preset threshold exceeds a preset number of times, error calibration is performed on each joint of the robotic arm to obtain the inherent error of each joint;
[0096] When the duration for which the random error is greater than a preset threshold exceeds a preset duration, error calibration is performed on each joint of the robotic arm to obtain the inherent error of each joint.
[0097] It can be understood that for the case where the random error is greater than a preset threshold, it is necessary to count the number of times the random error is greater than the preset threshold. When this number exceeds the preset number of times, it indicates that the inherent error of the robotic arm has changed significantly and needs to be recalibrated to update the inherent error. Therefore, at this time, error calibration is performed on each joint of the robotic arm to obtain the inherent error of each joint. When this number does not exceed the preset number of times, the original inherent error can be maintained.
[0098] In addition, for the case where the random error is greater than a preset threshold, it is also possible to count the duration for which the random error is greater than the preset threshold. When this duration exceeds the preset duration, it indicates that the inherent error of the robotic arm has changed significantly and needs to be recalibrated to update the inherent error. Therefore, at this time, error calibration is performed on each joint of the robotic arm to obtain the inherent error of each joint. When this duration does not exceed the preset duration, the original inherent error can be maintained.
[0099] In this way, by comparing the number of times the random error is greater than the preset threshold with the preset number of times, and comparing the duration for which the random error is greater than the preset threshold with the preset duration, the calibration of the inherent error is performed only when at least one of them exists, making the calibration of the inherent error more effective and saving the power consumption of the robot and the rational utilization of resources.
[0100] Next, an example is given to describe the control method of the robotic arm described in one or more of the above embodiments.
[0101] Currently, for the mechanical structure of the robotic arm, especially for low-cost robotic arms, the control ability of the robotic arm will decay due to reasons such as device aging, wear, and possible bumps during use, thereby affecting the function and prematurely ending the life cycle.
[0102] This example presents a solution for online calibration of a robotic arm and end-effector precision correction in a non-standard environment. By using a sensor mounted at the end of the robotic arm, the non-random errors in the robotic arm control are calibrated and corrected, thereby maintaining a high-precision end-effector control ability throughout the life cycle of the robotic arm.
[0103] Among them, this example has no specific requirements for the environment, as long as there are objects in the environment that can be correctly sensed by the sensor mounted on the robotic arm. It has the advantages of low scene requirements, simple operations, high precision, and high reliability, and can complete the calibration and calibration operations without the user noticing.
[0104] In this example, for a multi-arm robotic arm with motor control, an environmental perception sensor needs to be mounted at the end of the robotic arm. For example, a depth sensor, a monocular / binocular sensor, etc. The core of this example lies in calibrating the inherent errors of the joint motors connecting the robotic arm, thereby achieving end-effector precision correction. This example divides the calibrated joint motor control errors into two parts: inherent errors and random errors.
[0105] Among them, the inherent error refers to the fixed control error generated by the robotic arm due to various reasons during its life cycle, and the random error refers to the random error generated during each operation of the robotic arm. The inherent error acts on the control result as a fixed calibration value during each operation, while the random error is estimated and corrected in real time during the normal operation of the robotic arm. When the estimated random error meets some conditions, the random error will be estimated as an inherent error and solidified to improve the robustness of precision correction.
[0106] Figure 2 It is a schematic flow diagram of an example of a control method for a robotic arm provided in an embodiment of this application. As Figure 2 shown, the control method of the robotic arm may include:
[0107] S201: The robotic arm starts working;
[0108] S202: Estimate the random error;
[0109] S203: Read the fixed calibration value and the robotic arm works;
[0110] S204: End the work;
[0111] S205: Determine whether the random error can be solidified? If yes, execute S206;
[0112] S206: Online calibration;
[0113] S207: Fix the calibration value.
[0114] Among them, the above fixed calibration value is equivalent to the above inherent error.
[0115] The content of the two parts, "estimating random error" and "online calibration", will be introduced in detail below.
[0116] Regarding the estimation of random error:
[0117] To estimate the random error, it is necessary to first obtain the real-time target trajectory, which comes from the control module of the robotic arm. Secondly, it is necessary to estimate the end motion trajectory in real time. There can be different options depending on the sensors installed. Taking a monocular camera as an example, VSLAM can be used to estimate the motion trajectory of the monocular camera, and by superimposing the installation pose information of the factory-calibrated monocular camera and the end of the robotic arm, the actual motion trajectory of the end can be obtained. Figure 3 As an optional schematic diagram of random error provided by an embodiment of the present application, as Figure 3 shown, let P represent the position of the end of the robotic arm, then P target represents the position where the control module expects the end of the robotic arm to move to, and P est represents the actually estimated end position. The random error can be set as:
[0118] e = P target - P est (4)
[0119] The above random error can be used to correct the robotic arm control parameters in real time.
[0120] Regarding online calibration:
[0121] When the random error exceeds the set threshold, or during long-term movement, when it is found that the random error remains at a relatively high level for a long time, online calibration is required. First, an error model (equivalent to the above-mentioned motion model of the robotic arm) needs to be established. Assume that the robotic arm has a total of M joints, numbered M1, M2,..., Mm in sequence, and M + 1 arms, numbered 2, 3,..., m + 1 in sequence. The m-th joint controls the (m + 1)-th arm. A coordinate system is established for the motor of each joint, fixed at the origin of the motor rotation.
[0122] Figure 4 As an optional schematic diagram of a multi-robotic arm provided by an embodiment of the present application, as Figure 4 shown, C represents the coordinate system, P represents the 3D position coordinates, M represents the joints, R represents the rotation of each joint, C includes: C1, C2, and C3, P includes: P1, P2, P3, and P4, M includes: M1, M2, M3, and M4. There are motors at all ends except M4. C1 and P2 are in the same coordinate system, C2 and P3 are in the same coordinate system, C3 and P4 are in the same coordinate system. R1 represents the rotation of the M1 joint, R2 represents the rotation of the M2 joint, and R3 represents the rotation of the M3 joint.
[0123] The coordinates of the end of each forearm in the previous joint coordinate system are:
[0124]
[0125]
[0126] Among them, P1 represents the first joint coordinate system, P2 represents the second joint coordinate system, …, P m is the m-th joint coordinate system. In the previous joint coordinate system, it is considered the position at the moment when the defined angle is 0 degrees. It can be obtained through structural parameters or other calibrations. represents the rotation matrix corresponding to the desired angle of the first joint, represents the rotation matrix corresponding to the desired angle of the second joint, …, is the rotation matrix corresponding to the desired angle of the m-th joint, represents the inherent error of the first joint, represents the inherent error of the second joint, …, is the control error of the m-th joint. Then the coordinates of joint m + 1 (equivalent to the position of the end of the (m + 1)-th arm controlled by the m-th joint) in Cm are:
[0127]
[0128] Among them, the coordinates of joint m (equivalent to the position of the end of the m-th arm controlled by the (m - 1)-th joint) in Cm - 1 are:
[0129]
[0130] Then the coordinates of joint m + 1 in Cm - 1 are:
[0131]
[0132] And so on, the coordinates of joint m + 1 in C1 are: the above formulas (1) and (2).
[0133] By separately controlling each joint to perform periodic reciprocating motions, Figure 5 is a schematic diagram of an optional target joint provided by an embodiment of the present application. As Figure 5 shown, taking joint M3 as an example, fixing M1 and M2, controlling the motor of M3, and only rotating M3 to make P4 reciprocate.
[0134] During the movement, the trajectory of the end is estimated, and the true end trajectory estimated each time when a certain joint is separately controlled can be obtained Since each time a certain joint is separately controlled to move, the inherent error of this joint can be expressed as: the above formula (3).
[0135] in, Only with R i Optimizing this error can obtain the calibrated As the inherent error, the optimization method can be LM optimization or other convex optimization algorithms, and the calibration is now complete.
[0136] Using the calibration method in the above example, the scene is simple, the accuracy is high, and the action is simple.
[0137] The embodiment of the present application provides a control method for a robotic arm, wherein the robotic arm is arranged in a robot, and the robotic arm has one joint or at least two joints, comprising: generating control parameters of each joint of the robotic arm according to a received control instruction for the robotic arm, adjusting the control parameters of each joint according to an inherent error of each joint, obtaining the adjusted control parameters of each joint, and controlling the operation of the motor of each joint by using the adjusted control parameters of each joint, so that the end of the robotic arm moves to a target position, wherein the inherent error of each joint is obtained by calibrating the error of each joint; that is, in the embodiment of the present application, in controlling the robotic arm, after generating the control parameters of each joint of the robotic arm, the control parameters of each joint need to be adjusted by using the calibrated inherent errors of each joint, so that the motor of each joint can be controlled by using the adjusted control parameters of each joint, so that the end of the robotic arm moves to the target position of the desired movement under the action of the adjusted control parameters, thus, by calibrating each joint, the control parameters of each joint can be adjusted, thereby improving the control accuracy of the robotic arm.
[0138] Based on the same concept as the above embodiments, the present application provides a control device for a robot arm, wherein the robot arm is arranged in a robot, and the robot arm has one joint or at least two joints. Figure 6 A schematic diagram of the structure of an optional control device for a robotic arm provided in an embodiment of the present application, such as Figure 6 As shown, the control device of the robot arm may include:
[0139] A generating module 61, for generating control parameters of each joint of the robotic arm according to the received control instruction of the robotic arm;
[0140] The adjustment module 62 is used to adjust the control parameters of each joint according to the inherent error of each joint to obtain the adjusted control parameters of each joint; wherein the inherent error of each joint is obtained by calibrating the error of each joint;
[0141] The control module 63 is used to control the motors of each joint using the adjusted control parameters of each joint so that the end of the robotic arm moves to the target position.
[0142] In an alternative embodiment, the above-mentioned device is further configured to: work by controlling the target joints of the robotic arm to obtain the actual position of the end of the robotic arm; obtain the motion model of the target joints from the preset motion model of the robotic arm; wherein, the motion model of the target joints is the relationship between the inherent error of the target joints under the motion of the target joints and the position of the end of the robotic arm; optimize the motion model of the target joints based on the actual position to obtain the inherent error of the target joints.
[0143] In an alternative embodiment, the above-mentioned device is further configured to: determine the relationship between the inherent error of each joint and the position of the end of the robotic arm; wherein, the position of the end of the robotic arm is the position of the end of the arm corresponding to each joint of the robotic arm in the joint coordinate system corresponding to the first arm; construct the motion model of the robotic arm by using the relationship between the inherent error of each joint and the position of the end of the robotic arm.
[0144] In an alternative embodiment, the following formula can be used to determine the relationship between the inherent error of each joint and the position of the end of the robotic arm: the above-mentioned formulas (1) and (2);
[0145] Wherein, represents the position of the end of the arm controlled by the m joints when the mth joint moves in the first joint coordinate system; P m+1 is the position coordinate of the end of the arm controlled by the mth joint in the mth joint coordinate system, is the rotation matrix corresponding to the desired angle of the mth joint; is the inherent error of the mth joint; wherein, m is a positive integer greater than or equal to 2.
[0146] In an alternative embodiment, when the above-mentioned device optimizes the motion model based on the actual position to obtain the inherent error of the target joints, it includes: taking the minimization of the difference between the motion model of the target joints and the actual position as the goal, optimizing the motion model of the target joints to obtain the optimized motion model of the target joints, and determining the inherent error of the target joints from the optimized motion model of the target joints.
[0147] In an alternative embodiment, the following formula can be used to determine the error between the motion model of the target joints and the actual position: the above-mentioned formula (3);
[0148] Wherein, represents the actual position of the end of the robotic arm when the target joints move; represents the position of the end of the robotic arm obtained under the motion model of the target joints; represents the error between the motion model of the target joints and the actual position; wherein, the target joint is the ith joint of the robotic arm; wherein, i is a positive integer greater than 1 and less than or equal to m.
[0149] In an alternative embodiment, the above device is further configured to: during the operation of the robotic arm, obtain the random error of the robotic arm; and when the random error meets a preset condition, perform error calibration on each joint of the robotic arm to obtain the inherent error of each joint.
[0150] In an alternative embodiment, the above device is further configured to: adjust the adjusted control parameters of each joint by using the random error to update the adjusted control parameters of each joint.
[0151] In an alternative embodiment, when the above device obtains the random error of the robotic arm during the operation of the robotic arm, it includes: during the operation of the robotic arm, obtain the first position of the end of the robotic arm through a sensor on the end of the robotic arm; determine the difference between the first position and the second position as the random error; where the second position is the position expected to be reached when the robotic arm operates.
[0152] In an alternative embodiment, when the above device performs error calibration on each joint of the robotic arm to obtain the inherent error of each joint when the random error meets a preset condition, it includes: when the random error is greater than a preset threshold, perform error calibration on each joint of the robotic arm to obtain the inherent error of each joint.
[0153] In an alternative embodiment, when the above device performs error calibration on each joint of the robotic arm to obtain the inherent error of each joint when the random error meets a preset condition, it includes: when the number of times the random error is greater than a preset threshold exceeds a preset number of times, perform error calibration on each joint of the robotic arm to obtain the inherent error of each joint; when the duration for which the random error is greater than a preset threshold exceeds a preset duration, perform error calibration on each joint of the robotic arm to obtain the inherent error of each joint.
[0154] In practical applications, the above generating module 61, adjusting module 62, and control module 63 can be implemented by a processor located on the control device of the robotic arm, specifically implemented by a CPU, a microprocessor (Microprocessor Unit, MPU), a digital signal processor (Digital Signal Processing, DSP), or a field programmable gate array (Field Programmable Gate Array, FPGA), etc.
[0155] Figure 7 A schematic structural diagram of an alternative robot provided by an embodiment of the present application is as Figure 7 shown. An embodiment of the present application provides a robot 700, including:
[0156] A robotic arm 71 having at least two joints, a processor 72, and a storage medium 73 storing processor-executable instructions; the storage medium 73 performs operations depending on the processor 72 through a communication bus 74. When the instructions are executed by the processor, the steps in the method executed on the processor side in one or more of the above embodiments are performed.
[0157] It should be noted that in actual applications, each component in the mobile robot is coupled together through the communication bus 74. It can be understood that the communication bus 74 is used to realize the connection and communication between these components. In addition to the data bus, the communication bus 74 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 7 all kinds of buses are labeled as the communication bus 74.
[0158] An embodiment of the present application provides a computer storage medium storing executable instructions. When the executable instructions are executed by one or more processors, the processors perform the steps in the method in one or more of the above embodiments.
[0159] An embodiment of the present application provides a computer program product including a computer program or instruction. When the computer program or instruction is executed by a processor, the steps in the method in one or more of the above embodiments are implemented.
[0160] Among them, the computer-readable storage medium may be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.
[0161] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0162] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0163] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0164] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0165] As mentioned above, the above are only optional embodiments of the present application and are not used to limit the protection scope of the present application.
Claims
1. A control method for a robotic arm, characterized in that, The robotic arm is disposed in a robot. The robotic arm has one joint or at least two joints and includes: Generating control parameters for each joint of the robotic arm according to a received control instruction for the robotic arm; Adjusting the control parameters of each joint according to the inherent error of each joint to obtain the adjusted control parameters of each joint; wherein, the inherent error of each joint is obtained by calibrating the error of each joint; Controlling the motors of each joint to work by using the adjusted control parameters of each joint so that the end of the robotic arm moves to a target position.
2. The method according to claim 1, characterized in that, The method further includes: Obtaining the actual position of the end of the robotic arm by controlling a target joint of the robotic arm to work; Obtaining a motion model of the target joint from a preset motion model of the robotic arm; wherein, the motion model of the target joint is the relationship between the inherent error of the target joint and the position of the end of the robotic arm under the motion of the target joint; Optimizing the motion model of the target joint based on the actual position to obtain the inherent error of the target joint.
3. The method according to claim 2, wherein The method further includes: Determining the relationship between the inherent error of each joint and the position of the end of the robotic arm; wherein, the position of the end of the robotic arm is the position of the end of the arm corresponding to each joint of the robotic arm in the first joint coordinate system; Constructing a motion model of the robotic arm by using the relationship between the inherent error of each joint and the position of the end of the robotic arm.
4. The method according to claim 3, characterized in that, Using the following formula to determine the relationship between the inherent error of each joint and the position of the end of the robotic arm: Among them, represents the position of the end of the arm controlled by the m joints during the movement of the m joints in the first joint coordinate system; P m+1 is the position coordinate of the end of the arm controlled by the m joints in the m joint coordinate system, is the rotation matrix corresponding to the desired angle of the m-th joint; is the inherent error of the m-th joint; where m is a positive integer greater than or equal to 2.
5. The method according to claim 2, wherein The optimizing the motion model of the target joint based on the actual position to obtain the inherent error of the target joint includes: Taking the minimization of the error between the motion model of the target joint and the actual position as the goal, optimizing the motion model of the target joint to obtain an optimized motion model of the target joint, and determining the inherent error of the target joint from the optimized motion model.
6. The method according to claim 5, characterized in that, Using the following formula to determine the error between the motion model of the target joint and the actual position: Among them, represents the actual position of the end of the robotic arm when the target joint moves; represents the position of the end of the robotic arm obtained under the motion model of the target joint movement; represents the error between the motion model of the target joint and the actual position; among them, the target joint is the i-th joint of the robotic arm; where i is a positive integer greater than 1 and less than or equal to m.
7. The method according to any one of claims 1 to 6, characterized in that The method further includes: Obtaining a random error of the robotic arm during the operation of the robotic arm; Calibrating the error of each joint of the robotic arm to obtain the inherent error of each joint when the random error meets a preset condition.
8. The method according to claim 7, wherein The method further includes: Adjusting the adjusted control parameters of each joint by using the random error to update the adjusted control parameters of each joint.
9. The method according to claim 7, wherein The obtaining a random error of the robotic arm during the operation of the robotic arm includes: During the operation of the robotic arm, obtaining a first position of the end of the robotic arm through a sensor on the end of the robotic arm; Determining the difference between the first position and a second position as the random error; wherein, the second position is the position that the robotic arm is expected to reach during operation.
10. The method according to claim 7, characterized in that, When the random error meets a preset condition, performing error calibration on each joint of the robotic arm to obtain the inherent error of each joint, including: When the random error is greater than a preset threshold, performing error calibration on each joint of the robotic arm to obtain the inherent error of each joint.
11. The method according to claim 7, wherein When the random error meets a preset condition, performing error calibration on each joint of the robotic arm to obtain the inherent error of each joint, including: When the number of times the random error is greater than a preset threshold exceeds a preset number of times, performing error calibration on each joint of the robotic arm to obtain the inherent error of each joint; When the duration for which the random error is greater than a preset duration exceeds a preset duration, performing error calibration on each joint of the robotic arm to obtain the inherent error of each joint.
12. A control device for a robotic arm, characterized in that, The robotic arm is disposed in a robot. The robotic arm has one joint or at least two joints, including: A generation module, configured to generate control parameters for each joint of the robotic arm according to a received control instruction for the robotic arm; An adjustment module, configured to adjust the control parameters of each joint according to the inherent error of each joint to obtain adjusted control parameters for each joint; wherein, the inherent error of each joint is obtained by calibrating the error of each joint; A control module, configured to control the motors of each joint to operate by using the adjusted control parameters of each joint, so that the end of the robotic arm moves to a target position.
13. The device according to claim 12, wherein, The device is further configured to: Obtain the actual position of the end of the robotic arm by controlling a target joint of the robotic arm to operate; Obtain the motion model of the target joint from a preset motion model of the robotic arm; wherein, the motion model of the target joint is the relationship between the inherent error of the target joint and the position of the end of the robotic arm during the movement of the target joint; Optimize the motion model of the target joint based on the actual position to obtain the inherent error of the target joint.
14. The device according to claim 13, characterized in that, The device is further configured to: Determine the relationship between the inherent error of each joint and the position of the end of the robotic arm; wherein, the position of the end of the robotic arm is the position of the end of the arm corresponding to each joint of the robotic arm in the first joint coordinate system; Construct a motion model of the robotic arm by using the relationship between the inherent error of each joint and the position of the end of the robotic arm.
15. The device according to claim 14, characterized in that, Use the following formula to determine the relationship between the inherent error of each joint and the position of the end of the robotic arm: Among them, represents the position of the end of the arm controlled by the m joints during the movement of the m joints in the first joint coordinate system; P m+1 is the position coordinate of the end of the arm controlled by the m joints in the m joint coordinate system, is the rotation matrix corresponding to the desired angle of the m-th joint; is the inherent error of the m-th joint; where m is a positive integer greater than or equal to 2.
16. The device according to claim 15, characterized in that, When the device optimizes the motion model based on the actual position to obtain the inherent error of the target joint, it includes: Taking the minimization of the error between the motion model of the target joint and the actual position as the goal, optimizing the motion model of the target joint to obtain an optimized motion model of the target joint, and determining the inherent error of the target joint from the optimized motion model of the target joint.
17. The device according to claim 16, characterized in that, Use the following formula to determine the error between the motion model of the target joint and the actual position: Among them, represents the actual position of the end of the robotic arm when the target joint moves; represents the position of the end of the robotic arm obtained under the motion model of the target joint movement; represents the error between the motion model of the target joint and the actual position; among them, the target joint is the i-th joint of the robotic arm; where i is a positive integer greater than 1 and less than or equal to m.
18. The device according to any one of claims 12 to 17, characterized in that The device is further configured to: During the operation of the robotic arm, obtain the random error of the robotic arm; When the random error meets the preset conditions, perform error calibration on each joint of the robotic arm to obtain the inherent error of each joint.
19. The device according to claim 18, characterized in that, The device is further configured to: Use the random error to adjust the adjusted control parameters of each joint to update the adjusted control parameters of each joint.
20. The device according to claim 18, characterized in that, When the device obtains the random error of the robotic arm during the operation of the robotic arm, it includes: During the operation of the robotic arm, obtain the first position of the end of the robotic arm through a sensor on the end of the robotic arm; Determine the difference between the first position and the second position as the random error; Wherein, the second position is the position that the robotic arm is expected to reach during operation.
21. The device according to claim 18, wherein, When the device performs error calibration on each joint of the robotic arm to obtain the inherent error of each joint when the random error meets the preset conditions, it includes: When the random error is greater than the preset threshold, perform error calibration on each joint of the robotic arm to obtain the inherent error of each joint.
22. The device according to claim 18, characterized in that, When the device performs error calibration on each joint of the robotic arm to obtain the inherent error of each joint when the random error meets the preset conditions, it includes: When the number of times the random error is greater than the preset threshold exceeds the preset number of times, perform error calibration on each joint of the robotic arm to obtain the inherent error of each joint; When the duration for which the random error is greater than the preset duration exceeds the preset duration, perform error calibration on each joint of the robotic arm to obtain the inherent error of each joint.
23. A robot, comprising a robotic arm having one joint or at least two joints, a memory, and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the method according to any one of claims 1 to 11.
24. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps in the method according to any one of claims 1 to 11.
25. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instruction is executed by the processor, it implements the steps in the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Robot calibration method, device and equipment and computer readable storage medium
CN112873204A
High-precision force sensing control system and method based on heavy-load robot
CN115070726A
Robot parameter optimization and calibration method, device and system, robot and medium
CN115533888A
Position sensitive error compensation method for industrial robot end tool calibration
CN117047780A
Industrial robot transmission error compensation method, device and equipment and storage medium
CN117621034A