Humanoid robot mass center smooth curve generation method, storage medium and generator
The smooth centroid trajectory is generated through the recursive calculation method of integral and basic spline basis functions, which solves the problem of unsmooth centroid trajectory of humanoid robots in the prior art, improves walking stability and reduces impact force, and extends the service life of the robot .
Patent Information
- Application Number
- CN202411109437.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-10
AI Technical Summary
The existing method of humanoid robot centroid trajectory generation is insufficient in terms of smoothness and continuity, resulting in vibration and impact during walking, affecting the stability and service life of the robot.
By obtaining the acceleration data during the walking of the humanoid robot, the integral calculation is performed. After the discretization process, the basic spline basis function and recursive calculation method are used to generate a smooth and continuous center of mass trajectory, and a fourth-order velocity polynomial quasi-matching is used during the bifoot switching period. To optimize the center of mass trajectory.
It effectively avoids the numerical instability and overfitting problems in traditional methods, reduces the mutation and discontinuity of the trajectory, improves the stability and stability of the walking process, reduces the risks of impact and vibration, and extends the service life of the robot.
Smart Images

Figure CN119106700A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of humanoid robots, and specifically provides a method for generating a smooth curve of the center of mass of a humanoid robot, a storage medium and a generator. Background Art
[0002] With the rapid development of robotics technology, humanoid robots have been widely used in industrial production, medical rehabilitation, home services and other fields. When a humanoid robot walks, the smoothness and continuity of the center of mass trajectory are crucial to its walking stability and safety;
[0003] Existing methods for generating center of mass trajectories usually use polynomial fitting or simple linear interpolation. These methods have deficiencies in the smoothness and continuity of the center of mass trajectory, which can easily lead to sudden changes and discontinuities in the trajectory. Especially in the process of switching between the two feet of the robot, the uneven center of mass trajectory can cause vibration and impact of the robot. In the process of humanoid robot walking, especially at the moment of switching between the two feet, the uneven center of mass trajectory can cause a large impact force, which not only affects the walking stability of the robot, but may also damage the robot structure and shorten its service life.
[0004] Accordingly, the art needs a new method, storage medium and generator for generating a smooth curve of the center of mass of a humanoid robot to solve the above technical problems. Summary of the invention
[0005] The present invention aims to solve the above technical problems, that is, to solve.
[0006] In a first aspect, the present invention provides a method for generating a smooth curve of the center of mass of a humanoid robot. The steps of the generating method are as follows:
[0007] Obtain the acceleration of the humanoid robot changing with time during walking;
[0008] Obtaining first position data of the humanoid robot by integral calculation according to the acceleration;
[0009] Discretize the first position data to obtain second position data corresponding to a plurality of equally spaced time points;
[0010] Define basic spline basis functions, and obtain high-order basic spline basis functions through recursive calculation;
[0011] Obtaining a basic spline function curve by fitting the high-order basic spline basis function with the second position data;
[0012] A second spline coefficient is obtained according to a curve derivative of the basic spline function curve, and the second spline coefficient is substituted into the basic spline curve to obtain a final centroid trajectory.
[0013] Obtaining first position data of the humanoid robot through integral calculation according to the acceleration, including:
[0014] Obtaining the walking speed of the humanoid robot by integral calculation according to the acceleration;
[0015] The center of mass trajectory of the humanoid robot during walking is obtained by integral calculation according to the walking speed.
[0016] In the preferred technical solution of the above generation method, the first position data is discretized to obtain second position data corresponding to a plurality of equally spaced time points, including:
[0017] The continuous time period is divided into a plurality of equally spaced time points, and the discretized second position data is recorded corresponding to each time point.
[0018] In the preferred technical solution of the above generation method, the basic spline basis function is:
[0019]
[0020] Wherein: i is the index of the basis function, 1 represents that the basic spline curve is of order 1, x is the position variable within the definition interval of the basic spline basis function; t i is the i-th node in the node vector; the t i+1 is the i+1th node in the node vector; i,1 (x) This is the first-order basic spline basis function, when x is at the node t i and t i+1 The function value is 1 when , and 0 otherwise.
[0021] In the preferred technical solution of the above generation method, the basic spline function curve is obtained by fitting the high-order basic spline basis function with the second position data, including:
[0022] The high-order basic spline basis functions are calculated step by step through the known low-order basic spline basis functions; in the process of recursive calculation, the value of each high-order basic spline basis function is obtained by the weighted sum of two low-order basic spline basis functions, and the continuity and smoothness of the basis function are guaranteed in this recursive manner.
[0023] In the preferred technical solution of the above generation method, the high-order basic spline basis function is:
[0024] B i,1 (x) = ω i,d B i,d-1 (x)+(1-ω i,d )Bi+1,d-1 (x);
[0025] Where: i,d (x) is a weight function in the recursive formula, which represents the weight of the basic spline basis function of the i-th order d; wherein The specific definition is: if t i ≠t i+d-1 Then No measurement of the i,d (x) = 0, the t i is the i-th node in the node vector, t i+d-1 It is the i+d-1th node in the node vector.
[0026] In the preferred technical solution of the above generation method, by adjusting the weight coefficient of the basic spline basis function, the basic spline function curve simulates the actual position data, and the basic spline function curve is:
[0027]
[0028] Where: f(x) is a curve function, which represents a smooth curve fitted; a i is the first spline coefficient, representing the weight coefficient of each of the basic spline basis functions; K is the number of control points; and d is the order of the basic spline curve.
[0029] In the preferred technical solution of the above generation method, obtaining a second spline coefficient according to the curve derivative of the basic spline function curve, substituting the second spline coefficient into the basic spline curve to obtain the final centroid trajectory includes:
[0030] The derivative represents the slope of the curve at each point, that is, the rate of change. By calculating the derivative, we can understand the change of the center of mass trajectory, so as to further optimize and adjust the trajectory. The fitted basic spline curve is used as the center of mass trajectory of the humanoid robot. The derivative of the curve is:
[0031]
[0032] Where: β is a proportional factor used to calculate the derivative of the basic spline curve; t j+d-1 is the j+d-1th node in the node vector; j+1 is the j+1th node in the node vector; d is the order of the basic spline curve; a j ' is the new spline coefficient, which represents the weight coefficient in the derivative.
[0033] In a second aspect, the present invention provides a computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the method as claimed in any one of claims 1 to 8.
[0034] In a third aspect, the present invention provides a generator comprising a processor and the computer-readable storage medium as claimed in claim 9 .
[0035] In the case of adopting the above technical solution, the generation method of the present invention obtains speed and position data by collecting acceleration data and performing integral calculation, and then converts the continuous position data into multiple equally spaced discrete points through discretization processing, and finally generates a smooth and continuous center of mass trajectory by using basic spline basis functions and recursive calculation methods. This method effectively avoids the numerical instability and overfitting problems caused by traditional high-order polynomial fitting, thereby ensuring the smooth transition of the center of mass trajectory under different motion states and reducing the mutation and discontinuity of the trajectory;
[0036] Furthermore, a period of double-foot support time is introduced during the double-foot switching period, and a fourth-order velocity polynomial fitting is used during this period to generate a smooth velocity and position curve. This can effectively alleviate the impact force during the double-foot switching and improve the stability of the robot's walking process. By comprehensively applying the fitted B-Spline curve and its derivative, the center of mass trajectory is further optimized to ensure the smooth movement of the robot's center of mass during walking, reduce the impact and vibration during walking, and improve the stability and reliability of movement.
[0037] Furthermore, by using the recursive calculation method of the basic spline curve and spline basis function, the spline coefficient can be flexibly adjusted so that the fitting curve can accurately reflect the actual motion trajectory. This flexibility and accuracy enable the method to adapt to different robot motion requirements, with strong adaptability and practicality. By defining and calculating high-order basic spline basis functions, the recursive algorithm is used to ensure the accuracy and efficiency of the calculation, while ensuring the smoothness and continuity of the generated curve.
[0038] Furthermore, by generating a smooth and continuous center of mass trajectory, the potential risks caused by the uneven center of mass trajectory during robot walking are reduced. The stable center of mass trajectory reduces the risk of falls and failures during robot walking, improving overall safety. The improvement in stability and reliability is not only applicable to daily walking, but also to complex terrain and special tasks, expanding the application range of humanoid robots in various environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings, in which:
[0040] Figure 1 A flow chart showing the main steps of the generation method of the present invention is shown;
[0041] Figure 2 A curve diagram of the center of mass trajectory of a humanoid robot in the prior art during walking is shown;
[0042] Figure 3 A curve diagram of the center of mass trajectory of the humanoid robot of the present invention during walking is shown. DETAILED DESCRIPTION
[0043] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make adjustments to them as needed to adapt to specific application scenarios.
[0044] It should be noted that in the description of the present invention, the terms indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings, which are only for the convenience of description, and do not indicate or imply that the structure must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0045] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "connected", "interconnected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0046] In addition, it should be noted that in the description of the present invention, although the various steps of the control method of the present invention are described in this application in a specific order, these orders are not restrictive. Without departing from the basic principles of the present invention, those skilled in the art can perform the steps in a different order.
[0047] Specifically, the generator of the present invention includes a processor and a computer-readable storage medium. Of course, it should be noted that the present invention does not impose any restrictions on the specific type of processor, and those skilled in the art can set it according to their needs, as long as it can ensure that the processor can run the program of the present invention. At least one instruction or at least one program is stored in the storage medium, and at least one instruction or at least one program is loaded and executed by the processor to implement the generation method of the present invention. It should be noted that the present invention does not impose any restrictions on the specific type of storage medium, and those skilled in the art can set it according to their needs. For example, the storage medium can be a solid-state hard disk, and for example, the storage medium can also be a removable hard disk, as long as it can ensure that the storage medium can store the program of the generation method.
[0048] See below Figure 1 ,like Figure 1 As shown, the steps of the generation method of the present invention are:
[0049] S1 obtains the acceleration of the humanoid robot changing with time during walking;
[0050] S2 obtains first position data of the humanoid robot through integral calculation according to the acceleration;
[0051] S3 discretizes the first position data to obtain second position data corresponding to a plurality of equally spaced time points;
[0052] S4 defines the basic spline basis function, and obtains the high-order basic spline basis function through recursive calculation;
[0053] S5: fitting the high-order basic spline basis function with the second position data to obtain a basic spline function curve;
[0054] S6 obtains a second spline coefficient according to a curve derivative of the basic spline function curve, substitutes the second spline coefficient into the basic spline curve, and obtains a center of mass trajectory of the humanoid robot during walking.
[0055] By acquiring acceleration data and performing integral calculations, preliminary position data is generated. Then, through discretization processing, high-order basic spline (B-Spline) basis functions are defined and calculated to fit and generate a smooth center of mass trajectory, ensuring that the center of mass trajectory of the humanoid robot is smooth and continuous during walking.
[0056] Further, in step S2, the walking speed of the humanoid robot is obtained by integral calculation according to the acceleration; the first position data of the humanoid robot is obtained by integral calculation according to the walking speed. It should be noted that the present invention does not impose any restrictions on the method of integral calculation, and those skilled in the art can set it according to their needs. For example, the integral calculation can be calculated by a computing device, or by manual calculation, as long as the calculated result is accurate. By integrally calculating the speed and position, the accuracy of the calculation is guaranteed, which is conducive to the subsequent fitting work.
[0057] Furthermore, in step S3, the first position data is discretized to obtain second position data corresponding to a plurality of equally spaced time points, including dividing a continuous time period into a plurality of equally spaced time points, and recording the discretized second position data corresponding to each time point. Of course, it should be noted that the present invention does not impose any restrictions on the specific number of time period divisions, and those skilled in the art can set them according to their needs, as long as the divided time period can calculate the corresponding second position data. Dividing a continuous time period into a plurality of equally spaced time points is conducive to the processing and fitting of discretized data, and ensures the continuity and smoothness of the centroid trajectory.
[0058] Furthermore, in step S5, a basic spline basis function is defined, and a high-order basic spline basis function is obtained by recursive calculation. The basic spline basis function is:
[0059]
[0060] Where: i is the index of the basis function, 1 represents the first-order basic spline curve, x is the position variable within the definition interval of the basic spline basis function; t i is the i-th node in the node vector; t i+1 is the i+1th node in the node vector; B i,1 (x) This is the first-order basic spline basis function. When x is at the node t i and t i+1 When the value is between , the function value is 1, and otherwise it is 0. This process clarifies the value of the basis function in a specific interval, laying the foundation for the subsequent recursive calculation of higher-order basis functions.
[0061] Further, in step S5, a basic spline function curve is obtained according to the fitting of the high-order basic spline basis function with the second position data, including, through the known low-order basic spline basis function, gradually calculating the high-order basic spline basis function; in the process of recursive calculation, the value of each high-order basic spline basis function is obtained by the weighted sum of two low-order basic spline basis functions, and the continuity and smoothness of the basis function are guaranteed in this recursive manner. It should be noted that the present invention does not impose any restrictions on the specific method of data fitting, and those skilled in the art can set it according to their needs, as long as the basic spline function curve obtained after fitting is accurate. By recursively calculating the high-order basis function, each high-order basic spline basis function is obtained by the weighted sum of the low-order basic spline basis functions, which ensures the continuity and smoothness of the basic spline basis function, thereby improving the smoothness of the fitting curve.
[0062] The higher-order basic spline basis functions are:
[0063] B i,1 (x) = ω i,d B i,d-1 (x)+(1-ω i,d )B i+1,d-1 (x);
[0064] Where: i,d (x) is the weight function in the recursive formula, which represents the weight of the i-th d-order basic spline basis function; The specific definition is: if t i ≠t i+d-1 but No measurement i,d (x) = 0, t i is the i-th node in the node vector, t i+d-1 It is the i+d-1th node in the node vector.
[0065] By adjusting the weight coefficient of the basic spline basis function, the basic spline function curve simulates the actual position data. The basic spline function curve is:
[0066]
[0067] Where: f(x) is the curve function, which represents the smooth curve fitted; a i is the first spline coefficient, which represents the weight coefficient of each basic spline basis function; K is the number of control points; d is the order of the basic spline curve. The adjustment of the spline coefficient makes the fitting curve more flexible and can better adapt to the changes in the actual position data. It should be noted that the present invention does not impose any restrictions on the weight coefficient, and those skilled in the art can set it according to their needs, as long as the calculated basic spline function curve is accurate.
[0068] Further, in step S6, according to the curve derivative of the basic spline function curve, the second spline coefficient is obtained and substituted into the basic spline curve to obtain the final centroid trajectory, including:
[0069] The derivative represents the slope of the curve at each point, that is, the rate of change. By calculating the derivative, we can understand the change of the center of mass trajectory, so as to further optimize and adjust the trajectory. The fitted basic spline curve is used as the center of mass trajectory of the humanoid robot. The derivative of the curve is:
[0070]
[0071] Where: β is the proportional factor, which is used to calculate the derivative of the basic spline curve; t j+d-1 is the j+d-1th node in the node vector; j+1 is the j+th node in the node vector
[0072] 1 node; d is the order of the basic spline curve; a j ' is the new spline coefficient, which represents the weight coefficient in the derivative.
[0073] So far, the technical solutions of the present invention have been described in conjunction with the optional implementation modes shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific implementation modes. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A method for generating a smooth curve of the center of mass of a humanoid robot. It is characterized in that The steps of the generation method are: Obtain the acceleration of the humanoid robot changing with time during walking; Obtaining first position data of the humanoid robot by integral calculation according to the acceleration; Discretize the first position data to obtain second position data corresponding to a plurality of equally spaced time points; Define basic spline basis functions, and obtain high-order basic spline basis functions through recursive calculation; Obtaining a basic spline function curve by fitting the high-order basic spline basis function with the second position data; A second spline coefficient is obtained according to a curve derivative of the basic spline function curve, and the second spline coefficient is substituted into the basic spline curve to obtain a center of mass trajectory of the humanoid robot during walking.
2. The generation method according to claim 1, It is characterized in that Obtaining first position data of the humanoid robot through integral calculation according to the acceleration, including: Obtaining the walking speed of the humanoid robot by integral calculation according to the acceleration; The first position data of the humanoid robot is obtained by integral calculation according to the walking speed.
3. The generation method according to claim 2, It is characterized in that The first position data is discretized to obtain second position data corresponding to a plurality of equally spaced time points, including: The continuous time period is divided into a plurality of equally spaced time points, and the discretized second position data is recorded corresponding to each time point.
4. The generation method according to claim 1, It is characterized in that The basic spline basis function is: Wherein: i is the index of the basis function, 1 represents that the basic spline curve is of order 1, x is the position variable within the definition interval of the basic spline basis function; t i is the i-th node in the node vector; the t i+1 is the i+1th node in the node vector; i,1 (x) This is the first-order basic spline basis function, when x is at the node t i and t i+1 The function value is 1 when , and 0 otherwise.
5. The generation method according to claim 4, It is characterized in that According to the high-order basic spline basis function and the second position data fitting, a basic spline function curve is obtained, including: By using the known low-order basic spline basis functions, the high-order basic spline basis functions are calculated step by step; In the process of recursive calculation, the value of each high-order basic spline basis function is obtained by the weighted sum of two low-order basic spline basis functions. The continuity and smoothness of the basis function are guaranteed in this recursive manner.
6. The generation method according to claim 5, It is characterized in that The high-order basic spline basis function is: B i,1 (x)=ω i,d B i,d-1 (x)+(1-ω i,d )B i+1,d-1 (x); Wherein: ωi,d(x) is the weight function in the recursive formula, which represents the weight of the basic spline basis function of the i-th order d; The specific definition is: if t i ≠t i+d-1 Then No measurement of the i,d (x) = 0, the t i is the i-th node in the node vector, t i+d-1 It is the i+d-1th node in the node vector.
7. The generation method according to claim 6, It is characterized in that By adjusting the weight coefficient of the basic spline basis function, the basic spline function curve simulates the actual position data, and the basic spline function curve is: Where: f(x) is a curve function, which represents a smooth curve fitted; a i is the first spline coefficient, representing the weight coefficient of each of the basic spline basis functions; K is the number of control points; and d is the order of the basic spline curve.
8. The generation method according to claim 7, It is characterized in that According to the curve derivative of the basic spline function curve, a second spline coefficient is obtained, and the second spline coefficient is substituted into the basic spline curve to obtain the final centroid trajectory, including: The derivative represents the slope of the curve at each point, that is, the rate of change. By calculating the derivative, we can understand the change of the center of mass trajectory, so as to further optimize and adjust the trajectory. The fitted basic spline curve is used as the center of mass trajectory of the humanoid robot. The derivative of the curve is: Where: β is a proportional factor used to calculate the derivative of the basic spline curve; t j+d-1 is the j+d-1th node in the node vector; j+1 is the j+1th node in the node vector; d is the order of the basic spline curve; a j ' is the new spline coefficient, which represents the weight coefficient in the derivative.
9. A computer-readable storage medium, It is characterized in that The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method as claimed in any one of claims 1 to 8.
10. A generator, It is characterized in that The method comprises a processor and the computer-readable storage medium as claimed in claim 9.
