Motion track compensation method and device of mechanical arm, mechanical arm and storage medium

By identifying and estimating multiple factors that affect the positioning error of the robot arm's end, determining and modifying the motion trajectory, the problem of insufficient positioning accuracy of the robot arm in different states is solved, and higher positioning accuracy is achieved.

CN120773023APending Publication Date: 2025-10-14KUKA ROBOTICS GUANGDONG CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410415930.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2025-10-14

AI Technical Summary

Technical Problem

It is difficult for a robotic arm to achieve accurate end positioning under different motion states. The existing technology uses a constant compensation method after measuring the backlash, which is difficult to deal with errors under different motion states, resulting in poor positioning accuracy.

Method used

By identifying multiple factors that affect the positioning error of the robot arm end, determining multiple sets of motion states and their corresponding errors, obtaining the current motion state and estimating the error, and modifying the motion trajectory according to the error, accurate compensation is achieved.

Benefits of technology

The end positioning accuracy of the robotic arm in different motion states is improved, the positioning error is reduced, and the accuracy of motion trajectory compensation is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120773023A_ABST
    Figure CN120773023A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a motion compensation method and device of a mechanical arm, the mechanical arm and a storage medium, and relates to the technical field of mechanical arms. According to the method, multiple sets of motion states of the mechanical arm and errors corresponding to the multiple sets of motion states are determined according to multiple influence factors influencing the positioning errors of the tail end of the mechanical arm, each set of motion state is represented by the multiple influence factors, and the values of at least one influence factor between the different motion states are different; the current motion state of the mechanical arm is obtained, wherein the current motion state is represented by the multiple influence factors; estimating an error corresponding to the current motion state according to the multiple groups of motion states, the errors corresponding to the multiple groups of motion states and the current motion state; and according to the error corresponding to the current motion state, the motion track of the mechanical arm is modified, and therefore the tail end positioning precision of the mechanical arm in different motion states can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of robotic arms, and more specifically, to a method and device for compensating a motion trajectory of a robotic arm, a robotic arm, and a storage medium. Background Art

[0002] Robotic arms are widely used in various aspects of manufacturing. Accurate output from the reducers of each arm's axis (also known as a joint) is crucial for ensuring the positioning accuracy of the arm's end-of-line. In this field, a common method for compensating the robot's motion trajectory is to measure backlash and then apply a constant to compensate. Specifically, the backlash between each axis and each reducer stage is measured. Based on the measured data, a constant is preset, and the robot's motion trajectory is compensated using this constant.

[0003] However, the gear meshing of the reducers on each axis of the robotic arm has backlash, and multi-stage reducers have multiple meshing relationships within them. Due to the presence of multiple axes and multi-stage reducers, the positioning error after the robotic arm stabilizes varies under different motion states and is difficult to predict. Therefore, the method of measuring backlash and then using a constant to compensate for the motion of the robotic arm in different motion states is difficult to handle, resulting in poor end-of-line positioning accuracy under different motion states. Summary of the Invention

[0004] The embodiments of the present application propose a motion trajectory compensation method, device, robotic arm, and storage medium for a robotic arm to improve the above-mentioned problems.

[0005] In a first aspect, an embodiment of the present application provides a method for compensating the motion trajectory of a robotic arm, the method comprising: determining multiple groups of motion states of the robotic arm and errors corresponding to each group of motion states based on multiple influencing factors affecting the positioning error of the end of the robotic arm, wherein each group of motion states is represented by the multiple influencing factors, and there is a different value of at least one influencing factor between different motion states; obtaining the current motion state of the robotic arm, the current motion state is represented by the multiple influencing factors; estimating the error corresponding to the current motion state based on the multiple groups of motion states, the errors corresponding to each group of motion states, and the current motion state; and modifying the motion trajectory of the robotic arm based on the error corresponding to the current motion state.

[0006] In a second aspect, an embodiment of the present application provides a motion trajectory compensation device for a robotic arm, the device comprising: a data acquisition module for determining multiple groups of motion states of the robotic arm and errors corresponding to each group of motion states based on multiple influencing factors affecting the positioning error of the end of the robotic arm, wherein each group of motion states is represented by the multiple influencing factors, and there is a different value of at least one influencing factor between different motion states; a state acquisition module for acquiring the current motion state of the robotic arm, which is represented by the multiple influencing factors; an error estimation module for estimating the error corresponding to the current motion state based on the multiple groups of motion states, the errors corresponding to each group of motion states, and the current motion state; a motion compensation module for modifying the motion trajectory of the robotic arm according to the error corresponding to the current motion state.

[0007] In a third aspect, an embodiment of the present application provides a robotic arm, which includes: a memory and a processor, wherein an application is stored in the memory, and when the processor calls the application, the method provided in the embodiment of the present application can be implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having program code stored thereon, and when a processor calls the program code, the method provided in the embodiment of the present application can be implemented.

[0009] The embodiments of the present application provide a method, device, robotic arm and storage medium for compensating the motion trajectory of a robotic arm, multiple influencing factors affecting the positioning error of the end portion of the robotic arm, determining multiple groups of motion states of the robotic arm and the errors corresponding to each group of motion states; estimating the error corresponding to the current motion state based on the multiple groups of motion states, the errors corresponding to each group of motion states and the current motion state; modifying the motion trajectory of the robotic arm based on the error corresponding to the current motion state; thereby taking into account multiple influencing factors affecting the positioning error of the end portion of the robotic arm, and estimating the error of the current motion state based on the errors in multiple groups of different motion states represented by multiple influencing factors, which can improve the accuracy of error estimation in different motion states; modifying the motion trajectory of the robotic arm based on the estimated error, which can accurately and effectively compensate for the motion trajectory of the robotic arm in different motion states, thereby reducing the end positioning error of the robotic arm in different motion states, and improving the end positioning accuracy of the robotic arm in different motion states. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of this application, not all embodiments. All other embodiments and drawings obtained by ordinary technicians in this field based on the embodiments of this application without creative work are within the scope of protection of this application.

[0011] Figure 1 is a structural diagram of a robotic arm provided in one embodiment of the present application;

[0012] Figure 2 is a structural schematic diagram of a robotic arm provided by another embodiment of the present application;

[0013] Figure 3 1 is a flow chart of a motion trajectory compensation method for a robotic arm provided in one embodiment of the present application;

[0014] Figure 4 This is a schematic diagram of a process in which a robotic arm performs a grasping and releasing task, provided by an exemplary embodiment of the present application;

[0015] Figure 5 This is another schematic diagram of a process in which a robotic arm performs a grasping and placing task according to an exemplary embodiment of the present application;

[0016] Figure 6 This is another process diagram of a catch-and-release task provided by an exemplary embodiment of the present application;

[0017] Figure 7 1 is another process diagram of a catch-and-release task provided by an exemplary embodiment of the present application;

[0018] Figure 8 is a schematic diagram of a mapping relationship between motion states and errors provided by an exemplary embodiment of the present application;

[0019] Figure 9 is a schematic diagram of a mapping relationship between motion states and errors provided by another exemplary embodiment of the present application;

[0020] Figure 10 is a flow chart of a motion trajectory compensation method for a robotic arm provided by another embodiment of the present application;

[0021] Figure 11 is a flow chart of a motion trajectory compensation method for a robotic arm provided by an exemplary embodiment of the present application;

[0022] Figure 12 Schematic diagram of the structure of the motion trajectory compensation device of the robotic arm provided in an embodiment of the present application;

[0023] Figure 13This is a schematic structural diagram of a robotic arm provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable people skilled in the art to better understand the solution of the present application, the technical solution 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.

[0025] The motion trajectory compensation method for a robotic arm in the embodiments of the present application can be applied to a motion trajectory compensation device for a robotic arm or a robotic arm. The motion trajectory compensation device for a robotic arm can be applied to a robotic arm. The robotic arm can be a serial robotic arm or a robotic arm with some joints in serial connection, and can include but is not limited to a four-axis robotic arm or a six-axis robotic arm.

[0026] See also Figure 1 , Figure 1 The figure is a schematic diagram of the structure of the robot arm provided in one embodiment of the present application. The robot arm 100 is a four-axis robot arm. Figure 1 As shown, the robot arm 100 includes a first axis 110, a second axis 120, a third axis 130, and a fourth axis 140, wherein the first axis 110, the second axis 120, and the fourth axis 140 are three rotation axes (joints) of the robot arm 100. For example, the robot arm 100 may be a Selective Compliance Assembly Robot Arm (SCARA).

[0027] See also Figure 2 , Figure 2 2 is a schematic diagram of the structure of a robotic arm provided by another embodiment of the present application. The robotic arm 200 is a six-axis robotic arm. Figure 2 As shown, the robot arm 200 includes a first axis 210 , a second axis 220 , a third axis 230 , a fourth axis 240 , a fifth axis 250 and a sixth axis 260 .

[0028] It should be understood that each axis of the robotic arm referred to in the embodiments of the present application can be referred to as an axis joint. For example, the first axis can be referred to as a first axis joint or a first joint.

[0029] The following will take the robotic arm 100 as an example of the execution body to illustrate the motion trajectory compensation method of the robotic arm in the embodiment of the present application.

[0030] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of a motion trajectory compensation method for a robotic arm provided in one embodiment of the present application. The motion trajectory compensation method for a robotic arm may include steps S110 to S140.

[0031] Step S110: Determine multiple groups of motion states of the robot arm and the errors corresponding to each group of motion states based on multiple influencing factors that affect the positioning error of the end of the robot arm, wherein each group of motion states is represented by multiple influencing factors, and there is a different value of at least one influencing factor between different motion states.

[0032] The multiple influencing factors (also called influencing factors) that affect the positioning error of the end-of-arm robot can be manually screened in advance, and the multiple influencing factors screened in advance can be used as fixed optional variables. Figure 4 and Figure 5 , Figure 4 This is a schematic diagram of a process in which a robotic arm performs a grasping and releasing task, provided by an exemplary embodiment of the present application; Figure 5 This is another schematic diagram of the process of the robot arm performing a grasping and placing task provided by an exemplary embodiment of the present application. Figure 4 and Figure 5 As shown, in one workstation, Figure 4 and Figure 5 The arrows in the middle indicate the movement directions of conveyor belts 1 and 2. Conveyor belt 1 moves item 3 on conveyor belt 1 from left to right, while conveyor belt 2 moves box 4 on conveyor belt 2 from bottom to top. During the movement of conveyor belts 1 and 2, the positions of item 3 on conveyor belt 1 and box 4 on conveyor belt 2 are random. Robot arm 100 performs a pick-and-place task: sequentially pick up items 3 from conveyor belt 1 and place them into boxes 4 on conveyor belt 2. Because the positions of items 3 and boxes 4 are random, the starting and target positions of robot arm 100 vary, as does the arm span. The rotation directions of the rotation axes (first, second, and fourth axes) of robot arm 100 vary during each operation. If the tolerances of items 3 are large, the weights of different items 3 will vary, resulting in a different load for each operation of robot arm 100. Consequently, the center of mass of each item 3 picked up by robot arm 100 will be located at a different position relative to the end of robot arm 100. If the user sets different movement speeds and accelerations for each operation, the movement speeds and accelerations of the robot arm 100 at the time of starting deceleration each time the robot arm 100 performs the operation may be different.

[0033] Based on the above analysis, multiple influencing factors that affect the positioning error of the end of the robot arm can be manually screened out. In an embodiment of the present application, the multiple influencing factors include at least: the arm posture, arm span, movement direction of each axis, load, movement speed and acceleration of the robot arm. Among them, the arm posture refers to the posture and position of the robot arm. Since the range of motion of the robot arm is a spherical range, the arm span can refer to the radius of the range of motion of the robot arm. The movement direction of each axis can refer to the rotation direction of the rotation axis of the robot arm. For example, taking the SCARA robot arm as an example, the movement direction of each axis of the SCARA robot arm can refer to the rotation direction of the first axis, the second axis and the fourth axis, and the rotation direction includes clockwise (positive direction) or counterclockwise (reverse direction). Load refers to the weight of the object picked up by the robot arm and / or the position of the center of mass of the object picked up by the robot arm relative to the end of the robot arm. The movement speed of the robot arm can refer to the movement speed of the robot arm at multiple times during the operation process, for example, the movement speed when starting to decelerate. The acceleration of the robot arm can refer to the acceleration of the robot arm at multiple times during the operation process, for example, the acceleration when starting to decelerate.

[0034] After the manual screening is completed, the multiple influencing factors that affect the positioning error of the end of the manipulator that have been screened out can be used as fixed optional variables. After obtaining multiple influencing factors, at least one influencing factor corresponding to the current task of the manipulator (such as the grasping and releasing task) can be screened out from the multiple influencing factors. Based on the at least one influencing factor, multiple groups of motion states of the manipulator are determined. Among them, the at least one influencing factor corresponding to the current task of the manipulator can refer to an influencing factor that changes greatly when the manipulator performs the current task. For example, in the grasping and releasing task, the influencing factors that change greatly include the arm posture, the movement speed and acceleration when starting to decelerate, and the influencing factors that change less or remain basically unchanged include the load and the movement direction of each axis. Then, the arm posture, the movement speed and acceleration when starting to decelerate can be screened out as variables in subsequent calculations. That is to say, in the embodiment of the present application, at least one influencing factor screened out from multiple factors is a variable, and the remaining influencing factors are constants. Different groups of motion states can be distinguished based on the value of at least one influencing factor as a variable.

[0035] For example, see Figure 6 and Figure 7 , Figure 6 This is another process diagram of a catch-and-release task provided by an exemplary embodiment of the present application. Figure 7 This is another process diagram of a pick-and-place task provided by an exemplary embodiment of the present application. Figure 6 and Figure 7The direction indicated by the middle arrow is the movement direction of conveyor belts 1 and 2. Conveyor belt 1 drives the item 3 on conveyor belt 1 to move from left to right, and conveyor belt 2 drives the box 4 on conveyor belt 2 to move from bottom to top. During the movement of conveyor belts 1 and 2, the position of item 3 on conveyor belt 1 and the position of box 4 on conveyor belt 2 are random. Assuming that the load of the robot 100 remains unchanged, the load is a constant. Since the target position of box 4 is random, when the robot 100 performs the grasping and releasing task, it is assumed that the movement direction of the first axis is used as a reference, that is, it is assumed that the movement direction of the first axis is a constant, then the movement directions of the second and fourth axes are variables. Due to the different movement distances of the rotating axes, or due to different motion parameters set by human factors, the movement speed and acceleration at the beginning of the deceleration phase obtained by the motion planning of each axis are different, that is, the movement speed and acceleration at the beginning of deceleration are both variables.

[0036] After dividing the multiple influencing factors into at least one variable and a constant, different motion states can be distinguished based on the different values ​​of at least one influencing factor (i.e., variable) in different motion states. In the embodiment of the present application, each group of motion states includes the robot arm performing a task (e.g. Figure 4 and Figure 5 The numerical values ​​of multiple influencing factors contained in each of the multiple feature points on the motion trajectory passed by the robot (the pick-and-release task shown in the figure), that is, a set of motion states can be represented by the specific numerical values ​​of the above-mentioned multiple influencing factors, and different motion states can be distinguished based on the different values ​​of the variables in the influencing factors. Taking the pick-and-release task as an example, the robot performs a pick-and-release task along a motion trajectory, samples multiple feature points on the motion trajectory, and each of the multiple feature points contains the numerical values ​​of multiple influencing factors. For example, the multiple feature points include the starting point of the motion trajectory (the starting point of the pick-and-release task), the feature point at the time of starting deceleration (the speed and acceleration at this moment), and the end point (the end point of the pick-and-release task). Then, the numerical values ​​of the multiple influencing factors corresponding to the starting point of the motion trajectory, the feature point at the time of starting deceleration, and the end point of the motion trajectory can be used to represent a set of motion states of the robot performing the pick-and-release task this time.

[0037] In some embodiments, the value interval (i.e., value range) of at least one influencing factor in the current task of the robotic arm can be obtained; the value interval of at least one influencing factor can be mapped to a preset interval; and multiple groups of motion states of the robotic arm can be determined based on the preset interval corresponding to at least one influencing factor.

[0038] Among them, the current task of the robot arm refers to the task that the robot arm is about to perform. At least one of the selected influencing factors has a value range as a variable. For example, taking the grasping and releasing task as an example, the target position of the grasping and releasing task (for example Figure 4-7The minimum arm span Rmin and maximum arm span Rmax that the robot can achieve are determined based on the position of box 4 in the figure. The arm span value range is [Rmin, Rmax]. For another example, the same rotation direction of the second and fourth axes during the deceleration phase can be used as a reference direction to obtain the value range of the movement directions of the second and fourth axes. For another example, the movement speed and acceleration value ranges of the first-axis motor when it starts to decelerate can be manually set, or the movement speed and acceleration value ranges of the first-axis motor when it starts to decelerate can be obtained based on the kinematic constraints of the robot.

[0039] The preset interval can be manually pre-set. The purpose of setting the preset interval is to map at least one influencing factor (i.e., all variables) to the same interval range, thereby facilitating the subsequent determination of the motion state, reducing subsequent motion state-related calculations, alleviating computational pressure, and reducing computational complexity. For example, the preset interval can be [0, 1], [1, 10], [-10, 10], or [5, 25], etc.

[0040] In some embodiments, the preset interval corresponding to at least one influencing factor can be divided equally to obtain M sub-intervals corresponding to at least one influencing factor, where M is a positive integer; based on the M sub-intervals corresponding to at least one influencing factor, M numerical values ​​corresponding to at least one influencing factor are determined, and each numerical value corresponds to a sub-interval; the M numerical values ​​corresponding to at least one influencing factor are arranged and combined to obtain multiple groups of motion states of the robotic arm, and the values ​​of at least one influencing factor (i.e., variable) are different between different motion states in the obtained multiple groups of motion states, while the constants in the multiple groups of motion states remain fixed.

[0041] For example, assuming the preset interval is [0,1], record at least one influencing factor and each influencing factor is v i (v i,min ≤v i ≤v i,max , i=1,2,3,…), the following expression (1) can be used to normalize each influencing factor, mapping the value interval of each influencing factor to the preset interval [0,1], and obtaining the normalized influencing factor value γ i and the true value of the impact factor v i The mapping relationship between them:

[0042]

[0043] Table 1

[0044]

[0045] For example, take the case of selecting a variable influencing factor, which is motion speed, as an example, assuming that the range of motion speed is [v1, v4]. Divide [v1, v4] into three equal parts to obtain three sub-intervals corresponding to the motion speed: [v1, v2], (v2, v3], (v3, v4]. The maximum value (or minimum value or intermediate value) of each of the three sub-intervals can be taken as the three numerical values ​​corresponding to the motion speed, namely, v2, v3 and v4. By permuting and combining v2, v3 and v4, three groups of motion states can be obtained as shown in Table 1. As shown in Table 1, in the first to third groups of motion states, the value of at least one influencing factor (for example, motion speed) is different between different motion states, while the values ​​of other influencing factors (for example, acceleration, arm posture, load, etc.) that serve as constants among the multiple influencing factors are the same.

[0046] Table 2

[0047]

[0048] For example, let's take the case of screening out two influencing factors as variables, including the movement speed and acceleration when the robot arm starts to decelerate. Assume that the range of the movement speed is [v1, v4], and the range of the acceleration is [a1, a4]. Divide [v1, v4] into 3 equal parts to obtain the 3 sub-intervals corresponding to the movement speed [v1, v2], (v2, v3], (v3, v4]. The maximum value (or minimum value or middle value) of each of the 3 sub-intervals can be taken as the 3 numerical values ​​corresponding to the movement speed, namely, v2, v3 and v4. Divide [a1, a4] into 3 equal parts to obtain the 3 sub-intervals corresponding to the movement speed [a1, a2], (a2, a3], (a3, a4]. The maximum value (or middle value) of each of the 3 sub-intervals can be taken as the 3 numerical values ​​corresponding to the movement speed, namely, v2, v3 and v4. The minimum or intermediate value) is used as the three values ​​corresponding to the motion speed, namely, a2, a3, and a4. By permuting and combining v2, v3, v4, and a2, a3, and a4, nine groups of motion states can be obtained as shown in Table 1. As shown in Table 2, there is a difference in the value of at least one influencing factor (e.g., motion speed or acceleration) between different motion states in Groups 1 to 9, while the values ​​of other influencing factors (e.g., arm posture, load, etc.) that serve as constants among the multiple influencing factors are the same.

[0049] It should be noted that, for example, the examples related to Table 1 and Table 2 are only used to explain the motion state and should not be understood as a limitation of the present application. In actual application, the influencing factor selected as a variable from multiple influencing factors can be at least one, for example, one, two, three, etc. The present application does not limit the number of influencing factors selected as variables from multiple influencing factors.

[0050] In some embodiments, multiple groups of motion states are executed Q times respectively to obtain Q errors corresponding to each group of motion states, where Q is a positive integer; the average value of the Q errors corresponding to each group of motion states is calculated as the error corresponding to each group of motion states.

[0051] Among them, executing once for each set of motion states means that the robot arm performs a complete task according to the set of motion states. For example, see Figure 4-7 , the robot arm 100 performs a complete grasping and placing task from picking up the object 3 to placing the object 3 into the box 4 and stopping the movement. Each time a set of motion states is executed, when the robot arm stops moving, a high-precision measuring device (for example, a camera, a laser tracker, etc.) can be used to measure the end position of the robot arm, and the difference between the reference position set manually or calculated by the ideal model and the measured end position is calculated to obtain an actual error corresponding to the motion state (the end positioning error of the robot arm). Executing this set of motion states Q times can obtain Q actual errors corresponding to the motion state. The Q actual errors form the error band of the motion state, and the average value of the Q actual errors is used as the final error corresponding to the motion state.

[0052] For example, the influencing factor to be screened out as a variable is γ i For example, see Figure 8 , Figure 8 It is a schematic diagram of the mapping relationship between motion state and error provided by an exemplary embodiment of the present application. Figure 8 The horizontal axis in the figure represents different motion states, which can be represented by the (normalized) influence factor γ i To distinguish, that is, the influence factor γ in these motion states i The values ​​of are different, and the values ​​of other influencing factors are the same. Figure 8 The vertical axis in the figure represents the error corresponding to the motion state, and the small white circle represents the actual error (i.e., the error obtained by actual measurement). i The corresponding multiple white circles are formed by the impact factor γ i The error band of the motion state is represented by . The small black circles represent the same influencing factor γ i The average value of the corresponding multiple actual errors, that is, the influence factor γ i The error band represents the average error of the motion state.

[0053] It should be noted that the determination of multiple groups of motion states and the errors corresponding to each group of motion states can be completed in advance before the actual operation of the robotic arm. The determined multiple groups of motion states and the errors corresponding to each group of motion states can be saved in the readable storage area of ​​the robotic arm to facilitate subsequent acquisition, modification, addition, and deletion of multiple groups of motion states and the errors corresponding to each group of motion states.

[0054] In some embodiments, after obtaining multiple sets of motion states and the errors corresponding to each of the multiple sets of motion states, a mapping relationship between the motion states and the errors can be fitted based on the multiple sets of motion states and the errors corresponding to each of the multiple sets of motion states. Specifically, a Gaussian process fitting can be performed based on at least one (normalized) influencing factor in the multiple sets of motion states and the errors (or error bands) corresponding to each of the multiple sets of motion states to obtain the mapping relationship between the motion states and the errors.

[0055] For example, the factors that influence the variables include γ i and γ k For example, see Figure 9 , Figure 9 It is a schematic diagram of the mapping relationship between motion state and error provided by another exemplary embodiment of the present application. Figure 9 γ in i and γ k The horizontal axis represents different motion states, which can be represented by the (normalized) influence factor γ i and / or γ k To distinguish, that is, the influence factor γ in these motion states i and / or γ k The values ​​of are different, and the values ​​of other influencing factors are the same. Figure 8 The vertical axis where e is located represents the error corresponding to the motion state, the white circle represents the actual error (that is, the error obtained by actual measurement), and the multiple white circles on the same vertical axis form the influencing factor γ i and γ k The black circle represents the average value of the actual errors corresponding to the multiple white circles on the same vertical axis, that is, the error band of the motion state represented by the influencing factor γ. i and γ k The average error of the error band of the motion state is represented by i and γ k As well as the errors corresponding to multiple groups of motion states, the errors corresponding to different motions can be obtained through Gaussian process fitting, such as Figure 9 As shown by the points on the surface represented by the curve grid in, that is, the mapping relationship between the motion state and the error can be obtained.

[0056] Specifically, the errors corresponding to the multiple sets of motion states can be sorted to obtain a first vector; and a first covariance matrix can be calculated based on at least one influencing factor in the multiple sets of motion states. The parameters in the first covariance matrix represent the motion states, and the parameters in the first vector represent the errors. There is a mapping relationship between the first covariance matrix and the parameters in the first vector.

[0057] The sorting order refers to the sampling order of at least one influencing factor, for example, Figure 8 As shown, the errors of different motion states are calculated according to the influence factor γ i Sort the samples from 0 to 1, and the first vector is as follows Figure 8 As shown by the small circles in (including white and black circles). Figure 9 As shown, the errors of different motion states are calculated according to the influence factor γ i From 0 to 1 and impact factor γ k Sort the samples from 0 to 1, and the first vector is as follows Figure 9 As shown in the small circles (including white circles and black circles).

[0058] Among them, the radial basis function can be used as the kernel function, and the first covariance matrix is ​​calculated according to the at least one influencing factor in the multiple groups of motion states. Among them, the radial basis function is a real-valued function whose value depends only on the distance from the origin, that is, Φ(x)=Φ(||x||), or it can also be the distance to any point c, point c is called the center point, that is, Φ(x,c)=Φ(||xc||). Any function Φ that satisfies the characteristic of Φ(x)=Φ(||x||) is called a radial basis function. The standard one generally uses the Euclidean distance (also called the Euclidean radial basis function), and other distance functions can also be used. The kernel function refers to the support vector through a nonlinear transformation. Mapping the input space to a high-dimensional feature space. That is, a function that takes a vector in the original space (e.g., multiple influencing factors or at least one influencing factor in this application) as an input vector and returns the dot product of a vector in the feature space (e.g., the error in this application) is called a kernel function. This embodiment of the application uses a Gaussian kernel function, also known as a radial basis function.

[0059] For example, the factors that influence the variables include γ i and γ k For example, we can use expression (2) to calculate the first covariance matrix:

[0060]

[0061] Among them, y i,k Represents the parameters in the i-th row and k-th column of the first covariance matrix, which is represented by the influencing factor γ i and γ k Represents the motion state, a and b are undetermined parameters, a and b can be manually debugged and pre-set. i and γ k Indicates the specific value of the impact factor.

[0062] After obtaining the mapping relationship between the motion state and the error, the mapping relationship between the motion state and the error can be stored in a readable storage area of the robot arm, so that subsequent groups of motion states and errors corresponding to the groups of motion states are obtained, modified, added, or deleted.

[0063] In the embodiments of the present application, the mapping relationship between the motion state and the error is fitted according to the groups of motion states and the errors corresponding to the groups of motion states, which can solve the problem of high-dimensional nonlinear data fitting of different end errors corresponding to different multi-dimensional inputs under different motion states.

[0064] It should be noted that the step of "fitting the mapping relationship between the motion state and the error according to the groups of motion states and the errors corresponding to the groups of motion states" in the embodiments of the present application can be implemented before step S120 or after step S120, and the present application does not limit the specific implementation time of fitting the mapping relationship between the motion state and the error.

[0065] Step S120: obtaining the current motion state of the robot arm, the current motion state being represented by a plurality of influence factors.

[0066] Since the error of the motor (also referred to as a speed reducer) closer to the shaft (i.e., the first shaft) of the robot arm base has a more significant amplification effect on the end error of the robot arm. Therefore, for the robot arm, compensating the output of the first shaft motor is the key to improving the accuracy of the end positioning of the robot arm. Therefore, when the robot arm is about to perform a new action, that is, about to perform a new task (for example, a pick-and-place task), the motion trajectory of the first shaft motor of the robot arm output by the trajectory planning module of the robot arm can be obtained, and the current motion state of the robot arm can be obtained based on the motion trajectory. Thus, the motion trajectory of the first shaft motor is compensated, thereby minimizing the end error caused by the gear backlash and maximizing the accuracy of the end positioning of the robot arm. Figure 4-7

[0067] For example, the values of the plurality of influence factors included in each of the plurality of feature points on the motion trajectory can be obtained, and the values of the plurality of influence factors can be used to represent the current motion state. For example, the values of the plurality of influence factors corresponding to the start point, the feature point at the start deceleration time, and the end point of the motion trajectory can be obtained, and the obtained values can be used to represent a group of motion states of the robot arm in performing the pick-and-place task.

[0068] ​It should be noted that the related steps (for example, steps S120 to S130) for compensating the motion trajectory of the first-axis motor in the embodiments of the present application can also be applied to compensate the motion trajectory of other motors or other transmission chains of the mechanical arm, and the principle and steps are similar to compensating the motion trajectory of the first-axis motor. The technical solution of applying the related steps for compensating the motion trajectory of the first-axis motor in the embodiments of the present application to compensate the motion trajectory of other motors or other transmission chains of the mechanical arm to reduce the end error caused by the gear backlash or the end error caused by the backlash of any link in the transmission chain also belongs to the protection scope of the present application.

[0069] Step S130: estimating the error corresponding to the current motion state according to the plurality of sets of motion states, the errors corresponding to the plurality of sets of motion states respectively, and the current motion state.

[0070] The error corresponding to the current motion state can refer to the error that can occur at the end of the mechanical arm after the current motion state is executed.

[0071] In some embodiments, the mapping relationship between the motion state and the error can be fitted according to the plurality of sets of motion states and the errors corresponding to the plurality of sets of motion states. For example, the errors corresponding to the plurality of sets of motion states are sorted to obtain a first vector; a first covariance matrix is calculated according to at least one influence factor in the plurality of sets of motion states, and the parameters in the first covariance matrix and the first vector have a mapping relationship. In this embodiment, the specific description of each step is referred to the foregoing related part.

[0072] Based on the mapping relationship between the motion state and the error, the error corresponding to the current motion state is determined. For example, a second covariance matrix can be calculated according to the plurality of sets of motion states and the current motion state, the last row of the second covariance matrix is the current motion state; a second vector is calculated according to the first vector, the first covariance matrix and the second covariance matrix; and the last item of the second vector is obtained as the error corresponding to the current motion state.

[0073] For example, the radial basis function can be used as the kernel function, and the second covariance matrix can be calculated according to the plurality of sets of motion states and the current motion state. The second covariance matrix can be calculated by using the above expression (2). It should be understood that the calculation formulas of the first covariance matrix and the second covariance matrix are the same, and the only difference is that the current motion state is combined when calculating the second covariance matrix.

[0074] Among them, the pseudo-inverse matrix of the first covariance matrix can be determined; the second covariance matrix, the pseudo-inverse matrix and the first vector are multiplied in sequence, and the product is used as the second vector. Among them, the pseudo-inverse matrix is ​​also called the generalized inverse matrix (Moore-Penrose). For example, the pseudo-inverse matrix of matrix A is denoted as A + , therefore, the pseudo-inverse matrix of A can also be called the plus inverse of A.

[0075] For example, let the first vector be μ1, the first covariance matrix be C1, and the pseudo-inverse matrix of the first covariance matrix be The second covariance matrix is ​​C2, and the second vector μ2 can be calculated according to expression (3):

[0076]

[0077] The last item of the second vector is the estimated mean of the positioning error of the end of the manipulator in the current motion state, which is used to screen out the influencing factor as a variable. i For example, Figure 8 The plus sign in the figure indicates the impact factor γ i The estimated error corresponding to the different motion states can also be understood as the average positioning error of the end-arm under the current motion state. Therefore, the error corresponding to the current motion state can be obtained by obtaining the last term of the second vector.

[0078] In some embodiments, a third covariance matrix can be calculated based on some of the motion states in the multiple sets of motion states and at least one influencing factor in the current motion state; a fourth vector can be calculated based on the first vector, the first covariance matrix, and the third covariance matrix; and the last item of the fourth vector is obtained as the error corresponding to the current motion state. In this embodiment, at least one influencing factor in all of the multiple sets of motion states is not used, but only at least one influencing factor in some of the motion states is used, for example, Figure 9 As shown, γ can be used i is 0.4-1 and γ k For data in the range of 0.4-1 instead of the entire γ i is 0-1 and γ k For data in the range of 0-1, the third covariance matrix and the fourth vector are calculated, thereby reducing the amount of calculation and improving the calculation efficiency while ensuring the terminal positioning accuracy.

[0079] Step S140: modifying the motion trajectory of the robotic arm according to the error corresponding to the current motion state.

[0080] In some embodiments, the arm span of the robotic arm in the current motion state is obtained; the motor angle compensation amount is determined based on the arm span and the error corresponding to the current motion state; and the motion trajectory of the robotic arm is modified based on the motor angle compensation amount.

[0081] In some embodiments, the error e corresponding to the current motion state can be end As the approximate arc length, the arm span r corresponding to the current motion state is used as the radius, and the error corresponding to the current motion state is divided by the arm span to obtain the target angle The target angle is multiplied by the reduction ratio of the first-axis motor of the robot arm to obtain the motor angle compensation.

[0082] The reduction ratio of the first-axis motor measures the degree of deceleration of the first-axis motor. It refers to the ratio of the rotational speed of the first-axis motor's input shaft to the rotational speed of the output shaft. Specifically, the reduction ratio = the number of input shaft revolutions required for each output shaft revolution = input shaft speed / output shaft speed. For example, if the input shaft speed is 1200 revolutions per minute (rpm) and the output shaft speed is 300 rpm, the reduction ratio is 4:1. In other words, for every one revolution of the first-axis motor's output shaft, the first-axis motor's input shaft requires four revolutions. The reduction ratio of the first-axis motor can be obtained directly from the robot arm's device parameter table.

[0083] In other embodiments, after obtaining the motor angle compensation amount, the motor angle compensation amount may be multiplied by a coefficient less than 1, and the obtained product is used as the final motor angle compensation amount.

[0084] After obtaining the (final) motor angle compensation, the motor angle compensation can be divided into N sub-motor angle compensations, each of which is less than or equal to a preset angle, where N is a positive integer. The preset angle can be set in advance based on actual needs, for example, 0.1 degrees. In some embodiments, the motor angle compensation can be divided equally to obtain N sub-motor angle compensations of equal size.

[0085] The motion position trajectory of the robot arm's first-axis motor, output by the trajectory planning module, can be obtained. During the first N control cycles of this motion position trajectory, the position trajectory values ​​are modified one by one based on the N sub-motor angle compensation values, with each control cycle corresponding to one sub-motor angle compensation value. It should be noted that after N control cycles have been superimposed, the subsequent motion position trajectory retains the final superimposed value for execution. The control cycle corresponds to the frequency at which the control system issues control commands to the first-axis motor. That is, if the control system issues control commands to the first-axis motor every T milliseconds (T > 0), the control cycle of the first-axis motor is T ms.

[0086] If N=1, the implementation method of "in the first N control cycles of the motion position trajectory, the position trajectory values ​​are superimposed and modified one by one according to the N sub-motor angle compensation amounts" includes: directly superimposing the (final) motor angle compensation amount to the position trajectory value of the motion position trajectory of the first-axis motor, and the subsequent motion position trajectories all maintain the final superimposed amount to perform the task.

[0087] If N > 1, then during the first N control cycles of the motion position trajectory, the position trajectory values ​​are modified one by one based on the angle compensation values ​​of the N sub-motors. After N control cycles of superposition, the subsequent motion position trajectory maintains the final superposition value to execute the task. This cycle-by-cycle superposition compensation method can achieve multiple compensations, avoid sudden changes in the rotation angle of the first-axis motor, achieve uniform speed control of the first-axis motor, increase the consistency of the first-axis motor control, and solve problems such as mechanical shock and jitter caused by excessive compensation at one time during motion compensation.

[0088] For example, if the control system issues a control command to the first-axis motor every 4ms, the control cycle for the first-axis motor is 4ms. Assuming the original control of the first-axis motor is to rotate 0.1 degrees each time, for example, the control angle issued the first time (4ms) is 0.1 degrees, the second time (8ms) is 0.2 degrees, the third time (12ms) is 0.3 degrees, and so on, and the control angle issued the 30th time (120ms) is 3 degrees. Assuming that the (final) motor angle compensation is 0.3 degrees and the originally planned trajectory of the motor needs to move 30 degrees, the compensation is divided into three sub-motor angle compensations, each with a compensation of 0.1 degrees, and compensation is performed three times. That is, after compensation, the control angle issued for the first time (4ms) is 0.2 degrees (original control amount 0.1 + compensation amount 0.1), the control angle issued for the second time (8ms) is 0.4 degrees (0.2+0.2), the control angle issued for the third time (12ms) is 0.6 degrees (0.3+0.3), the control angle issued for the fourth time (16ms) is 0.7 degrees (0.4+0.3)..., and the control angle issued for the 300th time (1200ms) is 30.3 degrees (30+0.3).

[0089] Based on steps S110 to S140, multiple influencing factors affecting the end positioning error of the manipulator are considered. The error of the current motion state is estimated by combining the errors in multiple groups of different motion states represented by the multiple influencing factors. This can improve the accuracy of the error estimation in different motion states. The motion trajectory of the manipulator is modified according to the estimated error, which can accurately and effectively compensate the motion trajectory of the manipulator in different motion states, thereby reducing the end positioning error of the manipulator in different motion states and improving the end positioning accuracy of the manipulator in different motion states. In addition, according to the multiple groups of motion states and the errors corresponding to the multiple groups of motion states, the mapping relationship between the motion state and the error is fitted, which can solve the high-dimensional nonlinear data fitting problem of different end error band outputs corresponding to multi-dimensional inputs in different motion states. Finally, when the motor angle compensation amount is large, multiple compensation is achieved by superimposing compensation cycle by cycle, which can avoid sudden changes in the angle of rotation of the first axis motor, achieve uniform speed control of the first axis motor, increase the consistency of the control of the first axis motor, and solve the problems of mechanical shock and jitter caused by excessive compensation at one time during motion compensation.

[0090] See also Figure 10 , Figure 10 FIG. 1 is a flow chart of a motion trajectory compensation method for a robotic arm provided by another embodiment of the present application. Figure 10 As shown, in some embodiments, after step S140 , the motion trajectory compensation method of the robotic arm may further include step S150 : executing the modified motion trajectory.

[0091] After using the motor angle compensation amount to modify the motion trajectory of the first-axis motor of the robot arm, control instructions can be sent to the first-axis motor in sequence according to the modified motion trajectory of the first-axis motor, cycle by cycle according to the control cycle. The control instructions include the current control angle and control direction (for example, clockwise or counterclockwise). After receiving the control angle, the first-axis motor uses the control angle as the change in this rotation and rotates the control angle in the control direction in the control instruction.

[0092] Based on steps S110 to S150, considering multiple influence factors affecting the positioning error of the end of the mechanical arm, combining the errors in different motion states represented by the multiple influence factors to estimate the error of the current motion state can improve the accuracy of error estimation in different motion states. According to the estimated error, the motion trajectory of the mechanical arm is modified, which can accurately and effectively compensate the motion trajectory of the mechanical arm in different motion states, thereby reducing the end positioning error of the mechanical arm in different motion states and improving the end positioning accuracy of the mechanical arm in different motion states. In addition, according to the multiple sets of motion states and the errors corresponding to each set of motion states, the mapping relationship between the motion states and the errors is fitted, which can solve the high-dimensional nonlinear data fitting problem that different motion states in multiple dimensions correspond to different end error band outputs. Finally, when the motor angle compensation amount is large, multiple compensations are realized by means of periodic superposition compensation, which can avoid the sudden change of the angle of the first axis motor, realize the uniform speed control of the first axis motor, increase the continuity of the control of the first axis motor, and solve the problems of mechanical impact and jitter caused by one-time compensation during motion compensation.

[0093] Referring to Figure 11 , Figure 11 is a flowchart of a motion trajectory compensation method of a mechanical arm provided by an exemplary embodiment of the present application. The motion trajectory compensation method of the mechanical arm can include steps S210 to S290.

[0094] Step S210: Multiple influence factors such as arm posture, forward and reverse motion of the rotation axis, load, motion speed, acceleration, etc. of the mechanical arm are selected as fixed optional variables.

[0095] Step S220: At least one variable corresponding to the actual work task of the mechanical arm is selected from the multiple influence factors.

[0096] Step S230: At least one variable is normalized, and the normalized variables are arranged and combined to obtain multiple sets of motion states.

[0097] Step S240: The first covariance matrix of the multiple sets of motion states is calculated.

[0098] Step S250: Each set of motion states is executed multiple times to obtain the error band of each set of motion states, and the error mean of the error band is calculated.

[0099] Step S260: A new motion state is obtained.

[0100] Step S270: The second covariance matrix is calculated in combination with the new motion state and the multiple sets of motion states.

[0101] Step S280: Calculate the error value corresponding to the new motion state based on the error means corresponding to the multiple groups of motion states, the first covariance matrix, and the second covariance matrix.

[0102] Step S290: Calculate the motor angle compensation of the first-axis motor of the robot arm, modify the position trajectory of the first-axis motor using the motor angle compensation, and execute the modified position trajectory of the first-axis motor.

[0103] For the parts not described in detail in steps S210 to S290, please refer to the relevant parts mentioned above.

[0104] Based on steps S210 to S290, multiple influencing factors affecting the end positioning error of the manipulator are considered. The error of the current motion state is estimated by combining the errors in multiple groups of different motion states represented by the multiple influencing factors. This can improve the accuracy of the error estimation in different motion states. The motion trajectory of the manipulator is modified according to the estimated error, which can accurately and effectively compensate the motion trajectory of the manipulator in different motion states, thereby reducing the end positioning error of the manipulator in different motion states and improving the end positioning accuracy of the manipulator in different motion states. In addition, according to the multiple groups of motion states and the errors corresponding to the multiple groups of motion states, the mapping relationship between the motion state and the error is fitted, which can solve the high-dimensional nonlinear data fitting problem of different end error band outputs corresponding to multi-dimensional inputs in different motion states. Finally, when the motor angle compensation amount is large, multiple compensation is achieved by superimposing compensation cycle by cycle, which can avoid sudden changes in the angle of rotation of the first axis motor, achieve uniform speed control of the first axis motor, increase the consistency of the control of the first axis motor, and solve the problems of mechanical shock and jitter caused by excessive compensation at one time during motion compensation.

[0105] See also Figure 12 , Figure 12FIG. 1 is a structural schematic diagram of a motion trajectory compensation device of a mechanical arm provided by an embodiment of the present application. The motion trajectory compensation device 300 of the mechanical arm comprises a data acquisition module 310, a state acquisition module 320, an error estimation module 330, and a motion compensation module 340. The data acquisition module 310 is configured to determine a plurality of groups of motion states of the mechanical arm and errors corresponding to the plurality of groups of motion states respectively according to a plurality of influence factors affecting positioning errors of an end of the mechanical arm, wherein each group of motion states is represented by the plurality of influence factors, and at least one value of the influence factors is different between different groups of motion states. The state acquisition module 320 is configured to acquire a current motion state of the mechanical arm, the current motion state being represented by the plurality of influence factors. The error estimation module 330 is configured to estimate an error corresponding to the current motion state according to the plurality of groups of motion states, the errors corresponding to the plurality of groups of motion states respectively, and the current motion state. The motion compensation module 340 is configured to modify a motion trajectory of the mechanical arm according to the error corresponding to the current motion state.

[0106] In some embodiments, the error estimation module 330 is further configured to fit a mapping relationship between motion states and errors according to the plurality of groups of motion states and the errors corresponding to the plurality of groups of motion states respectively, and determine the error corresponding to the current motion state based on the mapping relationship.

[0107] In some embodiments, the error estimation module 330 is further configured to sort the errors corresponding to the plurality of groups of motion states respectively to obtain a first vector, calculate a first covariance matrix according to the at least one influence factor in the plurality of groups of motion states, the parameters in the first covariance matrix and the first vector having a mapping relationship, calculate a second covariance matrix according to the at least one influence factor in the plurality of groups of motion states and the current motion state, calculate a second vector according to the first vector, the first covariance matrix, and the second covariance matrix, and obtain a last item of the second vector as the error corresponding to the current motion state.

[0108] In some embodiments, the error estimation module 330 is further configured to determine a pseudo-inverse matrix of the first covariance matrix, and multiply the second covariance matrix, the pseudo-inverse matrix, and the first vector in sequence, and take a product as the second vector.

[0109] In some embodiments, the error estimation module 330 is further configured to calculate the first covariance matrix according to the at least one influence factor in the plurality of groups of motion states by using a radial basis function as a kernel function, and calculate the second covariance matrix according to the plurality of groups of motion states and the current motion state by using the radial basis function as the kernel function.

[0110] In some embodiments, the motion compensation module 340 is also used to obtain the arm span of the robotic arm in the current motion state; determine the motor angle compensation amount based on the arm span and the error corresponding to the current motion state; and modify the motion trajectory of the robotic arm based on the motor angle compensation amount.

[0111] In some embodiments, the motion compensation module 340 is also used to divide the motor angle compensation into N sub-motor angle compensation amounts, each sub-motor angle compensation amount is less than or equal to a preset angle, where N is a positive integer; obtain the motion position trajectory of the first axis motor of the robotic arm; within the first N control cycles of the motion position trajectory, the position trajectory values ​​are superimposed and modified one by one according to the N sub-motor angle compensation amounts, where each control cycle corresponds to the superposition of one sub-motor angle compensation amount.

[0112] In some embodiments, the motion compensation module 340 is further used to divide the error corresponding to the current motion state by the arm span to obtain a target angle; and multiply the target angle by the reduction ratio of the first-axis motor of the robotic arm to obtain a motor angle compensation amount.

[0113] In some embodiments, the motion compensation module 340 is also used to divide the error corresponding to the current motion state by the arm span to obtain a target angle; multiply the target angle by the reduction ratio of the first-axis motor of the robotic arm to obtain a motor angle compensation; multiply the motor angle compensation by a coefficient less than 1, and use the obtained product as the final motor angle compensation.

[0114] In some embodiments, the data acquisition module 310 is also used to obtain multiple influencing factors that affect the positioning error of the end of the robotic arm; screen out at least one influencing factor corresponding to the current task of the robotic arm from the multiple influencing factors; and determine multiple groups of motion states of the robotic arm based on at least one influencing factor.

[0115] In some embodiments, the data acquisition module 310 is also used to obtain the value range of at least one influencing factor in the current task; map the value range of at least one influencing factor to a preset range; and determine multiple groups of motion states of the robotic arm based on the preset range corresponding to at least one influencing factor.

[0116] In some embodiments, the data acquisition module 310 is also used to equally divide the preset interval corresponding to at least one influencing factor to obtain M sub-intervals corresponding to at least one influencing factor, where M is a positive integer; based on the M sub-intervals corresponding to at least one influencing factor, determine the M numerical values ​​corresponding to at least one influencing factor, each numerical value corresponds to a sub-interval; and arrange and combine the M numerical values ​​corresponding to at least one influencing factor to obtain multiple groups of motion states of the robotic arm.

[0117] In some embodiments, the data acquisition module 310 is further used to execute multiple groups of motion states Q times respectively, to obtain Q errors corresponding to each of the multiple groups of motion states, where Q is a positive integer; and to calculate the average value of the Q errors corresponding to each of the multiple groups of motion states as the error corresponding to each of the multiple groups of motion states.

[0118] In some embodiments, the motion trajectory compensation device 300 of the robotic arm further includes a trajectory execution module, which is configured to execute the modified motion trajectory.

[0119] Those skilled in the art can clearly understand that the above devices provided in the embodiments of the present application can implement the methods provided in the embodiments of the present application. The specific working processes of the above-described devices and modules can refer to the corresponding processes of the methods in the embodiments of the present application, which will not be repeated here.

[0120] In the embodiments provided in the present application, the coupling, direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication coupling through some interfaces, devices or modules, and may be electrical, mechanical or other forms, and the embodiments of the present application do not impose specific limitations on this.

[0121] In addition, the functional modules in the embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0122] See also Figure 13 , Figure 13 4 is a schematic diagram of a mechanical arm according to another embodiment of the present invention. The mechanical arm 400 may include a memory 410 and a processor 420. The memory 410 stores an application program. When the processor 420 calls the application program, the method according to the embodiment of the present invention can be implemented.

[0123] The processor 420 may include one or more processing cores. The processor 420 connects various components within the entire robotic arm 400 using various interfaces and circuits. The processor 420 is used to run or execute instructions, programs, code sets, or instruction sets stored in the memory 410, call and run or execute data stored in the memory 410, perform various functions of the robotic arm 400, and process data.

[0124] The processor 420 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 420 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to handle wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 420, but may be implemented separately through a communication chip.

[0125] The memory 410 may include random access memory (RAM) or read-only memory (ROM). The memory 410 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 410 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described above, and the like. The data storage area may store data created by the robotic arm 400 during use, and the like.

[0126] The embodiment of the present application also provides a computer-readable storage medium having program code stored thereon, and when a processor calls the program code, the method provided in the embodiment of the present application can be implemented.

[0127] The computer-readable storage medium may be an electronic memory such as a flash memory, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a hard disk, or a ROM.

[0128] In some embodiments, the computer-readable storage medium includes a non-volatile computer-readable medium (Non-Transitory Computer-Readable Storage Medium, referred to as Non-TCRSM). The computer-readable storage medium has storage space for program codes that execute any method step in the above method. These program codes can be read from or written into one or more computer program products. The program code can be compressed in an appropriate form.

[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A motion trajectory compensation method for a robotic arm, characterized in that: include: Determining, based on a plurality of influencing factors affecting the positioning error of the end of the manipulator, a plurality of groups of motion states of the manipulator and errors corresponding to the plurality of groups of motion states, wherein each group of motion states is represented by the plurality of influencing factors, and at least one of the influencing factors has a different value between different motion states; Acquire a current motion state of the robotic arm, where the current motion state is represented by the multiple influencing factors; estimating the error corresponding to the current motion state according to the multiple groups of motion states, the errors corresponding to the multiple groups of motion states, and the current motion state; Modify the motion trajectory of the robotic arm according to the error corresponding to the current motion state.

2. The method according to claim 1, characterized in that The estimating the error corresponding to the current motion state according to the multiple groups of motion states, the errors corresponding to the multiple groups of motion states, and the current motion state includes: Fitting a continuous mapping relationship between motion states and errors according to the plurality of discrete sets of motion states and the errors corresponding to the plurality of sets of motion states; Based on the mapping relationship, an error corresponding to the current motion state is determined.

3. The method according to claim 2, characterized in that The step of fitting a mapping relationship between motion states and errors according to the plurality of sets of motion states and the errors corresponding to the plurality of sets of motion states includes: Sorting the errors corresponding to the plurality of groups of motion states to obtain a first vector; Calculating a first covariance matrix according to the at least one influencing factor in the multiple groups of motion states, wherein the first covariance matrix and the parameters in the first vector have a mapping relationship; The determining, based on the mapping relationship, an error corresponding to the current motion state includes: Calculating a second covariance matrix according to the multiple groups of motion states and the current motion state, wherein the last row of the second covariance matrix is ​​the current motion state; Calculating a second vector based on the first vector, the first covariance matrix, and the second covariance matrix; The last item of the second vector is obtained as the error corresponding to the current motion state.

4. The method according to claim 3, characterized in that Calculating the second vector according to the first vector, the first covariance matrix, and the second covariance matrix includes: determining a pseudo-inverse matrix of the first covariance matrix; The second covariance matrix, the pseudo-inverse matrix, and the first vector are multiplied in sequence, and the product is used as the second vector.

5. The method according to claim 3, characterized in that The step of calculating a first covariance matrix according to the at least one influencing factor in the multiple groups of motion states includes: Using a radial basis function as a kernel function, and calculating a first covariance matrix according to the at least one influencing factor in the multiple groups of motion states; The calculating of the second covariance matrix according to the multiple groups of motion states and the current motion state includes: The radial basis function is used as the kernel function, and the second covariance matrix is ​​calculated according to multiple groups of motion states and the current motion state.

6. The method according to claim 1, characterized in that The multiple influencing factors include the arm span of the robotic arm, and modifying the motion trajectory of the robotic arm according to the error corresponding to the current motion state includes: Obtaining the arm span of the robotic arm in the current motion state; Determining a motor angle compensation amount according to the arm span and an error corresponding to the current motion state; The motion trajectory of the robotic arm is modified according to the motor angle compensation amount.

7. The method according to claim 6, characterized in that The step of modifying the motion trajectory of the robotic arm according to the motor angle compensation amount includes: Divide the motor angle compensation into N sub-motor angle compensations, each sub-motor angle compensation is less than or equal to a preset angle, wherein N is a positive integer; Obtain the motion position trajectory of the first axis motor of the robotic arm; In the first N control cycles of the motion position trajectory, the position trajectory values ​​are modified one by one according to the N sub-motor angle compensation amounts, wherein each control cycle corresponds to the superposition of one sub-motor angle compensation amount.

8. The method according to claim 6, characterized in that The determining of the motor angle compensation amount according to the arm span and the error corresponding to the current motion state includes: Dividing the error corresponding to the current motion state by the arm span to obtain a target angle; The target angle is multiplied by the reduction ratio of the first-axis motor of the robotic arm to obtain the motor angle compensation amount.

9. The method according to claim 8, characterized in that The method of multiplying the target angle by the reduction ratio of the first axis motor of the robotic arm to obtain the motor angle compensation includes: The target angle is multiplied by the reduction ratio of the first-axis motor of the robot arm to obtain a motor angle compensation amount; The motor angle compensation amount is multiplied by a coefficient less than 1, and the obtained product is used as the final motor angle compensation amount.

10. The method according to claim 1, characterized in that The method of determining multiple sets of motion states of the robotic arm based on multiple influencing factors affecting the positioning error of the robotic arm end includes: Obtain multiple influencing factors that affect the positioning error of the end of the robot arm; Select at least one influencing factor corresponding to the current task of the robotic arm from among the multiple influencing factors; According to at least one influencing factor, multiple groups of motion states of the robot arm are determined.

11. The method according to claim 10, characterized in that The determining of multiple sets of motion states of the robotic arm according to at least one influencing factor includes: Obtaining a value range of at least one influencing factor in the current task; Mapping the value interval of each of at least one influencing factor to a preset interval; According to a preset interval corresponding to at least one influencing factor, multiple groups of motion states of the robotic arm are determined.

12. The method according to claim 11, characterized in that The determining of multiple sets of motion states of the robotic arm according to a preset interval corresponding to at least one influencing factor includes: Equally divide the preset interval corresponding to at least one influencing factor to obtain M subintervals corresponding to at least one influencing factor, where M is a positive integer; Determining, based on the M subintervals corresponding to the at least one influencing factor, M numerical values ​​corresponding to the at least one influencing factor, each numerical value corresponding to a subinterval; The M numerical values ​​corresponding to at least one influencing factor are arranged and combined to obtain multiple groups of motion states of the robotic arm.

13. The method according to claim 1, wherein The method of determining the errors corresponding to the plurality of groups of motion states according to the plurality of influencing factors affecting the positioning error of the end of the manipulator comprises: Execute multiple sets of motion states Q times respectively, and obtain Q errors corresponding to each set of motion states, where Q is a positive integer; Calculate the average value of Q errors corresponding to each of the multiple groups of motion states as the error corresponding to each of the multiple groups of motion states.

14. The method according to any one of claims 1 to 13, characterized in that The multiple influencing factors include at least: the arm posture, arm span, movement direction of each axis, load, movement speed and acceleration of the robot arm.

15. The method according to any one of claims 1 to 13, characterized in that After modifying the motion trajectory of the robotic arm according to the error corresponding to the current motion state, the method further includes: Execute the modified motion trajectory.

16. A motion trajectory compensation device for a robotic arm, characterized in that: include: a data acquisition module, configured to determine, based on a plurality of influencing factors affecting positioning errors of the end portion of the manipulator, a plurality of sets of motion states of the manipulator and errors corresponding to the plurality of sets of motion states, wherein each set of motion states is represented by the plurality of influencing factors, and at least one of the influencing factors has a different value between different motion states; A state acquisition module, configured to acquire a current motion state of the robotic arm, where the current motion state is represented by the plurality of influencing factors; an error estimation module, configured to estimate an error corresponding to a current motion state based on the multiple groups of motion states, the errors corresponding to the multiple groups of motion states, and the current motion state; The motion compensation module is used to modify the motion trajectory of the robotic arm according to the error corresponding to the current motion state.

17. A robotic arm, characterized in that: include: A memory and a processor, wherein an application is stored in the processor, and when the processor calls the application, the method according to any one of claims 1 to 15 can be implemented.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, and the processor calls the program code to implement the method according to any one of claims 1 to 15.