A manipulator trajectory optimization method, device, computer device and storage medium
By improving the Gray Wolf algorithm to optimize the movement trajectory of each joint of the robotic arm, combined with the cubic spline interpolation method, the problem of the inability to optimize the movement trajectory of each joint in the prior art is solved, and the effect of rapid movement of the robotic arm to a designated position is achieved.
Patent Information
- Application Number
- CN202211018033.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-08-24
AI Technical Summary
The existing robotic arm trajectory planning methods cannot effectively optimize the movement trajectory of each joint, resulting in limited increase in the movement speed of the robotic arm.
The improved gray wolf algorithm is used to optimize the movement trajectory of each joint of the robotic arm through random initialization of interpolation time intervals, kinematic constraint judgment, gray wolf position update and convergence factor calculation, and the joint position, velocity and acceleration are calculated by combining the cubic spline interpolation method.
The rapid trajectory optimization of each joint of the robot arm is achieved, avoiding the problems of slow convergence speed and falling into local optimal solutions, ensuring that the robot arm reaches the designated position as soon as possible.
Smart Images

Figure CN115383744B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of robotic arms, and particularly to a method and device for optimizing the trajectory of a robotic arm, a computer device, and a storage medium. Background Art
[0002] With the rapid development of science and technology, more and more mechanical and repetitive tasks will be performed by robots. As a result, robotic arms are increasingly widely used in various fields of industry. When a robotic arm performs grasping and handling tasks, moving from the starting position to the target position requires the cooperation of multiple joints. The rotational speed and angle of each joint determine how to move to the target position faster. That is, reasonable trajectory planning for the movement of the robotic arm can make the robotic arm move faster, and the fast movement of the robotic arm can improve the operation efficiency of the factory workshop, thereby increasing the relevant economic benefits.
[0003] Existing trajectory planning methods for robotic arms involve dividing the space into grids to determine the movement path of the end of the robotic arm. However, this method can only perform trajectory planning for the end of the robotic arm and cannot optimize the trajectory according to each joint of the robotic arm, and thus cannot significantly improve the movement speed of the robotic arm.
[0004] Therefore, there is an urgent need for a method for optimizing the trajectory of a robotic arm that can determine the movement trajectory of the robotic arm according to the characteristics of each joint of the robotic arm. Summary of the Invention
[0005] Based on this, in view of the above technical problems, it is necessary to provide a method and device for optimizing the trajectory of a robotic arm, a computer device, and a storage medium that can quickly optimize the trajectories of each joint of the robotic arm.
[0006] A method for optimizing the trajectory of a robotic arm, the method comprising:
[0007] S110, randomly initializing an interpolation time interval according to the value range of the interpolation time; wherein, the randomly initialized interpolation time interval determines the initial position of the wolf pack, and the current interpolation time interval of the optimal wolf is obtained through random initialization;
[0008] S120, obtaining the task angles of each joint of the robotic arm, and calculating the movement trajectory position, speed, and acceleration of each joint of the robotic arm by using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf;
[0009] S130, determining whether the speed and acceleration of the movement of each joint of the robotic arm satisfy the kinematic constraint conditions;
[0010] S140, if the kinematic constraint conditions are satisfied, then take the current fitness value as the optimal fitness value, and compare the fitness values corresponding to the three levels of gray wolves, namely α, β, and δ, with the optimal fitness value and update their own fitness values;
[0011] S150, calculate the convergence factor and calculate the coefficient according to the convergence factor;
[0012] S160, calculate the current interpolation time interval of the optimal wolf according to the current interpolation time intervals and coefficients of each joint of the robotic arm corresponding to the three levels of gray wolves, namely α, β, and δ;
[0013] S170, if the current interpolation time interval of the optimal wolf does not satisfy the boundary conditions of the optimization variables, use the boundary value as the current interpolation time interval of the optimal wolf;
[0014] S180, repeat S120 - S170 until the number of iterations reaches the maximum value and then exit.
[0015] In one embodiment, the obtaining the task angles of each joint of the robotic arm and calculating the motion trajectory positions, velocities and accelerations of each joint of the robotic arm by using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf includes: obtaining the task angles of each joint of the robotic arm; assuming that the velocity and acceleration values of each joint calculated by using the cubic spline interpolation method according to the task angles of each joint of the robotic arm and the current interpolation time interval of the optimal wolf are υ i,j and acc i,j , where i = 1, 2, 3, 4, 5, 6, i is the joint label, and j = 1, ……, n, j is the label of the interpolated position point; the judging whether the velocities and accelerations of the movements of each joint of the robotic arm satisfy the kinematic constraint conditions is:
[0016] |υ i,j | ≤ V max ;
[0017] |acc i,j | ≤ A ccmax ;
[0018] where, V max is the maximum velocity of the movement of each joint of the robotic arm, and A ccmax is the maximum acceleration of the movement of each joint of the robotic arm.
[0019] In one embodiment, the if the kinematic constraint conditions are satisfied, then take the current fitness value as the optimal fitness value, and compare the fitness values corresponding to the three levels of gray wolves, namely α, β, and δ, with the optimal fitness value and update their own fitness values includes: if the kinematic constraint conditions are satisfied, then take the current fitness value as the optimal fitness value, and the formula for calculating the current fitness value is:
[0020]
[0021] Among them, T is the current fitness value, and T is equal to the sum of the interpolation time intervals of each joint of the robotic arm, T i is the current interpolation time interval of the optimal wolf of each joint of the robotic arm, and m is the number of total interpolation time intervals; compare the fitness values corresponding to the three levels of gray wolves, α, β, and δ, with the optimal fitness value and update their own fitness values.
[0022] In one embodiment, the comparing the fitness values corresponding to the three levels of gray wolves, α, β, and δ, with the optimal fitness value and updating their own fitness values includes: calculating the fitness values corresponding to the three levels of gray wolves, α, β, and δ, respectively, and the calculation formulas are as follows:
[0023]
[0024]
[0025]
[0026] Among them, T α is the fitness value corresponding to the α-level gray wolf, T β is the fitness value corresponding to the β-level gray wolf, T δ is the fitness value corresponding to the δ-level gray wolf, T αi is the current interpolation time interval of each joint of the robotic arm corresponding to the α-level gray wolf, T βi is the current interpolation time interval of each joint of the robotic arm corresponding to the β-level gray wolf, T δi is the current interpolation time interval of each joint of the robotic arm corresponding to the δ-level gray wolf; if T α > T, then take T as the fitness value corresponding to the α-level gray wolf; among them, T i is used as the current interpolation time interval of each joint of the robotic arm corresponding to the α-level gray wolf; if T β > T, then take T as the fitness value corresponding to the β-level gray wolf; among them, T i is used as the current interpolation time interval of each joint of the robotic arm corresponding to the β-level gray wolf; if T δ > T, then take T as the fitness value corresponding to the δ-level gray wolf; among them, T i is used as the current interpolation time interval of each joint of the robotic arm corresponding to the δ-level gray wolf.
[0027] In one embodiment, the robotic arm trajectory optimization method further includes: if the kinematic constraint conditions are not satisfied, then take the optimal fitness value as 100, calculate the current interpolation time interval of the optimal wolf according to the value of the optimal fitness value, and return to S120.
[0028] In one embodiment, calculating the convergence factor and calculating coefficients according to the convergence factor includes:
[0029] Calculating the convergence factor a, with the formula as follows:
[0030]
[0031] where L is the maximum number of iterations of the algorithm; let A be the position update coefficient and C be the distance update coefficient, and calculating coefficients according to the convergence factor, with the calculation formula as follows:
[0032] A = 2a·r1 - a;
[0033] C = 2r2;
[0034] where r1, r2 are random values between 0 and 1, and a represents the convergence factor.
[0035] In one embodiment, calculating the current interpolation time interval of the optimal wolf according to the current interpolation time intervals and coefficients of each joint of the robotic arm corresponding to the gray wolves of α, β, δ levels includes: Let the current interpolation time intervals of each joint of the robotic arm corresponding to the gray wolves of α, β, δ levels be X α,l , X β,l , X δ,l , X l be the previous adaptive position, then calculating the distances D α , D β , D δ from itself according to the current interpolation time intervals and the distance update coefficient of each joint of the robotic arm corresponding to the gray wolves of α, β, δ levels, with the formula as follows:
[0036]
[0037] where C1, C2, C3 are the distance update coefficients corresponding to the α, β, δ wolves respectively; calculating the updated interpolation time intervals corresponding to the gray wolves of α, β, δ levels according to the distances D α , D β , D δ , with the formula as:
[0038]
[0039] where X α,l+1 , X β,l+1 , X δ,l+1 are the updated interpolation time intervals corresponding to the α, β, δ wolves respectively, and A1, A2, A3 are the position update coefficients corresponding to the α, β, δ wolves respectively; calculating the current adaptive position according to the updated interpolation time intervals corresponding to the α, β, δ wolves, with the formula as follows:
[0040]
[0041] Among them, X l+1 is the current adaptive position, and L is the maximum number of iterations of the algorithm; the current adaptive position is used as the current interpolation time interval of the optimal wolf.
[0042] A manipulator trajectory optimization device, the device includes:
[0043] An initialization module for randomly initializing the interpolation time interval according to the value range of the interpolation time; among them, the randomly initialized interpolation time interval determines the initial wolf pack position, and the current interpolation time interval of the optimal wolf is obtained through random initialization;
[0044] A manipulator motion parameter calculation module for obtaining the task angles of each joint of the manipulator and calculating the motion trajectory positions, velocities and accelerations of each joint of the manipulator by using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf;
[0045] A kinematic constraint judgment module for judging whether the velocities and accelerations of the motions of each joint of the manipulator satisfy the kinematic constraint conditions;
[0046] A gray wolf position update module for, if the kinematic constraint conditions are satisfied, taking the current fitness value as the optimal fitness value and comparing the fitness values corresponding to the gray wolves of the three levels of α, β, and δ with the optimal fitness value and updating its own fitness value;
[0047] A coefficient calculation module for calculating the convergence factor and calculating the coefficient according to the convergence factor;
[0048] An optimal wolf position calculation module for calculating the current interpolation time interval of the optimal wolf according to the current interpolation time intervals and coefficients of each joint of the manipulator corresponding to the gray wolves of the three levels of α, β, and δ;
[0049] An optimal wolf position correction module for, if the current interpolation time interval of the optimal wolf does not satisfy the boundary conditions of the optimization variables, using the boundary value as the current interpolation time interval of the optimal wolf;
[0050] A loop module for controlling the manipulator motion parameter calculation module, the kinematic constraint judgment module, the gray wolf position update module, the coefficient calculation module, the optimal wolf position calculation module, and the optimal wolf position correction module to execute sequentially and repeatedly until the number of iterations reaches the maximum value and the program exits.
[0051] A computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0052] S110. Randomly initialize the interpolation time interval according to the value range of the interpolation time. Among them, the randomly initialized interpolation time interval determines the initial wolf pack position, and the current interpolation time interval of the optimal wolf is obtained through random initialization;
[0053] S120. Obtain the task angles of each joint of the robotic arm, and calculate the motion trajectory position, speed, and acceleration of each joint of the robotic arm by using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf;
[0054] S130. Determine whether the speed and acceleration of the motion of each joint of the robotic arm satisfy the kinematic constraint conditions;
[0055] S140. If the kinematic constraint conditions are satisfied, take the current fitness value as the optimal fitness value, and compare the fitness values corresponding to the three levels of gray wolves, namely α, β, and δ, with the optimal fitness value and update their own fitness values;
[0056] S150. Calculate the convergence factor and calculate the coefficient according to the convergence factor;
[0057] S160. Calculate the current interpolation time interval of the optimal wolf according to the current interpolation time intervals of each joint of the robotic arm corresponding to the three levels of gray wolves, namely α, β, and δ, and the coefficient;
[0058] S170. If the current interpolation time interval of the optimal wolf does not meet the boundary conditions of the optimization variables, use the boundary value as the current interpolation time interval of the optimal wolf;
[0059] S180. Repeat S120 - S170 until the number of iterations reaches the maximum value and then exit.
[0060] A computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0061] S110. Randomly initialize the interpolation time interval according to the value range of the interpolation time. Among them, the randomly initialized interpolation time interval determines the initial wolf pack position, and the current interpolation time interval of the optimal wolf is obtained through random initialization;
[0062] S120. Obtain the task angles of each joint of the robotic arm, and calculate the motion trajectory position, speed, and acceleration of each joint of the robotic arm by using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf;
[0063] S130. Determine whether the speed and acceleration of the motion of each joint of the robotic arm satisfy the kinematic constraint conditions;
[0064] S140, if the kinematic constraint conditions are satisfied, take the current fitness value as the optimal fitness value, and compare the fitness values corresponding to the three levels of gray wolves, namely α, β, and δ, with the optimal fitness value and update their own fitness values;
[0065] S150, calculate the convergence factor and calculate the coefficient according to the convergence factor;
[0066] S160, calculate the current interpolation time interval of the optimal wolf according to the current interpolation time intervals and coefficients of each joint of the robotic arm corresponding to the three levels of gray wolves, namely α, β, and δ;
[0067] S170, if the current interpolation time interval of the optimal wolf does not satisfy the boundary conditions of the optimization variables, use the boundary value as the current interpolation time interval of the optimal wolf;
[0068] S180, repeat S120 - S170 until the number of iterations reaches the maximum value and then exit.
[0069] The above robotic arm trajectory optimization method, device, computer equipment, and storage medium apply the improved convergence factor and adaptive position update strategy of the gray wolf algorithm to the trajectory optimization of the robotic arm. It can not only avoid the problems of slow convergence speed and getting stuck in local optimal solutions, but also can perform trajectory optimization according to each joint of the robotic arm during the trajectory optimization process of the robotic arm, quickly obtain the optimal motion parameters, and ensure that the robotic arm reaches the specified position in the fastest time. Brief Description of the Drawings
[0070] Figure 1 It is a schematic flowchart of the robotic arm trajectory optimization method in an embodiment;
[0071] Figure 2 It is a comparison chart of convergence factors in an embodiment;
[0072] Figure 3 It is a comparison chart of motion time during the robotic arm trajectory optimization process of the gray wolf algorithm in an embodiment;
[0073] Figure 4 It is a joint acceleration curve graph in an embodiment;
[0074] Figure 5 It is a joint velocity curve graph in an embodiment;
[0075] Figure 6 It is a joint position curve graph in an embodiment;
[0076] Figure 7 It is a structural block diagram of the robotic arm trajectory optimization device in an embodiment;
[0077] Figure 8 It is an internal structure diagram of the computer equipment in an embodiment. Specific Embodiments
[0078] In order to make the objectives, technical solutions, and advantages of this application clearer, the following further details this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely used to explain this application and are not used to limit this application.
[0079] The Grey Wolf Algorithm is a swarm intelligence optimization algorithm evolved based on the hunting characteristics of wolf packs. The wolf pack has a very strict social hierarchy, which can be divided into four levels according to the level: α wolves, β wolves, δ wolves, and ω wolves. Among them, α wolves have the highest level, corresponding to the optimal solution of the problem; β wolves are in the second level, corresponding to the sub-optimal solution of the problem; δ wolves represent the grey wolves in the third level, corresponding to the third-best solution; the rest belong to ω wolves, which are in the lowest level. The entire process of wolf pack hunting includes the first three wolves responsible for leading the δ wolves to search for prey, surround the prey, and attack the prey, and finally complete the hunt (obtain the optimal value). The current Grey Wolf Algorithm is a new intelligent optimization algorithm that simulates the hunting behavior of grey wolves. The Grey Wolf Algorithm shows good application effects in continuous spaces, but its performance in discrete spaces is not very satisfactory. When optimizing the motion trajectory of a robotic arm, the desired effects are often not achieved.
[0080] In one embodiment, as Figure 1 shown, a robotic arm trajectory optimization method is provided, including the following steps:
[0081] S110, randomly initialize the interpolation time interval according to the value range of the interpolation time; wherein, the randomly initialized interpolation time interval determines the initial wolf pack position, and the current interpolation time interval of the optimal wolf is obtained through random initialization.
[0082] Among them, the value range of the interpolation time is set according to the requirements for the completion time of the robotic arm movement. For example, the value range of the interpolation time can be [0.2, 4], in seconds. The initial fitness values of the grey wolves at the α, β, and δ levels are set to 100, and the interpolation time interval (cubic spline interpolation interval) is 0.01 seconds. Among them, according to the Grey Wolf Algorithm, the initial population is set to 20, and the maximum number of iterations is 100 times; of course, the number of the initial population and the number of iterations can be set as needed and are not limited herein. Randomly initialize the wolf pack position, that is, the position of each grey wolf is the set of interpolation time periods to be optimized, that is, it is expressed as randomly initializing the wolf pack position, that is, the position of each grey wolf is the set of interpolation time periods to be optimized, that is, it is expressed as [T1, T2,..., T n-1 ; T i is the motion time period between two joints and is also the interpolation time interval.
[0083] S120. Obtain the task angles of each joint of the robotic arm. According to the current interpolation time interval of the optimal wolf, use the cubic spline interpolation method to calculate the motion trajectory positions, velocities, and accelerations of each joint of the robotic arm.
[0084] Among them, the robotic arm has multiple joints, and each joint is set with a task angle. For example, for a certain joint, it is set to move from the first angle to the second angle, from the second angle to the third angle, and from the third angle to the fourth angle. When S120 is executed for the first time, the calculation can be performed using the current interpolation time interval of the initialized optimal wolf.
[0085] S130. Determine whether the velocities and accelerations of the movements of each joint of the robotic arm satisfy the kinematic constraint conditions.
[0086] Among them, each robotic arm has restrictions on velocity and acceleration. If the limit requirements are exceeded, it will cause damage to the robotic arm. Therefore, it is necessary to limit the velocity and acceleration.
[0087] S140. If the kinematic constraint conditions are satisfied, take the current fitness value as the optimal fitness value, and compare the fitness values corresponding to the three levels of gray wolves, α, β, and δ, with the optimal fitness value and update their own fitness values.
[0088] Among them, the initial values of the fitness values corresponding to the three levels of gray wolves, α, β, and δ, are set to 100.
[0089] S150. Calculate the convergence factor and calculate the coefficient according to the convergence factor.
[0090] S160. According to the current interpolation time intervals and coefficients of each joint of the robotic arm corresponding to the three levels of gray wolves, α, β, and δ, calculate the current interpolation time interval of the optimal wolf.
[0091] S170. If the current interpolation time interval of the optimal wolf does not satisfy the boundary conditions of the optimization variables, use the boundary value as the current interpolation time interval of the optimal wolf.
[0092] S180. Repeat S120 - S170 until the number of iterations reaches the maximum value and then exit.
[0093] Among them, after exiting, use the finally updated velocities and accelerations and the current interpolation time interval of the optimal wolf to control the movement of each joint of the robotic arm, so that the robotic arm can quickly reach the specified position.
[0094] In the above robotic arm trajectory optimization method, by improving the convergence factor of the grey wolf algorithm and the update strategy of the adaptive position and applying them to the trajectory optimization of the robotic arm, not only can the problems of slow convergence speed and getting stuck in local optimal solutions be avoided, but also during the trajectory optimization process of the robotic arm, trajectory optimization can be performed according to each joint of the robotic arm, and the optimal motion parameters can be quickly obtained to ensure that the robotic arm reaches the specified position in the fastest time.
[0095] In one embodiment, the obtaining of the task angles of each joint of the robotic arm and the calculation of the motion trajectory positions, velocities, and accelerations of each joint of the robotic arm using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf include: obtaining the task angles of each joint of the robotic arm; assuming that the velocity and acceleration values of each joint calculated using the cubic spline interpolation method according to the task angles of each joint of the robotic arm and the current interpolation time interval of the optimal wolf are υ i,j and acc i,j , where i = 1, 2, 3, 4, 5, 6, i is the joint label, and j = 1, ……, n, j is the label of the interpolated position point; the judging whether the velocities and accelerations of the motions of each joint of the robotic arm satisfy the kinematic constraint conditions is:
[0096] |υ i,j | ≤ V max ;
[0097] |acc i,j | ≤ A ccmax ;
[0098] where, V max is the maximum velocity of the motion of each joint of the robotic arm, and A ccmax is the maximum acceleration of the motion of each joint of the robotic arm.
[0099] In one embodiment, the if the kinematic constraint conditions are satisfied, then the current fitness value is used as the optimal fitness value, and the fitness values corresponding to the grey wolves of the three levels of α, β, and δ are compared with the optimal fitness value and their own fitness values are updated, including: if the kinematic constraint conditions are satisfied, then the current fitness value is used as the optimal fitness value, and the calculation formula of the current fitness value is:
[0100]
[0101] where, T is the current fitness value, T is equal to the sum of the interpolation time intervals of each joint of the robotic arm, T i is the current interpolation time interval of the optimal wolf of each joint of the robotic arm, and m is the number of the total interpolation time intervals; the fitness values corresponding to the grey wolves of the three levels of α, β, and δ are compared with the optimal fitness value and their own fitness values are updated.
[0102] In one embodiment, comparing the fitness values corresponding to the α, β, and δ - level gray wolves with the optimal fitness value and updating their own fitness values includes:
[0103] Calculate the fitness values corresponding to the α, β, and δ - level gray wolves respectively. The calculation formulas are as follows:
[0104]
[0105]
[0106]
[0107] where T α is the fitness value corresponding to the α - level gray wolf, T β is the fitness value corresponding to the β - level gray wolf, T δ is the fitness value corresponding to the δ - level gray wolf, T αi is the current interpolation time interval of each joint of the robotic arm corresponding to the α - level gray wolf, T βi is the current interpolation time interval of each joint of the robotic arm corresponding to the β - level gray wolf, T δi is the current interpolation time interval of each joint of the robotic arm corresponding to the δ - level gray wolf; if T α > T, then take T as the fitness value corresponding to the α - level gray wolf; where T i serves as the current interpolation time interval of each joint of the robotic arm corresponding to the α - level gray wolf; if T β > T, then take T as the fitness value corresponding to the β - level gray wolf; where T i serves as the current interpolation time interval of each joint of the robotic arm corresponding to the β - level gray wolf; if T δ > T, then take T as the fitness value corresponding to the δ - level gray wolf; where T i serves as the current interpolation time interval of each joint of the robotic arm corresponding to the δ - level gray wolf.
[0108] In one embodiment, the robotic arm trajectory optimization further includes: S190, if the kinematic constraint conditions are not met, then take the optimal fitness value as 100, calculate the current interpolation time interval of the optimal wolf according to the value of the optimal fitness value, and return to S120.
[0109] Among them, calculating the current interpolation time interval of the optimal wolf according to the value of the optimal fitness value is specifically: the current interpolation time interval T i of the optimal wolf = 100÷m, where m is the number of the total interpolation time intervals.
[0110] In one embodiment, calculating the convergence factor and calculating the coefficient according to the convergence factor includes: calculating the convergence factor a, and the formula is as follows:
[0111]
[0112] Among them, L is the maximum number of iterations of the algorithm; let A be the position update coefficient and C be the distance update coefficient, and the coefficients are calculated according to the convergence factor. The calculation formulas are as follows:
[0113] A = 2a·r1 - a;
[0114] C = 2r2;
[0115] Among them, r1 and r2 are random values between 0 and 1, and a represents the convergence factor.
[0116] Among them, in the standard gray wolf algorithm, the convergence factor a uses a linearly decreasing method. However, during the entire algorithm process, it does not always converge according to the linear strategy. In this application, the convergence factor a is based on the non-linear convergence strategy and the sine-cosine convergence strategy. The attenuation speed is slower in the initial stage, making the algorithm easier to jump out of the local optimum, enhancing the global search ability, and increasing the diversity of solutions. As the number of iterations increases, the descent speed of a increases, enabling the algorithm to find the optimal solution faster.
[0117] Among them, as Figure 2 shown, the blue line is the graph of the convergence factor of the existing gray wolf algorithm changing with the number of iterations, and the orange line is the graph of the convergence factor changing with the number of iterations. For bionic population iteration algorithms, how to balance the global exploration and local exploitation capabilities is an important means to test the quality of the algorithm. It can be seen from the basic gray wolf algorithm model that both the global and local properties are determined by the coefficient vector (position update coefficient) A, and the element values in A are controlled by a. The convergence factor a is a linear transformation that linearly decreases from 2 to 0 as the number of iterations changes. However, the actual optimization process of the algorithm should be non-linear, and the linear convergence factor cannot accurately reflect the entire optimization process. By improving the convergence factor a, the factor slowly decreases in the initial stage, maintaining a large search range, ensuring globality, and increasing the convergence speed during iteration. Using the non-linear strategy of the present invention can effectively improve the global search ability and convergence speed of the gray wolf algorithm, thereby improving the efficiency of the manipulator trajectory optimization.
[0118] In one of the embodiments, calculating the current interpolation time interval of the optimal wolf according to the current interpolation time intervals and coefficients of each joint of the manipulator corresponding to the gray wolves of the α, β, and δ levels includes: setting the current interpolation time intervals of each joint of the manipulator corresponding to the gray wolves of the α, β, and δ levels to be X α,l 、X β,l 、X δ,l ,X lIf it is the previous adaptive position, then calculate the distance D from itself according to the current interpolation time intervals and distance update coefficients of each joint of the robotic arm corresponding to the gray wolves at the three levels of α, β, and δ. α , D β , D δ , and the formula is as follows:
[0119]
[0120] Among them, C1, C2, and C3 are the distance update coefficients corresponding to the α, β, and δ wolves respectively; according to the distances D α , D β , D δ , calculate the updated interpolation time intervals corresponding to the gray wolves at the three levels of α, β, and δ, and the formula is:
[0121]
[0122] Among them, X α,l+1 , X β,l+1 , X δ,l+1 are the updated interpolation time intervals corresponding to the α, β, and δ wolves respectively, and A1, A2, and A3 are the position update coefficients corresponding to the α, β, and δ wolves respectively; calculate the current adaptive position according to the updated interpolation time intervals corresponding to the α, β, and δ wolves, and the formula is as follows:
[0123]
[0124] Among them, X l+1 is the current adaptive position, and L is the maximum number of iterations of the algorithm; use the current adaptive position as the current interpolation time interval of the optimal wolf.
[0125] Among them, in the position update strategy of the standard gray wolf algorithm, the average value of the sum of the updated interpolation time intervals corresponding to the gray wolves at the three levels of α, β, and δ is used as the current adaptive position. This method does not reflect the leading role of the leading wolves in the wolf pack, and the update direction remains unchanged, making it easy to fall into the local optimal state; the formula for calculating the current adaptive position in this application focuses on the balance between global search and convergence speed. A good global search strategy can prevent the algorithm from falling into the local optimal solution state. Similarly, good local development ability also enables the algorithm to converge to the optimal position faster.
[0126] In one embodiment, it is necessary to perform optimal trajectory planning for the joint motion time of a six-degree-of-freedom collaborative robotic arm, obtain the angles that each of the six joints of the robotic arm needs to pass through, and use four angles for each joint as four task path points, which are: the position of joint 1 is [-10, 60, 20, 55], the position of joint 2 is [20, 50, 120, 35], the position of joint 3 is [15, 100, -10, 30], the position of joint 4 is [150, 100, 40, 10], the position of joint 5 is [30, 110, 90, 70], and the position of joint 6 is [120, 60, 100, 25]; let the interpolation time T for each segment representing the position of the gray wolf i (i = 1, 2, 3) has a value range of [0.2, 4], with the unit of seconds. The initial fitness values of the gray wolves at the three levels of α, β, and δ are set to 100. The cubic spline interpolation interval is 0.01 seconds. The interpolation time periods between the robotic arm motion path points are randomly initialized within the value range of the time period [0.2, 4]. By comparing the existing gray wolf algorithm with the improved gray wolf algorithm, the initial population is set to 20 for both, and the maximum number of iterations is 100 times. The results obtained are as Figure 3 shown, Figure 3 In which the blue dashed line is the total motion time of the trajectory optimization of the existing gray wolf algorithm, Figure 3 In which the orange solid line is the total motion time of the trajectory optimization of the improved gray wolf algorithm of the present invention. It can be seen that using the method of the present invention can effectively improve the convergence speed and better fitness value; according to Figure 4 the joint acceleration curve graph in, Figure 5 the joint velocity curve graph in and Figure 6 the joint position curve graph in, it can be seen that the trajectory optimized by the robotic arm trajectory optimization method of the present invention ensures the continuity of the running path and a good smooth velocity curve.
[0127] It should be understood that although Figure 1 the steps in the flowchart of Figure 1 are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,
[0128] In one embodiment, as Figure 7 shown, a robotic arm trajectory optimization device is provided, including:
[0129] The initialization module 210 is used to randomly initialize the interpolation time interval according to the value range of the interpolation time; among them, the randomly initialized interpolation time interval determines the initial wolf pack position, and the current interpolation time interval of the optimal wolf is obtained through random initialization;
[0130] The robotic arm motion parameter calculation module 220 is used to obtain the task angles of each joint of the robotic arm, and calculate the motion trajectory positions, velocities and accelerations of each joint of the robotic arm by using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf;
[0131] The kinematic constraint judgment module 230 is used to judge whether the velocities and accelerations of the motions of each joint of the robotic arm meet the kinematic constraint conditions;
[0132] The grey wolf position update module 240 is used to, if the kinematic constraint conditions are met, take the current fitness value as the optimal fitness value, and compare the fitness values corresponding to the grey wolves of the three levels of α, β, and δ with the optimal fitness value and update its own fitness value;
[0133] The coefficient calculation module 250 is used to calculate the convergence factor and calculate the coefficient according to the convergence factor;
[0134] The optimal wolf position calculation module 260 is used to calculate the current interpolation time interval of the optimal wolf according to the current interpolation time intervals of each joint of the robotic arm corresponding to the grey wolves of the three levels of α, β, and δ and the coefficient;
[0135] The optimal wolf position correction module 270 is used to, if the current interpolation time interval of the optimal wolf does not meet the boundary conditions of the optimization variables, use the boundary value as the current interpolation time interval of the optimal wolf;
[0136] The loop module 280 is used to control the robotic arm motion parameter calculation module 220, the kinematic constraint judgment module 230, the grey wolf position update module 240, the coefficient calculation module 250, the optimal wolf position calculation module 260, and the optimal wolf position correction module 270 to execute sequentially and repeatedly until the number of iterations reaches the maximum value and the program exits.
[0137] In one embodiment, the robotic arm motion parameter calculation module 220 includes: a joint task angle acquisition unit for acquiring the task angles of each joint of the robotic arm; a joint speed and acceleration calculation unit for setting the joint speed and acceleration values obtained by using the cubic spline interpolation method according to the task angles of each joint of the robotic arm and the current interpolation time interval of the optimal wolf to be υ i,j and acc i,j, where \(i = 1, 2, 3, 4, 5, 6\), \(i\) is the joint label, \(j = 1, \ldots, n\), \(j\) is the label of the position point obtained by interpolation; a kinematic constraint judgment unit for judging whether the speeds and accelerations of the movements of the joints of the robotic arm satisfy the kinematic constraint conditions:
[0138] |\(\upsilon\) i,j | \(\leq V\) max ;
[0139] |acc i,j | \(\leq A\) ccmax ;
[0140] where \(V\) max is the maximum speed of the movements of the joints of the robotic arm, and \(A\) ccmax is the maximum acceleration of the movements of the joints of the robotic arm.
[0141] In one embodiment, the optimal wolf position calculation module 260 includes: an optimal fitness value determination unit for, if the kinematic constraint conditions are satisfied, taking the current fitness value as the optimal fitness value, and the current fitness value calculation formula is:
[0142]
[0143] where \(T\) is the current fitness value, \(T\) is equal to the total interpolation time interval of the joints of the robotic arm, \(T\) i is the current interpolation time interval of the optimal wolf of the joints of the robotic arm, and \(m\) is the number of the total interpolation time intervals; a gray wolf adaptive fitness value update unit for comparing the fitness values corresponding to the three levels of gray wolves, \(\alpha\), \(\beta\), and \(\delta\), with the optimal fitness value and updating its own fitness value.
[0144] In one embodiment, the gray wolf adaptive fitness value update unit includes: a gray wolf fitness value calculation sub - unit for respectively calculating the fitness values corresponding to the three levels of gray wolves, \(\alpha\), \(\beta\), and \(\delta\), and the calculation formulas are as follows:
[0145]
[0146]
[0147]
[0148] where \(T\) α is the fitness value corresponding to the \(\alpha\) - level gray wolf, \(T\) β is the fitness value corresponding to the \(\beta\) - level gray wolf, \(T\) δ is the fitness value corresponding to the \(\delta\) - level gray wolf, \(T\) αi is the current interpolation time interval of the joints of the robotic arm corresponding to the \(\alpha\) - level gray wolf, \(T\) βiThe current interpolation time interval of each joint of the robotic arm corresponding to the β - level gray wolf, T δi is the current interpolation time interval of each joint of the robotic arm corresponding to the δ - level gray wolf; The fitness value update subunit of the α - level gray wolf is used to, if T α > T, then take T as the fitness value corresponding to the α - level gray wolf; where, T i serves as the current interpolation time interval of each joint of the robotic arm corresponding to the α - level gray wolf; The fitness value update subunit of the β - level gray wolf is used to, if T β > T, then take T as the fitness value corresponding to the β - level gray wolf; where, T i serves as the current interpolation time interval of each joint of the robotic arm corresponding to the β - level gray wolf; The fitness value update subunit of the δ - level gray wolf is used to, if T δ > T, then take T as the fitness value corresponding to the δ - level gray wolf; where, T i serves as the current interpolation time interval of each joint of the robotic arm corresponding to the δ - level gray wolf.
[0149] In one embodiment, the optimal wolf position calculation module 260 is further configured to, if the kinematic constraint conditions are not satisfied, take the optimal fitness value as 100, and calculate the current interpolation time interval of the optimal wolf according to the value of the optimal fitness value.
[0150] In one embodiment, the coefficient calculation module 250 includes: a convergence factor calculation unit for calculating the convergence factor a, and the formula is as follows:
[0151]
[0152] where, L is the maximum number of iterations of the algorithm; a coefficient calculation unit for setting A as the position update coefficient and C as the distance update coefficient, and calculating the coefficients according to the convergence factor, and the calculation formula is as follows:
[0153] A = 2a·r1 - a;
[0154] C = 2r2;
[0155] where, r1, r2 are random values between 0 and 1, and a represents the convergence factor.
[0156] In one embodiment, the optimal wolf position calculation module 260 includes: a distance calculation unit for setting the current interpolation time intervals of each joint of the robotic arm corresponding to the α, β, and δ - level gray wolves as X α,l , X β,l , X δ,l , X l is the previous adaptive position, then calculate the distance D from itself according to the current interpolation time intervals of each joint of the robotic arm corresponding to the α, β, and δ - level gray wolves and the distance update coefficientα , D β , D δ , the formula is as follows:
[0157]
[0158] Where C1, C2, and C3 are the distance update coefficients corresponding to wolves α, β, and δ respectively; the time interval update unit is used to calculate the distance D α , D β , D δ , and calculate the updated interpolation time intervals corresponding to the three levels of wolves α, β, and δ. The formula is:
[0159]
[0160] Where X α,l+1 , X β,l+1 , X δ,l+1 are the updated interpolation time intervals corresponding to wolves α, β, and δ respectively, and A1, A2, and A3 are the position update coefficients corresponding to wolves α, β, and δ respectively; the current adaptive position calculation unit is used to calculate the current adaptive position according to the updated interpolation time intervals corresponding to wolves α, β, and δ. The formula is as follows:
[0161]
[0162] Where X l+1 is the current adaptive position, and L is the maximum number of iterations of the algorithm; the optimal wolf position determination unit is used to use the current adaptive position as the current interpolation time interval of the optimal wolf.
[0163] For the specific limitations of the robotic arm trajectory optimization device, reference can be made to the limitations on the robotic arm trajectory optimization method in the above text, which will not be elaborated here. Each module in the above robotic arm trajectory optimization device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0164] In one embodiment, a computer device is provided. This computer device can be a server, and its internal structure diagram can be as Figure 8As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store interpolation time interval data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a method for optimizing the trajectory of a robotic arm.
[0165] Those skilled in the art can understand that Figure 8 the structure shown in [FIGURE REFERENCE] is only a block diagram of some of the structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0166] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps in the above method embodiments are implemented.
[0167] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0168] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0169] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0170] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A method for optimizing the trajectory of a robotic arm, characterized in that, The method includes: S110. Randomly initialize the interpolation time interval according to the value range of the interpolation time. Among them, the randomly initialized interpolation time interval determines the initial wolf pack position, and the current interpolation time interval of the optimal wolf is obtained through random initialization. S120. Obtain the task angles of each joint of the robotic arm, and calculate the position, velocity, and acceleration of the motion trajectory of each joint of the robotic arm by using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf. S130. Determine whether the velocities and accelerations of the motions of each joint of the robotic arm satisfy the kinematic constraint conditions. S140. If the kinematic constraint conditions are satisfied, take the current fitness value as the optimal fitness value, and compare the fitness values corresponding to the three levels of gray wolves, namely α, β, and δ, with the optimal fitness value and update their own fitness values. S150. Calculate the convergence factor and calculate the coefficient according to the convergence factor. S160. Calculate the current interpolation time interval of the optimal wolf according to the current interpolation time intervals of each joint of the robotic arm corresponding to the three levels of gray wolves, namely α, β, and δ, and the coefficient. The calculation of the current interpolation time interval of the optimal wolf according to the current interpolation time intervals of each joint of the robotic arm corresponding to the three levels of gray wolves, namely α, β, and δ, and the coefficient includes: Let the current interpolation time intervals of each joint of the robotic arm corresponding to the three levels of gray wolves, α, β, and δ, be X α , l, X β , l, X δ , l, X l be the previous adaptive position. Then, calculate the distance D from itself according to the current interpolation time intervals and distance update coefficients of each joint of the robotic arm corresponding to the three levels of gray wolves, α, β, and δ α , D β , D δ , and the formula is as follows: Among them, C1, C2, and C3 are the distance update coefficients corresponding to the α, β, and δ wolves respectively. According to the distance D α , D β , D δ , calculate the updated interpolation time intervals corresponding to the gray wolves of three levels α, β, and δ. The formula is: Among them, X α , l + 1, X β , l + 1, X δ , l + 1 are the updated interpolation time intervals corresponding to the α, β, and δ wolves respectively, and A1, A2, and A3 are the position update coefficients corresponding to the α, β, and δ wolves respectively; Calculate the current adaptive position according to the updated interpolation time intervals corresponding to the α, β, and δ wolves. The formula is as follows: where X l+1 is the current adaptive position, and L is the maximum number of iterations of the algorithm; Take the current adaptive position as the current interpolation time interval of the optimal wolf. S170. If the current interpolation time interval of the optimal wolf does not satisfy the boundary conditions of the optimization variables, use the boundary value as the current interpolation time interval of the optimal wolf. S180. Repeat S120 - S170 until the number of iterations reaches the maximum value and then exit.
2. The method according to claim 1, wherein The obtaining of the task angles of each joint of the robotic arm and the calculation of the position, velocity, and acceleration of the motion trajectory of each joint of the robotic arm by using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf include: Obtain the task angles of each joint of the robotic arm. Let the joint velocities and acceleration values calculated using the cubic spline interpolation method according to the task angles of each joint of the robotic arm and the interpolation time interval be υ i,j and acc i,j , where i = 1, 2, 3, 4, 5, 6, i is the joint label, and j = 1, ……, n, j is the position point label obtained by interpolation; The determination of whether the velocities and accelerations of the motions of each joint of the robotic arm satisfy the kinematic constraint conditions is: |υ i,j | ≤ V max ; |acc i,j |≤A ccmax ; Among them, V max is the maximum speed of the movement of each joint of the robotic arm, and A ccmax is the maximum acceleration of the movement of each joint of the robotic arm.
3. The method according to claim 1, wherein The step of, if the kinematic constraint conditions are satisfied, taking the current fitness value as the optimal fitness value, and comparing the fitness values corresponding to the three levels of gray wolves, namely α, β, and δ, with the optimal fitness value and updating their own fitness values includes: If the kinematic constraint conditions are satisfied, take the current fitness value as the optimal fitness value. The calculation formula of the current fitness value is: Among them, T is the current fitness value, and T is equal to the sum of the interpolation time intervals of the movements of the joints of the robotic arm. T i is the current interpolation time interval of the optimal wolf of each joint of the robotic arm, and m is the number of the total interpolation time intervals; Compare the fitness values corresponding to the three levels of gray wolves, namely α, β, and δ, with the optimal fitness value and update their own fitness values.
4. The method according to claim 3, wherein The comparison of the fitness values corresponding to the three levels of gray wolves, namely α, β, and δ, with the optimal fitness value and the update of their own fitness values include: Calculate the fitness values corresponding to the three levels of gray wolves, namely α, β, and δ, respectively. The calculation formulas are as follows: Among them, T α is the fitness value corresponding to the gray wolf of α level, T β is the fitness value corresponding to the gray wolf of β level, T δ is the fitness value corresponding to the gray wolf of δ level, T αi is the current interpolation time interval of each joint of the robotic arm corresponding to the gray wolf of α level, T βi is the current interpolation time interval of each joint of the robotic arm corresponding to the gray wolf of β level, T δ i is the current interpolation time interval of each joint of the robotic arm corresponding to the gray wolf of δ level; If T α > T, then use T as the fitness value corresponding to the α - level gray wolf; where T i serves as the current interpolation time interval of each joint of the robotic arm corresponding to the α - level gray wolf. If T β > T, then use T as the fitness value corresponding to the β-level gray wolf; where T i serves as the current interpolation time interval of each joint of the robotic arm corresponding to the β-level gray wolf. If T δ > T, then use T as the fitness value corresponding to the gray wolf of δ level; where T i serves as the current interpolation time interval of each joint of the robotic arm corresponding to the gray wolf of δ level.
5. The method according to claim 1, wherein It also includes: If the kinematic constraint conditions are not satisfied, take the optimal fitness value as 100, calculate the current interpolation time interval of the optimal wolf according to the value of the optimal fitness value, and return to S120.
6. The method according to claim 1, wherein The calculation of the convergence factor and the calculation of the coefficient according to the convergence factor include: Calculate the convergence factor a, and the formula is as follows: Where L is the maximum number of iterations of the algorithm; Let A be the position update coefficient and C be the distance update coefficient. Calculate the coefficients according to the convergence factor, and the calculation formula is as follows: A = 2a·r1 - a; C=2r2; Where r1 and r2 are random values between 0 and 1, and a represents the convergence factor.
7. A manipulator trajectory optimization device, characterized in that, The device includes: An initialization module, configured to randomly initialize the interpolation time interval according to the value range of the interpolation time; wherein, the randomly initialized interpolation time interval determines the initial wolf pack position, and the current interpolation time interval of the optimal wolf is obtained through random initialization; A robotic arm motion parameter calculation module, configured to obtain the task angles of each joint of the robotic arm, and calculate the motion trajectory positions, velocities and accelerations of each joint of the robotic arm by using the cubic spline interpolation method according to the current interpolation time interval of the optimal wolf; A kinematic constraint judgment module, configured to judge whether the velocities and accelerations of the motions of each joint of the robotic arm meet the kinematic constraint conditions; A gray wolf position update module, configured to, if the kinematic constraint conditions are met, use the current fitness value as the optimal fitness value, and compare the fitness values corresponding to the gray wolves of the α, β, and δ levels with the optimal fitness value and update its own fitness value; A coefficient calculation module, configured to calculate the convergence factor and calculate the coefficients according to the convergence factor; An optimal wolf position calculation module, configured to calculate the current interpolation time interval of the optimal wolf according to the current interpolation time intervals and coefficients of each joint of the robotic arm corresponding to the gray wolves of the α, β, and δ levels; The calculation of the current interpolation time interval of the optimal wolf according to the current interpolation time intervals and coefficients of each joint of the robotic arm corresponding to the gray wolves of the α, β, and δ levels includes: Let the current interpolation time intervals of the joints of the robotic arm corresponding to the three levels of gray wolves, α, β, and δ, be X α , l, X β , l, X δ , l, X l be the previous adaptive position. Then, calculate the distance D from itself according to the current interpolation time intervals and distance update coefficients of the joints of the robotic arm corresponding to the three levels of gray wolves, α, β, and δ α , D β , D δ , The formula is as follows: Where C1, C2, and C3 are the distance update coefficients corresponding to the α, β, and δ wolves respectively; According to the distance D α , D β , D δ , calculate the updated interpolation time intervals corresponding to the gray wolves of three levels α, β, and δ. The formula is: Among them, X α , l + 1, X β , l + 1, X δ , l + 1 are the updated interpolation time intervals corresponding to the α, β, and δ wolves respectively, and A1, A2, and A3 are the position update coefficients corresponding to the α, β, and δ wolves respectively; Calculate the current adaptive position according to the updated interpolation time intervals corresponding to the α, β, and δ wolves, and the formula is as follows: where X l+1 is the current adaptive position, and L is the maximum number of iterations of the algorithm; Use the current adaptive position as the current interpolation time interval of the optimal wolf; An optimal wolf position correction module, configured to, if the current interpolation time interval of the optimal wolf does not meet the boundary conditions of the optimization variables, use the boundary value as the current interpolation time interval of the optimal wolf; A loop module, configured to control the robotic arm motion parameter calculation module, the kinematic constraint judgment module, the gray wolf position update module, the coefficient calculation module, the optimal wolf position calculation module, and the optimal wolf position correction module to execute sequentially and repeatedly until the number of iterations reaches the maximum value, and then exit the program.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. 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 of the method according to any one of claims 1 to 6.