Swing leg control method, device, electronic device and storage medium
By predicting the center of mass angular momentum and constructing a triggered sampling mechanism, combined with polynomial interpolation and admittance models, the problem of insufficient robustness and compliance in the swing leg foothold control in the gait of a humanoid robot is solved, and the stability of gait switching is improved. performance and robustness.
Patent Information
- Application Number
- CN202410719717.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-06-05
AI Technical Summary
In the existing technology, during the gait movement of humanoid robots, the robustness and flexibility of the swing leg foot point control are insufficient, resulting in unstable gait switching.
By obtaining the status data and joint angle data of the humanoid robot, predict the center of mass angular momentum, build a triggered sampling mechanism, update the angular momentum prediction value, calculate the foothold position, and adjust the gait trajectory based on polynomial interpolation and admittance models to improve the foothold. stability.
It improves the stability and robustness of the single-leg support phase of the humanoid robot, reduces the frequency of foothold update, reduces the relative sliding between the foot and the ground after touching the ground, and enhances the stability of gait switching.
Smart Images

Figure CN118295446B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot control technology, and in particular to a swing leg control method, device, electronic equipment and storage medium. Background Art
[0002] The autonomous stable balance of the humanoid robot's gait movement is achieved through the legs. In addition to providing gravity support, the control of the legs must also be adjusted at any time according to the changes in the body's state to ensure the stability and balance of the body during static or dynamic movement. During the gait movement of the humanoid robot (such as walking and stepping), the control of the foothold of the swinging leg plays an important role in maintaining the stability of the body during the gait switching stage.
[0003] In the prior art, traditional foothold control methods include inverted pendulum model, zero moment point (ZMP) and angular momentum prediction, which mainly adjust the foothold position in real time according to the posture of the fuselage. However, these control methods still have shortcomings in achieving robustness and compliance. Summary of the invention
[0004] The present invention provides a swing leg control method, device, electronic equipment and storage medium, which are used to solve the problem that the control method in the prior art is still insufficient in achieving robustness and flexibility.
[0005] The present invention provides a swing leg control method, comprising: acquiring state data and joint angle data of a humanoid robot; determining the posture state information of the humanoid robot according to the state data, and determining the sole information of the humanoid robot according to the joint angle data and forward kinematics; predicting the center of mass angular momentum at the end of the current gait according to the posture state information and the sole information; constructing a triggered sampling mechanism to regulate the predicted calculation of the center of mass angular momentum to obtain a triggered angular momentum prediction value; determining the expected angular momentum corresponding to different motion instructions; calculating the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum; wherein the triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change value of the center of mass angular momentum is greater than a first threshold value and the sole position of the foot in the z-axis direction is higher than a second threshold value to obtain the triggered angular momentum prediction value.
[0006] According to a swing leg control method provided by the present invention, after calculating the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum, the method also includes: obtaining the current motion instruction of the humanoid robot; determining the current motion mode according to the current motion instruction, and determining the expected body posture change sequence of the humanoid robot based on the current motion mode; determining the landing point compensation information according to the expected body posture change sequence and the landing point position, and correcting the gait of the humanoid robot based on the landing point compensation information.
[0007] According to a swing leg control method provided by the present invention, the method also includes: determining the gait trajectory of the swing leg of the humanoid robot from the current position to the target landing point based on polynomial interpolation; determining the plantar feedback contact force of the humanoid robot; constructing an admittance model for leg stiffness adjustment according to the plantar feedback contact force; and correcting the gait trajectory according to the admittance model and the plantar feedback contact force.
[0008] According to a swing leg control method provided by the present invention, after the gait trajectory is corrected according to the admittance model and the plantar feedback contact force, the method further includes: back-calculating the gait trajectory to an expected position sequence of each joint in the joint space based on inverse kinematics; calculating the torque signal of each joint according to the expected joint position sequence, and driving the swing leg of the humanoid robot to perform joint movement through the torque signal.
[0009] The present invention also provides a swing leg control device, comprising: an acquisition module and a processing module; the acquisition module is used to acquire state data and joint angle data of a humanoid robot; the processing module is used to determine the posture state information of the humanoid robot according to the state data, and determine the plantar information of the humanoid robot according to the joint angle data and forward kinematics; predict the center of mass angular momentum at the end of the current gait according to the posture state information and the plantar information; construct a triggered sampling mechanism to regulate the predicted calculation of the center of mass angular momentum to obtain a triggered angular momentum prediction value; determine the expected angular momentum corresponding to different motion instructions; calculate the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum; wherein the triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change value of the center of mass angular momentum is greater than a first threshold value and the plantar position of the z-axis is higher than a second threshold value to obtain the triggered angular momentum prediction value.
[0010] According to a swing leg control device provided by the present invention, after calculating the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum, the processing module is used to obtain the current motion instruction of the humanoid robot; determine the current motion mode according to the current motion instruction, and determine the expected body posture change sequence of the humanoid robot based on the current motion mode; determine the landing point compensation information according to the expected body posture change sequence and the landing point position, and correct the gait of the humanoid robot based on the landing point compensation information.
[0011] According to a swing leg control device provided by the present invention, the processing module is also used to determine the gait trajectory of the swing leg of the humanoid robot from the current position to the target landing point based on polynomial interpolation; determine the plantar feedback contact force of the humanoid robot; construct an admittance model for leg stiffness adjustment according to the plantar feedback contact force; and correct the gait trajectory according to the admittance model and the plantar feedback contact force.
[0012] According to a swing leg control device provided by the present invention, the processing module is also used to back-calculate the gait trajectory into an expected position sequence of each joint in the joint space based on inverse kinematics; calculate the torque signal of each joint according to the expected joint position sequence, and drive the swing leg of the humanoid robot to perform joint movement through the torque signal.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned swing leg control methods are implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described swing leg control methods.
[0015] The swing leg control method, device, electronic device and storage medium provided by the present invention can obtain the state data and joint angle data of the humanoid robot; determine the posture state information of the humanoid robot according to the state data, and determine the plantar information of the humanoid robot according to the joint angle data and forward kinematics; predict the center of mass angular momentum at the end of the current gait according to the posture state information and the plantar information; construct a triggered sampling mechanism to regulate the predicted calculation of the center of mass angular momentum to obtain a triggered angular momentum prediction value; determine the expected angular momentum corresponding to different motion instructions; calculate the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum; wherein the triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change value of the center of mass angular momentum is greater than a first threshold value and the plantar position of the z-axis is higher than a second threshold value to obtain the triggered angular momentum prediction value. Through this scheme, since a triggered sampling mechanism is introduced, and the triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change of the center of mass angular momentum is greater than a first threshold and the plantar position of the z-axis is higher than a second threshold, it is possible not only to determine whether the current state of the humanoid robot is that the swinging leg is about to touch the ground, but also to determine whether it is necessary to sample the angular momentum estimate value based on the current state for updating the foothold position, so that the update of the angular momentum prediction value and the foothold position is only performed at the moment before touching the ground, and remains unchanged after touching the ground. In this way, the relative sliding of the foot and the ground after the swinging leg touches the ground can be reduced, thereby improving the stability and robustness of the single-leg support stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of the swing leg control method provided by the present invention;
[0018] Figure 2 It is a structural schematic diagram of the swing leg control device provided by the present invention;
[0019] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0020] 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 of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. 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.
[0021] It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0022] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present invention is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0023] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", etc. are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. are not limiting the quantity and execution order.
[0024] The embodiments of the present invention describe some exemplary embodiments for the purpose of explanation. It should be understood that the present invention can be implemented in other ways that are not specifically shown in the drawings.
[0025] The above implementation is described in detail below with reference to specific embodiments and drawings.
[0026] like Figure 1As shown, an embodiment of the present invention provides a swing leg control method, which can be applied to a swing leg control device. The swing leg control method may include S101-S106:
[0027] S101. A leg swing control device obtains state data and joint angle data of a humanoid robot.
[0028] Specifically, the swing leg control device can record the robot's state data and joint angle data, the state data includes the inertial measurement unit (IMU) data and encoder data of the body, the IMU data includes the linear acceleration and attitude angular velocity of the body. The joint angle data includes the left leg joint angle and The joint angles of the right leg, where N is the joint degree of freedom of each leg.
[0029] S102. The swing leg control device determines the posture state information of the humanoid robot according to the state data, and determines the sole information of the humanoid robot according to the joint angle data and forward kinematics.
[0030] Among them, the posture state information includes the fuselage center of mass position, the fuselage center of mass speed and the fuselage attitude Euler angle; the plantar information includes the swing leg plantar position, the supporting leg plantar position, the swing leg plantar speed and the supporting leg plantar speed.
[0031] Optionally, the swing leg control device determines the posture state information of the humanoid robot according to the state data, including: since the IMU data itself has attenuation drift, the swing leg control device can perform Kalman filtering fusion on the IMU data through model kinematics to obtain the center of mass position of the fuselage , body center of mass speed And the Euler angle of the fuselage attitude .
[0032] Optionally, the swing leg control device determines the sole information of the humanoid robot according to the joint angle data and forward kinematics, including:
[0033] foot The calculation formula of plantar position and plantar velocity is:
[0034] ;
[0035] ;
[0036] in, Indicates the position of the sole of the swing leg. Indicates the position of the sole of the supporting leg. represents the swing leg plantar velocity, represents the plantar velocity of the supporting leg, and is the bias term. is the rotation matrix, is the forward kinematics equation, is the Jacobian matrix, is the identity matrix.
[0037] S103, the swing leg control device predicts the center of mass angular momentum at the end of the current gait according to the posture state information and the sole information.
[0038] Since the mass of a heavy humanoid robot is mainly concentrated in the upper body, if the upper body is assumed to be a point mass, the movement of the humanoid robot during single-leg support can be simplified to a linear inverted pendulum. The position of the foothold at the end of the current gait can be predicted based on the evolution of the angular momentum during the inverted pendulum movement.
[0039] Specifically, the state variable vector of the humanoid robot can be defined as ,in, is the component of the center of mass relative to the foothold position along the x direction, is the angular momentum of the center of mass along the y direction, is the velocity of the center of mass in the y direction, is the height of the centroid, It's the quality of the fuselage.
[0040] Starting from the current time t, the state variable vector after T time steps is predicted to be:
[0041] ;
[0042] Where T is the predicted time step, which is also the time when the current gait ends. T is the current gait time, m is the mass of the robot, and H is the height of the center of mass relative to the ground. , g is the acceleration due to gravity, and is a hyperbolic trigonometric function.
[0043] During single-leg support, based on the current center of mass position relative to the support point and the estimated value of angular momentum, the predicted value of the center of mass angular momentum at the end of the current gait, i.e., before touching the ground, is:
[0044] .
[0045] in, It is the moment before the legs switch.
[0046] S104, the swing leg control device constructs a triggered sampling mechanism to regulate the predicted calculation of the center of mass angular momentum to obtain a triggered angular momentum prediction value.
[0047] The triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change of the center of mass angular momentum is greater than a first threshold and the plantar position of the z-axis is higher than a second threshold to obtain the triggered angular momentum prediction value.
[0048] Optionally, in order to improve the reliability of the heavy-duty humanoid robot, the swing leg control device may use a trigger mechanism to regulate the estimation and update of the center of mass angular momentum.
[0049] Specifically, the trigger time sequence is defined as , , and , the predicted value of the triggered angular momentum at time t is defined as: , the update of this value is only performed at a specific trigger moment. At a non-specific trigger moment, this value always remains the sample of the previous trigger moment. The triggered angular momentum prediction value can be expressed as:
[0050] ;
[0051] in, .
[0052] It should be noted that the predicted value of angular momentum in the x direction can be calculated in the same way: and , I will not go into details here.
[0053] The deviation change of the center of mass angular momentum can be defined as:
[0054] ;
[0055] in, .
[0056] The trigger condition of the triggered angular momentum prediction value can be based on the deviation change value and the plantar position of the swinging leg in the z direction Sure:
[0057] ;
[0058] According to the above formula, if and only if the deviation change value of the center of mass angular momentum is greater than the first threshold , and the foot position in the z direction is higher than the second threshold The predicted value of angular momentum is Update. When the deviation changes Less than or equal to the first threshold , it means that the fuselage has not changed significantly, so no update is required; or when the foot position of the z-axis When , it indicates that the swinging leg is about to touch the ground, so the predicted value of angular momentum is no longer updated. In this way, it can be ensured that there is no relative sliding between the foot and the ground after touching the ground.
[0059] S105. The swing leg control device determines the expected angular momentum corresponding to different motion instructions.
[0060] In order to meet the periodic stability of the humanoid robot's footing, the swing leg control device can design the expected angular momentum change within a gait cycle according to different motion instructions (stepping or walking). For example, when the robot is walking at a constant speed, the body maintains a dynamic balance. In the forward direction, the center of mass always maintains a certain constant speed, and in the lateral direction perpendicular to the forward direction, the center of mass changes meet the characteristics of periodic oscillation. The specific design is as follows:
[0061] ;
[0062] ;
[0063] Where W is the width between the two legs, which is a constant value, 1 / 2 W refers to the distance between the sole of the foot and the center of mass, which is half the width of the two feet. is the position of the expected center of mass in the x direction relative to the foothold. When the robot is walking at a constant speed, is a constant value. When standing still, the forward speed is 0. ,but .
[0064] S106. The swing leg control device calculates the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum.
[0065] Based on the predicted angular momentum and the expected value, the swing leg control device can calculate the expected position of the center of mass relative to the sole of the swing leg at the end of the current gait:
[0066] ;
[0067] According to the above formula, The update of determines the update frequency of the foothold. By introducing a trigger mechanism, the update frequency of the foothold during the robot's movement can be reduced, especially after the swing leg touches the ground. Constraining the change in the expected foothold position will solve the problem of the sole sliding relative to the ground, thereby improving the stability of gait switching.
[0068] Optionally, the gait switching identification information of the humanoid robot It can be defined as:
[0069] ;
[0070] in, represents the component of the plantar position coordinates along the z direction, It represents the component of the foot velocity coordinate along the z direction.
[0071] It should be noted that the above gait switching identification information refers to the identification of the humanoid robot switching from the swing leg to the supporting leg, that is, the component of the plantar position coordinate along the z direction 0 means the swinging leg has touched the ground, and the component of the plantar velocity coordinate along the z direction Less than 0 means the swing leg is already used to support the ground.
[0072] Optionally, the swing leg control device can obtain the current motion instructions of the humanoid robot; determine the current motion mode according to the current motion instructions, and determine the expected body posture change sequence of the humanoid robot based on the current motion mode; determine the foothold compensation information according to the expected body posture change sequence and the foothold position, and correct the gait of the humanoid robot based on the foothold compensation information.
[0073] Specifically, in order to reduce the motion deviation, the swing leg control device can calculate the foot point compensation information based on the PID control of the fuselage inclination angle. That is, according to the deviation between the pitch angle of the fuselage and the expected value, the foot point compensation in the x, y, and z directions is calculated:
[0074] First, the swing leg control device can obtain the current motion command of the humanoid robot, determine the current motion mode according to the current motion command, and determine the expected body posture change sequence of the humanoid robot based on the current motion mode. The motion mode of the humanoid robot refers to basic bipedal motion, such as standing, stepping, walking, etc. The expected body posture change sequence can be expressed as: ,in, represents the expected centroid position, represents the desired attitude angle sequence, They are the expected pitch angle, expected roll angle and expected yaw angle respectively. Then, the foot point compensation information is determined according to the expected fuselage posture change sequence and the foot point position:
[0075] ;
[0076] ;
[0077] .
[0078] in, , , They are the deviations of the attitude angles pitch, roll and yaw from the expected values.
[0079] Finally, the swing leg control device can correct the gait of the humanoid robot based on the foothold compensation information.
[0080] Optionally, the swing leg control device can determine the gait trajectory of the swing leg of the humanoid robot from the current position to the target landing point based on polynomial interpolation; determine the plantar feedback contact force of the humanoid robot; construct an admittance model for leg stiffness adjustment according to the plantar feedback contact force; and correct the gait trajectory according to the admittance model and the plantar feedback contact force.
[0081] Specifically, the swing leg control device can use a three-segment quintic polynomial to interpolate and plan the gait trajectory. The three-segment quintic polynomial can be expressed as:
[0082] ;
[0083] in, is the Bezier parameter, , t is the normalized time parameter. The optimization can make the trajectory curve smoother, thereby improving the continuity of plantar movement.
[0084] After determining the gait trajectory, in order to avoid excessive ground contact force during the swing leg contact process that will cause the fuselage to tilt, it is necessary to constrain the ground contact motion of the swing leg and achieve smooth contact with the ground. The swing leg control device can first determine the plantar feedback contact force of the humanoid robot:
[0085] The actual plantar feedback contact force is estimated by the deformation of the leg leaf spring. The plantar force variable is defined as ,in For the i-th joint, the plantar force of the left and right legs can be estimated by the following formula:
[0086] ;
[0087] ;
[0088] ;
[0089] in, For leg length, is the estimated coefficient. Since the contact force on the sole of the foot is in opposite directions to the movement of the foot along the z-axis, the sign needs to be chosen.
[0090] Furthermore, the swing leg control device can construct an admittance model for leg stiffness adjustment according to the above-mentioned sole feedback contact force:
[0091] The admittance model can be expressed as:
[0092] ;
[0093] in, and They represent the admittance coefficients for regulating acceleration, velocity and position, respectively. It is the acceleration, velocity and position of the foothold after correction by admittance control. are the acceleration, velocity and position of the planned desired landing point. is a sign function, when x is equal to 0, is 1, when x is not equal to 0, is 0.
[0094] Furthermore, the swing leg control device can correct the gait trajectory according to the admittance model and the plantar feedback contact force:
[0095] The admittance model represents the mapping relationship between the external force and the compression between the legs, and indirectly realizes the change of leg stiffness. In order to reduce the impact force when the swinging leg touches the ground, a virtual contact force related to the height and speed of the leg is designed and introduced in the pre-touchdown stage (the actual contact force is 0). , which is used to constrain the acceleration and speed at the moment of contact and reduce the impact of contact; in the actual contact phase, the estimated contact force is introduced The sole position is corrected to constrain the ground contact force and achieve a smooth ground contact effect. The virtual contact force can be designed as a function of the sole height, which is specifically expressed as follows:
[0096] ;
[0097] in, is the calculation coefficient, is the mass of the robot's swinging leg, is the terminal velocity of the swing leg. It is the position of the sole in the z direction, which measures the distance between the current sole position and the contact ground. It is a constant offset that reduces the probability of direct rigid collision between the foot and the ground. is the diffusion coefficient.
[0098] According to the virtual contact force and the real contact force fed back by the sole of the foot, the ground contact acceleration and velocity are constrained:
[0099] ;
[0100] in, , .
[0101] Optionally, after correcting the gait trajectory according to the admittance model and the plantar feedback contact force, the swing leg control device can back-calculate the gait trajectory to the expected position sequence of each joint in the joint space based on inverse kinematics; calculate the torque signal of each joint according to the expected joint position sequence, and drive the swing leg of the humanoid robot to perform joint movement through the torque signal.
[0102] Specifically, the swing leg control device can obtain the desired motion sequence based on the above algorithm. The plantar trajectory of the supporting leg is back-calculated into the expected position sequence of each joint in the joint space through inverse kinematics, and then the torque signal of each joint is calculated based on the dynamic model and PD tracking control algorithm to drive the joint movement of the swing leg.
[0103] The dynamic model of the humanoid robot is:
[0104] ;
[0105] in, Generalized coordinates representing the current joint angle, angular velocity, and angular acceleration, model parameters represents the mass matrix of the system, represents gravity, represents the Coriolis force matrix, is the joint torque, is the torque distribution. represents the Jacobian matrix from Cartesian space to joint space, represents the plantar feedback contact force, is the torsional moment of the leg, is the Jacobian matrix of the leaf spring.
[0106] The calculation formula of control torque is:
[0107] ;
[0108] in, and To control the gain parameter, is the dynamic control coefficient, and It refers to the expected angle, angular velocity and angular acceleration of the joint.
[0109] In the embodiment of the present invention, since a triggered sampling mechanism is introduced, and the triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change of the center of mass angular momentum is greater than a first threshold value and the plantar position of the z-axis is higher than a second threshold value, it is possible not only to determine whether the current state of the humanoid robot is that the swinging leg is about to touch the ground, but also to determine whether it is necessary to sample the angular momentum estimation value based on the current state for updating the foothold position, so that the update of the angular momentum prediction value and the foothold position is only performed at the moment before touching the ground, and remains unchanged after touching the ground. In this way, the relative sliding of the foot and the ground after the swinging leg touches the ground can be reduced, thereby improving the stability and robustness of the single-leg support stage.
[0110] The above mainly introduces the solution provided by the embodiment of the present invention from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed in this article, the embodiment of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware 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 exceed the scope of the present invention.
[0111] The swing leg control method provided in the embodiment of the present invention can be executed by a swing leg control device or a control module for swing leg control in the swing leg control device. In the embodiment of the present invention, the swing leg control device provided in the embodiment of the present invention is described by taking the swing leg control device executing the swing leg control method as an example.
[0112] It should be noted that the embodiment of the present invention can divide the functional modules of the swing leg control device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present invention is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0113] like Figure 2As shown, an embodiment of the present invention provides a swing leg control device 200. The swing leg control device 200 includes: an acquisition module 201 and a processing module 202. The acquisition module 201 is used to acquire the state data and joint angle data of the humanoid robot; the processing module 202 is used to determine the posture state information of the humanoid robot according to the state data, and determine the sole information of the humanoid robot according to the joint angle data and forward kinematics; predict the center of mass angular momentum at the end of the current gait according to the posture state information and the sole information; construct a triggered sampling mechanism to regulate the prediction calculation of the center of mass angular momentum to obtain a triggered angular momentum prediction value; determine the expected angular momentum corresponding to different motion instructions; calculate the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum; wherein the triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change value of the center of mass angular momentum is greater than a first threshold value and the sole position of the z-axis is higher than a second threshold value to obtain the triggered angular momentum prediction value.
[0114] Optionally, the processing module 202 is used to obtain the current motion instructions of the humanoid robot; determine the current motion mode according to the current motion instructions, and determine the expected body posture change sequence of the humanoid robot based on the current motion mode; determine the foothold compensation information according to the expected body posture change sequence and the foothold position, and correct the gait of the humanoid robot based on the foothold compensation information.
[0115] Optionally, the processing module 202 is also used to determine the gait trajectory of the swing leg of the humanoid robot from the current position to the target landing point based on polynomial interpolation; determine the plantar feedback contact force of the humanoid robot; construct an admittance model for leg stiffness adjustment according to the plantar feedback contact force; and correct the gait trajectory according to the admittance model and the plantar feedback contact force.
[0116] Optionally, the processing module 202 is also used to back-calculate the gait trajectory into an expected position sequence of each joint in the joint space based on inverse kinematics; calculate the torque signal of each joint according to the expected position sequence of the joints, and drive the swing leg of the humanoid robot to perform joint movement through the torque signal.
[0117] In the embodiment of the present invention, since a triggered sampling mechanism is introduced, and the triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change of the center of mass angular momentum is greater than a first threshold value and the plantar position of the z-axis is higher than a second threshold value, it is possible not only to determine whether the current state of the humanoid robot is that the swinging leg is about to touch the ground, but also to determine whether it is necessary to sample the angular momentum estimation value based on the current state for updating the foothold position, so that the update of the angular momentum prediction value and the foothold position is only performed at the moment before touching the ground, and remains unchanged after touching the ground. In this way, the relative sliding of the foot and the ground after the swinging leg touches the ground can be reduced, thereby improving the stability and robustness of the single-leg support stage.
[0118] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor (processor) 310, a communication interface (Communications Interface) 320, a memory (memory) 330 and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 can call the logic instructions in the memory 330 to execute the swing leg control method, which includes: obtaining the state data and joint angle data of the humanoid robot; determining the posture state information of the humanoid robot according to the state data, and determining the plantar information of the humanoid robot according to the joint angle data and forward kinematics; predicting the center of mass angular momentum at the end of the current gait according to the posture state information and the plantar information; constructing a triggered sampling mechanism to regulate the predicted calculation of the center of mass angular momentum to obtain a triggered angular momentum prediction value; determining the expected angular momentum corresponding to different motion instructions; calculating the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum; wherein the triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change value of the center of mass angular momentum is greater than a first threshold and the plantar position of the z-axis is higher than a second threshold to obtain the triggered angular momentum prediction value.
[0119] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is 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, and the computer software product is stored in a storage medium, including a number of 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: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0120] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the swing leg control method provided by the above methods, and the method includes: obtaining state data and joint angle data of a humanoid robot; determining the posture state information of the humanoid robot according to the state data, and determining the plantar information of the humanoid robot according to the joint angle data and forward kinematics; predicting the center of mass angular momentum at the end of the current gait according to the posture state information and the plantar information; constructing a triggered sampling mechanism to regulate the predicted calculation of the center of mass angular momentum to obtain a triggered angular momentum prediction value; determining the expected angular momentum corresponding to different motion instructions; calculating the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum; wherein the triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change value of the center of mass angular momentum is greater than a first threshold value and the plantar position of the z-axis is higher than a second threshold value to obtain the triggered angular momentum prediction value.
[0121] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned swing leg control methods, the methods comprising: obtaining state data and joint angle data of a humanoid robot; determining the posture state information of the humanoid robot according to the state data, and determining the sole information of the humanoid robot according to the joint angle data; predicting the center of mass angular momentum at the end of the current gait according to the posture state information and the sole information; constructing a triggered sampling mechanism for the center of mass angular momentum to obtain a triggered angular momentum prediction value; determining the expected angular momentum corresponding to different motion instructions; calculating the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum; wherein the triggered sampling mechanism includes updating the center of mass angular momentum to obtain the triggered angular momentum prediction value when the deviation change value of the center of mass angular momentum is greater than a first threshold value and the sole position of the foot in the z-axis direction is higher than a second threshold value.
[0122] 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.
[0123] 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, 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.
[0124] 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 swing leg control method, characterized in that: include: Obtain status data and joint angle data of the humanoid robot; Determine the posture state information of the humanoid robot according to the state data, and determine the sole information of the humanoid robot according to the joint angle data and forward kinematics; Predicting the center of mass angular momentum at the end of the current gait according to the posture state information and the sole information; Constructing a triggered sampling mechanism to regulate the predicted calculation of the center of mass angular momentum, and obtaining a triggered angular momentum prediction value; Determine the expected angular momentum corresponding to different motion commands; Calculating a foothold position of the humanoid robot according to the predicted value of the triggered angular momentum and the expected angular momentum; The triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change value of the center of mass angular momentum is greater than a first threshold value and the plantar position of the z-axis is higher than a second threshold value to obtain the triggered angular momentum prediction value; The step of calculating the landing point of the humanoid robot according to the predicted value of the triggered angular momentum and the expected angular momentum comprises: According to the formula Determine the landing point position of the humanoid robot at time t ; in, represents the predicted value of the triggered angular momentum at time t, represents the expected angular momentum at time t, represents the mass of the robot, represents the height of the center of mass relative to the ground, , g is the acceleration due to gravity, and is a hyperbolic trigonometric function, Represents the time step.
2. The swing leg control method according to claim 1, characterized in that: After calculating the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum, the method further includes: Obtaining current motion instructions of the humanoid robot; Determining a current motion mode according to a current motion instruction, and determining an expected body posture change sequence of the humanoid robot based on the current motion mode; Foothold compensation information is determined according to the expected body posture change sequence and the foothold position, and the gait of the humanoid robot is corrected based on the foothold compensation information.
3. The swing leg control method according to claim 1, characterized in that: The method further comprises: Determine the gait trajectory of the swinging leg of the humanoid robot from the current position to the target landing point based on the polynomial interpolation method; determining a plantar feedback contact force of the humanoid robot; constructing an admittance model for leg stiffness adjustment according to the plantar feedback contact force; The gait trajectory is corrected according to the admittance model and the plantar feedback contact force.
4. The swing leg control method according to claim 3, characterized in that: After the gait trajectory is corrected according to the admittance model and the plantar feedback contact force, the method further includes: Based on inverse kinematics, the gait trajectory is back-calculated into a sequence of expected positions of each joint in the joint space; The torque signals of each joint are calculated according to the joint expected position sequence, and the swing legs of the humanoid robot are driven to perform joint movement by the torque signals.
5. A swing leg control device, characterized in that: include: Acquisition module and processing module; The acquisition module is used to acquire the state data and joint angle data of the humanoid robot; The processing module is used to determine the posture state information of the humanoid robot according to the state data, and determine the plantar information of the humanoid robot according to the joint angle data and forward kinematics; predict the center of mass angular momentum at the end of the current gait according to the posture state information and the plantar information; construct a triggered sampling mechanism to regulate the prediction calculation of the center of mass angular momentum to obtain a triggered angular momentum prediction value; determine the expected angular momentum corresponding to different motion instructions; and calculate the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum; The triggered sampling mechanism includes updating the center of mass angular momentum when the deviation change value of the center of mass angular momentum is greater than a first threshold value and the plantar position of the z-axis is higher than a second threshold value to obtain the triggered angular momentum prediction value; The processing module is used for: According to the formula Determine the landing point position of the humanoid robot at time t ; in, represents the predicted value of the triggered angular momentum at time t, represents the expected angular momentum at time t, represents the mass of the robot, represents the height of the center of mass relative to the ground, , g is the acceleration due to gravity, and is a hyperbolic trigonometric function, Represents the time step.
6. The swing leg control device according to claim 5, characterized in that: After calculating the landing point position of the humanoid robot according to the triggered angular momentum prediction value and the expected angular momentum, the processing module is used to obtain the current motion instruction of the humanoid robot; determine the current motion mode according to the current motion instruction, and determine the expected body posture change sequence of the humanoid robot based on the current motion mode; determine the landing point compensation information according to the expected body posture change sequence and the landing point position, and correct the gait of the humanoid robot based on the landing point compensation information.
7. The swing leg control device according to claim 5, characterized in that: The processing module is also used to determine the gait trajectory of the swinging leg of the humanoid robot from the current position to the target landing point based on polynomial interpolation; determine the plantar feedback contact force of the humanoid robot; construct an admittance model for leg stiffness adjustment according to the plantar feedback contact force; and correct the gait trajectory according to the admittance model and the plantar feedback contact force.
8. The swing leg control device according to claim 7, characterized in that: The processing module is also used to correct the gait trajectory according to the admittance model and the plantar feedback contact force, and then back-calculate the gait trajectory to the expected position sequence of each joint in the joint space based on inverse kinematics; calculate the torque signal of each joint according to the expected joint position sequence, and drive the swing leg of the humanoid robot to perform joint movement through the torque signal.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps in the swing leg control method according to any one of claims 1 to 4 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the swing leg control method according to any one of claims 1 to 4 are implemented.
