Lightweight generative anthropomorphic gait tracking system establishment method
Patent Information
- Application Number
- CN202610907438.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-08-18
AI Technical Summary
(1)传统 ZMP/模型预测控制方法计算量大(其在线滚动优化机制与高维动力学约束建模的双重叠加,导致每控制周期需实时求解一个复杂非线性优化问题),难以在嵌入式平台实时运行
[0014]Compared with the prior art, the beneficial effects of this invention are: (1) Lightweight inference: The model parameter count is ~200K, and the single inference outputs a complete cycle trajectory (~5ms GPU / ~100ms embedded CPU), which is much lower than the traditional optimization method; (2) Continuous smoothness: Autoregressive mechanism + frame boundary switching + cubic spline upsampling can realize continuous multi-cycle seamless gait; (3) Real-time response: The three-thread architecture decouples input perception, trajectory planning and tracking control, and supports real-time speed/direction command changes; (4) Full-body coordination: The gait trajectory includes 29 joints of the legs, waist and arms, which can realize the robot's coordinated movement in conjunction with the full-body tracking strategy.
Smart Images

Figure CN122584331A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of humanoid robot whole-body motion control technology, and in particular to a lightweight generative anthropomorphic gait tracking system establishment method that can realize end-to-end gait trajectory generation, real-time motion planning and whole-body tracking control. Background Technology
[0002] Humanoid robots, also known as humanoid robots, are intelligent mechanical bodies that mimic human appearance and behavior. They integrate cutting-edge technologies such as electromechanical engineering, artificial intelligence, sensor fusion, and bionic control, and are regarded as the next generation of disruptive human-computer interaction platforms after computers, smartphones, and new energy vehicles.
[0003] Although existing humanoid robot technology has developed rapidly, due to its own technological limitations, many humanoid robots still have technical problems with insufficient gait control methods, which are specifically manifested as follows: (1) Traditional ZMP / model predictive control methods have a large computational load (the superposition of its online rolling optimization mechanism and high-dimensional dynamic constraint modeling leads to the need to solve a complex nonlinear optimization problem in real time for each control cycle), making it difficult to run in real time on embedded platforms. (2) End-to-end methods based on reinforcement learning have poor generalization (essentially the result of the combined effect of the lack of physical priors, limited data distribution, and single training target, leading to the collapse of the model strategy under small perturbations outside the training environment), and discontinuous speed control. (3) The pre-recorded motion trajectory playback method cannot respond to speed / direction change commands (the fundamental reason is that this method is essentially an open-loop control mechanism, and its motion commands are solidified into a discrete sequence of time-position-velocity during the recording stage, and only replay according to the preset time sequence during playback, lacking perception, feedback, and replanning capabilities). (4) Motion generation and motion tracking are separated and lack a unified framework (the essence of which stems from the inherent conflict between the hierarchical design of the control architecture and the optimization goal: the high-level generation module pursues the optimal task goal and trajectory, while the low-level tracking module relies on low-latency feedback for stable execution. The two are difficult to coordinate in terms of time scale, data interface and reward function, resulting in the "unbalanced" phenomenon of "can dance but not balance, can balance but not generalize"). Summary of the Invention
[0004] To overcome the shortcomings of existing humanoid robots in terms of gait control methods due to technological limitations, this invention provides a lightweight generative anthropomorphic gait tracking system establishment method that achieves technological updates such as lightweight inference, continuous smoothing, real-time response, and whole-body coordinated control through the combined action of related processes. This provides strong technical support for stable and reliable gait control in humanoid robot terminal applications.
[0005] The technical solution adopted by this invention to solve its technical problem is: A lightweight generative anthropomorphic gait tracking system establishment method includes three processes: gait data construction, generative gait model training, and real-time gait planning and whole-body tracking control. The data obtained from these three processes is used for gait control of the humanoid robot's control system. The gait data construction process includes four steps: reference motion data acquisition, gait period extraction, period symmetry, and period closed-loop processing. The generative gait model training process includes four steps: network architecture, training a multi-objective loss function, data augmentation, and model derivation. The network architecture adopts a conditional generative network, including establishing an MLP encoder, a velocity conditional augmentation module, and an MLP decoder. The training of the multi-objective loss function adopts a grouped weighted loss, which includes joint position reconstruction loss, periodic closure loss, velocity consistency loss, temporal smoothing loss, motion amplitude regularization, and velocity-position consistency loss. The real-time gait planning and whole-body tracking control process includes eight steps: determining a three-thread concurrent architecture, gait model generation, frequency upsampling, limb symmetry post-processing, joint sequence mapping, pose integration, whole-body tracking control, and determining the velocity strategy. The three-thread concurrent architecture includes an input thread, a planning thread, and a control thread. The velocity data for determining the velocity strategy includes forward, backward, lateral, turning, and velocity zeroing speeds.
[0006] Furthermore, the reference motion data acquisition is carried out in a simulation environment by mapping human motion capture data onto the skeleton of the target humanoid robot through motion redirection technology to generate a reference motion sequence covering multiple speed-direction combinations; the gait cycle extraction is performed on the reference motion sequence by detecting the highest point of the swing phase based on the peak knee joint angle, and using this as the segmentation point to extract a complete gait cycle segment.
[0007] Furthermore, the cycle symmetry is to perform temporal mirror symmetry on the joint data of each gait cycle. Specifically, the left and right limb data of the first half of the cycle are mirrored to generate the second half of the cycle, ensuring that the left and right limb movements are strictly symmetrical within each complete cycle. At the same time, the yaw / roll joints of the waist are reversed to ensure that the trunk movement is centered. The cycle closed-loop processing is to perform loop closure alignment on the first and last frames of each cycle, so that the joint state of the last frame of the cycle is consistent with that of the first frame, ensuring that there are no jumps when playing continuously in a loop.
[0008] Furthermore, the establishment of the MLP encoder involves concatenating the 3D forward / lateral / yaw speed commands of the control system with the current 29-dimensional joint position states of the humanoid robot to form a 32-dimensional input, which is then mapped to a 128-dimensional latent vector through two layers of fully connected layers with layer normalization. The establishment of the speed condition enhancement module involves independently encoding the speed command into a 128-dimensional vector, adding it to the encoder output, and enhancing the speed condition's discriminative power for generating the trajectory. The establishment of the MLP decoder involves directly outputting the complete periodic trajectory from the 128-dimensional latent vector through three fully connected layers.
[0009] Furthermore, the joint position reconstruction loss is weighted by limb grouping, with arm joints having a weight of 3.0 and leg / waist joints having a weight of 1.0; the periodic closed-loop loss is the symmetric alignment error between the first 3 frames and the last 3 frames, with a weight of 2.0; the velocity consistency loss is the error between the average base velocity of the generated trajectory and the input velocity command; the temporal smoothing loss is the sum of squares of the differences between adjacent frames; the motion amplitude regularization is the L1 error between the joint change amplitude of the generated trajectory and the target, with the arm having an additional weight of 2.0; and the velocity-position consistency loss is the error between the numerical differentiation of the joint position and the predicted joint velocity.
[0010] Furthermore, the data augmentation involves randomly applying time reversal, velocity command Gaussian noise, and trajectory Gaussian noise to each sample during training; model export involves sequentially exporting the PyTorch model into TorchScript and ONNX formats after training for deployment in the C++ inference engine.
[0011] Furthermore, in the input thread, the speed and direction commands of the control device are read and written into a thread-safe command buffer; in the planning thread, the speed / direction is read from the command buffer, gait model inference is performed, a 50Hz gait trajectory is generated and written into the motion buffer; in the control thread, the reference trajectory frame is read from the motion buffer, the observation token is extracted by the encoder, the joint action is output by the policy network inference, and the motor command is sent.
[0012] Furthermore, the gait model generation specifically employs an autoregressive mechanism to generate continuous multi-cycle gait; frequency upsampling uses natural cubic spline interpolation to upsample all 62 output dimensions from 30Hz to 50Hz, generating 49 frames of trajectory at 50Hz; limb symmetry post-processing performs left-right limb symmetry on the frequency-upsampled 50Hz trajectory; joint order mapping is performed by rearranging the joint order when writing to the motion buffer using a predefined 29-element mapping array.
[0013] Furthermore, the pose integration is performed at each 50Hz frame by integrating the base position in the world coordinate system based on the base linear velocity and the current heading angle output by the model, and then integrating the heading angle yaw based on the angular velocity and converting it into a quaternion to be written into the motion buffer; the full-body tracking control is performed by the control thread running at 500Hz, advancing one frame of 50Hz reference trajectory every 10 ticks.
[0014] Compared with the prior art, the beneficial effects of this invention are: (1) Lightweight inference: The model parameter count is ~200K, and the single inference outputs a complete cycle trajectory (~5ms GPU / ~100ms embedded CPU), which is much lower than the traditional optimization method; (2) Continuous smoothness: Autoregressive mechanism + frame boundary switching + cubic spline upsampling can realize continuous multi-cycle seamless gait; (3) Real-time response: The three-thread architecture decouples input perception, trajectory planning and tracking control, and supports real-time speed / direction command changes; (4) Full-body coordination: The gait trajectory includes 29 joints of the legs, waist and arms, which can realize the robot's coordinated movement in conjunction with the full-body tracking strategy. Attached Figure Description
[0015] Figure 1 This is a schematic flowchart of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Figure 1 As shown, a lightweight generative anthropomorphic gait tracking system establishment method includes three processes: gait data construction, generative gait model training, and real-time gait planning and whole-body tracking control. The data obtained from these three processes are used for the walking gait control of the humanoid robot's control system.
[0018] Step 1: Gait data construction, which includes the following steps.
[0019] Step 1.1, Reference motion data acquisition: Specifically in the simulation environment (emulator), human motion capture data is mapped to the skeleton of the target humanoid robot through motion redirection technology to generate a reference motion sequence covering multiple velocity-direction combinations.
[0020] Step 1.2, Gait cycle extraction: Based on the reference motion sequence from the previous step, the highest point of the swing phase is detected based on the peak knee joint angle of the humanoid robot, and the complete gait cycle segment is extracted using this as the segmentation point; each cycle includes joint position, base height, base linear velocity, and joint velocity, forming a trajectory frame sequence with dimension T×62, where T is the number of cycle frames (typical value 30), and 62 = 29 joint positions + 1 height + 3 base velocities + 29 joint velocities.
[0021] Step 1.3, Periodic Symmetry: Perform temporal mirror symmetry on the joint data of each gait cycle. Specifically, mirror the left and right limb data of the humanoid robot in the first half of the cycle (referring to the first half of the time of a gait cycle (starting from the highest point of the swing phase detected by the knee joint angle peak, i.e., from the start frame of the cycle to half of the total number of frames (frame 0 to frame T / 2, typically frames 0 to 14 when T=30); during this stage, one side of the robot's limbs (e.g., the left leg) is in the main swing phase) to generate the joint data of the second half of the cycle (referring to the second half of the time of the gait cycle (frame T / 2 to frame T-1, typically frames 15 to 29); by mirroring the left and right limb data of the first half of the cycle (left ↔ right swap), the joint data of the second half of the cycle is generated. This ensures that each complete cycle (referring to a complete gait cycle, i.e., the time interval between the highest point of one swing phase and the highest point of the next swing phase, including the first half and the second half of the cycle (typically 30 frames @ 30Hz, corresponding to approximately 1) is generated). (seconds); within a complete cycle, the robot completes a full swing of the left and right legs. The left and right limb movements are strictly symmetrical; at the same time, the yaw / roll joints of the waist are reversed to ensure that the trunk movement is centered.
[0022] Step 1.4, Cyclic closed-loop processing: Perform cyclic closed alignment on the first and last frames of each cycle of the humanoid robot to make the joint state of the last frame of the cycle consistent with that of the first frame, ensuring no jumps during continuous loop playback (the purpose of cyclic closed-loop processing is to eliminate state jumps between the first and last frames of the gait cycle). The gait construction functions are as follows: (1) Reference motion acquisition: Map human motion capture data to the robot skeleton to establish the correspondence between human motion and robot motion; (2) Gait cycle extraction: Cut out standardized cycle segments from continuous motion and unify the data format (T×62); (3) Cyclic symmetry: Eliminate the asymmetry of left and right limb movements so that the generated gait is not affected by left and right deviations during model training; (4) Cyclic closed-loop processing: Eliminate the jumps at the beginning and end to ensure the cyclic continuity of training data.
[0023] Step 2: Generative gait model training, which includes the following steps.
[0024] Step 2.1, Network Architecture: A conditional generation network is adopted, including: (1) MLP encoder: Specifically, the speed command (the command is 3D: forward / lateral / yaw; the speed command comes from the three-dimensional vector output by the remote controller) is concatenated with the current robot joint position state (29-dimensional) to form a 32-dimensional input, which is then mapped to a 128-dimensional latent vector through two layers of fully connected layers with layer normalization (the purpose of the MLP encoder is to integrate the speed command and the current joint state into a compact latent vector representation); (2) Speed condition enhancement module: Specifically, the speed command is independently encoded into a 128-dimensional vector, added to the encoder output, and the speed condition is enhanced to improve the differentiation of the generated trajectory (the purpose of the speed condition enhancement module is to strengthen the differentiated control capability of the speed command on the generated trajectory); (3) MLP decoder: The 128-dimensional latent vector is directly output to form a complete gait periodic trajectory [30, 62] through three layers of fully connected layers (the purpose of the decoder is to decode the 128-dimensional latent vector into a complete gait periodic trajectory).
[0025] Step 2.2, determine the multi-objective loss function. The specific training adopts grouped weighted loss. The weighted loss data includes the following: (1) Joint position reconstruction loss, specifically weighted by limb group. The weight of arm joints (referring to the joint position data of the arm part among the 29 joints, the corresponding target joint angle value and the model predicted joint angle value) is 3.0, and the weight of leg / waist is 1.0; (2) Periodic closed loop loss: the 62-dimensional motion parameters (joint position, base height, base velocity, joint velocity) of the first 3 frames (referring to the first 3 frames (frame 0, frame 1, frame 2) of the generated trajectory) and the last 3 frames (3) Velocity consistency loss: Specifically, it is the error between the average base velocity of the generated trajectory and the input velocity command (the role of velocity consistency loss is to ensure that the actual motion velocity of the generated trajectory is consistent with the input velocity command); (4) Temporal smoothing loss: Specifically, it is the sum of squares of the differences between adjacent frames (the role of temporal smoothing loss is to ensure the continuity and smoothness of the generated trajectory in the time dimension); (5) Motion amplitude regularization: Specifically, it is the L1 error between the joint change amplitude of the generated trajectory and the target, with an additional weight of 2.0 for the arm (the role of motion amplitude regularization is to constrain the motion amplitude of the joints in the generated trajectory to be consistent with the real reference data); (6) Velocity-position consistency loss: Specifically, it is the error between the numerical derivative of the joint position and the predicted joint velocity (the role of position consistency loss is to ensure that the joint position and joint velocity output by the model are physically self-consistent).
[0026] Step 2.3, data augmentation, involves randomly applying time reversal, velocity command Gaussian noise, and trajectory Gaussian noise to each sample during the training process. The purpose of data augmentation is to improve the model's generalization ability and robustness.
[0027] Step 2.4, Model Export: After training, the PyTorch model is exported sequentially as TorchScript and ONNX formats for deployment with the C++ inference engine. (The purpose of model export is to convert the trained PyTorch model into an inference format that can run efficiently on embedded platforms; TorchScript format: PyTorch's native serialization format, preserving model structure and weights, can be loaded and run on the C++ LibTorch backend without a Python environment; ONNX format: an open neural network exchange format, which can be loaded by the ONNX Runtime C++ backend for efficient inference on embedded ARM CPUs (approximately 100ms per inference iteration)). The overall purpose of the generative gait model training process is to train a conditional generative network that can generate a complete gait cycle trajectory in one go based on velocity commands and the current joint state.
[0028] Step 3: Real-time gait planning and whole-body tracking control, which includes the following steps.
[0029] Step 3.1, Three-thread concurrent architecture: The system adopts the following three threads running concurrently: (1) Input thread (~50Hz), specifically reads the speed and direction commands of the control device and writes them into the thread-safe command buffer (the purpose of the input thread is to collect the speed and direction commands of the control device in real time at a high frequency (~50Hz) and pass them to the planning thread through the thread-safe buffer); (2) Planning thread (~1Hz), specifically reads the speed / direction from the command buffer, performs gait model inference, generates a 50Hz gait trajectory and writes it into the motion buffer (the purpose of the planning thread is to perform ONNX inference of the gait model at a lower frequency (~1Hz), generate a complete cycle (49 frames @ 50Hz) of gait trajectory and write it into the motion buffer); (3) Control thread (500Hz), specifically reads the reference trajectory frame from the motion buffer, extracts the observation token through the encoder, outputs the joint action through the policy network inference, and sends the motor command (the purpose of the control thread is to perform full-body tracking control at a high frequency (500Hz) to realize real-time closed-loop control from gait trajectory to motor command). Step 3.2, adopt the autoregressive mechanism to realize the gait generation model of continuous multi-cycle gait, including the following steps: (1) During each inference, the joint position of the last frame of the original last frame output of the previous inference cycle (referring to the gait cycle generated when the planning thread called the gait model inference in the previous (previous) time; that is, the "previous inference cycle" refers to the complete gait trajectory (30 frames @ 30Hz) output by the planning thread when it executed the model inference in the previous time, and the joint position of the last frame (the 29th frame) is saved as the joint state input (dof_pos [1,29]) of the current (next) inference. This forms an autoregressive chain: the output state of the previous time → the current input state → the current output trajectory → the next input state, and so on) is used as the joint state input of the current inference; (2) The cooling time between two consecutive inferences (typical value 800ms; the cooling time refers to the minimum interval time between two consecutive gait model inferences (typical value 800ms)) ensures that the current trajectory (the trajectory refers to the gait trajectory currently being played and executed by the controlled thread, that is, the 49th frame generated by the previous inference and written to the motion buffer) is used as the joint state input of the current inference; (3) The cooling time between two consecutive inferences (typical value 800ms) ensures that the current trajectory (the trajectory refers to the gait trajectory currently being played and executed by the controlled thread, that is, the 49th frame generated by the previous inference and written to the motion buffer) is used as the joint state input of the current inference; (3) The trajectory switching adopts frame boundary gating. Specifically, the newly generated trajectory is written into the motion buffer only when the current trajectory plays to the last frame, so as to achieve seamless looping (the purpose of frame boundary gating is to achieve seamless switching between the old and new trajectories. The new trajectory is written only when the trajectory plays to the last frame).
[0030] Step 3.3, Frequency Upsampling: The gait model outputs a 30Hz trajectory, while the control thread requires a 50Hz trajectory. Specifically, natural cubic spline interpolation is used to upsample all 62 output dimensions from 30Hz to 50Hz, generating 49 frames of trajectory at 50Hz. The purpose of frequency upsampling is to convert the low-frequency trajectory (30Hz, 30 frames) output by the gait model into the high-frequency trajectory (50Hz, 49 frames) required by the control thread.
[0031] Step 3.4 Limb symmetry post-processing: Perform left-right limb symmetry on the upsampled 50Hz trajectory. Specifically, identify 13 pairs of symmetrical joints, calculate the mean and amplitude of the left and right joints, center the mean and average the amplitude to eliminate the inherent left-right bias of the model. The purpose of limb symmetry post-processing is to eliminate the inherent left-right limb movement bias in the gait model inference output.
[0032] Step 3.5, Joint Sequence Mapping: The gait model uses the MuJoCo joint sequence (consistent with the robot SDK), while the downstream tracking policy (the downstream tracking policy refers to the encoder-policy network in whole-body tracking control. This network is trained through reinforcement learning in the IsaacLab simulation environment, and its input joint sequence follows IsaacLab's joint numbering convention (different from MuJoCo)) uses the joint sequence trained in IsaacLab. Joint sequence rearrangement is performed when writing to the motion buffer using a predefined 29-element mapping array. The purpose of joint sequence mapping is to eliminate the difference in joint numbering conventions between the gait model and the tracking policy network. The gait model uses the MuJoCo joint sequence (consistent with the robot SDK control interface), while the tracking policy network uses the joint sequence trained in IsaacLab. Without rearrangement, joint commands will be sent to the wrong motors, causing erratic robot movement. A lookup and rearrangement is performed when writing to the motion buffer using the 29-element mapping array, ensuring that each joint command corresponds to the correct motor.
[0033] Step 3.6, Pose Integration: On each 50Hz frame, based on the base linear velocity (body coordinate system) and current heading angle output by the model (referring to each frame in the 49-frame @ 50Hz trajectory generated after frequency upsampling in Step 3.3; that is, from frame 0 to frame 48, a pose integration calculation is performed once per frame. The model refers to the base linear velocity data output by the gait model (generative gait model, ONNX format) inference in Step 3.2), the base position (x, y) is calculated in the world coordinate system by integration, and the heading angle yaw is integrated based on the angular velocity, converted into a quaternion, and written to the motion buffer. The purpose of this pose integration step is to convert the velocity information in the body coordinate system output by the gait model into the base pose (position and orientation) in the world coordinate system.
[0034] Step 3.7, full-body tracking control, the specific control thread runs at 500Hz, advancing a 50Hz reference trajectory frame every 10 ticks, including the following: (1) reading the reference joint position, joint velocity, and base quaternion of the current frame from the motion buffer (the purpose is to obtain the ideal motion target planned by the gait model); (2) combining the robot's real-time sensor feedback (IMU, joint encoder) to construct the observation vector (the purpose is to incorporate the robot's actual physical state into the feedback loop of the tracking control); (3) the encoder network compresses the reference motion information into a token vector; (4) the policy network uses the observation vector + token vector as input to infer and output a 29-dimensional joint motion increment (the purpose is to generate refined joint-level control instructions); (5) the motion increment is superimposed on the current joint instruction after being limited and sent to the motor driver (the purpose is to safely convert the output of the policy network into the actual motor control signal).
[0035] Step 3.8, speed strategy, specifically adopting differentiated speed control for different movement directions, including the following: (1) Forward: triggered incremental control by the control device, each trigger is ±0.2 m / s, range [0, 3.0] m / s (its function is to allow the operator to flexibly and accurately adjust the robot's forward speed. Unlike directly mapping the joystick position, incremental control avoids speed fluctuations caused by small joystick jitters, while the upper limit of 3.0 m / s constrains the safe speed range; (2) Backward: fixed safe speed of 0.8 m / s: (when walking backward, the robot's field of vision is limited and its stability is worse than when moving forward. Using a fixed low speed (rather than an adjustable speed) can avoid the risk of falling caused by high-speed backward movement. The fixed value of 0.8 m / s is an engineering choice between backward stability and backward capability. (3) Lateral movement: fixed safe speed of 0.6 m / s m / s (The lateral motion stability of humanoid robots is significantly weaker than that of forward and backward motion (the lateral support surface is narrow and the center of gravity is easily shifted). A fixed low speed is used to ensure that the robot will not tip over due to excessive speed during lateral movement. The fixed value of 0.6 m / s takes into account both the maneuverability and safety of lateral movement). (4) Steering: The P controller converts the deviation between the target heading and the current heading into yaw rate, with a limit of ±1.0 rad / s (the limit of ±1.0 rad / s constrains the maximum steering rate and prevents the robot from becoming unbalanced due to centrifugal force due to sharp turns). (5) When there is no input: the speed is reduced to zero and the default standing posture is written (this data is written to the default standing posture to return the joints to the predefined stable initial position, avoiding the robot from continuing to move due to inertia or becoming unbalanced due to abnormal joint position. This is the system's safety fallback mechanism).
[0036] Figure 1As shown, through all the above technical solutions, the present invention has the following advantages. (1) Lightweight inference: The model parameter count is ~200K, and the single inference outputs a complete cycle trajectory (~5ms GPU / ~100ms embedded CPU), which is much lower than traditional optimization methods; (2) Continuous smoothness: Autoregressive mechanism + frame boundary switching + cubic spline upsampling realizes continuous multi-cycle seamless gait; (3) Real-time response: The three-thread architecture decouples input perception, trajectory planning and tracking control, and supports real-time speed / direction command changes; (4) Full-body coordination: The gait trajectory simultaneously includes 29 joints of the legs, waist and arms, which can cooperate with the robot's full-body tracking strategy to achieve coordinated movement.
[0037] The foregoing has shown and described the basic principles and main features of the present invention, as well as its advantages. It will be apparent to those skilled in the art that the present invention is limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or basic characteristics. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within the present invention.
[0038] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in the embodiments can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for establishing a lightweight generative anthropomorphic gait tracking system, characterized in that, It includes three processes: gait data construction, generative gait model training, and real-time gait planning and whole-body tracking control. The data obtained from these three processes are used for the walking gait control of the humanoid robot's control system. The gait data construction process includes four steps: motion data acquisition, gait cycle extraction, cycle symmetry, and cycle closed-loop processing. The generative gait model training process includes four steps: network architecture, training multi-objective loss function, data augmentation, and model export. The network architecture adopts a conditional generation network, including establishing an MLP encoder, establishing a speed conditional enhancement module, and establishing an MLP decoder; The training of the multi-objective loss function is carried out using grouped weighted loss, which includes joint position reconstruction loss, periodic loop closure loss, velocity consistency loss, temporal smoothing loss, motion amplitude regularization, and velocity-position consistency loss. The real-time gait planning and whole-body tracking control process includes eight steps: determining a three-thread concurrent architecture, gait model generation, frequency upsampling, limb symmetry post-processing, joint sequence mapping, pose integration, whole-body tracking control, and determining a speed strategy. The three-thread concurrent architecture includes an input thread, a planning thread, and a control thread. The speed data used to determine the speed strategy includes forward, backward, lateral, and turning speeds, as well as speed zeroing.
2. The method for establishing a lightweight generative anthropomorphic gait tracking system according to claim 1, characterized in that, Reference motion data acquisition involves mapping human motion capture data onto the skeleton of a target humanoid robot in a simulation environment using motion redirection technology, generating a reference motion sequence covering multiple velocity-direction combinations. Gait cycle extraction involves extracting complete gait cycle segments from the reference motion sequence by detecting the highest point of the swing phase based on the peak knee joint angle.
3. The method for establishing a lightweight generative anthropomorphic gait tracking system according to claim 1, characterized in that, Periodic symmetry is a process of performing temporal mirroring symmetry on the joint data of each gait cycle. Specifically, it mirrors the left and right limb data of the first half of the cycle to generate the second half of the cycle, ensuring that the left and right limb movements are strictly symmetrical within each complete cycle. At the same time, it reverses the yaw / roll joints of the waist to ensure that the trunk movement is centered. Periodic closed-loop processing is a process of performing loop closure alignment on the first and last frames of each cycle, so that the joint state of the last frame of the cycle is consistent with that of the first frame, ensuring that there are no jumps when playing continuously in a loop.
4. The method for establishing a lightweight generative anthropomorphic gait tracking system according to claim 1, characterized in that, The MLP encoder is established by concatenating the 3D forward / lateral / yaw speed commands of the control system with the current 29-dimensional joint position states of the humanoid robot to form a 32-dimensional input, which is then mapped to a 128-dimensional latent vector through two fully connected layers with layer normalization. The speed condition enhancement module is established by independently encoding the speed command into a 128-dimensional vector, adding it to the encoder output, and enhancing the speed condition's discriminative power for generating the trajectory. The MLP decoder is established by directly outputting the complete periodic trajectory from the 128-dimensional latent vector through three fully connected layers.
5. The method for establishing a lightweight generative anthropomorphic gait tracking system according to claim 1, characterized in that, The joint position reconstruction loss is weighted by limb grouping, with arm joint weighting. 3.0, leg / waist weight 1.0; periodic closed-loop loss, which is the symmetric alignment error between the first 3 frames and the last 3 frames, weight 2.0; velocity consistency loss, which is the error between the average base velocity of the generated trajectory and the input velocity command; temporal smoothing loss, which is the sum of squares of the differences between adjacent frames; motion amplitude regularization, which is the L1 error between the joint change amplitude of the generated trajectory and the target, with an additional weight of 2.0 for the arm; velocity-position consistency loss, which is the error between the numerical differentiation of the joint position and the predicted joint velocity.
6. The method for establishing a lightweight generative anthropomorphic gait tracking system according to claim 1, characterized in that, Data augmentation involves randomly applying time reversal, velocity command Gaussian noise, and trajectory Gaussian noise to each sample during the training process. Model export involves exporting the PyTorch model sequentially into TorchScript and ONNX formats after training, for deployment with the C++ inference engine.
7. The method for establishing a lightweight generative anthropomorphic gait tracking system according to claim 1, characterized in that, In the input thread, the speed and direction commands of the control device are read and written to the thread-safe command buffer. In the planning thread, the speed / direction is read from the command buffer, the gait model is inferred, a 50Hz gait trajectory is generated and written to the motion buffer. In the control thread, the reference trajectory frame is read from the motion buffer, the observation token is extracted by the encoder, the policy network infers and outputs the joint action, and the motor command is sent.
8. The method for establishing a lightweight generative anthropomorphic gait tracking system according to claim 1, characterized in that, Gait model generation specifically employs an autoregressive mechanism to generate continuous multi-cycle gait; frequency upsampling uses natural cubic spline interpolation to upsample all 62 output dimensions from 30Hz to 50Hz, generating 49 frames of trajectory at 50Hz; limb symmetry post-processing performs left-right limb symmetry on the frequency-upsampled 50Hz trajectory; joint order mapping uses a predefined 29-element mapping array to rearrange the joint order when writing to the motion buffer.
9. The method for establishing a lightweight generative anthropomorphic gait tracking system according to claim 1, characterized in that, Pose integration is performed at each 50Hz frame. Based on the base linear velocity and current heading angle output by the model, the base position is calculated in the world coordinate system by integration. The heading angle (yaw) is integrated based on the angular velocity and converted into a quaternion and written to the motion buffer. Full-body tracking control is performed by the control thread running at 500Hz, advancing one frame of 50Hz reference trajectory every 10 ticks.