Robot motion trail generation method and device
By establishing a target dynamic model based on centroid dynamics and whole-body kinematics in humanoid robots, the complexity and efficiency problems of high-dynamic motion trajectory planning in the prior art are solved, and a higher precision and efficiency motion trajectory generation is achieved.
Patent Information
- Application Number
- CN202311437433.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2043-10-31
AI Technical Summary
The prior art has problems such as complex modeling, low computational efficiency and inability to reflect the whole body kinematic information of the robot in the planning of high dynamic motion trajectory of humanoid robots, resulting in poor motion trajectory performance.
A target dynamics model is established based on the robot's centroid dynamics and whole-body kinematics, and the optimal motion trajectory is generated through behavioral sequence coding and optimization solutions.
The accuracy and optimization efficiency of the high dynamic motion trajectory of the humanoid robot are improved, effectively reflecting the whole-body motion information of the robot during the high dynamic motion.
Smart Images

Figure CN119910637A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of bionic robots, and in particular to a method and device for generating a robot motion trajectory. Background Art
[0002] A humanoid robot refers to a bipedal robot that imitates human movement patterns. It can replace human work intelligently and stably. One of the prerequisites for serving human life is that the robot has sufficiently powerful high-dynamic movement capabilities, such as continuous jumping, running, rotating jumps, somersaults, etc.
[0003] In the related art, for the high-dynamic motion behavior of humanoid robots, the robot is generally regarded as a multi-rigid body system with a floating base or a free single rigid body system, and a nonlinear optimization problem is established based on the full dynamics model or the single rigid body dynamics model to obtain the optimal motion trajectory. This method is either complex in modeling, inefficient in calculation, or unable to reflect the robot's full body kinematic information, resulting in poor robot motion trajectory performance. Summary of the invention
[0004] In order to improve the accuracy and optimization efficiency of the high-dynamic motion trajectory of a humanoid robot, the embodiments of the present disclosure provide a method, device, electronic device and storage medium for generating a robot motion trajectory.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating a robot motion trajectory, comprising:
[0006] Obtaining a corresponding behavior sequence based on the robot's motion behavior, wherein the behavior sequence represents a contact state between the robot and the outside world during the motion behavior;
[0007] For each time node in the behavior sequence, determining the optimal variable corresponding to each time node based on a pre-established target dynamics model, wherein the target dynamics model is established based on the center of mass dynamics equation and the whole body kinematics equation of the robot;
[0008] Based on the optimal variable corresponding to at least one time node, a target trajectory corresponding to the movement behavior is determined.
[0009] In some embodiments, the robot-based motion behavior coding to obtain a corresponding behavior sequence includes:
[0010] Based on the contact state between the robot and the outside world, the movement behavior is divided into a plurality of movement stages;
[0011] Determine the contact mode corresponding to the motion phase based on a preconfigured contact mode correspondence, wherein the contact mode included in the contact mode correspondence represents the contact state between the robot's sole contact point and the outside world;
[0012] The behavior sequence is generated based on the contact pattern corresponding to each of the movement phases.
[0013] In some embodiments, the process of pre-establishing the target kinetic model includes:
[0014] Establishing a whole-body kinematic equation of the robot based on the postures of the robot's joint position vectors and floating basis vectors relative to a world coordinate system;
[0015] Establishing a center of mass dynamics equation of the robot based on the position of the plantar contact point of the robot relative to the center of mass and the contact force of the plantar contact point;
[0016] The target dynamics model is established based on the whole-body kinematics equation and the center of mass dynamics equation.
[0017] In some embodiments, for each time node in the behavior sequence, determining the optimal variable corresponding to each time node based on a pre-established target dynamics model includes:
[0018] Discretizing the motion behavior based on the behavior sequence to obtain each time node included in the behavior sequence;
[0019] For each time node, the variables corresponding to the time node are optimized and solved based on the target dynamics model to obtain the optimal variables corresponding to each time node; wherein the variables include the robot's center of mass momentum, generalized coordinates, contact force, and joint angular velocity.
[0020] In some embodiments, for each time node, optimizing and solving the variables corresponding to the time node based on the target dynamics model to obtain the optimal variables corresponding to each time node includes:
[0021] For each time node, determining an optimized initial value corresponding to the time node based on a pre-configured initial variable sequence, wherein the initial variable sequence includes the optimized initial values corresponding to each time node;
[0022] The optimization initial value is iteratively optimized based on the target dynamics model until a preset convergence condition is met, thereby obtaining the optimal variable corresponding to the time node.
[0023] In some implementations, the process of pre-configuring the initial variable sequence includes:
[0024] Collecting motion data of the target object during the process of performing the motion behavior, and performing discretization processing on the motion data to obtain various time nodes corresponding to the behavior sequence;
[0025] For each time node, determining an optimization initial value corresponding to the time node based on the motion data, the optimization initial value comprising a reference generalized coordinate, a reference center of mass momentum, a reference contact force, and a reference joint angular velocity;
[0026] The initial variable sequence is established based on the optimized initial values corresponding to each time node.
[0027] In some implementations, determining the target trajectory corresponding to the movement behavior based on the optimal variable corresponding to each time node includes:
[0028] The optimal variables corresponding to each time node are serialized to obtain the target trajectory.
[0029] In a second aspect, an embodiment of the present disclosure provides a robot motion trajectory generating device, comprising:
[0030] A behavior encoding module is configured to obtain a corresponding behavior sequence based on the movement behavior of the robot, wherein the behavior sequence represents a contact state between the robot and the outside world during the movement behavior;
[0031] A variable optimization module is configured to determine, for each time node in the behavior sequence, an optimal variable corresponding to each time node based on a pre-established target dynamics model, wherein the target dynamics model is established based on a center of mass dynamics equation and a whole-body kinematics equation of the robot;
[0032] The trajectory generation module is configured to determine a target trajectory corresponding to the motion behavior based on an optimal variable corresponding to at least one time node.
[0033] In some embodiments, the behavior encoding module is configured to:
[0034] Based on the contact state between the robot and the outside world, the movement behavior is divided into a plurality of movement stages;
[0035] Determine the contact mode corresponding to the motion phase based on a preconfigured contact mode correspondence, wherein the contact mode included in the contact mode correspondence represents the contact state between the robot's sole contact point and the outside world;
[0036] The behavior sequence is generated based on the contact pattern corresponding to each of the movement phases.
[0037] In some implementations, the variable optimization module is configured to:
[0038] Establishing a whole-body kinematic equation of the robot based on the postures of the robot's joint position vectors and floating basis vectors relative to a world coordinate system;
[0039] Establishing a center of mass dynamics equation of the robot based on the position of the plantar contact point of the robot relative to the center of mass and the contact force of the plantar contact point;
[0040] The target dynamics model is established based on the whole-body kinematics equation and the center of mass dynamics equation.
[0041] In some implementations, the variable optimization module is configured to:
[0042] Discretizing the motion behavior based on the behavior sequence to obtain each time node included in the behavior sequence;
[0043] For each time node, the variables corresponding to the time node are optimized and solved based on the target dynamics model to obtain the optimal variables corresponding to each time node; wherein the variables include the robot's center of mass momentum, generalized coordinates, contact force, and joint angular velocity.
[0044] In some implementations, the variable optimization module is configured to:
[0045] For each time node, determining an optimized initial value corresponding to the time node based on a pre-configured initial variable sequence, wherein the initial variable sequence includes the optimized initial values corresponding to each time node;
[0046] The optimization initial value is iteratively optimized based on the target dynamics model until a preset convergence condition is met, thereby obtaining the optimal variable corresponding to the time node.
[0047] In some implementations, the variable optimization module is configured to:
[0048] Collecting motion data of the target object during the process of performing the motion behavior, and performing discretization processing on the motion data to obtain various time nodes corresponding to the behavior sequence;
[0049] For each time node, determining an optimization initial value corresponding to the time node based on the motion data, the optimization initial value comprising a reference generalized coordinate, a reference center of mass momentum, a reference contact force, and a reference joint angular velocity;
[0050] The initial variable sequence is established based on the optimized initial values corresponding to each time node.
[0051] In some embodiments, the trajectory generation module is configured to:
[0052] The optimal variables corresponding to each time node are serialized to obtain the target trajectory.
[0053] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0054] Processor; and
[0055] A memory storing computer instructions, wherein the computer instructions are used to enable a processor to execute the method described in any embodiment of the first aspect.
[0056] In a fourth aspect, an embodiment of the present disclosure provides a storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in any embodiment of the first aspect.
[0057] The motion trajectory generation method of the disclosed embodiment constructs a target dynamics model for high-dynamic motion trajectory optimization based on the robot's center of mass dynamics and whole-body kinematics, simplifies the trajectory optimization algorithm, and effectively reflects the robot's whole-body motion information during high-dynamic motion. By encoding the corresponding behavior sequence for the high-dynamic motion, the motion information of various high-dynamic motion processes is accurately reflected, thereby improving the trajectory planning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0059] Figure 1 is a simplified structural diagram of a robot according to some embodiments of the present disclosure.
[0060] Figure 2 It is a flowchart of a method for generating a robot motion trajectory according to some embodiments of the present disclosure.
[0061] Figure 3 It is a flowchart of a method for generating a robot motion trajectory according to some embodiments of the present disclosure.
[0062] Figure 4 It is a schematic diagram of a method for generating a robot motion trajectory according to some embodiments of the present disclosure.
[0063] Figure 5 It is a schematic diagram of a method for generating a robot motion trajectory according to some embodiments of the present disclosure.
[0064] Figure 6 It is a flowchart of a method for generating a robot motion trajectory according to some embodiments of the present disclosure.
[0065] Figure 7It is a flowchart of a method for generating a robot motion trajectory according to some embodiments of the present disclosure.
[0066] Figure 8 It is a flowchart of a method for generating a robot motion trajectory according to some embodiments of the present disclosure.
[0067] Fig. 9 It is a flowchart of a method for generating a robot motion trajectory according to some embodiments of the present disclosure.
[0068] Fig.10 It is a structural block diagram of a robot motion trajectory generating device in some embodiments of the present disclosure.
[0069] Fig.11 It is a structural block diagram of an electronic device according to some implementations of the present disclosure. DETAILED DESCRIPTION
[0070] The technical solution of the present disclosure will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described implementation is a part of the implementation of the present disclosure, rather than all the implementations. Based on the implementation in the present disclosure, all other implementations obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. In addition, the technical features involved in the different implementations of the present disclosure described below can be combined with each other as long as they do not conflict with each other.
[0071] Nowadays, robots are widely used in various life scenarios. Take humanoid robots as an example. Humanoid robots refer to bipedal robots that imitate human movement patterns. Compared with quadruped robots, humanoid robots are closer to human movement, and bipedal robots can free the upper limbs to achieve more operations. Therefore, humanoid robots can replace human work intelligently and stably.
[0072] High-dynamic motion capability is one of the prerequisites for humanoid robots to serve human life. High-dynamic motion can include continuous running, continuous jumping, translation / rotation jumping, somersaults, etc. At present, realizing high-dynamic motion such as jumping on humanoid robots is still a challenging control problem. Among them, motion trajectory planning for high-dynamic actions is one of the technical difficulties in realizing high-dynamic motion.
[0073] In the related art, for the high dynamic motion behavior of humanoid robots, the robot is generally regarded as a multi-rigid body system with a floating base or a free single rigid body system. Based on the full dynamics model or the single rigid body dynamics model, a nonlinear optimization problem is established to solve the optimal motion trajectory.
[0074] The full dynamics model is complex to build, and the calculation is very time-consuming and inefficient in high-dynamic motion. The single rigid body dynamics model cannot reflect the essential effect of external forces on the robot, nor can it consider the robot's full body kinematic information under high-dynamic motion, resulting in poor motion trajectory planning performance and poor high-dynamic motion performance of the robot.
[0075] Based on the defects of the above-mentioned related technologies, the embodiments of the present disclosure provide a robot motion trajectory generation method, device, electronic device and storage medium, which aim to construct a dynamic model for high-dynamic motion trajectory optimization based on the robot's center of mass dynamics and whole-body kinematics, simplify the trajectory optimization algorithm and accuracy, and accurately reflect high-dynamic motion information and improve trajectory planning accuracy by designing corresponding behavior sequences for high-dynamic motion.
[0076] Figure 1 The structure diagram of the humanoid robot in some embodiments of the present disclosure is shown below. Figure 1 Provide explanation.
[0077] like Figure 1 As shown, the humanoid robot is a bipedal robot, and each leg includes 6 joints, namely 3 joint motors at the hip joint, 1 joint motor at the knee joint, and 2 joint motors at the ankle joint. The hip joint motor can provide the robot with rotational freedom in yaw, pitch, and roll. The knee joint motor can provide the robot with 1 rotational freedom in the pitch direction. The ankle joint motor can provide the robot with rotational freedom in yaw and roll.
[0078] The waist of the robot generally includes 0 to 3 joint motors, such as Figure 1 In the example, the robot's waist includes three waist joint motors, which can provide the robot with rotational freedom in three directions: yaw, pitch and roll.
[0079] Each arm of the robot includes at least four motors, including three joint motors located at the shoulders, which can provide the arm with rotational freedom in three directions: yaw, pitch and roll, and one joint motor located at the elbow, which can provide the forearm with one rotational freedom in the pitch direction.
[0080] In addition, the robot wrist and neck may also have 0 to 3 joint motors. In the embodiment of the present disclosure, for the purpose of simplicity, the degrees of freedom of the wrist and neck are ignored and are not shown again.
[0081] Continue to refer Figure 1In the figure, coordinate system I represents the world coordinate system. Coordinate system B represents the body coordinate system corresponding to the robot's floating base. The origin of body coordinate system B is the midpoint of the robot's floating base, and its orientation changes with the robot's motion direction. Coordinate system G represents the robot's center of mass coordinate system. The origin of center of mass coordinate system G is the robot's center of mass, and its orientation is the same as that of world coordinate system I.
[0082] The robot's legs have two flat feet at the end, which are used to contact the outside world (such as the ground). By changing the contact state between the soles of the feet and the outside world, it can achieve a variety of dynamic behaviors, such as walking, running, jumping, and somersaults.
[0083] Of course, in Figure 1 In the example, only a simplified motion model of the biped robot is described. As for other structures and functional elements included in the robot, those skilled in the art can understand them, and they will not be elaborated in this disclosure.
[0084] Based on the above-mentioned robot, an embodiment of the present disclosure provides a method for generating a robot motion trajectory, which can optimize the motion trajectory of the robot in high-dynamic motion, generate the optimal motion trajectory of the robot under high-dynamic motion, thereby guiding the high-dynamic motion control of the robot and improving the high-dynamic motion performance of the robot.
[0085] It is worth noting that in the embodiments of the present disclosure, there is no restriction on the high-dynamic motion behavior of the robot, which can be any motion behavior, such as running, jumping, continuous running, continuous jumping, somersaults, rotational jumps, translational jumps, etc., and the present disclosure will not go into details about this.
[0086] like Figure 2 As shown, in some embodiments, the robot motion trajectory generation method of the present disclosure example includes:
[0087] S210: Obtain a corresponding behavior sequence based on the robot's motion behavior.
[0088] In the disclosed embodiment, it is necessary to design a corresponding behavior sequence for the robot's motion behavior. The behavior sequence can be understood as a sequence obtained by decomposing the entire motion behavior process, and each subsequence in the behavior sequence corresponds to a sub-motion stage in the motion behavior.
[0089] For example, taking jumping as an example of movement behavior, the entire jumping process can be decomposed into multiple sub-movement stages of "standing - lifting the heel - lifting the toes - landing the heel - landing the toes (standing)", and each sub-movement stage can be represented as a subsequence, thus forming a behavior sequence.
[0090] In some implementations of the present disclosure, the behavior sequence of the robot's motion behavior may be characterized based on the contact state between the robot and the outside world.
[0091] The contact state between the robot and the outside world refers to the contact between the robot's sole and the ground. For example, taking the aforementioned jumping process as an example, it can be seen that during the entire jumping process, the robot's sole is not always in contact with the ground, but there is a stage of vacancy. In addition, the contact between the robot's sole and the ground is different in different stages of movement, such as the heel contacting the ground, the toe contacting the ground, etc.
[0092] Therefore, in some embodiments of the present disclosure, in order to effectively describe the high-dynamic motion behavior of the robot, multiple contact points can be set on the soles of the robot in advance, and based on the contact conditions between these contact points and the ground, corresponding contact pattern correspondences can be constructed, and the contact patterns can be used to describe the high-dynamic motion behavior of the robot.
[0093] Therefore, for a certain motion behavior of the robot, by reasonably dividing the motion stages included in the motion behavior, the contact pattern can be used to represent the subsequence of each motion stage, and the behavior sequence corresponding to the entire motion behavior can be obtained based on time sequence encoding.
[0094] In summary, in the embodiments of the present disclosure, by encoding the motion behavior, a relatively complex high-dynamic motion can be encoded into a behavior sequence using a contact pattern, and both periodic motion and non-periodic motion can be described using a behavior sequence. Periodic motion can be, for example, continuous jumping, continuous running, etc., and non-periodic motion can be, for example, a single jump, etc.
[0095] For the process of encoding high-dynamic motion behavior to obtain behavior sequences, the present disclosure is as follows: Figure 3 The implementation method is described.
[0096] S220: For each time node in the behavior sequence, determine the optimal variable corresponding to each time node based on a pre-established target dynamics model.
[0097] In the disclosed embodiment, a target dynamics model is constructed based on the combination of the robot's center of mass dynamics and whole-body kinematics, that is, the optimization variables in the target dynamics model include the robot's whole-body dynamics parameters and center of mass dynamics parameters, thereby reflecting the robot's whole-body motion information during high-dynamic motion.
[0098] In some embodiments, the target dynamics model can be obtained in advance based on the robot's center of mass dynamics equation and the whole body kinematics equation. The target dynamics model represents the robot's full center of mass dynamics equation (kino-dynamics model). The algorithm for establishing the target dynamics model is described in the following embodiments of the present disclosure.
[0099] The purpose of establishing the target dynamics model is to construct a trajectory optimization problem for the variables of the target dynamics model, and to obtain the optimal variables by solving the trajectory optimization problem. The optimal variables are then used to represent the movement of the robot at each moment, and the target trajectory of the entire motion behavior process is then constructed.
[0100] In some embodiments of the present disclosure, the trajectory optimization problem can be discretized, that is, the entire motion behavior is discretized into multiple time nodes based on the behavior sequence obtained by the above encoding, and each time node reflects a certain moment in the robot's high-dynamic motion process. Therefore, for each time node, the trajectory optimization problem can be constructed using the target dynamics model, and the optimal variable corresponding to the time node can be determined by designing appropriate optimization objectives and constraints. The optimal variable can represent the motion of the robot at the time node.
[0101] In some embodiments, the optimization variables based on the target dynamics model may include, for example, the robot's center of mass momentum, generalized coordinates, contact force of the plantar contact point, and joint angular velocity. The process of constructing the optimization problem and solving the optimal variables is described in the following embodiments of the present disclosure.
[0102] In some embodiments, when solving the optimal problem, in order to accelerate the iterative optimization process, an optimization initial value may be given in advance based on human data during the same movement behavior, thereby accelerating the optimization convergence process. The following embodiments of the present disclosure illustrate this.
[0103] S230: Determine a target trajectory corresponding to the movement behavior based on the optimal variable corresponding to at least one time node.
[0104] Based on the foregoing, it can be seen that in the embodiments of the present disclosure, by discretizing the behavior sequence, the optimal problem is solved for each time node, and the optimal variable corresponding to each time node is obtained. The optimal variable can represent the movement of the robot at the time node.
[0105] Therefore, after obtaining the optimal variables at each time node, serialization processing is performed based on the time order to obtain the target trajectory corresponding to the entire motion behavior process of the robot, that is, the target trajectory is composed of the optimal variables at each time node.
[0106] From the above, it can be seen that in the embodiments of the present invention, a target dynamics model for optimizing high-dynamic motion trajectories is constructed based on the robot's center of mass dynamics and whole-body kinematics, the trajectory optimization algorithm is simplified, and the whole-body motion information of the robot during high-dynamic motion is effectively reflected. By encoding the corresponding behavior sequence for high-dynamic motion, the motion information of various high-dynamic motion processes is accurately reflected, thereby improving the trajectory planning accuracy.
[0107] like Figure 3 As shown, in some embodiments, the process of obtaining a corresponding behavior sequence based on the robot motion behavior coding includes:
[0108] S310: Based on the contact state between the robot and the outside world, the motion behavior is divided into multiple motion stages.
[0109] S320: Determine the contact mode corresponding to each movement phase based on the pre-configured contact mode correspondence relationship.
[0110] S330, generating a behavior sequence based on the contact pattern corresponding to each movement stage.
[0111] In the embodiments of the present disclosure, it is considered that for high-dynamic motion of the robot, the contact between the robot and the outside world during the motion often changes with different stages of the motion. Figure 1 Taking the humanoid robot shown in FIG. 1 as an example, during the jumping process, the number and position of the robot's foot contact points change with the jumping stage.
[0112] Therefore, in some embodiments of the present disclosure, multiple contact points are set for the sole of the robot, and the contact mode is characterized by the contact state between each contact point and the ground, so as to configure the corresponding relationship for the contact mode.
[0113] For example Figure 4 The bottom diagram of the robot's feet is shown in Figure 4 In the example, four contact points are set at the four corners of the left and right feet of the robot, that is, the robot has a total of eight contact points on both feet. Taking the left foot as an example, it includes the upper left contact point LLT, the upper right contact point LRT, the lower left contact point LLH, and the lower right contact point LRH. Taking the right foot as an example, it includes the upper left contact point RLT, the upper right contact point RRT, the lower left contact point RLH, and the lower right contact point RRH.
[0114] In the embodiment of the present disclosure, based on the contact situation between each contact point and the ground, multiple contact modes can be constructed, such as shown in the following Table 1:
[0115] Table 1
[0116]
[0117] In the example of Table 1, the contact modes are distinguished by integer numbers from 0 to 15, that is, this example includes 16 contact modes in total. Figure 4 Among the 8 contact points shown, for any contact point i, c i =0 means that the contact point is not in contact with the ground, c i =1 indicates that the contact point is in contact with the ground.
[0118] Therefore, in the example of the present disclosure, according to the contact conditions between each contact point and the ground, a contact mode correspondence relationship such as shown in Table 1 can be established, and the correspondence relationship includes all contact modes.
[0119] For a certain motion behavior of the robot, the motion behavior can firstly be divided into multiple motion stages based on the contact state between the sole of the robot and the ground.
[0120] For example Figure 5 shows the motion behavior of a humanoid robot in a single jump, see Figure 5 As shown in the figure, during a single jump, the entire motion behavior process can be divided into the following motion stages according to the different contact conditions between the robot's sole and the ground:
[0121] 1) Standing. This is the stage before the robot takes off, when all eight contact points of both feet are in contact with the ground.
[0122] 2) Heel lift: This is the stage when the robot is preparing to jump, and the contact points of the heels of both feet are off the ground.
[0123] 3) Lifting the toes (as shown in the figure). This is the stage when the robot is completely airborne, and all 8 contact points of the two feet are off the ground.
[0124] 4) Heel landing: This is the stage when the robot is preparing to land on the ground, and the contact points of the heels of both feet are in contact with the ground.
[0125] 5) Toe landing (i.e. toe landing as shown in the figure). This means that the robot completes the jumping process. At this time, as in the standing stage, all 8 contact points of both feet are in contact with the ground.
[0126] After dividing the motion behavior of a single jump into the above multiple motion stages, the contact mode corresponding to each motion stage can be determined from the contact mode correspondence shown in the pre-configured Table 1 according to the contact situation between the robot's sole contact point and the ground.
[0127] For example, the stance phase corresponds to contact mode mode-15, the heel-lift phase corresponds to contact mode mode-5, the toe-lift phase corresponds to contact mode mode-0, the heel-landing phase corresponds to contact mode mode-10, and the toe-landing phase corresponds to contact mode mode-15.
[0128] Therefore, based on the contact mode corresponding to each movement stage, the behavior sequence corresponding to the entire movement behavior process can be obtained by encoding in time order. For example, in the above example implementation, the behavior sequence of the jumping behavior obtained by encoding is {mode-15; mode-5; mode-0; mode-10; mode-15}.
[0129] It can be seen from the above that in the embodiments of the present disclosure, any complex high-dynamic motion behavior can be encoded using the contact pattern correspondence relationship to obtain a corresponding behavior sequence, thereby describing various complex high-dynamic motions.
[0130] In addition, the behavior sequence encoding process of the embodiment of the present disclosure is not only applicable to Figure 4 The non-periodic motion shown also applies to periodic motion.
[0131] For example, for periodic motion with continuous jumps, see Figure 5 As shown, taking a jump cycle as an example, its motion is similar to Figure 4 Single jump is similar, so its behavior sequence is also the same as the behavior sequence of single jump. The difference is that for continuous jumping motion behavior, it constantly repeats the jumping behavior of each cycle, so the behavior sequence obtained by encoding is also a periodic cycle sequence. Those skilled in the art will undoubtedly understand this, and the disclosure will not repeat it again.
[0132] After understanding the above-mentioned process of encoding the behavioral sequence of high-dynamic motion, the process of establishing the target dynamics model is explained below.
[0133] like Figure 6 As shown, in some embodiments, the robot motion trajectory generation method of the example of the present disclosure, the process of establishing the target dynamics model includes:
[0134] S610: Establish the whole-body kinematic equation of the robot based on the joint position vectors and the posture of the floating basis vectors of the robot relative to the world coordinate system.
[0135] S620: Establish a center of mass dynamics equation of the robot based on the position of the robot's sole contact point relative to the center of mass and the contact force of the sole contact point.
[0136] S630: Establish a target dynamics model based on the whole body dynamics equation and the center of mass dynamics equation.
[0137] In some embodiments of the present disclosure, the robot system can be regarded as a multi-rigid body system with a floating base in contact with the outside world, so that the whole body kinematic equation of the robot can be expressed as:
[0138]
[0139] In formula (1), q j Represents the position vector of each joint; q b Represents the position of the floating basis vector relative to the world coordinate system I, r IB is the pose of the floating basis vector relative to the world coordinate system I, Φ IBare the Euler angles of the floating basis vectors relative to the world coordinate system.
[0140] In the disclosed embodiment, considering that the robot system has sufficient control authority over each joint, it can control any torque to affect the center of mass momentum of the whole machine, thereby controlling the overall movement of the robot. Therefore, in the disclosed embodiment, the centroidal dynamics equation is used to perform trajectory optimization. The centroidal dynamics equation is the Newton-Euler equation applied to the center of mass position of the robot, expressed as:
[0141]
[0142] In formula (2), h = [h lin ,h ang ] T ∈R 6 represents the mass center momentum of the mass center coordinate system G, is the position of the plantar contact point i relative to the center of mass, represents the contact force at contact point i, is the moment at the contact point i. In the embodiment of the present disclosure, the sole contact point i is the aforementioned Figure 4 At the contact point shown, the moment at the contact point is zero.
[0143] The centroidal momentum matrix (CMM) can be used to link the center of mass dynamics equation with the whole body kinematics equation, which is expressed as:
[0144]
[0145] In formula (3), represents the center-of-mass momentum matrix. Based on formula (3), it is easy to obtain:
[0146]
[0147] Assume the state and input of the robot system are as follows:
[0148]
[0149] In formula (5), v j represents the joint angular velocity. Thus, the target dynamics model established through the center of mass dynamics and whole body kinematics equations is expressed as:
[0150]
[0151] In the target dynamics model shown in formula (6),
[0152] From the above, it can be seen that in the embodiments of the present invention, a target dynamics model for optimizing high-dynamic motion trajectories is constructed based on the robot's center of mass dynamics and whole-body kinematics, the trajectory optimization algorithm is simplified, and the whole-body motion information of the robot during high-dynamic motion is effectively reflected. By encoding the corresponding behavior sequence for high-dynamic motion, the motion information of various high-dynamic motion processes is accurately reflected, thereby improving the trajectory planning accuracy.
[0153] like Figure 7 As shown, in some embodiments, the robot motion trajectory generation method of the present disclosure example, the process of determining the optimal variable corresponding to each time node based on the target dynamics model, includes:
[0154] S710 , discretizing the motion behavior based on the behavior sequence to obtain each time node included in the behavior sequence.
[0155] In the embodiment of the present disclosure, for a certain high dynamic motion behavior, after the above Figure 3 After the corresponding behavior sequence is obtained, the motion behavior needs to be discretized based on the behavior sequence. The purpose of the discretization is to decompose the entire motion behavior into multiple time nodes.
[0156] In some embodiments, motor behavior is discretely divided into N time nodes (knotnodes) from the starting moment to the terminal moment, and the time interval (also being discrete step length) between adjacent time nodes is Δ t. For example in an example, assuming that the motor behavior starting moment is 10s to the terminal moment time length, the time interval of discretization is 0.1s, thereby whole motor behavior process can be divided into 100 time nodes. Of course, those skilled in the art will appreciate that the time interval of discretization is not limited to this, and the disclosure will not repeat them here.
[0157] S720: For each time node, the variables corresponding to the time node are optimized and solved based on the target dynamics model to obtain the optimal variables corresponding to each time node.
[0158] In the disclosed embodiment, the trajectory optimization problem is constructed as an optimal control problem (OCP), and cost functions and constraints are added to each discretized time node to perform variable optimization, so that the original trajectory optimization problem is expressed as a nonlinear programming problem (NLP), which is explained in detail below.
[0159] First, based on the target dynamics model established above, the optimization variable X at each time node is determined, expressed as:
[0160] X={h[k],q[k],fc [k],v j [k]}, for all k=1,...,N (7)
[0161] In formula (7), k represents the kth time node. That is, in the embodiment of the present disclosure, the optimization variables include the robot's center of mass momentum h[k], the robot's generalized coordinates q[k], the contact force f of the contact point c [k] and joint angular velocity v j [k].
[0162] After constructing the optimization variables, the desired optimization target can be constructed. In some embodiments of the present disclosure, the cost function can be minimized as the optimization target. For example, in one example, the cost function includes two parts: the final cost and the path cost, which are expressed as:
[0163]
[0164] In formula (8), q[N] represents the actual generalized coordinates at the Nth time node, q ref [N] represents the expected generalized coordinates at the Nth time node, and the difference between the two is the final cost. The path cost is expressed as the contact force f c [k] and joint angular velocity v j The weighted sum of squares of [k], where W is the weight matrix.
[0165] For the optimal control problem, in order to make the robot meet various physical constraints during the movement, it is also necessary to construct corresponding constraints, which may include the following aspects:
[0166] 1) The robot's initial state is the specified value:
[0167]
[0168] 2) If the motion behavior is periodic and satisfies the periodicity constraint:
[0169] h[N]=h[1],q[N]=q[1],v j [N] = v j [1]
[0170] 3) System Dynamics Consistency:
[0171]
[0172] 4) Integration continuity between time nodes (explicit Euler integration rule):
[0173]
[0174] 5) Generalized coordinate restrictions:
[0175] q min ≤q[k]≤q max
[0176] 6) Maximum joint speed limit:
[0177]
[0178] 7) Contact constraints:
[0179] There is no relative motion between the contact point and the contact object, where J c is the contact Jacobian matrix:
[0180]
[0181] The normal component of the force at the contact point is not less than 0:
[0182] f c,z [k]≥0
[0183] The external force on the contact point is within the friction cone, where μ is the friction coefficient:
[0184]
[0185] 8) Non-contact constraints:
[0186] The force at non-contact points is 0:
[0187] f c,z [k] = 0
[0188] After constructing the above optimization variables, optimization objectives and constraints, we can optimize and solve the variables at each time node to obtain the optimal variables corresponding to each time node. Figure 8 Provide explanation.
[0189] like Figure 8 As shown, in some embodiments, the robot motion trajectory generation method of the example of the present disclosure optimizes and solves each time node to obtain the optimal variable, including:
[0190] S810: For each time node, determine an optimized initial value corresponding to the time node based on a pre-configured initial variable sequence.
[0191] S820, iteratively optimizing the initial optimization value based on the target dynamics model until a preset convergence condition is met to obtain the optimal variable corresponding to the time node.
[0192] In the disclosed embodiment, after the optimization variables, optimization objectives and constraints are constructed through the aforementioned method process, the variables at each time node can be optimized and solved.
[0193] It is worth mentioning that for the optimal control problem, the basic principle is to continuously iterate the initial variable value so that the variables are continuously optimized and adjusted until the optimization goal is reached, that is, the optimization problem is solved, and the obtained variables are the optimal variables.
[0194] In some implementations, for the optimization solution process at each time node, an initial variable value may be arbitrarily given, so that optimization iterations are performed based on the initial variable value until the optimization goal is reached, thereby obtaining the optimal variable corresponding to each time node.
[0195] However, in this process, if the deviation of the initial variable value is too large, it is easy for the result to fail to converge or the calculation to take too long. Therefore, providing relatively accurate initial variable values is a necessary means to accelerate the optimization solution process.
[0196] Therefore, in some other embodiments of the present disclosure, the anthropomorphic characteristics of the humanoid robot's motion behavior are fully considered, and the motion data of humans performing the same motion behavior can be sampled to provide a more reliable initial variable value for the optimization algorithm, thereby accelerating the solution of the optimization problem. Fig. 9 Provide explanation.
[0197] like Fig. 9 As shown, in some embodiments, the trajectory generation method of the example of the present disclosure, the process of pre-configuring the initial variable sequence includes:
[0198] S910 , collecting motion data of the target object during the motion behavior, and discretizing the motion data to obtain various time nodes corresponding to the behavior sequence.
[0199] S920: For each time node, determine an optimized initial value corresponding to the time node based on the motion data.
[0200] S930: Establish an initial variable sequence based on the optimized initial values corresponding to each time node.
[0201] In the disclosed embodiments, the target object may be made to perform the same high-dynamic motion behavior, and motion data during the motion behavior may be collected.
[0202] For example, in one example, taking the aforementioned single jump as an example, the motion data of humans performing the same single jump motion behavior can be collected. The motion data can include, for example, the position data of five joints in space, namely, waist, left foot, right foot, left wrist, and right wrist. It can also include the position and rotation matrix of the body coordinate system relative to the world coordinate system.
[0203] After acquiring the motion data of human motion, the motion data can be discretized. The discretization time interval is the same as the time interval for discretizing the behavior sequence mentioned above, which is Δt. Therefore, the time nodes of the discretized human motion data can correspond to the time nodes of the aforementioned optimization problem.
[0204] For a certain time point, the relative position of the four joint ends of the left foot, right foot, left wrist, and right wrist relative to the waist can be calculated, and the angle of each joint end can be calculated by solving the inverse kinematics of the limbs, that is, the joint angle Then, the waist posture is converted into the displacement and Euler angle of the body coordinate system B relative to the world coordinate system I, that is, Afterwards, the optimization initial value corresponding to each time node is calculated by the following formula:
[0205]
[0206] In formula (9), represents the reference generalized coordinates, represents the reference center-of-mass momentum, represents the reference contact force, Represents the reference joint angular velocity. That is, the initial value of the optimization at each time node includes these variables, expressed as:
[0207]
[0208] After the optimized initial value of each time node is calculated by formula (9), the optimized initial value of each time node can be processed according to time series according to formula (10) to obtain the initial variable sequence described in the present disclosure.
[0209] exist Figure 8 In the implementation method, when optimizing and solving each time node k, the initial variable sequence shown in formula (10) can be used to find the optimization initial value corresponding to the time node k, and then the optimization initial value is used as the initial variable value for the optimization solution, so as to continuously optimize and iterate until the optimization goal shown in the above formula (8) is met, and the optimal variable corresponding to the time node k can be obtained.
[0210] After calculating the optimal variables for each time node k, the final target trajectory can be obtained by serializing the optimal variables of all time nodes. That is, the target trajectory is composed of the optimal variables of each time node, and the expression equation of the target trajectory is shown in the above formula (7).
[0211] From the above, it can be seen that in the embodiments of the present disclosure, the initial value of the optimization problem is generated based on the motion data of humans with similar motion conditions, so as to provide a more reliable initial value for the optimization iteration process, accelerate the optimization solution process, accelerate the convergence of the results, and improve the efficiency and accuracy of the algorithm.
[0212] In some embodiments, the present disclosure provides a robot motion trajectory generation device, such as Fig.10 As shown, the device comprises:
[0213] A behavior encoding module 10 is configured to obtain a corresponding behavior sequence based on the movement behavior of the robot, wherein the behavior sequence represents a contact state between the robot and the outside world during the movement behavior;
[0214] The variable optimization module 20 is configured to determine the optimal variable corresponding to each time node in the behavior sequence based on a pre-established target dynamics model, wherein the target dynamics model is established based on the center of mass dynamics equation and the whole body kinematics equation of the robot;
[0215] The trajectory generation module 30 is configured to determine a target trajectory corresponding to the movement behavior based on an optimal variable corresponding to at least one time node.
[0216] From the above, it can be seen that in the embodiments of the present invention, a target dynamics model for optimizing high-dynamic motion trajectories is constructed based on the robot's center of mass dynamics and whole-body kinematics, the trajectory optimization algorithm is simplified, and the whole-body motion information of the robot during high-dynamic motion is effectively reflected. By encoding the corresponding behavior sequence for high-dynamic motion, the motion information of various high-dynamic motion processes is accurately reflected, thereby improving the trajectory planning accuracy.
[0217] In some embodiments, the behavior encoding module 10 is configured to:
[0218] Based on the contact state between the robot and the outside world, the movement behavior is divided into a plurality of movement stages;
[0219] Determine the contact mode corresponding to the motion phase based on a preconfigured contact mode correspondence, wherein the contact mode included in the contact mode correspondence represents the contact state between the robot's sole contact point and the outside world;
[0220] The behavior sequence is generated based on the contact pattern corresponding to each of the movement phases.
[0221] It can be seen from the above that in the embodiments of the present disclosure, any complex high-dynamic motion behavior can be encoded using the contact pattern correspondence relationship to obtain a corresponding behavior sequence, thereby describing various complex high-dynamic motions.
[0222] In some implementations, the variable optimization module 20 is configured to:
[0223] Establishing a whole-body kinematic equation of the robot based on the postures of the robot's joint position vectors and floating basis vectors relative to a world coordinate system;
[0224] Establishing a center of mass dynamics equation of the robot based on the position of the plantar contact point of the robot relative to the center of mass and the contact force of the plantar contact point;
[0225] The target dynamics model is established based on the whole-body kinematics equation and the center of mass dynamics equation.
[0226] In some implementations, the variable optimization module 20 is configured to:
[0227] Discretizing the motion behavior based on the behavior sequence to obtain each time node included in the behavior sequence;
[0228] For each time node, the variables corresponding to the time node are optimized and solved based on the target dynamics model to obtain the optimal variables corresponding to each time node; wherein the variables include the robot's center of mass momentum, generalized coordinates, contact force, and joint angular velocity.
[0229] In some implementations, the variable optimization module 20 is configured to:
[0230] For each time node, determining an optimized initial value corresponding to the time node based on a pre-configured initial variable sequence, wherein the initial variable sequence includes the optimized initial values corresponding to each time node;
[0231] The optimization initial value is iteratively optimized based on the target dynamics model until a preset convergence condition is met, thereby obtaining the optimal variable corresponding to the time node.
[0232] In some implementations, the variable optimization module 20 is configured to:
[0233] Collecting motion data of the target object during the process of performing the motion behavior, and performing discretization processing on the motion data to obtain various time nodes corresponding to the behavior sequence;
[0234] For each time node, determining an optimization initial value corresponding to the time node based on the motion data, the optimization initial value comprising a reference generalized coordinate, a reference center of mass momentum, a reference contact force, and a reference joint angular velocity;
[0235] The initial variable sequence is established based on the optimized initial values corresponding to each time node.
[0236] In some embodiments, the trajectory generation module 30 is configured to:
[0237] The optimal variables corresponding to each time node are serialized to obtain the target trajectory.
[0238] From the above, it can be seen that in the embodiments of the present disclosure, the initial value of the optimization problem is generated based on the motion data of humans with similar motion conditions, so as to provide a more reliable initial value for the optimization iteration process, accelerate the optimization solution process, accelerate the convergence of the results, and improve the efficiency and accuracy of the algorithm.
[0239] In some embodiments, the present disclosure provides an electronic device, including:
[0240] Processor; and
[0241] A memory stores computer instructions, wherein the computer instructions are used to enable a processor to execute the method described in any of the above embodiments.
[0242] In some embodiments, the present disclosure provides a storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in any of the above embodiments.
[0243] Specifically, Fig.11 A schematic diagram of the structure of an electronic device 600 suitable for implementing the method disclosed in the present invention is shown. Fig.11 The electronic device shown can realize the corresponding functions of the above-mentioned processor and storage medium.
[0244] like Fig.11 As shown, the electronic device 600 includes a processor 601, which can perform various appropriate actions and processes according to the program stored in the memory 602 or the program loaded from the storage part 608 into the memory 602. In the memory 602, various programs and data required for the operation of the electronic device 600 are also stored. The processor 601 and the memory 602 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0245] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0246] In particular, according to an embodiment of the present disclosure, the above method process can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the above method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 609, and / or installed from a removable medium 611.
[0247] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0248] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the embodiments. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A method for generating a robot motion trajectory, characterized in that: include: Obtaining a corresponding behavior sequence based on the robot's motion behavior, wherein the behavior sequence represents a contact state between the robot and the outside world during the motion behavior; For each time node in the behavior sequence, determining the optimal variable corresponding to each time node based on a pre-established target dynamics model, wherein the target dynamics model is established based on the center of mass dynamics equation and the whole body kinematics equation of the robot; Based on the optimal variable corresponding to at least one time node, a target trajectory corresponding to the movement behavior is determined.
2. The method according to claim 1, characterized in that The corresponding behavior sequence is obtained based on the robot's motion behavior coding, including: Based on the contact state between the robot and the outside world, the movement behavior is divided into a plurality of movement stages; Determine the contact mode corresponding to the motion phase based on a preconfigured contact mode correspondence, wherein the contact mode included in the contact mode correspondence represents the contact state between the robot's sole contact point and the outside world; The behavior sequence is generated based on the contact pattern corresponding to each of the movement phases.
3. The method according to claim 1, characterized in that The process of pre-establishing the target dynamics model includes: Establishing a whole-body kinematic equation of the robot based on the postures of the robot's joint position vectors and floating basis vectors relative to a world coordinate system; Establishing a center of mass dynamics equation of the robot based on the position of the plantar contact point of the robot relative to the center of mass and the contact force of the plantar contact point; The target dynamics model is established based on the whole-body kinematics equation and the center of mass dynamics equation.
4. The method according to any one of claims 1 to 3, characterized in that: For each time node in the behavior sequence, based on a pre-established target dynamics model, determining the optimal variable corresponding to each time node includes: Discretizing the motion behavior based on the behavior sequence to obtain each time node included in the behavior sequence; For each time node, the variables corresponding to the time node are optimized and solved based on the target dynamics model to obtain the optimal variables corresponding to each time node; wherein the variables include the robot's center of mass momentum, generalized coordinates, contact force, and joint angular velocity.
5. The method according to claim 4, characterized in that For each time node, optimizing and solving the variables corresponding to the time node based on the target dynamics model to obtain the optimal variables corresponding to each time node includes: For each time node, determining an optimized initial value corresponding to the time node based on a pre-configured initial variable sequence, wherein the initial variable sequence includes the optimized initial values corresponding to each time node; The optimization initial value is iteratively optimized based on the target dynamics model until a preset convergence condition is met, thereby obtaining the optimal variable corresponding to the time node.
6. The method according to claim 5, characterized in that The process of pre-configuring the initial variable sequence includes: Collecting motion data of the target object during the process of performing the motion behavior, and performing discretization processing on the motion data to obtain various time nodes corresponding to the behavior sequence; For each time node, determining an optimization initial value corresponding to the time node based on the motion data, the optimization initial value comprising a reference generalized coordinate, a reference center of mass momentum, a reference contact force, and a reference joint angular velocity; The initial variable sequence is established based on the optimized initial values corresponding to each time node.
7. The method according to claim 1, characterized in that The step of determining the target trajectory corresponding to the motion behavior based on the optimal variable corresponding to each time node includes: The optimal variables corresponding to each time node are serialized to obtain the target trajectory.
8. A robot motion trajectory generating device, characterized in that: include: A behavior encoding module is configured to obtain a corresponding behavior sequence based on the movement behavior of the robot, wherein the behavior sequence represents a contact state between the robot and the outside world during the movement behavior; A variable optimization module is configured to determine, for each time node in the behavior sequence, an optimal variable corresponding to each time node based on a pre-established target dynamics model, wherein the target dynamics model is established based on a center of mass dynamics equation and a whole-body kinematics equation of the robot; The trajectory generation module is configured to determine a target trajectory corresponding to the motion behavior based on an optimal variable corresponding to at least one time node.
9. An electronic device, characterized in that: include: processor; and A memory storing computer instructions, wherein the computer instructions are used to enable a processor to execute the method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: Computer instructions are stored, and the computer instructions are used to make a computer execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Stable walking control method and device for biped robot, equipment and readable medium
CN111674486A
Dynamic motion generation and control method for biped robot
CN112051741A
Balance control method and device for humanoid robot and humanoid robot
CN113305844A
Motion control method and system for four-foot single-arm operation robot
CN114954724A
One-step prediction whole-body control method and device of foot type robot and foot type robot
CN116079735A
Cited By
A legged robot
CN122560078A
A foot-type robot
CN122560078B