A gait planning method, device, computer-readable storage medium and robot
By constructing and optimizing the phase variables of the robot gait programming, the problem of excessive impact when the swing foot touches the ground in advance is solved. The improved phase variable has a smaller slope before the ground, which improves the stability of the robot gait.
Patent Information
- Application Number
- CN202210204305.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-02
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-03-02
AI Technical Summary
Existing gait planning methods may cause excessive impact on the ground when the swing foot touches the ground in advance, affecting the stability of the robot's gait.
Construct the first phase variable of the robot's gait programming, establish a functional relationship between two position components of the trunk on the horizontal plane through the binary quadratic equation with the coefficients, and establish a solution set of equations based on the preset values at the initial and termination times. , after simplification, construct the optimization objective function, calculate the coefficients to be determined to construct the improved phase variable, and use the improved phase variable to perform gait planning of the swing foot to ensure a smaller slope before touchdown.
Through the improved phase variable, the impact of the swing foot to the ground is reduced, and the stability of the robot's walking is enhanced.
Smart Images

Figure CN114815596B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robotics technology, and in particular, relates to a gait planning method, device, computer-readable storage medium, and robot. Background Art
[0002] When planning the robot's gait, the robot's internal state can be used instead of time to plan the robot's controlled joints. This internal state can be called a phase variable. Constructing a phase variable in three-dimensional space allows the robot to have an internal clock, which can resist certain disturbances during walking without relying on additional controllers.
[0003] Using the robot's internal state instead of time allows the robot to automatically adjust the swing time and swing foot trajectory according to the disturbance to maintain a stable gait. However, the construction of this phase variable may cause the swing foot to hit the ground too much in advance, thus affecting the stability of the gait. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a gait planning method, device, computer-readable storage medium and robot to solve the problem that the existing gait planning method may cause the swinging foot to have excessive impact with the ground when touching the ground prematurely, thereby affecting the stability of the gait.
[0005] A first aspect of an embodiment of the present application provides a gait planning method, which may include:
[0006] Constructing a first phase variable of the gait planning of the robot, wherein the first phase variable is a function of two position components of the trunk of the robot on a horizontal plane;
[0007] Determine the product of the first phase variable and a preset adjustment coefficient, and use the ratio between the inverse hyperbolic sine function of the product and the inverse hyperbolic sine function of the adjustment coefficient as the second phase variable;
[0008] The second phase variable is used to perform gait planning on the swinging foot of the robot to obtain a planned trajectory of the swinging foot of the robot.
[0009] In a specific implementation of the first aspect, the first phase variable for constructing the gait planning of the robot may include:
[0010] Using a quadratic equation with undetermined coefficients, a functional relationship between the first phase variable and two position components of the robot's trunk on a horizontal plane is established;
[0011] Establishing a set of equations for solving each undetermined coefficient of the quadratic equation according to the preset value of the first phase variable at the initial time and the preset value at the termination time;
[0012] Simplifying the number of undetermined coefficients of the quadratic equation according to the set of equations to be solved to obtain a simplified functional relationship;
[0013] Constructing an optimization objective function corresponding to the simplified functional relationship;
[0014] The various undetermined coefficients of the binary quadratic equation are calculated according to the optimization objective function and a preset optimization algorithm to complete the construction of the first phase variable.
[0015] In a specific implementation of the first aspect, the use of a quadratic equation with undetermined coefficients to establish a functional relationship between the first phase variable and two position components of the trunk of the robot on a horizontal plane may include:
[0016] Establish the functional relationship shown below:
[0017] Φ=a1x w +a2y w +a3x w y w +a4x w 2 +a5y w 2 +a6
[0018] Among them, x w and w are two position components of the robot's trunk on the horizontal plane, a1, a2, a3, a4, a5 and a6 are unknown coefficients, and Φ is the phase variable.
[0019] In a specific implementation of the first aspect, establishing a set of equations for solving each undetermined coefficient of the quadratic equation according to the preset value of the phase variable at the initial time and the preset value at the termination time may include:
[0020] Establishing a first solution equation of the quadratic equation according to a preset value of the first phase variable at an initial time;
[0021] Establishing a second solution equation for the quadratic equation according to a preset value of the first phase variable at the termination time;
[0022] Substituting a preset position error relationship into the second solution equation to obtain various derivative solution equations of the second solution equation; the position error relationship is the relationship between two position error components of the trunk of the robot on the horizontal plane;
[0023] The derivative solution equations of the first solution equation and the second solution equation are constructed as the solution equation group.
[0024] In a specific implementation of the first aspect, constructing an optimization objective function corresponding to the simplified functional relationship may include:
[0025] Construct the optimization objective function as shown below:
[0026] J=∑(Φ(t i )-t i / T) 2
[0027] Wherein, T is the period of the linear inverted pendulum model of the robot, t i is the i-th moment in the cycle, Φ(t i ) is the first phase variable and t i The corresponding value, J is the optimization objective function.
[0028] A second aspect of an embodiment of the present application provides a gait planning device, which may include:
[0029] A first phase variable construction module, used to construct a first phase variable of the robot's gait planning, wherein the first phase variable is a function of two position components of the robot's trunk on a horizontal plane;
[0030] a second phase variable construction module, configured to determine the product of the first phase variable and a preset adjustment coefficient, and to use the ratio between the inverse hyperbolic sine function of the product and the inverse hyperbolic sine function of the adjustment coefficient as the second phase variable;
[0031] A gait planning module is used to use the second phase variable to perform gait planning on the swinging foot of the robot to obtain a planned trajectory of the swinging foot of the robot.
[0032] In a specific implementation of the second aspect, the first phase variable construction module may include:
[0033] A functional relationship establishing unit, used for establishing a functional relationship between the first phase variable and two position components of the trunk of the robot on a horizontal plane using a quadratic equation with undetermined coefficients;
[0034] A unit for solving an equation group is used to establish an equation group for solving each undetermined coefficient of the quadratic equation according to a preset value of the first phase variable at an initial time and a preset value at a termination time;
[0035] A coefficient simplification unit, used for simplifying the number of undetermined coefficients of the quadratic equation according to the set of equations to be solved, to obtain a simplified functional relationship;
[0036] An optimization objective function construction unit, used to construct an optimization objective function corresponding to the simplified functional relationship;
[0037] A coefficient calculation unit is used to calculate the various undetermined coefficients of the binary quadratic equation according to the optimization objective function and a preset optimization algorithm to complete the construction of the first phase variable.
[0038] In a specific implementation of the second aspect, the functional relationship establishing unit is specifically used to establish a functional relationship as shown in the following formula:
[0039] Φ=a1x w +a2y w +a3x w y w +a4x w 2 +a5y w 2 +a6
[0040] Among them, x w and w are two position components of the robot's trunk on the horizontal plane, a1, a2, a3, a4, a5 and a6 are unknown coefficients respectively, and Φ is the first phase variable.
[0041] In a specific implementation of the second aspect, the equation solving unit may include:
[0042] A first solution equation establishing subunit, used for establishing a first solution equation of the binary quadratic equation according to a preset value of the first phase variable at an initial moment;
[0043] A second solution equation establishment subunit, used for establishing a second solution equation of the binary quadratic equation according to a preset value of the first phase variable at the termination time;
[0044] A derivative solution equation establishment subunit is used to substitute a preset position error relationship into the second solution equation to obtain each derivative solution equation of the second solution equation; the position error relationship is the relationship between two position error components of the trunk of the robot on the horizontal plane;
[0045] The solution equation group establishment subunit is used to construct the derivative solution equations of the first solution equation and the second solution equation into the solution equation group.
[0046] In a specific implementation of the second aspect, the optimization objective function construction unit is specifically used to construct the optimization objective function shown below:
[0047] J=∑(Φ(t i )-t i / T) 2
[0048] Wherein, T is the period of the linear inverted pendulum model of the robot, t i is the i-th moment in the cycle, Φ(t i ) is the first phase variable and t i The corresponding value, J is the optimization objective function.
[0049] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned gait planning methods are implemented.
[0050] A fourth aspect of an embodiment of the present application provides a robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned gait planning methods when executing the computer program.
[0051] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a robot, the robot executes the steps of any one of the above-mentioned gait planning methods.
[0052] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application construct the first phase variable of the gait planning of the robot, the first phase variable being a function of two position components of the trunk of the robot on the horizontal plane; constructing the second phase variable according to the first phase variable, the second phase variable being a function of the first phase variable, and at the moment before the swing foot of the robot touches the ground, the slope of the second phase variable is less than the slope of the first phase variable; using the second phase variable to plan the gait of the swing foot of the robot, the planning trajectory of the swing foot of the robot is obtained. Through the embodiments of the present application, the phase variable (i.e., the first phase variable) constructed based on the robot state is improved, and the slope of the improved phase variable (i.e., the second phase variable) at the moment before the swing foot touches the ground is smaller, and using the improved phase variable to plan the gait of the swing foot can make the impact of the swing foot on the ground smaller, thereby enhancing the walking stability of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1It is a schematic diagram of the periodic trajectory of the linear inverted pendulum model;
[0055] Figure 2 Schematic diagram of the switching plane of the robot;
[0056] Figure 3 Schematic diagram of the position error relationship of the robot;
[0057] Figure 4 This is a flow chart of an embodiment of a robot gait planning method in an embodiment of the present application;
[0058] Figure 5 A schematic flow chart for constructing the first phase variables of robot gait planning;
[0059] Figure 6 is a schematic diagram of the first phase variables;
[0060] Figure 7 It is a schematic diagram for comparing the first phase variable and the second phase variable;
[0061] Figure 8 This is a structural diagram of an embodiment of a robot gait planning device in an embodiment of the present application;
[0062] Fig. 9 This is a schematic block diagram of a robot in an embodiment of the present application. DETAILED DESCRIPTION
[0063] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0064] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0065] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0066] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0067] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0068] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0069] For the sake of simplicity, unless otherwise specified, the robots mentioned in the embodiments of the present application are all bipedal humanoid robots.
[0070] A robot is a complex mechanism with a high degree of freedom, so a simplified model of the robot is often used to study its motion characteristics. In an embodiment of the present application, a linear inverted pendulum model (LIPM) can be used to replace the complete model of the robot. The ankle joint of the robot is regarded as a passive joint, so the entire robot is an under-driven system. Compared with the control method based on the zero moment point (Zero Moment Point, ZMP), this method can make full use of gravity as the drive for the robot to move forward, so as to save energy, have higher walking efficiency, and is closer to the walking characteristics of humans.
[0071] In an embodiment of the present application, a coordinate system is established on a horizontal plane where the supporting ankle joint is located, the coordinate origin is located at the supporting ankle joint, the x-axis points to the direction of movement of the robot, the y-axis points to the inside of the robot, and the z-axis points vertically upward.
[0072] When the robot is simplified to LIPM and the ZMP is assumed to be (0,0), its dynamic model is as follows:
[0073]
[0074] Where x is the center of mass position of LIPM on the x-axis, y is the center of mass position of LIPM on the y-axis, is the mass center acceleration of LIPM on the x-axis, is the mass center acceleration of LIPM on the y axis, g is the acceleration due to gravity, and z is the height of the center of mass of LIPM from the ground.
[0075] For LIPM, its stable cycle trajectory is as follows Figure 1 As shown in Figure 2, the larger the period (denoted as T), the larger the trajectory amplitude of the center of mass of the LIPM, but its center of mass will eventually pass through Point, where S is the robot's step length and D is the robot's step width.
[0076] In the embodiment of the present application, a robot can be constructed based on two position components of the robot's trunk on the horizontal plane (the position component on the x-axis is denoted as x w , and the position component on the y-axis is recorded as y w ), namely the phase variable (denoted as Φ). Among them, the trunk position of the robot relative to the coordinate origin (i.e. the waist position) can be calculated using forward kinematics based on the joint angle feedback value.
[0077] Φ needs to meet two conditions: first, it changes from 0 to 1; second, it is strictly monotonically increasing. In order to ensure that Φ must be equal to 1 at the end of each step, it is necessary to construct a functional relationship between the torso position along the x and y axes at the moment before the supporting foot switches. In the embodiment of the present application, a two-dimensional spatial plane that meets the following conditions can be constructed:
[0078]
[0079] Figure 2 This plane is shown Schematic diagram of the switching plane, which is called the switching plane here, where z w is the position component of the robot's trunk on the z-axis, and C is the slope parameter of the switching plane, the specific value of which can be set according to actual conditions, and is not specifically limited in the present application embodiment. During walking, the height of the robot's trunk is constrained so that it is in the same horizontal plane.
[0080] Figure 3 The figure shows the relationship between the robot's position error. When the robot is simplified to LIPM, its stable periodic trajectory always starts from Start to End, such as Figure 3 When the robot is disturbed, its motion trajectory will deviate from the original stable periodic orbit, as shown in the dotted line trajectory. Figure 3 The intersection of the plane where the robot's trunk is located and the switching plane can be regarded as a straight line, as shown in Figure 3 The straight line in the figure defines the relationship between the position errors of the torso in the x-axis and y-axis directions, namely:
[0081] δx w =Cδy w
[0082] Among them, δx w is the position error component of the torso on the x-axis, δy w is the position error component of the torso on the y-axis. When disturbed, δx w with δy w The value of is unknown, but it always satisfies the relationship shown in the above formula.
[0083] During the robot's walking process, the foot position and swing time of the swing foot are very important factors affecting the walking stability. When the robot is disturbed, the robot's position and posture will deviate from the original trajectory. If the time variable is used to plan the robot's controlled joints, early or delayed ground contact will occur. Using the robot's internal state instead of time can enable the robot to automatically adjust the swing time and swing foot trajectory according to the disturbance to maintain a stable gait. However, the construction of this phase variable may cause the swing foot to have too much impact on the ground when it touches the ground early, thereby affecting the stability of the gait.
[0084] In the embodiment of the present application, the phase variable in the three-dimensional space can be improved so that when the planned swinging foot lands in advance, the impact with the ground is smaller, and thus the robot's walking is more stable.
[0085] See also Figure 4 , an embodiment of a robot gait planning method in an embodiment of the present application may include:
[0086] Step S401: construct the first phase variable of the robot's gait planning.
[0087] In two-dimensional space, the phase variable can be the displacement of the robot in the direction of travel, or the angle between the supporting leg and the ground. In three-dimensional space, the phase variable needs to consider two components of the robot state in the horizontal plane at the same time, such as the displacement of the robot's torso position in the direction of travel and the lateral direction. Among them, the displacement in the direction of travel is monotonically increasing, and the displacement in the lateral direction is non-monotonic. In the embodiment of the present application, it is necessary to construct a monotonically increasing phase variable based on these two, which is recorded as the first phase variable.
[0088] like Figure 5 As shown, step S401 may specifically include the following process:
[0089] Step S4011: Use a quadratic equation with unknown coefficients to establish a functional relationship between the first phase variable and two position components of the robot's trunk on the horizontal plane.
[0090] Specifically, the following functional relationship can be established:
[0091] Φ=a1x w +a2y w +a3x w y w +a4x w 2 +a5y w 2 +a6
[0092] Among them, a1, a2, a3, a4, a5 and a6 are unknown coefficients.
[0093] Step S4012: Establish a set of equations for solving each undetermined coefficient of the quadratic equation of two variables according to the preset value of the first phase variable at the initial time and the preset value at the termination time.
[0094] First, the first solution equation of the quadratic equation can be established according to the preset value of the first phase variable at the initial time. From the above analysis, it can be seen that the first phase variable is always 0 at the initial time, that is, Φ(x w0 ,y w0 )=0, where (x w0 ,y w0 ) are the two position components of the robot's trunk on the horizontal plane at the initial moment, which can be calculated based on the final state of the robot's previous step and are known quantities. Φ(x w0 ,y w0 ) is the value of the first phase variable at the initial moment. Substituting it into the above functional relationship, we can get the first solution equation as shown below:
[0095] a1x w0 +a2y w0 +a3x w0 y w0 +a4x w0 2 +a5y w0 2 +a6=0
[0096] The second solution equation of the quadratic equation can also be established according to the preset value of the first phase variable at the termination time. From the above analysis, it can be seen that the phase variable is always 1 at the termination time, that is, Φ(x wf ,y wf )=1, where (x wf ,y wf ) are the two position components of the robot's trunk on the horizontal plane at the end time. Under ideal conditions, In case of disturbance, Φ(x wf ,y wf) is the value of the first phase variable at the termination time. Substituting it into the above functional relationship, we can get the second solution equation as shown below:
[0097]
[0098] For the convenience of writing, δy w Abbreviated as δ, the position error relationship δx w =Cδy w Substituting into the second solution equation, we can get:
[0099]
[0100] For any δ, the constraints in the above formula must be satisfied. Therefore, the coefficients in front of all terms containing δ in the above formula must be 0, and the sum of the remaining terms must be 1. Therefore, the derivative solution equations shown below can be obtained from the above formula:
[0101] a1(S / 2)+a2(D / 2)+a3(S / 2)(D / 2)+a4(S / 2) 2 +a5(D / 2) 2 +a6=1
[0102] -a3C+a4C 2 +a5=0
[0103] -a1C+a2-a3C(D / 2)+a3(S / 2)-2a4C(S / 2)+2a5(D / 2)=0
[0104] Finally, the derivative solution equations of the first solution equation and the second solution equation can be constructed into a solution equation system as shown below:
[0105]
[0106] Step S4013: simplify the number of undetermined coefficients of the quadratic equation of two variables according to the solution of the equation group to obtain a simplified functional relationship.
[0107] The equations to be solved contain 4 equations and 6 unknowns, namely the unknown coefficients a1, a2, a3, a4, a5 and a6. The four unknown coefficients can be regarded as functions with the remaining two unknown coefficients as variables. For example, a1, a2, a3, and a4 can be regarded as functions with a5 and a6 as variables respectively. In this way, the 6 unknown coefficients can be simplified to 2 unknown coefficients, thereby obtaining a simplified functional relationship.
[0108] Step S4014: construct an optimization objective function corresponding to the simplified functional relationship.
[0109] Specifically, the optimization objective function can be constructed as follows:
[0110] J=∑(Φ(t i )-t i / T) 2
[0111] Among them, t i is the i-th moment in the LIPM cycle, Φ(t i ) is the first phase variable and t i The corresponding value, J is the optimization objective function. Since the first phase variable must keep monotonically increasing during the process of completing a step, this optimization objective function selects several moments from the LIPM cycle. For the i-th moment, use (Φ(t i )-t i / T) 2 To measure the deviation between the first phase variable and the unitized time variable, the total deviation obtained by accumulating the deviations at each selected moment is the optimization objective function.
[0112] Step S4015: Calculate the various undetermined coefficients of the quadratic equation according to the optimization objective function and the preset optimization algorithm to complete the construction of the first phase variable.
[0113] In the embodiment of the present application, any optimization algorithm in the prior art can be selected according to the actual situation, including but not limited to the optimization algorithms such as stochastic gradient descent method, momentum algorithm, Adam algorithm, etc. By solving, the various undetermined coefficients of the binary quadratic equation can be obtained, thereby completing the construction of the first phase variable.
[0114] Step S402: construct a second phase variable according to the first phase variable.
[0115] Figure 6 The diagram shown is a schematic diagram of the first phase variable. When the first phase variable is used to measure the swing foot height (denoted as z s ) is used for planning, the speed of the swinging foot (denoted as ), that is, the time-dependent derivative of the swing foot position is:
[0116]
[0117] When the value of the first phase variable is close to 1, that is, when the swinging foot is about to touch the ground, the slope of the first phase variable increases, that is, Increase, The value of will also increase accordingly. Once the swinging foot touches the ground in advance, it will have a greater impact with the ground, affecting the stability of the robot's walking.
[0118] In a specific implementation of the embodiment of the present application, the phase variable Φ can be improved so that when the value of Φ is close to 1, the slope of Φ is as small as possible, and it must be ensured that the initial value and the final value of Φ do not change, and remain 0 and 1 respectively. For example, the first phase variable can be processed using a preset inverse hyperbolic sine function to obtain a new phase variable, which is recorded as the second phase variable.
[0119] Specifically, the first phase variable can be processed according to the following formula:
[0120]
[0121] Wherein, arsinh is the inverse hyperbolic sine function, n is the preset adjustment coefficient, and its specific value can be set according to the actual situation. For example, it can be set to 1, 2, 3, etc., Φ * is the second phase variable.
[0122] The comparison between the improved second phase variables and the original first phase variables is as follows: Figure 7 As shown in the figure, it can be seen that the slope of the improved second phase variable at the moment before the collision is significantly reduced compared with the original first phase variable, which makes an important contribution to reducing the impact of the swinging foot with the ground.
[0123] It should be noted that the above construction process of the second-phase variable is only an example. In practical applications, other second-phase variables can be constructed according to specific circumstances, but it is necessary to ensure that the slope of the second-phase variable is less than the slope of the first-phase variable at the moment before the robot's swinging foot touches the ground.
[0124] Step S403: Use the second phase variables to perform gait planning on the robot's swing foot to obtain a planned trajectory of the robot's swing foot.
[0125] First, the trajectory of the robot's swinging foot in each coordinate axis direction can be expressed as a function of the second phase variable. Among them, the trajectory in the x-axis direction is recorded as x s (Φ * ), the trajectory in the y-axis direction is recorded as y s (Φ * ), the trajectory in the z-axis direction is recorded as z s (Φ * ).
[0126] Then, the boundary conditions of the trajectory of the robot's swing foot in the direction of each coordinate axis can be determined separately.
[0127] Among them, the boundary conditions of the trajectory in the x-axis direction are:
[0128] x s (0) = x w0 , xs (1) = S;
[0129]
[0130] The boundary conditions of the trajectory in the y-axis direction are:
[0131] y s (0) = y w0 ,y s (1) = D;
[0132]
[0133] in, is the speed of the robot’s trunk in the x-axis direction at the initial moment, is the speed of the robot's trunk in the y-axis direction at the initial moment. Both can be calculated based on the final state of the robot's previous step and are known quantities. In an ideal state where collision is not considered, both can be set to 0.
[0134] The boundary conditions of the trajectory in the z-axis direction are:
[0135] z s (0) = 0, z s (Φ m )=h s , z s (1) = 0;
[0136]
[0137] Among them, h s is the maximum height of the swinging foot, 0<Φ m <1, for Φ * An intermediate value of * =Φ m , the swing foot reaches maximum height.
[0138] Finally, curve fitting can be performed on the trajectory of the robot's swinging foot in the preset directions of each coordinate axis according to the boundary conditions to obtain the planned trajectory of the robot's swinging foot in the preset directions of each coordinate axis.
[0139] In the embodiment of the present application, any curve fitting algorithm in the prior art can be selected according to actual conditions, including but not limited to curve fitting algorithms based on cubic polynomial curves, S-shaped curves, cubic spline curves, cubic Hermite curves, and Bezier curves. A smooth curve that transitions from an initial state to a terminal state, i.e., the planned trajectory of the swinging foot, is determined by curve fitting.
[0140] In summary, the embodiment of the present application constructs the first phase variable of the robot's gait planning, the first phase variable being a function of two position components of the robot's trunk on the horizontal plane; constructs the second phase variable based on the first phase variable, the second phase variable being a function of the first phase variable, and at a moment before the robot's swing foot touches the ground, the slope of the second phase variable is less than the slope of the first phase variable; uses the second phase variable to perform gait planning on the robot's swing foot, and obtains the planned trajectory of the robot's swing foot. Through the embodiment of the present application, the phase variable (i.e., the first phase variable) constructed based on the robot state is improved, and the slope of the improved phase variable (i.e., the second phase variable) at a moment before the swing foot touches the ground is smaller. Using the improved phase variable to perform gait planning on the swing foot can make the impact of the swing foot on the ground smaller, thereby enhancing the walking stability of the robot.
[0141] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0142] Corresponding to a gait planning method described in the above embodiment, Figure 8 A structural diagram of an embodiment of a gait planning device provided in an embodiment of the present application is shown.
[0143] In this embodiment, a gait planning device may include:
[0144] A first phase variable construction module 801 is used to construct a first phase variable of the robot's gait planning, wherein the first phase variable is a function of two position components of the robot's trunk on a horizontal plane;
[0145] A second phase variable construction module 802, configured to construct a second phase variable according to the first phase variable, wherein the second phase variable is a function of the first phase variable, and a slope of the second phase variable is less than a slope of the first phase variable at a moment before the swinging foot of the robot touches the ground;
[0146] The gait planning module 803 is used to use the second phase variable to perform gait planning on the swing foot of the robot to obtain a planned trajectory of the swing foot of the robot.
[0147] In a specific implementation of the embodiment of the present application, the second phase variable construction module can be specifically used to process the first phase variable using a preset inverse hyperbolic sine function to obtain the second phase variable.
[0148] In a specific implementation of the embodiment of the present application, the second phase variable construction module may be specifically used to process the first phase variable according to the following formula:
[0149]
[0150] Wherein, Φ is the first phase variable, arsinh is the inverse hyperbolic sine function, n is the preset adjustment coefficient, Φ * is the second phase variable.
[0151] In a specific implementation of the embodiment of the present application, the first phase variable construction module may include:
[0152] A functional relationship establishing unit, used for establishing a functional relationship between the first phase variable and two position components of the trunk of the robot on a horizontal plane using a quadratic equation with undetermined coefficients;
[0153] A unit for solving an equation group is used to establish an equation group for solving each undetermined coefficient of the quadratic equation according to a preset value of the first phase variable at an initial time and a preset value at a termination time;
[0154] A coefficient simplification unit, used for simplifying the number of undetermined coefficients of the quadratic equation according to the set of equations to be solved, to obtain a simplified functional relationship;
[0155] An optimization objective function construction unit, used to construct an optimization objective function corresponding to the simplified functional relationship;
[0156] A coefficient calculation unit is used to calculate the various undetermined coefficients of the binary quadratic equation according to the optimization objective function and a preset optimization algorithm to complete the construction of the first phase variable.
[0157] In a specific implementation of the embodiment of the present application, the functional relationship establishing unit is specifically used to establish the functional relationship shown in the following formula:
[0158] Φ=a1x w +a2y w +a3x w y w +a4x w 2 +a5y w 2 +a6
[0159] Among them, x w and w are two position components of the robot's trunk on the horizontal plane, a1, a2, a3, a4, a5 and a6 are unknown coefficients respectively, and Φ is the first phase variable.
[0160] In a specific implementation of the embodiment of the present application, the equation solving unit may include:
[0161] A first solution equation establishing subunit, used for establishing a first solution equation of the binary quadratic equation according to a preset value of the first phase variable at an initial moment;
[0162] A second solution equation establishment subunit, used for establishing a second solution equation of the binary quadratic equation according to a preset value of the first phase variable at the termination time;
[0163] A derivative solution equation establishment subunit is used to substitute a preset position error relationship into the second solution equation to obtain each derivative solution equation of the second solution equation; the position error relationship is the relationship between two position error components of the trunk of the robot on the horizontal plane;
[0164] The solution equation group establishment subunit is used to construct the derivative solution equations of the first solution equation and the second solution equation into the solution equation group.
[0165] In a specific implementation of the embodiment of the present application, the optimization objective function construction unit is specifically used to construct the optimization objective function shown below:
[0166] J=∑(Φ(t i )-t i / T) 2
[0167] Wherein, T is the period of the linear inverted pendulum model of the robot, t i is the i-th moment in the cycle, Φ(t i ) is the first phase variable and t i The corresponding value, J is the optimization objective function.
[0168] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0169] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0170] Fig. 9 A schematic block diagram of a robot provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0171] like Fig. 9As shown, the robot 9 of this embodiment includes: a processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the processor 90. When the processor 90 executes the computer program 92, the steps in the above-mentioned gait planning method embodiments are implemented, for example Figure 4 Alternatively, when the processor 90 executes the computer program 92, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 8 The functions of modules 801 to 803 are shown.
[0172] Exemplarily, the computer program 92 may be divided into one or more modules / units, which are stored in the memory 91 and executed by the processor 90 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 92 in the robot 9.
[0173] Those skilled in the art will understand that Fig. 9 It is only an example of the robot 9 and does not constitute a limitation of the robot 9. The robot 9 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the robot 9 may also include input and output devices, network access devices, buses, etc.
[0174] The processor 90 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0175] The memory 91 may be an internal storage unit of the robot 9, such as a hard disk or memory of the robot 9. The memory 91 may also be an external storage device of the robot 9, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the robot 9. Further, the memory 91 may also include both an internal storage unit of the robot 9 and an external storage device. The memory 91 is used to store the computer program and other programs and data required by the robot 9. The memory 91 may also be used to temporarily store data that has been output or is to be output.
[0176] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0177] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0178] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0179] In the embodiments provided in the present application, it should be understood that the disclosed devices / robots and methods can be implemented in other ways. For example, the device / robot embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0180] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0181] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0182] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0183] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such 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 application, and should all be included in the protection scope of the present application.
Claims
1. A gait planning method, It is characterized in that include: Constructing a first phase variable of the gait planning of the robot, wherein the first phase variable is a function of two position components of the trunk of the robot on a horizontal plane; Determine the product of the first phase variable and a preset adjustment coefficient, and use the ratio between the inverse hyperbolic sine function of the product and the inverse hyperbolic sine function of the adjustment coefficient as the second phase variable; The second phase variable is used to perform gait planning on the swinging foot of the robot to obtain a planned trajectory of the swinging foot of the robot.
2. The gait planning method according to claim 1, It is characterized in that The first phase variable of constructing the gait planning of the robot includes: Using a quadratic equation with undetermined coefficients, a functional relationship between the first phase variable and two position components of the robot's trunk on a horizontal plane is established; Establishing a set of equations for solving each undetermined coefficient of the quadratic equation according to the preset value of the first phase variable at the initial time and the preset value at the termination time; Simplifying the number of undetermined coefficients of the quadratic equation according to the set of equations to be solved to obtain a simplified functional relationship; Constructing an optimization objective function corresponding to the simplified functional relationship; The various undetermined coefficients of the binary quadratic equation are calculated according to the optimization objective function and a preset optimization algorithm to complete the construction of the first phase variable.
3. The gait planning method according to claim 2, It is characterized in that The method of establishing a functional relationship between the first phase variable and two position components of the robot's trunk on a horizontal plane using a quadratic equation with undetermined coefficients includes: Establish the functional relationship shown below: Φ=a 1 x w +a 2 and w +a 3 x w and w +a 4 x w 2 +a 5 and w 2 +a 6 Among them, x w and w are the two position components of the robot’s trunk on the horizontal plane, a 1 、a 2 、a 3 、a 4 、a 5 and a 6 are the unknown coefficients respectively, and Φ is the phase variable.
4. The gait planning method according to claim 2, It is characterized in that The step of establishing a set of equations for solving each undetermined coefficient of the quadratic equation according to the preset value of the phase variable at the initial time and the preset value at the termination time includes: Establishing a first solution equation of the binary quadratic equation according to a preset value of the first phase variable at an initial moment; Establishing a second solution equation for the quadratic equation according to a preset value of the first phase variable at the termination time; Substituting a preset position error relationship into the second solution equation to obtain various derivative solution equations of the second solution equation; the position error relationship is the relationship between two position error components of the trunk of the robot on the horizontal plane; The derivative solution equations of the first solution equation and the second solution equation are constructed as the solution equation group.
5. The gait planning method according to any one of claims 2 to 4, It is characterized in that The constructing of the optimization objective function corresponding to the simplified functional relationship includes: Construct the optimization objective function as shown below: J=Σ(Φ(t i )-t i / T) 2 Wherein, T is the period of the linear inverted pendulum model of the robot, t i is the i-th moment in the cycle, Φ(t i ) is the first phase variable and t i The corresponding value, J is the optimization objective function.
6. A gait planning device, It is characterized in that include: A first phase variable construction module, used to construct a first phase variable of the robot's gait planning, wherein the first phase variable is a function of two position components of the robot's trunk on a horizontal plane; a second phase variable construction module, configured to determine the product of the first phase variable and a preset adjustment coefficient, and to use the ratio between the inverse hyperbolic sine function of the product and the inverse hyperbolic sine function of the adjustment coefficient as the second phase variable; A gait planning module is used to use the second phase variable to perform gait planning on the swinging foot of the robot to obtain a planned trajectory of the swinging foot of the robot.
7. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the gait planning method according to any one of claims 1 to 5 are implemented.
8. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the gait planning method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and device for planning robot time optimal trajectory based on dynamic model
CN110209048A
Humanoid robot gait generation method based on centroid height compensation
CN112859856A
Robot trajectory planning method and device, readable storage medium and robot
CN113001542A
Gait track planning method and device, readable storage medium and robot
CN113110484A
Wearable walking fitness system based on exoskeleton, control method and storage medium
CN113599781A
