A motion control method for a humanoid robot adapted to walking in complex terrain and the humanoid robot

By combining reinforcement learning and multimodal perception, a composite reward function and policy library were designed to enable the robot to walk stably in complex terrain. This solves the problems of insufficient environmental adaptability and walking stability in existing technologies and improves the robot's adaptability and stability in complex terrain.

CN122085993APending Publication Date: 2026-05-26武汉大步智能科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
武汉大步智能科技有限公司
Filing Date
2026-01-20
Publication Date
2026-05-26

Smart Images

  • Figure CN122085993A_ABST
    Figure CN122085993A_ABST
Patent Text Reader

Abstract

This invention discloses a motion control method and a humanoid robot adapted to walking in complex terrain, belonging to the field of robot motion control. To address the problems of poor adaptability and instability during strategy switching in existing technologies under complex terrain, this invention proposes a control framework combining offline and online methods. In the offline stage, a composite reward function integrating energy consumption, balance, and foot force indices is used to train multiple walking strategies for different terrains using reinforcement learning, and a strategy library is constructed. In the online stage, terrain categories are identified in real time using multimodal perception data from foot fore-and-aft torque sensors, IMU, and other sensors. Based on the identification results, the optimal strategy is selected from the strategy library, and a smooth switching mechanism with temporal constraints and output interpolation is used for strategy transition. This invention significantly improves the walking stability, energy efficiency, and adaptability of humanoid robots in complex and unknown terrains such as slopes, gravel, and slippery surfaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of humanoid robot motion control, specifically relating to a motion control method for a humanoid robot that can walk in complex terrain and a humanoid robot. Background Technology

[0002] Humanoid robots, with their human-like structure and flexible gait, have broad application prospects in autonomous movement and human-robot collaboration in complex environments. However, existing humanoid robot motion control methods still face many challenges in complex terrains (such as slopes, steps, gravel, slippery surfaces, etc.).

[0003] Traditional control methods primarily rely on model-based kinematics and dynamics control. These methods require establishing accurate mathematical models of the robot and the terrain, and obtaining gait through planning and controller calculations. However, in real-world environments, the terrain is diverse and external disturbances are complex, making it difficult to establish accurate models and resulting in insufficient robustness of the controller. Consequently, the robot may become unstable or even fall over in complex terrain.

[0004] In recent years, reinforcement learning-based methods have been increasingly applied to robot motion control. These methods, through extensive trial-and-error training in simulated environments, can acquire relatively flexible control strategies to a certain extent. However, existing research typically focuses only on single performance metrics, lacking consideration of comprehensive factors such as energy consumption and force balance, resulting in insufficient generalization ability of the strategies in real-world complex terrains. Furthermore, while many reinforcement learning methods perform well in simulation training, their performance significantly degrades when transferred to real-world environments due to sensor noise, terrain variations, and uncertainties in the friction coefficient.

[0005] On the other hand, at the perception level, current humanoid robots mostly rely on vision or inertial measurement units (IMUs) to obtain environmental and posture information. However, single-modal perception suffers from insufficient accuracy or limited real-time performance. Especially in complex terrain, relying solely on vision may fail due to lighting or occlusion, while relying solely on IMUs makes it difficult to accurately reflect the foot contact state and perceive terrain differences in a timely manner, causing the robot to be unable to quickly select an appropriate walking strategy.

[0006] Current research reveals significant limitations in the walking control of humanoid robots in complex terrain: First, their adaptability to environmental changes is weak, making walking stability susceptible to impacts; second, reinforcement learning strategies have limited generalization capabilities, struggling to balance energy consumption, balance, and gait continuity, and their limited perceptual information prevents comprehensive real-time assessment of terrain conditions; third, the strategy switching mechanism is imperfect, easily leading to instability due to abrupt action changes. Therefore, there is an urgent need for a motion control method that integrates multimodal perceptual information, combines energy consumption and multi-index optimization training strategies, and possesses adaptive walking mode switching capabilities to improve the stability and adaptability of robots in complex terrain. Summary of the Invention

[0007] To address the above problems, this invention proposes a motion control method for humanoid robots that can walk on complex terrain. It combines reinforcement learning-based policy generation with multimodal terrain recognition based on foot force perception. By using a composite reward function with energy consumption and multiple indicators, it obtains policy features that distinguish different terrains. During online operation, it utilizes fore-and-aft torque sensors on the feet, an IMU (Integrated Mutor Unit), and joint feedback for real-time terrain assessment. Based on the terrain category, it selects and switches appropriate policies from a policy library, thereby significantly improving the robot's stability and adaptability on complex and unknown terrains such as slopes, gravel, steps, and slippery surfaces.

[0008] The motion control method for a humanoid robot adapted to walking in complex terrain involved in this invention mainly includes two stages: offline training and online operation.

[0009] The offline training phase primarily uses simulation, gradually introducing complex terrain through course learning to improve training convergence speed and policy robustness. Furthermore, domain randomization and additional noise are employed to enhance the sim-to-real capability.

[0010] Training scenarios were constructed under various simulated terrains, and physical parameters were randomized in the domain during training. A composite reward function was designed, which, in addition to speed / progression and fall penalty, focused on introducing energy consumption, posture balance, foot force smoothing, and gait continuity terms, so that the trained strategy could simultaneously take into account energy consumption, balance, and gait quality.

[0011] A series of policies performing well under different terrains were trained using the reinforcement learning algorithm PPO. During training, feature vectors were collected for each step or time window to train the terrain classifier. These features included: foot fore-and-aft force patterns, energy consumption per step, IMU attitude and angular velocity statistics, joint current, torque features, etc. A lightweight terrain classifier was trained using this data, and the trained policies and their corresponding terrain feature labels were stored in a policy library.

[0012] The online operation phase is based on a process of real-time perception → terrain assessment → strategy selection:

[0013] The system aggregates real-time data from the front and rear foot torque sensors, IMU signals, and torque estimates from each motor using a sliding window. Statistical features are calculated within a short-time sliding window, and time-series fusion is performed using filtering to obtain a stable feature vector. This feature vector is then input into a lightweight online classifier, which outputs the probability distribution of the current terrain category, while smoothing using confidence scores and historical windows.

[0014] If the classifier has high confidence and the current policy is inconsistent with the optimal policy, a corresponding terrain policy is selected from the policy library as a candidate policy. A smooth switching mechanism is used to smoothly transition the current policy to the candidate policy. The lower layer executes the desired joint position output by the policy by a fast feedback controller and monitors safety parameters, triggering an emergency conservative policy in case of anomalies.

[0015] Furthermore, reinforcement learning during the training phase uses even reward r t It consists of several weighted factors:

[0016]

[0017] Where, r v,t It is the forward speed reward, r e,t The energy consumption term can be approximated as the time integral of the product of motor torque and angular velocity. r b,t The attitude balance reward, r, is designed based on the deviation between the centroid projection and the supporting polygon. f,t This indicates a reward for smoothing foot force to reduce impact spikes and abrupt changes, r c,t To encourage periodic rewards for desired gait characteristics, P t ω represents the set of penalty terms for undesirable states such as falling or exceeding joint limits. * The weights are determined through hyperparameter search.

[0018] Preferably, energy consumption is not used alone to determine terrain, but rather together with other indicators to form a characteristic space that distinguishes terrain.

[0019] Furthermore, torque sensors are placed at the forehead (toe) and heel (back) of each foot to obtain the spatiotemporal variations in force distribution. By calculating the force ratio between the forehead and heel, the change in the center of force (CoP) position, and the tangential / normal ratio of the applied force, signals capable of distinguishing terrain features such as uphill / downhill / convex / concave terrain can be obtained. Specific analytical data includes: forehead / heel force ratio. Rate of change of foot force Statistics; imbalance of torque between left and right feet.

[0020] Preferably, the foot biomechanical characteristics are aligned with the IMU's angular velocity, joint torque / current characteristics, and other information in time for multimodal sensing fusion. Weighted fusion or a small filter stack is used in online operation to obtain a stable estimate, thereby reducing the risk of misidentification caused by the failure of a single sensor.

[0021] To reduce the latency and computational cost of the terrain classifier, the algorithm uses a sliding window MLP, and the output is a terrain category probability vector. It combines confidence and short-term history to use a moving average to avoid short-term fluctuations.

[0022] Preferably, the classifier training data comes from offline simulation data collection and a small number of labeled samples on a real robot.

[0023] Furthermore, to avoid the problem of "frequent switching—abrupt action—falling," this invention employs the following combination of mechanisms:

[0024] Switching is only allowed when the confidence level of a candidate terrain exceeds a threshold and remains above the minimum time window. Simultaneously, the new strategy must remain in place for at least a minimum time to avoid oscillations. During the switching period, a time coefficient is applied. Interpolate the control outputs of the two strategies:

[0025]

[0026] in At the start of the transition, the speed is smoothly increased from 0 to 1; in addition to the motion output, key parameters (stride length, cadence, swing height, and foot contact period) are exponentially smoothed to avoid instantaneous jumps; during the interpolation period, stability indicators are continuously monitored, and if an abnormality is detected, the speed immediately reverts to a conservative strategy or triggers fall protection.

[0027] Further design considerations were made for the Sim-to-Real transfer strategy: extensive use of domain randomization during the training phase, including but not limited to friction, inertia, sensor noise, and control delay; estimation of key dynamic parameters on a real robot using system identification and optimization of the simulation model; and small-scale online fine-tuning on a real robot using a small amount of real-world experience.

[0028] The advantages of this invention are:

[0029] 1. This invention innovatively designs a reward function based on energy consumption and multi-dimensional indicators. In addition to considering traditional gait stability and speed, it also introduces indicators such as energy consumption, posture balance, and foot impact smoothness. Through training in different terrain environments, it learns the differences between energy consumption and gait characteristics and terrain types, thereby improving the generalization ability of the strategy in complex terrain.

[0030] 2. This invention innovatively integrates foot sensors with multimodal perception. Torque sensors are installed at both ends of the robot's feet to monitor the direction and distribution of forces in real time, enabling the identification of slopes and uneven terrain. Simultaneously, by combining IMU and joint motor feedback signals, a multimodal perception system is constructed, significantly improving the accuracy and robustness of the blind-walking humanoid robot in recognizing complex terrain.

[0031] 3. This invention innovatively proposes a terrain perception-driven strategy adaptation and smooth strategy switching mechanism. By fusing and analyzing sensor data and training strategies, it determines the terrain type in real time and selects an appropriate walking strategy accordingly. Furthermore, for frequent walking mode transitions in complex terrain, it employs motion interpolation or transition control mechanisms to achieve smooth switching between strategies, avoiding robot instability caused by sudden changes in movement. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of the steps of the method of the present invention.

[0033] Figure 2 This is a flowchart illustrating the implementation of the present invention.

[0034] Figure 3 This is a schematic diagram of the output of the torque sensor used in this invention under different terrain conditions. Detailed Implementation

[0035] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0036] Example 1

[0037] The method of this invention includes a training phase, a perception phase, a terrain recognition and classification phase, a walking strategy selection phase, and a strategy smooth switching and execution phase. These phases work together to enable the humanoid robot to achieve energy optimization, stable walking, and adaptive strategy switching in complex terrain.

[0038] This embodiment discloses a motion control method for a humanoid robot that adapts to walking in complex terrain, which includes the following steps:

[0039] Step S1: During the training phase, candidate walking strategies adaptable to various terrains are obtained using a reinforcement learning framework. Multi-dimensional metrics such as energy consumption, stability, and impact force are incorporated into the reward function design to improve the generalization ability of the strategies. The specific implementation process is described below:

[0040] S1-1 optimizes the robot's energy consumption and motion performance under different terrains by constructing a composite reward function in a simulation environment, thereby forming a differentiated walking strategy. The key lies in the design of the reward function, with the total reward r... t It is derived from a combination of multiple items, and the specific definitions of its sub-items are as follows:

[0041]

[0042] in, This represents the actual forward speed. For the desired speed, This refers to the motor torque. Angular velocity, This indicates the geometric center of the supporting polygon.

[0043] Specifically, energy consumption bonus With energy consumption per unit time as the main optimization objective, motor torque is introduced. With angular velocity The product of these factors serves as an approximation of energy consumption. This design can be used to compare energy consumption differences under different terrains, thereby extracting features for terrain discrimination. Contact consistency reward. Constraints are imposed on the foot's landing point and contact force to avoid single-point force on the toes or heels.

[0044] S1-2, A dynamic model of the humanoid robot was established in the physical simulation platform Gazebo. Model parameters included: number of joints, link length, mass distribution, and coefficient of friction. The humanoid robot selected for this example is a self-developed 6-DOF (6-degree-of-freedom) legged robot. The simulation environment included various typical terrains, such as flat ground, uphill, downhill, gravel roads, and slippery surfaces. All terrain parameters were adjustable, with uphill / downhill angles ranging from 5° to 15°, gravel size from 5cm to 15cm, and a coefficient of friction of 0.1 to 0.3 for slippery surfaces.

[0045] S1-3: Walking strategies were trained under different terrain conditions, and the performance of the strategies in terms of energy consumption, center of gravity stability, and foot impact force was recorded. Through differential analysis, typical characteristic indicators for each type of terrain were extracted. On uphill slopes, energy consumption increased significantly, and the force on the forefoot was greater; on downhill slopes, the impact force on the hindfoot increased, and stability decreased; on slippery surfaces, the impact force decreased, but the posture deviation rate increased.

[0046] S1-4 involves randomly perturbing the robot and environmental parameters during training to improve the policy's generalization ability in real-world environments and prevent overfitting to the simulation. This results in a policy library containing multiple candidate walking strategies, each corresponding to one or more terrain categories. This policy library will be combined with terrain recognition results in subsequent steps for adaptive application.

[0047] Step S2 involves acquiring terrain information based on foot force sensing. Torque sensors are deployed at the front and rear ends of the robot's two feet to monitor the interaction force between the robot and the ground in real time, thereby inferring the characteristics of the terrain and providing a basis for selecting a walking strategy. The specific implementation steps are as follows:

[0048] The S2-1 incorporates high-sensitivity six-dimensional force sensors installed at the front (toes) and rear (heel) of each foot to collect data on vertical force, tangential force, and torque. Each sensor is connected to the robot's controller via a high-speed EtherCAT bus, enabling millisecond-level data transmission.

[0049] Preferably, the six-dimensional force sensor can adopt a strain gauge or piezoelectric structure, such as the ATI Mini45 or an equivalent model, with a measurement range of ±500 N and ±20 N·m and a measurement accuracy better than 0.5%; the sensor sampling frequency is 1kHz to ensure that instantaneous force changes can still be accurately captured when the robot walks quickly.

[0050] Furthermore, the collected sensor data is recorded as follows: , Calculated by the angle of the force direction:

[0051]

[0052] in, This characterizes the degree of deviation in the direction of force applied to the robot's feet; when it continuously exceeds a threshold... At that time, it can be determined that the robot is on tilted, soft, or irregular terrain.

[0053] S2-2, The original sensor signal is low-pass filtered at a cutoff frequency of 20 Hz to eliminate high-frequency noise and extract the force ratio before and after. The rate of change of force direction serves as a basis for reflecting the forward and backward shift of the robot's center of gravity. The contact stability index reflects the undulation of the ground; an excessively large rate of change indicates a significant degree of ground undulation. Simultaneously, the index is calculated based on the variance of force fluctuations; if the variance exceeds a threshold, it indicates uneven ground friction or an uneven surface.

[0054] Furthermore, by analyzing the above characteristics, a coarse classification of the terrain can be achieved. When the force direction is stable, the terrain is flat; when or When this occurs, it indicates a significant shift in the direction of force, corresponding to uphill or downhill terrain; when Frequent fluctuations indicate low contact stability and may be due to complex terrain such as gravel or grassland.

[0055] S2-3, a sliding window is used to segment and aggregate continuously acquired multi-source sensor data. In this embodiment, the window length is set to 0.5 seconds, corresponding to approximately 50 sampling frames, and the sliding step size is 20% of the window length to balance the integrity of temporal features and real-time responsiveness. Each window contains synchronous data from the six-dimensional force sensor at the front and rear of the foot, the IMU, and the motor torque estimation. Within this time window, the system calculates statistical and frequency domain features of each channel signal to obtain a set of temporal feature vectors reflecting terrain contact characteristics. To enhance noise resistance and temporal smoothness, the feature vectors are time-fused through one-dimensional convolution or exponential weighted filtering to finally generate a stable input vector. This input vector serves as the input to the online classifier, outputting the probability distribution results of each terrain category. By performing a moving average with the results of the previous window, the robustness and confidence stability of terrain recognition can be further improved.

[0056] Step S3: Using the multimodal foot force characteristics obtained in step S2 and the energy consumption difference characteristics trained in step S1, a terrain recognition and classification model is constructed to achieve real-time judgment of the terrain where the robot is currently located. The specific process is as follows:

[0057] S3-1, the feature parameters extracted in step S2 , The contact stability index and the unit energy consumption index obtained during the training process in step S1. Common inputs:

[0058]

[0059] in, Indicates the force variance. Energy consumption reward The calculations were performed. To reduce computational complexity and meet the application requirements for real-time judgment, this invention employs a lightweight multilayer perceptron (MLP) as the terrain classifier. The MLP consists of an input layer, two hidden layers, and an output layer. The input layer receives preprocessed foot force and IMU signal features. The number of nodes in the hidden layers are 64 and 32, respectively, and the ReLU function is used as the activation function. To further reduce computational load, the output layer uses the Softmax function to achieve probabilistic classification of different terrains (flat land, slopes, gravel, grass, steps, etc.).

[0060] Furthermore, the classifier outputs a set of probability distributions:

[0061]

[0062] The category with the highest probability is selected as the robot's current terrain determination result.

[0063] S3-2, Excessive approximation and calculation of measurement data can lead to cumulative errors. To reduce the probability of incorrect judgments, a probability threshold needs to be set. After numerous experiments, this invention achieves... If the maximum probability value is lower than the set threshold, the terrain recognition result is considered uncertain. In this case, the method in step S4 should be used.

[0064] Furthermore, the classification results are transmitted to the robot's motion control system in the form of terrain labels.

[0065] Step S4: Combining the terrain recognition results obtained in step S3, the system selects the optimal walking strategy from multiple pre-trained strategies and smoothly switches between them when necessary to ensure efficient and stable movement of the humanoid robot in complex terrain. The specific execution process is as follows:

[0066] S4-1, inheriting from step S1, obtains walking strategies for different terrains and builds a strategy library. Each strategy is optimized through reinforcement learning, and an energy-consuming reward is introduced during the training process to ensure a balance between energy saving and stability in the action.

[0067] Furthermore, using a flat ground strategy Using this as a baseline, experimental results using the control method of this invention show that the uphill strategy... The forward driving torque of the mid-leg joint increases, and the range of motion of the joint widens; downhill strategy Increased torque at each joint enhances braking control and suppresses forward roll; rough terrain strategy. Emphasis is placed on contact stability and a low gait height change rate, manifested as reduced stride height and longer foot contact time; step strategy The range of motion of the motors in the hip and knee joints is significantly increased, thereby increasing the height of foot elevation.

[0068] S4-2, After step S3 is completed, input it as follows:

[0069]

[0070] in, It is the chosen strategy. This is the output label of the terrain classifier at time t. The corresponding strategy is selected based on the terrain label. When there is uncertainty in the classification result (classification confidence),... The system will adopt a hybrid strategy:

[0071]

[0072] in, , These are the two most likely strategies. The probability ratio is dynamically calculated to avoid sudden erroneous switching.

[0073] Furthermore, to avoid frequent switching that could cause sudden changes in robot movements or even falls, this invention imposes limitations on strategy switching. Switching will only proceed when the confidence level of the terrain recognition result exceeds a threshold φ and the duration exceeds a minimum time window. Strategy switching is only allowed when a specific time condition is met; each new strategy must retain at least one minimum execution time after switching. This is to avoid jitter caused by frequent switching in a short period of time. Specifically, the present invention takes... , .

[0074] S4-3, introduce smoothing interpolation coefficients within the switching time window. The outputs of the old strategy and the new strategy are weighted proportionally:

[0075]

[0076] in, The original strategy outputs the control quantity. Output control input for the new strategy. The value is set to 0 at the start of the switching and smoothly rises to 1 within the window period. During the interpolation calculation, key control parameters such as stride length, stride frequency, swing height, and foot contact force are numerically smoothed to avoid instantaneous jumps.

[0077] Preferably, the present invention uses time-continuous smooth interpolation coefficients. Its interpolation type is a cosine smooth interpolation function:

[0078]

[0079] Among them, the interpolation window length The gait cycle can be set according to the terrain. If the terrain changes gently, the cycle can be extended to improve stability; if the terrain changes abruptly, the cycle can be shortened to enhance responsiveness. In this invention, the value range is 0.3–0.6s.

[0080] Furthermore, during the interpolation switching period, the system continuously monitors stability indicators such as center of gravity shift, force balance, and energy consumption change rate. If an abnormal value is detected that exceeds the threshold, the system immediately triggers an emergency protection action, reducing the stride and speed.

[0081] Step S5: After completing steps S3 and S4, the system enters the gait switching and execution phase. While ensuring stability and safety, this phase enables a smooth transition between different movement modes for the robot, maximizing walking efficiency and environmental adaptability. The specific implementation steps are as follows:

[0082] S5-1, when the classification result meets the minimum time threshold With stay time threshold Once the condition is confirmed as valid, the system generates a gait switching trigger signal. The trigger signal is parsed by the higher-level motion controller, which then calls the corresponding policy network weights based on the terrain label. The scheduler adopts a finite state machine (FSM) + policy fusion module: the FSM determines the target switching mode, and the policy fusion module generates a transition control law between the old and new policies.

[0083] Furthermore, time-domain interpolation is performed on parameters such as stride length, stride frequency, center of gravity height, swing leg trajectory, and contact force distribution to avoid abrupt changes in the control signal. While ensuring smooth parameter transitions, inverse dynamics and zero-moment point constraints are used to guarantee the stability of the supporting leg and the continuity of the center of gravity trajectory during the switching process.

[0084] In S5-2, control commands are issued in real time through the low-level joint controller, including position, velocity, and joint torque commands. To offset uncertainties during the switching process, a hybrid feedforward and feedback control is employed: the feedforward part, output by the switched policy network, provides a reference trajectory and joint torque; the feedback part, fused by an extended Kalman filter IMU and force sensors, provides real-time status for joint impedance adjustment and contact correction. The system completes a smooth transition within 1–2 gait cycles, enabling the robot to quickly adapt to new terrain.

[0085] After the switch is completed in S5-3, the system enters a short-term adaptive phase, further fine-tuning parameters by monitoring energy consumption, gait symmetry, and centroid shift in real time. Specifically, for complex or unseen terrain, the system can invoke an online fine-tuning mechanism: based on the original strategy, it updates rapidly through small-scale reinforcement learning, enabling the robot to achieve stable movement within a few steps. The update results are cached in an experience replay library to support rapid adaptation to subsequent environments.

[0086] Preferably, the online fine-tuning employs a proximal policy optimization (PPO) structure as its core framework, combining recent perceptual and motion feedback for mini-batch updates, with an update frequency of once every 10 steps triggering parameter optimization. The policy network uses a two-layer fully connected structure with 128 and 64 hidden layer nodes, respectively, and ReLU activation function. To ensure real-time performance and stability, online updates only adjust the parameters of the low-level control gain and feature extraction modules, with the learning rate limited to below 1e-4.

[0087] Furthermore, throughout the gait transition process, the system maintains a state-perception-execution closed loop. The perception module continuously provides terrain and stability indicators, and the control module makes real-time corrections. Simultaneously, safety protection is implemented: if cumulative energy consumption exceeds the normal threshold by 30%, body posture deviation exceeds a limited angle, or multiple contact failures are detected, the braking mode is automatically triggered.

[0088] This invention incorporates energy consumption metrics into the reward function, enabling the robot to learn the relationship between energy consumption and terrain, achieving a balance between energy efficiency and stability. Torque sensors are placed at the front and rear of the feet to improve terrain recognition accuracy. A smooth switching mechanism is employed to avoid abrupt gait changes and instability. This method enhances the robot's adaptability to complex terrain and the continuous stability of its walking.

[0089] Example 2

[0090] Based on the same inventive concept, this invention also designs a humanoid robot based on the motion control method for humanoid robots that adapt to walking in complex terrain as described in the embodiments, comprising:

[0091] Robot body and motion control module;

[0092] The robot body is driven by a high-torque servo motor, and each leg has 6 degrees of freedom, enabling flexible humanoid gait. Torque sensors are installed at the front and rear ends of each foot to detect the direction and magnitude of the force exerted by the ground on the foot in real time, helping to determine terrain features. The robot is also equipped with a high-precision IMU to acquire posture and velocity information, which is combined with an embedded computing platform to achieve real-time calculations.

[0093] The motion control module, based on a reinforcement learning control framework and incorporating a reward function that considers energy consumption metrics, adaptively selects walking strategies for different terrains. During operation:

[0094] By detecting changes in force on the fore and hind feet using torque sensors, and combining this with posture and energy consumption data, the system can accurately infer the terrain type.

[0095] When switching terrain or adjusting walking strategies, a smooth interpolation mechanism is used to achieve a natural transition between different strategies and avoid gait instability caused by sudden changes.

[0096] When the robot is in a potentially unstable state, the system makes a judgment based on abnormal patterns in energy consumption and force distribution, and triggers protective gait adjustments.

[0097] The humanoid robot described in this embodiment is a hardware platform for implementing the motion control method of the humanoid robot that adapts to complex terrain in Embodiment 1. For the specific control process, please refer to the method embodiment section, which will not be repeated here.

[0098] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.

Claims

1. A motion control method for a humanoid robot that adapts to walking in complex terrain, characterized in that, Includes the following stages: Offline training phase: In a simulation environment, multiple walking strategies are trained on different types of terrain using reinforcement learning algorithms, and a strategy library is built; the composite reward function used in training includes at least an energy consumption reward, a posture balance reward, and a foot force smoothing reward. The online operation phase includes: Real-time perception steps: Through torque sensors, IMUs, and joint feedback installed at the front and rear of the robot's feet, multimodal data of the robot's interaction with the environment are collected in real time; Terrain recognition step: Based on the data collected in the real-time perception step, feature vectors are extracted and input into a lightweight terrain classifier to determine the terrain category where the robot is currently located in real time; Strategy selection and smooth switching steps: Based on the terrain category identified in the terrain recognition step, the corresponding optimal walking strategy is selected from the strategy library, and the currently executing strategy is transitioned to the optimal walking strategy through a smooth switching mechanism.

2. The method according to claim 1, characterized in that, The composite reward function is expressed as follows: Where, r v,t For forward velocity reward, r e,t Represents the energy consumption term, r b,t Represents the posture balance reward, r f,t For the smooth reward of force distribution at the foot, r c,t To encourage periodic rewards for desired gait characteristics, P t Represents the set of penalty terms, ω * The weights are determined through hyperparameter search.

3. The method according to claim 1, characterized in that: During the offline training phase, complex terrain is gradually introduced using a course-based learning approach, and the physical parameters in the simulation environment are subjected to domain randomization.

4. The method according to claim 1, characterized in that: In the real-time sensing step, the features extracted from the torque sensor include the ratio of force on the front and rear ends of the foot, the change in the position of the force center, the ratio of the tangential to the normal direction of the force, and statistics on the rate of change of the force at the foot end.

5. The method according to claim 1, characterized in that: In the terrain recognition step, a sliding window is used to perform temporal fusion of the multimodal data to obtain a stable feature vector; the lightweight terrain classifier is a multilayer perceptron model.

6. The method according to claim 1, characterized in that: The smooth switching mechanism is specifically implemented as follows: Policy switching is only allowed when the confidence level of the terrain category exceeds a preset threshold and continues to exceed the minimum time window. Within the switching time window, through interpolation coefficients Output control quantity of the old strategy and the output control quantity of the new strategy Weighted fusion is performed to obtain the final control quantity. ,in, It starts at 0 and smoothly rises to 1 during the window period.

7. The method according to claim 6, characterized in that: During strategy switching, key parameters such as stride length, stride frequency, swing height, and foot contact force are simultaneously subjected to exponential smoothing; the robot's stability indicators are continuously monitored, and if an anomaly is detected, the robot immediately reverts to a conservative strategy or triggers a fall protection procedure.

8. The method according to claim 1, characterized in that, The online operation phase also includes an online fine-tuning mechanism for making small-scale, rapid updates to the selected walking strategy in a real-world environment based on limited real-time experience, in order to adapt to new, unseen terrain.

9. A humanoid robot implementing the motion control method as described in any one of claims 1-9, characterized in that, include: The robot body has legs driven by multiple joints, with torque sensors installed at the front and rear of the feet; an inertial measurement unit is used to detect the robot's attitude and angular velocity. The computational control unit is configured to: perform the offline training phase to build a policy library; and perform the real-time perception, terrain recognition, policy selection, and smooth switching steps during online operation.

10. The humanoid robot according to claim 9, characterized in that: The torque sensor is a six-dimensional force sensor, which is connected to the computing control unit via a high-speed bus. The computing control unit is also configured to monitor energy consumption and stability indicators during strategy switching and trigger an emergency conservative strategy in case of an anomaly.