Pose smooth transition method between arc tracks

By using cubic spline interpolation, spherical linear interpolation and logarithmic quaternion method in robotic arm trajectory planning, the smooth transition between arc trajectories and the stability and accuracy of trajectory planning are improved, and the problems of inconstant speed and sudden posture in transition parts in robotic arm trajectory planning are solved.

CN119501937APending Publication Date: 2025-02-25NANJING JICUI HUMANOID ROBOT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411686027.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-24
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When planning the trajectory, especially the transition part between the straight and arc trajectories, it is difficult to achieve a smooth transition, resulting in inconstant speed and sudden change in posture, which seriously affects production quality.

Method used

Through three parts: path planning, attitude planning and velocity planning, cubic spline interpolation method is used to perform global interpolation, spline curve is established, robotic arm attitude planning is carried out by combining spherical linear interpolation and logarithmic quaternary method, and the relationship between spline parameters and time is determined by Taylor expansion method, and double S-type velocity planning is carried out.

Benefits of technology

It realizes a smooth transition between arc trajectories, improves the stability and accuracy of trajectory planning, and can specify the trajectory speed at will, ensuring stable posture changes without sudden acceleration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119501937A_ABST
    Figure CN119501937A_ABST
Patent Text Reader

Abstract

The invention discloses a stable pose transition method between circular arc tracks, which comprises the following steps of: performing global interpolation by adopting a cubic spline interpolation method, and replacing a non-transition part formed by two circular arcs and a transition part between the two circular arcs with spline curves; according to the established spline curve, a spherical linear interpolation method and a logarithmic quaternion method are adopted for mechanical arm posture planning; determining a relationship between spline parameters of the spline curve and time based on a Taylor expansion method; and according to the relationship between the spline parameter and the time, the speed of the mechanical arm is planned by using a double-S-shaped speed planning method. According to the invention, any circular arc transition can be realized by using spline transition, whether coplanar or different planes; in the aspect of trajectory speed, the method can be arbitrarily specified, is not restricted by geometrical characteristics of splines, and can realize constant speed in the whole process; in the aspect of attitude speed, the attitude changes stably at the transition position, acceleration abrupt change is avoided, and the attitude speed is constant at the non-transition position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot arm trajectory planning, and in particular to a method for smooth transition of posture between circular arc trajectories. Background Art

[0002] When planning trajectories, robotic arms often encounter problems with the blending of different trajectories, such as the transition between straight and circular trajectories. Most robotic arms can only achieve the blending of coplanar straight lines or straight lines and circular arcs, but are helpless in blending skew circular arcs; at the same time, the speed of the blending part cannot be kept constant and sudden changes in posture are prone to occur. In some occasions where the stability of trajectory planning is required to be high, such as welding, grinding, spraying, etc., these problems will seriously restrict production quality. Summary of the invention

[0003] The present invention aims to solve one of the technical problems existing in the related art at least to a certain extent.

[0004] In this regard, the present invention provides a method for smooth transition of posture between circular arc trajectories. The method achieves smooth transition between circular arc trajectories through three parts: path planning, posture planning and speed planning, and improves the stability and accuracy of trajectory planning.

[0005] In order to achieve the above-mentioned object, the present invention provides a method for smooth transition of posture between arc trajectories, comprising:

[0006] S1. Using the cubic spline interpolation method for global interpolation, the non-transition part formed by the two arcs and the transition part between the two arcs are replaced by spline curves;

[0007] S2. According to the established spline curve, spherical linear interpolation and logarithmic quaternion method are used to perform robot arm posture planning;

[0008] S3. Determine the relationship between the spline parameter u of the spline curve and time based on the Taylor expansion method; and according to the relationship between the spline parameter u and time, use the double S-type speed planning method to perform robot arm speed planning.

[0009] A further preferred technical solution of the present invention is that the cubic spline interpolation method is used to perform global interpolation in step S1, and the non-transition part formed by the two arcs and the transition part between the two arcs are replaced by spline curves; including:

[0010] S11, teaching the two arcs to be spliced ​​and determining the teaching points;

[0011] S12, determining the area of ​​the non-transition part and the transition part;

[0012] S13, taking a number of equally divided points on the non-transition part of the trajectory as the middle points of the route, and obtaining the spline parameters u in the middle of each route;

[0013] S14. Using cubic spline interpolation at the middle point of the route, with the independent variable u and the dependent variable being the path point, the entire trajectory is generated, and the relationship p(u) between the path and the spline parameter u is obtained.

[0014] Preferably, in step S11, two arcs to be spliced ​​are taught to determine the teaching points; the specific method is:

[0015] Teach the two arcs that need to be spliced. The five teaching points required are P1, P " ,P # ,P $ ,P % , define where P1,P " Located in the first arc, P $ ,P % Located in the second arc, P # Located in the transition section;

[0016] The specific method for determining the area of ​​the non-transition part and the transition part in step S12 is as follows:

[0017] S121, define a circular arc with a radius of R and a transition radius of r b The fusion of

[0018] S122, angle θ corresponding to the trajectory transition area b for:

[0019]

[0020] S123. Distinguish the transition area and the non-transition area according to the range of the central angle:

[0021] The non-transition region of the first arc is [0,θ 1-1" +θ 1-"# -θ 1-b ], the transition region is [θ 1-1" +θ 1-_"# -θ b ,θ 1-1" +θ 1-_"# ];

[0022] where θ 1-1" For the first arc, the first teaching point P1 and the second teaching point P " The central angle of the arc, θ 1-"# The second teaching point P in the first arc " and the teaching point P of the transition part #The central angle of the arc, θ 1-b is the center angle of the first arc transition area;

[0023] The non-transition area of ​​the second arc is [θ "-b ,θ "-1" +θ "-"# -θ b ], the transition region is [0,θ "-b ];

[0024] where θ "-1" P is the teaching point of the transition part in the second arc. # and the first teaching point P $ The central angle of the arc, θ "-"# The first teaching point P in the second arc $ and the second teaching point P % The central angle of the arc, θ "-b is the center angle corresponding to the second arc transition area;

[0025] In step S13, a number of equally divided points are taken on the non-transition part of the trajectory as the middle points of the route, and the spline parameters u in the middle of each route are obtained; the specific method is:

[0026] Take 100 equally divided points on each non-transition part of the trajectory, and obtain their relationship with the arc center angle according to the arc trajectory model, thereby generating 200 path midpoints. The sample parameters corresponding to each midpoint are:

[0027] u=0,1 / 199,2 / 199,...,1;

[0028] Record these u values ​​as array u +,- ;

[0029] Step S14 uses cubic spline interpolation at the midpoint of the route, with the independent variable u and the dependent variable being the path point p, to generate the entire trajectory and obtain the relationship p(u) between the path and the spline parameter u. The specific method is:

[0030] The intermediate points are used for cubic interpolation, with the independent variable u and the dependent variable being the path point, to generate the entire trajectory; in the transition part, the trajectory is naturally transitioned using splines, thereby obtaining the relationship p(u) between the path p and the change of u.

[0031] As a preferred embodiment, the method further includes: S15, defining a sample parameter array u having a size equal to the number of teaching points . , used to associate the subsequent posture planning steps, u . The construction reference arc geometric relationship is as follows:

[0032] u. [0] = u +,- [0]

[0033] u . [1] = u +,- [(int)99*θ 1_1" / (θ 1_1" +θ 1_"# )]

[0034] u . [2]=(u +,-

[99] +u +,-

[100] ) / 2

[0035] u . [3]=u +,- [(int)(99+100*θ "_1" / θ "_1# )]

[0036] u . [4] =u +,-

[199]

[0037] Among them, u . [·] is the array u . One of the values, u +,- [·] is the array u +,- One of the values.

[0038] Preferably, the step S2 performs robot arm posture planning based on the established spline curve using spherical linear interpolation and logarithmic quaternion method; comprising:

[0039] S21, calculating the spline parameters corresponding to the starting posture and the ending posture of each non-transitional part of the trajectory, and the spline parameters corresponding to the middle points of all postures of each non-transitional part of the trajectory;

[0040] S22, performing spherical linear interpolation on each non-transition part of the trajectory, and calculating the attitude quaternions corresponding to 100 intermediate points;

[0041] S23, converting the quaternions corresponding to all the midpoints of the postures into quaternion logarithms;

[0042] S24. Use cubic spline interpolation to interpolate the quaternion logarithm to obtain the relationship between the posture q and the spline parameter u on the trajectory.

[0043] As a preference, step S21 calculates the spline parameters corresponding to the starting and ending postures of each non-transitional trajectory, as well as the spline parameters corresponding to the middle points of all postures of each non-transitional trajectory; it should be noted that the non-transitional part of the posture here is inconsistent with the trajectory, please compare Figure 2 and Figure 4, the trajectory only has a transition at P3, while the posture at P " ,P # and P $ There is a transition at each point, so that the robot arm can run to each teaching point in the teaching posture. The specific method is:

[0044] Define the spline parameter corresponding to the starting posture of each non-transition part of the trajectory as u + , the final posture is u , ; The spline parameter u corresponding to the 100 posture intermediate points of each non-transition part trajectory is:

[0045] u=u + +(u , -u + )*i / 99,i=0,1,2,...,99;

[0046] Among them, for the first non-transition part of the trajectory u s =u p [0],

[0047] The second non-transition track

[0048] The third non-transition track

[0049] The fourth non-transition track

[0050] In step S22, spherical linear interpolation is performed on each non-transition part of the trajectory to calculate the quaternion corresponding to the 100 intermediate points; the specific method is:

[0051] Calculate the attitude quaternion corresponding to 100 intermediate points, the calculation formula is:

[0052]

[0053] Among them, the unit quaternion corresponding to the starting posture of each non-transition part trajectory is Q + , the corresponding spline parameter is u + ; The ending posture is Q , and u , ; t by t + Change to t , , the step length is (t , -t + ) / 99, each non-transition trajectory has 100 posture intermediate points;

[0054] For the blending of two arc segments, the unit quaternions of the five teaching points are q1,q " ,q # ,q $ ,q % ;but

[0055] The first spherical linear interpolation, Q + =q1,Q , =q " ,t s =0,

[0056] The second spherical linear interpolation, Q + =q " ,Q , =q # ,

[0057] The third spherical linear interpolation, Q + =q # ,Q , =q $ ,

[0058] The fourth segment of spherical linear interpolation, Q + =q $ ,Q , =q % ,

[0059] t by t s Change to t e ;

[0060] In step S23, the quaternions corresponding to all the midpoints of the postures are converted into quaternion logarithms; the specific method is:

[0061] First adjust the quaternion to exponential form:

[0062]

[0063] The rotation vector P has two parameters, the rotation axis n and the rotation angle θ of the rotation transformation;

[0064] P = θn;

[0065] Then take the logarithm of the exponential form of the quaternion:

[0066]

[0067] As a preferred method, the quaternion logarithm is converted into a quaternion when the interpolation point is sent down, and the calculation formula is:

[0068]

[0069] Preferably, the step S3 determines the relationship between the spline parameters and time of the spline curve based on the Taylor expansion method; and according to the relationship between the spline parameters and time, the double S-type speed planning method is used to perform the robot arm speed planning; including:

[0070] S31. According to the double S-type speed planning method, define the expected relationship s(t) between s and t;

[0071] S32, the total motion time calculated by the double S-type speed planning method is T, and the sampling time is T : , for T ; =0,T : ,2*T : ,...,T, the Taylor expansion method is used repeatedly to obtain the relationship u(t) between u and t;

[0072] S33, using the obtained u(t), substitute p(u) and q(u) to determine the relationship p(t) and q(t) between the path and posture changing with time, and based on this, determine the relationship s(t) between the robot arm speed s and t.

[0073] As a preference, the step S32 is to ; =0,T : ,2*T : ,...,T, the Taylor expansion method is used repeatedly to obtain the relationship u(t) between u and t; the specific method is:

[0074] According to the cubic spline interpolation spline model, calculate one of the moments

[0075] According to the double-s speed plan, calculate v at this time ; =v(T ; )) and a ; =v(T ; ));

[0076] Update the u value according to Taylor recursion:

[0077]

[0078] Repeat the above steps for each moment to obtain the relationship u(t) between u and t.

[0079] Beneficial effects: The present invention can realize any arc transition by using spline transition, whether coplanar or skew plane; in terms of trajectory speed, the present invention can specify it arbitrarily, is not constrained by the spline geometric characteristics, and can maintain a uniform speed throughout the entire process; in terms of posture speed, the posture of the present invention changes smoothly at the transition point without sudden acceleration changes, and the posture speed is constant at the non-transition point. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 Schematic diagram of the method for determining the teaching point and the intermediate point in the embodiment;

[0081] Figure 2 Schematic diagram of a method for determining a non-transitional portion and a transitional portion of a trajectory in an embodiment;

[0082] Figure 3 A schematic diagram of a method for determining teaching point spline parameters in an embodiment;

[0083] Figure 4 It is a schematic diagram of a method for determining a posture non-transition part and a transition part area in an embodiment. DETAILED DESCRIPTION

[0084] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0085] Combine the following Figure 1-Figure 4 The present invention describes a method for smooth transition of posture between circular arc trajectories.

[0086] Embodiment 1: This embodiment provides a method for smooth transition of posture between circular arc trajectories. It mainly includes three parts, namely path planning, posture planning and speed planning. Because it is impossible to use splines to determine the relationship between the path posture and the path length s, it is necessary to first use splines to determine the relationship between the path posture and u, p(u) and q(u), that is, path planning and posture planning. Taylor recursion will determine the relationship u(t) between u and time, and then obtain p(t) and q(t), that is, speed planning.

[0087] 1. Path planning

[0088] This embodiment generates the required blending trajectory based on spline interpolation. In order to simplify the algorithm, this embodiment uses cubic spline interpolation to globally interpolate the two arcs. Compared with local interpolation (arc-spline-arc), splines are used instead of arcs to draw trajectories in global interpolation. This method is much simpler than the algorithm of local interpolation (arc-spline-arc), and cubic spline calculation is also faster. This embodiment only needs three points when using splines to interpolate arcs, which makes the operation no different from ordinary arc teaching.

[0089] like Figure 1 As shown in the figure, in the non-transition part, when the intermediate modeling points are dense enough, the generated trajectory will be indistinguishable from the original arc trajectory. This density can be determined with the help of trajectory accuracy measurement equipment such as laser trackers. Or ensuring that the distance between different points is less than the error requirement can definitely ensure accuracy. In the transition part, there will be no intermediate auxiliary modeling points, and the trajectory uses splines for natural transition.

[0090] The specific steps are:

[0091] S11. Teach the two arcs that need to be spliced. The five teaching points required are P1, P " ,P # ,P $ ,P % , define where P1,P " Located in the first arc, P $ ,P % Located in the second arc, P # Located in the transition section;

[0092] S12, determining the area of ​​the non-transition part and the transition part; the specific method is:

[0093] S121, define a circular arc with a radius of R and a transition radius of r b Take the blending of the first arc as an example, refer to Figure 2 The geometric relationship in r b It forms an isosceles triangle with R1;

[0094] S122, angle θ corresponding to the trajectory transition area b for:

[0095]

[0096] S123. Distinguish the transition area and the non-transition area according to the range of the central angle:

[0097] The non-transition region of the first arc is [0,θ 1-1" +θ 1-"# -θ 1-b ], the transition region is [θ 1-1" +θ 1-_"# -θ b ,θ 1-1" +θ 1-_"# ];

[0098] where θ 1-1" For the first arc, the first teaching point P1 and the second teaching point P " The central angle of the arc, θ 1-"# The second teaching point P in the first arc "and the teaching point P of the transition part # The central angle of the arc, θ 1-b is the center angle of the first arc transition area;

[0099] The non-transition area of ​​the second arc is [θ "-b ,θ "-1" +θ "-"# -θ b ], the transition region is [0,θ "-b ];

[0100] where θ "-1" P is the teaching point of the transition part in the second arc. # and the first teaching point P $ The central angle of the arc, θ "-"# The first teaching point P in the second arc $ and the second teaching point P % The central angle of the arc, θ "-b is the center angle corresponding to the second arc transition area;

[0101] S13, 100 equally divided points are taken on each non-transition part of the trajectory, and the relationship between the points and the arc center angle can be known according to the arc trajectory model. This generates 200 path intermediate points. Because spline transition is required, the relationship between the path point position p and the path length s is abandoned, and the spline parameter u is used instead.

[0102] The sample parameters corresponding to these two hundred points are:

[0103] u=0,1 / 199,2 / 199,...,1;

[0104] Record these u values ​​as array u +,- .

[0105] S14, define a sample parameter array u with a size equal to the number of teaching points . , used to associate subsequent posture planning steps to ensure the consistency of posture planning. . The construction reference arc geometric relationship, such as Figure 3 As shown, specifically:

[0106] u . [0] = u +,- [0]

[0107] u . [1] = u +,- [(int)99*θ 1_1" / (θ 1_1" +θ 1_"# )]

[0108] u . [2]=(u +,-

[99] +u +,-

[100] ) / 2

[0109] u . [3]=u +,- [(int)(99+100*θ "_1" / θ "_1# )]

[0110] u . [4] =u +,-

[199]

[0111] Among them, u . [·] is the array u . One of the values, u +,- [·] is the array u +,- One of the values.

[0112] S15. Use these intermediate points to perform cubic interpolation, with the independent variable u and the dependent variable being the path point p, thereby generating the entire trajectory. Cubic spline interpolation is a very classic interpolation method. Considering that there are a lot of materials explaining its principles, and it is not the innovative point of the present invention, it will not be repeated. In the non-transition part, when the intermediate auxiliary modeling points are dense enough, the generated trajectory will be indistinguishable from the original arc trajectory. This density can be determined with the aid of trajectory accuracy measurement equipment such as a laser tracker. Or ensuring that the distance between different points is less than the error requirement can certainly ensure accuracy. In this embodiment, there are 100 equally divided points. In the transition part, there will be no intermediate auxiliary modeling points, and the trajectory uses splines for natural transition. Thus, the relationship p(u) of the path p changing with u is obtained.

[0113] (II) Posture Planning

[0114] Spherical linear interpolation is the most commonly used method for attitude planning of robotic arms. This attitude planning method can achieve uniform attitude changes within a single trajectory, but cannot achieve smooth attitude transitions between multiple trajectories because the attitude change acceleration of this method is discontinuous.

[0115] Another method is the quaternion logarithmic attitude planning method, which has been applied to the attitude planning of robotic arms in recent years. This method intuitively represents the attitude changes corresponding to the quaternion on the Hopf three-dimensional sphere, which can ensure the continuity of the acceleration of the attitude change and achieve smooth transition of the attitudes between multiple trajectories.

[0116] The present invention creatively combines two methods, wherein the determination of many parameters will be combined with the arc geometric relationship, referring to Figure 4 Please note that the non-transition part of the posture is inconsistent with the trajectory. Please compare Figure 2 and Figure 4 , the trajectory only has a transition at P3, while the posture at P " ,P # and P $ There is a transition at each point, so that the robot arm can run to each teaching point in the teaching posture. The specific steps are:

[0117] S21, each non-transition part of the trajectory will have 100 posture intermediate points, and the spline parameter corresponding to the starting posture is u + , the final posture is u , .u + and u , It is directly related to the corresponding angle of the arc. The u corresponding to these 100 points is:

[0118] u=u + +(u , -u + )*i / 99,i=0,1,2,...,99;

[0119] Among them, for the first non-transition part of the trajectory u + =u . [0],

[0120] The second non-transition track

[0121] The third non-transition track

[0122] The fourth non-transition track

[0123] S22, perform spherical linear interpolation on each non-transition part of the trajectory, and calculate the attitude quaternion corresponding to these 100 points. The calculation formula is:

[0124]

[0125] Among them, the unit quaternion corresponding to the starting posture of each non-transition part trajectory is Q + , the corresponding spline parameter is u + ; The ending posture is Q , and u , ; t by t + Change to t , , the step length is (t , -t + ) / 99, each non-transition trajectory has 100 posture intermediate points;

[0126] For the blending of two arc segments, the unit quaternions of the five teaching points are q1,q " ,q # ,q $ ,q % ;but

[0127] The first spherical linear interpolation, Q + =q1,Q , =q " ,t + =0,

[0128] The second spherical linear interpolation, Q + =q " ,Q , =q # ,

[0129] The third spherical linear interpolation, Q + =q # ,Q , =q $ ,

[0130] The fourth segment of spherical linear interpolation, Q + =q $ ,Q , =q % ,

[0131] t by t s Change to t e , rather than from 0 to 1, leaving some posture variation margin for spline transition.

[0132] S23. Convert the quaternions corresponding to all the midpoints of the postures into quaternion logarithms; first adjust the quaternions to exponential form:

[0133]

[0134] The rotation vector P has two parameters, the rotation axis n and the rotation angle θ of the rotation transformation;

[0135] P = θn;

[0136] Then take the logarithm of the exponential form of the quaternion:

[0137]

[0138] S24. Use cubic spline interpolation to interpolate the quaternion logarithm to obtain the relationship q(u) between the posture q and u on the trajectory, u∈[0,1]. The non-transition area has dense intermediate points, which will make the posture planning present the uniform speed effect of spherical linear interpolation; the transition area has no intermediate points and uses splines for natural transition. Based on the properties of the quaternion logarithm, the continuity of speed and acceleration will be guaranteed.

[0139] S25. In the above steps, the arc length is used as the independent variable, and the relationship between it and the logarithmic quaternion of the corresponding point attitude is saved in the form of a spline. When sending the interpolation point, the quaternion logarithm still needs to be converted into a quaternion. The calculation formula is:

[0140]

[0141] (III) Speed ​​planning

[0142] For some simple curves such as straight lines and circles, we can directly use the relationship between the arc length s and its spatial point position P.

[0143] It is only necessary to determine the relationship between arc length s and time t through ordinary S-shaped speed planning, and the uniform speed planning of the spatial point P can be realized in the uniform speed section of the S-shaped speed planning.

[0144] However, the relationship between the arc length s and the spatial point P of some complex curves such as splines, trigonometric function trajectories, Fourier expansion trajectories, etc. is difficult to obtain or may consume a lot of computing power to obtain (calculated using the Simpson formula), making it difficult to achieve uniform speed planning.

[0145] For splines, we only know the relationship between parameter u and spatial coordinate P. We can determine the relationship between parameter u and time t using the Taylor expansion method, and then get the relationship between P and t.

[0146] The specific steps are:

[0147] S31. Define the expected s(t) according to the double-s type speed planning, that is, the relationship between s and t, and then get v(t), a(t),

[0148] S32, let the total motion time calculated by double-s be T, and the sampling time be T : . remember u ; =u(Tk), known u F =u(0)=0. Loop through the following steps 3-5, T ; =0,T : ,2*T : ,...,T, we can get the relationship between u and t.

[0149] S33, according to the cubic spline interpolation spline model, calculate the current

[0150] S34, according to the double-s speed plan, calculate the v at this time ; (i.e. v(T ; )), a ; (i.e. v(T ; ))

[0151] S35. Update the value of u according to the following Taylor recursion formula of u

[0152]

[0153] The derivation process of Taylor's expansion is as follows:

[0154] By the chain rule, the first and second order derivatives of any point p on the trajectory with respect to t are as follows

[0155]

[0156] The first and second order derivative expressions of u with respect to t can be obtained. The right side of the following formulas are all known variables.

[0157]

[0158] u ;81 With T = T : The Taylor expansion can be expanded as follows

[0159]

[0160] Omit the higher-order remainder and substitute and The expression of can get the required recursive formula

[0161] S36. When u(t) is determined, we can substitute p(u) and q(u) to determine the relationship between the path and posture over time, p(t) and q(t). The above loop obtains a discrete array. If a continuous function is required, the function relationship can also be interpolated using cubic splines.

[0162] In path planning, this embodiment uses spline interpolation to generate blending trajectories between arcs; in posture planning, it combines spherical linear interpolation and logarithmic quaternion to ensure that posture changes are always stable; in speed planning, Taylor recursion is used to achieve double-s speed planning for any complex trajectory. It has been found to be simple and reliable in actual application, and is suitable for mass production of robotic arms.

[0163] Embodiment 2: This embodiment provides a non-transitory computer-readable storage medium on which computer instructions are stored. The computer instructions enable a computer to execute the method for smooth transition of posture between circular arc trajectories of Embodiment 1.

[0164] Embodiment 3: This embodiment provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. The processor may call the logic instructions in the memory to execute the method for smooth transition of the position and posture between arc trajectories of embodiment 1.

[0165] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0166] Embodiment 4: This embodiment provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for smooth transition of posture between arc trajectories of Embodiment 1.

[0167] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0168] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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 deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for smooth transition of posture between arc trajectories, characterized in that: include: S1. Using the cubic spline interpolation method for global interpolation, the non-transition part formed by the two arcs and the transition part between the two arcs are replaced by spline curves; S2. According to the established spline curve, spherical linear interpolation and logarithmic quaternion method are used to perform robot arm posture planning; S3. Determine the relationship between the spline parameter u of the spline curve and time based on the Taylor expansion method; and according to the relationship between the spline parameter u and time, use the double S-type speed planning method to perform robot arm speed planning.

2. The method for smooth transition of posture between arc trajectories according to claim 1, characterized in that: In step S1, the cubic spline interpolation method is used for global interpolation, and the non-transition part formed by the two arcs and the transition part between the two arcs are replaced by spline curves; include: S11, teaching the two arcs to be spliced ​​and determining the teaching points; S12, determining the area of ​​the non-transition part and the transition part; S13, taking a number of equally divided points on the non-transition part of the trajectory as the middle points of the route, and obtaining the spline parameters u in the middle of each route; S14. Using cubic spline interpolation at the middle point of the route, with the independent variable u and the dependent variable being the path point, the entire trajectory is generated, and the relationship p(u) between the path and the spline parameter u is obtained.

3. The method for smooth transition of posture between arc trajectories according to claim 2, characterized in that: Step S11 is to teach the two arcs to be spliced ​​and determine the teaching points; the specific method is: Teach the two arcs that need to be spliced. The five teaching points required are P1, P " ,P # ,P $ ,P % , define where P1,P " Located in the first arc, P $ ,P % Located in the second arc, P # Located in the transition section; The specific method for determining the area of ​​the non-transition part and the transition part in step S12 is as follows: S121, define a circular arc with a radius of R and a transition radius of r b The fusion of S122, angle θ corresponding to the trajectory transition area b for: S123. Distinguish the transition area and the non-transition area according to the range of the central angle: The non-transition region of the first arc is [0,θ 1-1" +θ 1-"# -θ 1-b ], the transition region is [θ 1-1" +θ 1-_"# -θ b ,θ 1-1" +θ 1-_"# ]; where θ 1-1" For the first arc, the first teaching point P1 and the second teaching point P " The central angle of the arc, θ 1-"# The second teaching point P in the first arc " and the teaching point P of the transition part # The central angle of the arc, θ 1-b is the center angle of the first arc transition area; The non-transition area of ​​the second arc is [θ "-b ,θ "-1" +θ "-"# -θ b ], the transition region is [0,θ "-b ]; where θ "-1" P is the teaching point of the transition part in the second arc. # and the first teaching point P $ The central angle of the arc, θ "-"# The first teaching point P in the second arc $ and the second teaching point P % The central angle of the arc, θ "-b is the center angle corresponding to the second arc transition area; In step S13, a number of equally divided points are taken on the non-transition part of the trajectory as the middle points of the route, and the spline parameters u in the middle of each route are obtained; the specific method is: Take 100 equally divided points on each non-transition part of the trajectory, and obtain their relationship with the arc center angle according to the arc trajectory model, thereby generating 200 path midpoints. The sample parameters corresponding to each midpoint are: u=0,1 / 199,2 / 199,...,1; Record these u values ​​as array u +,- ; Step S14 uses cubic spline interpolation at the midpoint of the route, with the independent variable u and the dependent variable being the path point p, to generate the entire trajectory and obtain the relationship p(u) between the path and the spline parameter u. The specific method is: The intermediate points are used for cubic interpolation, with the independent variable u and the dependent variable being the path point, to generate the entire trajectory; in the transition part, the trajectory is naturally transitioned using splines, thereby obtaining the relationship p(u) between the path p and the change of u.

4. The method for smooth transition of posture between arc trajectories according to claim 3, characterized in that: It also includes, S15, defining a sample parameter array u with a size equal to the number of teaching points . , used to associate the subsequent posture planning steps, u . The construction reference arc geometric relationship is as follows: in . [0]=in +,- [0] you . [1]=u +,- [(int)99*θ 1_1" / (θ 1_1" +θ 1_"# )] in . [2]=(in +,- [99]+u +,- [100]) / 2 and . [3]=and +,- [(int)(99+100*θ "_1" / θ "_1# )] in . [4]=in +,- [199] Among them, u . [·] is the array u . One of the values, u +,- [·] is the array u +,- One of the values.

5. The method for smooth transition of posture between arc trajectories according to claim 4, characterized in that: Step S2: According to the established spline curve, spherical linear interpolation and logarithmic quaternion method are used to perform robot arm posture planning; include: S21, calculating the spline parameters corresponding to the starting posture and the ending posture of each non-transitional part of the trajectory, and the spline parameters corresponding to the middle points of all postures of each non-transitional part of the trajectory; S22, performing spherical linear interpolation on each non-transition part of the trajectory, and calculating the attitude quaternions corresponding to 100 intermediate points; S23, converting the quaternions corresponding to all the midpoints of the postures into quaternion logarithms; S24. Use cubic spline interpolation to interpolate the quaternion logarithm to obtain the relationship between the posture q and the spline parameter u on the trajectory.

6. The method for smooth transition of posture between arc trajectories according to claim 5, characterized in that: Step S21 calculates the spline parameters corresponding to the starting posture and the ending posture of each non-transitional part of the trajectory, and the spline parameters corresponding to all the middle points of the posture of each non-transitional part of the trajectory; the specific method is: Define the spline parameter corresponding to the starting posture of each non-transition part of the trajectory as u + , the final posture is u , ; The spline parameter u corresponding to the 100 posture intermediate points of each non-transition part trajectory is: in=in + +(in , -in + )*i / 99,i=0,1,2,...,99; Among them, for the first non-transition part of the trajectory u + =u . [0], The second non-transition track The third non-transition track The fourth non-transition track In step S22, spherical linear interpolation is performed on each non-transition part of the trajectory to calculate the quaternion corresponding to the 100 intermediate points; the specific method is: Calculate the attitude quaternion corresponding to 100 intermediate points, the calculation formula is: Among them, the unit quaternion corresponding to the starting posture of each non-transition part trajectory is Q + , the corresponding spline parameter is u + ; The ending posture is Q , and u , ; t by t + Change to t , , the step length is (t , -t + ) / 99, each non-transition trajectory has 100 posture intermediate points; For the blending of two arc segments, the unit quaternions of the five teaching points are q1,q " ,q # ,q $ ,q % ;but The first segment of spherical linear interpolation, The second segment of spherical linear interpolation, The third segment of spherical linear interpolation, The fourth segment is spherical linear interpolation, t by t s Change to t e ; In step S23, the quaternions corresponding to all the midpoints of the postures are converted into quaternion logarithms; the specific method is: First adjust the quaternion to exponential form: The rotation vector P has two parameters, the rotation axis n and the rotation angle θ of the rotation transformation; P = θn; Then take the logarithm of the exponential form of the quaternion:

7. The method for smooth transition of posture between arc trajectories according to claim 6 is characterized in that: When sending interpolation points, the quaternion logarithm is converted into a quaternion. The calculation formula is:

8. The method for smooth transition of posture between arc trajectories according to claim 6 is characterized in that: Step S3: determining the relationship between the spline parameters of the spline curve and time based on the Taylor expansion method; According to the relationship between the spline parameters and time, the double S-type speed planning method is used to plan the speed of the robot arm; including: S31. According to the double S-type speed planning method, define the expected relationship s(t) between s and t; S32, the total motion time calculated by the double S-type speed planning method is T, and the sampling time is T : , for T ; =0,T : ,2*T : ,...,T, the Taylor expansion method is used repeatedly to obtain the relationship u(t) between u and t; S33, using the obtained u(t), substitute p(u) and q(u) to determine the relationship p(t) and q(t) between the path and posture changing with time, and based on this, determine the relationship s(t) between the robot arm speed s and t.

9. The method for smooth transition of posture between arc trajectories according to claim 6, characterized in that: Step S32 is to ; =0,T : ,2*T : ,...,T, the Taylor expansion method is used repeatedly to obtain the relationship u(t) between u and t; the specific method is: According to the cubic spline interpolation spline model, calculate one of the moments According to the double-s speed plan, calculate v at this time ; =v(T ; )) and a ; =v(Y ; )); Update the u value according to Taylor recursion: Repeat the above steps for each moment to obtain the relationship u(t) between u and t.