A complex terrain-oriented quadruped robot motion strategy adaptive switching control method
Patent Information
- Application Number
- CN202611145968.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-09
AI Technical Summary
[0006]本发明的目的在于克服目前四足机器人在复杂环境中存在通过能力差、运动不稳定性以及工程可靠性差的缺陷,提供一种面向复杂地形的四足机器人运动策略自适应切换控制方法
[0031](1)本发明通过构建包含基础步态策略、地形适应策略及任务级运动策略的多层次运动策略库,并建立环境状态、机器人状态及任务需求与各策略之间的规则映射关系,使四足机器人能够针对平整路面、碎石地面、坡道、低摩擦地面、楼梯、正障碍及负障碍等多种复杂地形自主匹配目标运动策略,克服了现有技术中固定步态方法需人工切换、单一策略难以兼顾多种场景的缺陷,显著提高了机器人在多样化复杂环境中的自主通过能力和场景适应广度。
Smart Images

Figure CN122884092A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of robot motion control, embodied intelligence and artificial intelligence, specifically referring to an adaptive switching control method for the motion strategy of a quadruped robot facing complex terrain. Background Technology
[0002] Quadruped robots, with their excellent obstacle-crossing ability and adaptability to complex environments, have a wide range of applications in scenarios such as field inspection, emergency rescue, and special operations. However, real-world working environments typically include various complex terrains, such as flat roads, gravel surfaces, ramps, low-friction surfaces, stairs, positive obstacles, and negative obstacles. Different environmental conditions place different demands on the robot's mobility.
[0003] Existing quadruped robot motion control methods mainly fall into the following categories: The first category is fixed gait control. This method pre-designs fixed gait parameters for specific motion scenarios, and the quadruped robot moves according to the preset pattern. Its drawback is that manual intervention is required to switch motion modes when facing environmental changes, resulting in insufficient autonomy and difficulty in meeting the needs of autonomous operation in complex environments. The second category is single motion strategy control. This method focuses on optimizing the control performance of a single motion mode, making it difficult to simultaneously address the needs of high-speed movement, traversing complex terrain, and special action tasks. The third category is motion strategy control based on reinforcement learning. This method trains neural networks to enable the robot to learn complex motion capabilities, but it typically focuses on strategy optimization for a single task or environment. When the robot simultaneously faces multiple terrains, multiple tasks, and multiple motion requirements, relying solely on the learned model for motion strategy selection has drawbacks such as difficulty in locating abnormal states, high safety risks, and a lack of guaranteed motion stability during strategy switching.
[0004] In addition, although there are existing methods involving gait switching, most of them only focus on gait level switching and have not established a systematic strategy system covering basic gait, terrain adaptation and task-level movement; and the switching decision-making often relies on single sensor information or black box models, lacking an interpretable and debuggable rule-driven mechanism.
[0005] Therefore, there is an urgent need for an adaptive switching control method for the motion strategies of quadruped robots in complex terrain, which can reliably schedule and intelligently switch multiple motion strategies while ensuring the robot's motion capabilities. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of current quadruped robots in complex environments, such as poor mobility, motion instability, and poor engineering reliability, and to provide an adaptive switching control method for the motion strategy of quadruped robots in complex terrain.
[0007] To achieve the above objectives, the present invention employs the following technical solution: an adaptive switching control method for the motion strategy of a quadruped robot in complex terrain, comprising the following steps:
[0008] S1. Construct a motion strategy library that includes at least basic gait strategies, terrain adaptation strategies, and task-level motion strategies;
[0009] S2. Obtain environmental state information and robot body state information through the airborne sensing system to form a current motion state description vector;
[0010] S3. Establish a rule mapping relationship between the environmental state, robot state, and task requirements and various motion strategies in the motion strategy library, and match the target motion strategy from the motion strategy library based on the rule mapping relationship.
[0011] S4. When the matched target motion strategy is different from the currently executed motion strategy, a strategy switch is triggered;
[0012] S5. Perform a strategy switching transition to enable the quadruped robot to smoothly transition between the current motion strategy and the target motion strategy.
[0013] S6. Control the quadruped robot to perform motion according to the target motion strategy;
[0014] S7. During execution, continuously acquire feedback information and adjust the execution parameters of the rule mapping relationship or target motion strategy based on the feedback information.
[0015] Furthermore, the basic gait strategy described in step S1 includes one or more of the following: walking strategy, fast movement strategy, trotting strategy, crawling low posture movement strategy, crossing movement strategy, and self-recovery strategy.
[0016] The terrain adaptation strategies include one or more of the following: flat hard ground movement strategy, gravel and irregular ground movement strategy, slope movement strategy, grass and soft ground movement strategy, and low friction ground movement strategy;
[0017] The task-level movement strategies include one or more of the following: stair climbing strategy, positive obstacle climbing strategy, negative obstacle crossing strategy, narrow space passage strategy, and instability recovery strategy.
[0018] The environmental status information mentioned in step S2 includes one or more of the following: terrain type, ground slope, obstacle type, obstacle size, and ground contact conditions;
[0019] The robot's body state information includes one or more of the following: body posture, foot contact state, movement speed, stability state, and load state.
[0020] The rule mapping relationship described in step S3 is in the form of condition-action pairs. Each condition-action pair includes a condition part and an action part. The condition part includes a combination judgment of one or more of the following: environmental state conditions, robot state conditions, and task requirement conditions. The action part includes the target motion strategy identifier and switching parameters.
[0021] The triggering conditions for switching the triggering strategy in step S4 include one or more of the following: change in terrain type, ground slope exceeding a preset slope threshold, detection of an obstacle and obstacle size exceeding a preset size threshold, robot stability state exceeding a safe range, and change in task requirements.
[0022] The policy switching transition described in step S5 includes the following sub-steps:
[0023] S51. After detecting the switching trigger condition, enter the switching preparation state;
[0024] S52. In the switching preparation state, determine whether the current foot is in the support phase. If it is in the swing phase, wait for it to enter the support phase before performing the switching.
[0025] S53. Determine whether the current fuselage attitude angle is within the preset safety threshold range. If it exceeds the threshold, perform attitude adjustment first and then switch strategies.
[0026] S54. When the target motion strategy is started, the first frame control command of the target motion strategy and the last frame control command of the current motion strategy are weighted and transitioned to generate transition period control commands.
[0027] S55. Gradually adjust the weighting coefficients to smoothly transition the control command from the current motion strategy to the target motion strategy.
[0028] The feedback information mentioned in step S7 includes one or more of the following: foot contact feedback, fuselage attitude feedback, and environmental change information.
[0029] The rule mapping relationship described in step S3 supports both offline and online updates. The offline update refers to adjusting rule parameters through simulation or experimental data. The online update refers to recording the motion effect after each strategy switch in the online phase. When the switching effect of a certain rule is continuously lower than a preset threshold, the triggering condition or target motion strategy of that rule is automatically adjusted.
[0030] Compared with the prior art, the beneficial effects of the present invention are:
[0031] (1) This invention constructs a multi-level motion strategy library that includes basic gait strategy, terrain adaptation strategy and task-level motion strategy, and establishes a rule mapping relationship between environmental state, robot state and task requirements and each strategy. This enables the quadruped robot to autonomously match target motion strategies for various complex terrains such as flat roads, gravel ground, slopes, low friction ground, stairs, positive obstacles and negative obstacles. This overcomes the shortcomings of the existing technology where fixed gait methods require manual switching and a single strategy is difficult to take into account multiple scenarios. It significantly improves the robot's autonomous passage ability and scene adaptability in diverse and complex environments.
[0032] (2) The present invention uses explicit rule mapping relationship in the form of conditional action pairs to drive motion strategy decision-making, and solidifies the strategy selection logic in the form of readable and editable rules, which is different from the existing technology that relies on reinforcement learning black box model for strategy decision-making. When the robot has motion abnormalities, the reason for the strategy selection can be quickly located and optimized through rule tracing, which greatly improves the transparency, interpretability and engineering maintainability of the motion decision-making process, and reduces the safety risks and debugging difficulty in complex environments.
[0033] (3) In the transition of strategy switching, the present invention effectively avoids the sudden change of action and instability of the body caused by direct switching of different motion strategies through multiple protection mechanisms such as foot support phase judgment, body posture pre-adjustment and control command weighted transition, and significantly improves the motion stability and posture stability of the robot in the process of passing through continuous complex terrain.
[0034] (4) This invention supports dual-mode optimization of rule mapping relationships, namely offline and online updates. In the offline stage, rule parameters are adjusted in batches using simulation or experimental data and regression verification is performed to ensure the baseline reliability of the rule base. In the online stage, the motion effect after each strategy switch is recorded in real time. When the effect of a rule switch is continuously lower than a preset threshold, the triggering condition or target motion strategy of that rule is automatically adjusted. This invention adopts two update modes, offline and online, to work together, enabling the rule base to have both the ability to iterate and evolve in batches and to quickly adapt to the dynamic changes of the current environment, forming a continuously self-evolving motion decision optimization closed loop, which significantly improves the long-term reliability and environmental adaptability of the system. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the overall process of the present invention. Detailed Implementation
[0036] 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.
[0037] Example
[0038] like Figure 1 As shown, the adaptive switching control method for the motion strategy of a quadruped robot facing complex terrain according to the present invention includes steps S1 to S7, and each step is described in detail below.
[0039] S1. Construct a motion strategy library that includes at least basic gait strategies, terrain adaptation strategies, and task-level motion strategies.
[0040] This step involves constructing a multi-level motion strategy library, which is organized and stored in three levels for the quadruped robot.
[0041] The first level is the basic gait strategy, which provides the basic movement patterns for the quadruped robot. This basic gait strategy includes walking, fast movement, trotting, crawling low-posture movement, traversing movement, and self-recovery strategy. During operation, the basic gait strategy can be one or more of the above.
[0042] The walking strategy has a duty cycle of 0.75 and a step frequency of 0.5 to 1.0 Hz, suitable for low-speed, smooth movement and precise control scenarios. The fast movement strategy has a duty cycle of 0.5 and a step frequency of 1.5 to 3.0 Hz, suitable for medium-to-high-speed movement. The trotting strategy has a duty cycle of 0.5 and a step frequency of 1.0 to 2.0 Hz, suitable for medium-speed, long-distance movement. The crawling low-profile movement strategy lowers the robot's height to 60% to 70% of its normal height, suitable for navigating low-headroom environments. The traversing movement strategy increases the stride length to 120% to 150% of the normal stride length, suitable for traversing small obstacles. The self-recovery strategy includes a sequence of actions such as turning over, standing, and getting out of trouble, used for the robot to autonomously recover from tipping over or getting stuck.
[0043] The duty cycle mentioned above refers to the proportion of time a single leg of a quadruped robot is in the support phase (the foot touches the ground, bears the weight of the robot body, and propels the body forward) during a complete gait cycle.
[0044] The second level consists of terrain adaptation strategies, which optimize parameters for different ground physical characteristics. Terrain adaptation strategies include one or more of the following: smooth hard ground movement strategies, gravel and irregular ground movement strategies, slope movement strategies, grass and soft ground movement strategies, and low-friction ground movement strategies.
[0045] Among these strategies, the flat, hard ground movement strategy optimizes foot trajectory to increase speed and reduce impact. The gravel and irregular ground movement strategy increases foot contact area, reduces foot slip rate, and enhances landing stability. The slope movement strategy adjusts the aircraft's pitch angle to adapt to the incline and optimizes foot landing point to ensure grip. The grass and soft ground movement strategy increases stance phase time and reduces foot pressure to prevent sinking. The low-friction ground movement strategy reduces stride length, decreases acceleration, and optimizes foot trajectory to prevent slippage.
[0046] The third level is task-level movement strategies, which are designed for specific tasks or special scenarios. Task-level movement strategies include one or more of the following: stair climbing strategies, positive obstacle climbing strategies, negative obstacle crossing strategies, narrow space passage strategies, and instability recovery strategies.
[0047] The flight path strategy includes: a stair climbing strategy to plan the foot landing sequence and fuselage attitude trajectory for autonomous stair climbing; a positive obstacle climbing strategy to plan the foreleg grip and hind leg push sequence for vertical obstacle traversal; a negative obstacle crossing strategy to plan the crossing trajectory and weight transfer strategy for safe passage through ditches or pits; a narrow space passage strategy to adjust fuselage attitude and gait parameters to adapt to spatial constraints; and an instability recovery strategy to trigger emergency recovery actions based on stability quantification indicators to prevent overturning.
[0048] The strategies described above are stored in a parameterized form in the motion strategy library. Each strategy contains the following data structure:
[0049] The strategy ID is a globally unique identifier; the strategy type is one of the following: basic gait strategy, terrain adaptation strategy, or mission-level motion strategy; the applicable condition label includes terrain category label and mission label; the control parameter set includes gait parameters, foot trajectory parameters, attitude parameters, and PID control parameters, where gait parameters include duty cycle, stride frequency, stride length, and fuselage height; foot trajectory parameters include leg lift height, landing point offset, and trajectory curve type; attitude parameters include roll angle offset and pitch angle offset; and PID control parameters include proportional coefficient, integral coefficient, and derivative coefficient; the strategy entry command is the joint position vector and velocity vector of the first frame; and the strategy exit command is the joint position vector and velocity vector of the last frame.
[0050] S2. Obtain environmental state information and robot body state information through the airborne sensing system to form a current motion state description vector.
[0051] This step involves perceiving the environmental and robot body states. In this embodiment, the quadruped robot is equipped with multi-source sensing devices. These devices include a binocular vision camera, a depth camera, a lidar, an inertial measurement unit, a joint encoder, foot force sensors, and foot-to-ground switches.
[0052] The system includes a binocular vision camera for acquiring color images, depth images, and visual odometry information. A depth camera for acquiring depth images and point cloud data. A lidar system for acquiring 3D point cloud data and environmental elevation data. An inertial measurement unit (IMU) for acquiring the fuselage's three-axis attitude angles, angular velocities, and accelerations. An absolute encoder for the joints for acquiring the angles and angular velocities of each joint. A six-dimensional force sensor for the foot for acquiring the contact force and torque at the foot. A microswitch or capacitive sensor for the foot's ground contact switch for determining whether the foot is in the support or swing phase.
[0053] The process for acquiring and processing environmental status information is as follows:
[0054] First, a local terrain elevation map is generated through the fusion of binocular vision camera and LiDAR. This elevation map has a resolution of 2cm × 2cm and covers an area of 3m × 2m in front of the quadruped robot.
[0055] Secondly, terrain category labels are extracted based on the elevation map. A pre-trained support vector machine classifier is used to classify the terrain into flat hard ground, gravel and irregular ground, slope, grassy soft ground, or low friction ground.
[0056] Next, the ground slope angle, including the slope in the roll direction and the slope in the pitch direction, is calculated by least-squares plane fitting of the quadruped robot's standing area on the elevation map. The least-squares plane fitting is a mathematical method used by the quadruped robot to calculate the slope angle of the ground beneath its feet using sensor data (LiDAR point cloud or elevation map). Specifically, it involves fitting a smooth plane that best represents the current actual terrain direction from a large number of cluttered and discrete detection points on the ground in front of the quadruped robot, thereby accurately calculating whether the robot is going uphill, downhill, or tilting to the side.
[0057] Finally, the location, type, and size of obstacles are detected using a target detection algorithm based on elevation and depth images. The obstacle types include positive and negative obstacles, and the obstacle dimensions include height, width, and depth. The target detection algorithm can employ a neural network model based on YOLO or PointNet++.
[0058] The process for acquiring and processing robot body state information is as follows:
[0059] First, the real-time attitude angles of the fuselage, including roll angle, pitch angle and yaw angle, are obtained through attitude calculation by the inertial measurement unit and Kalman filtering, with an update frequency of 200 Hz.
[0060] Secondly, by using joint encoder readings and kinematic forward kinematics calculations, the three-dimensional position and velocity of each foot in the quadruped robot coordinate system are obtained.
[0061] Furthermore, by integrating the foot force sensor and the ground contact switch, the current phase state and contact force magnitude of each foot are determined. The phase state includes the support phase and the swing phase.
[0062] Then, the three-dimensional motion velocity of the robot body is calculated by fusing the acceleration integral of the inertial measurement unit with the extended Kalman filter of the visual odometry.
[0063] Next, the slip ratio of each foot is calculated by the difference between the theoretical foot speed calculated by the joint encoder and the actual fuselage speed measured by the inertial measurement unit and the odometer. The formula for calculating the slip ratio is: the difference between the theoretical foot speed and the actual fuselage speed, divided by the theoretical foot speed.
[0064] Finally, through comprehensive analysis of foot force sensors and fuselage attitude, the current load status is estimated, including no load, light load, and heavy load.
[0065] In the state information of a quadruped robot, stability is a key component, and its quantitative indicators include roll angle, pitch angle, and foot slip ratio. The preset thresholds for roll angle are ±15 degrees, pitch angle is ±20 degrees, and foot slip ratio is 0.30. When any of the following occurs, the system determines that the robot is in an unstable state and triggers an instability recovery strategy: roll angle exceeding ±15 degrees, pitch angle exceeding ±20 degrees, or foot slip ratio exceeding 0.30.
[0066] The formation of the current motion state description vector refers to: synchronizing all the aforementioned environmental state information with the robot's own state information in time and fusing features to form a standardized current motion state description vector. Specifically, time synchronization unifies all information to a 200 Hz control cycle.
[0067] The motion state description vector includes the following fields: timestamp; environmental state, including terrain type, ground slope, obstacle list, and estimated ground friction coefficient, where the ground slope includes roll and pitch slopes, and each obstacle in the obstacle list includes type, size, and location information; robot state, including body attitude angles, phase state of each foot, contact force and slip ratio, motion speed, stability state, and load state, where the body attitude angles include roll angle, pitch angle, and yaw angle, each foot state includes phase, normal force in contact force, and slip ratio, and motion speed includes velocity components in three orthogonal directions; and task requirements, including task type, speed requirements, and special constraints. Task types include inspection, rescue, and reconnaissance; speed requirements include high speed, medium speed, and low speed; and special constraints include low headroom and low noise.
[0068] S3. Establish a rule mapping relationship between the environmental state, robot state, and task requirements and various motion strategies in the motion strategy library, and match the target motion strategy from the motion strategy library based on the rule mapping relationship.
[0069] In this step, the rule mapping relationship is stored in the rule base in the form of condition-action pairs, and has a priority hierarchical structure. Each condition-action pair is an "IF-THEN" decision rule, which is the smallest decision unit that enables the quadruped robot to possess "logical reasoning ability" rather than "intuitive guessing ability." Each condition-action pair includes a condition part and an action part; the condition part includes a combination of one or more of the following: environmental state conditions, robot state conditions, and task requirement conditions; the action part includes the target motion strategy identifier and switching parameters.
[0070] The data structure of the above rules is as follows: Each rule includes a rule ID, rule name, priority, condition section, action section, and statistical information. The rule ID is a globally unique identifier, the rule name is a text description, and the priority is divided into three levels: safety level, task level, and efficiency level, with safety level having the highest priority. The condition section includes one or more combinations of environmental state conditions, robot state conditions, and task requirement conditions. Environmental state conditions include a set of terrain categories, slope range, obstacle type set, and obstacle size range, with the obstacle size range including height and width ranges. Robot state conditions include a set of attitude angles, speed range, and stability states, with the attitude angle range including roll angle and pitch angle ranges. Task requirement conditions include a set of task types and speed requirements. The action section includes the target policy ID and switching parameters, including maximum transition time, transition curve type, and forced switching timeout. Statistical information includes trigger count, success rate, average performance score, and recent window score, used to support online updates.
[0071] The aforementioned priority hierarchy structure has the following specific hierarchy logic:
[0072] Safety-level rules have the highest priority and include instability recovery policy triggering rules and emergency braking rules. When the conditions of a safety-level rule are met, the system unconditionally interrupts the currently executing task-level or efficiency-level policy and prioritizes the policy specified by the safety-level rule.
[0073] Task-level rules have the next highest priority and include task-oriented strategy triggering rules such as strategies for going up and down stairs, climbing positive obstacles, crossing negative obstacles, and navigating narrow spaces.
[0074] Efficiency-level rules have the lowest priority, including efficiency-oriented strategy triggering rules such as high-speed movement on flat ground and rapid passage through flat terrain.
[0075] When the conditions of multiple rules are met simultaneously, the system matches them in descending order of priority and selects the target motion strategy specified by the rule with the highest priority.
[0076] The specific strategy matching process is as follows:
[0077] First, the generated current motion state description vector is input into the rule base. Second, all rules in the rule base are traversed, and each rule's condition is checked to see if the current motion state description vector satisfies the condition of that rule. Third, all rules whose conditions are satisfied are collected to form a candidate rule set. Then, the rule with the highest priority is selected from the candidate rule set. Finally, the target policy ID of the rule's action part is read, and the corresponding policy control parameter set is retrieved from the policy base as the target motion policy output.
[0078] The rule mapping relationship is updated in real time, supporting both offline and online updates. This embodiment prioritizes supporting both offline and online updates simultaneously. Offline updates refer to adjusting rule parameters based on simulation or experimental data; online updates refer to recording the motion effect after each strategy switch in an online phase, and automatically adjusting the triggering condition or target motion strategy of a rule when the switching effect of a certain rule is consistently lower than a preset threshold.
[0079] S4. When the matched target motion strategy is different from the currently executed motion strategy, a strategy switch is triggered.
[0080] The specific logic for triggering strategy switching is as follows: Strategy switching is triggered when the terrain category changes, i.e., when the terrain category at the current moment is different from the terrain category at the previous moment. Strategy switching is triggered when the ground slope exceeds a preset slope threshold, which can be set to five degrees. Strategy switching is triggered when an obstacle is detected and its size exceeds a preset size threshold, with the height threshold set to 0.1 meters and the width threshold set to 0.3 meters. Strategy switching is triggered when the robot's stability state exceeds the safe range, i.e., when the stability state is determined to be unstable. Strategy switching is triggered when external task requirements change.
[0081] When any of the above conditions are met, the system records the reason for the switchover and a snapshot of the current state. The recorded reason for the switchover includes the trigger condition type. The recorded snapshot of the current state includes the current policy ID, the state vector at the time of triggering, and the trigger timestamp. The system then proceeds to the policy switchover transition process.
[0082] Specifically, when multiple triggering conditions exist simultaneously, the system processes them in the following priority order: stability exceeding the safe range has the highest priority, followed by changes in task requirements, then changes in terrain type, then ground slope exceeding a preset slope threshold, and finally, the detection of an obstacle with a size exceeding a preset size threshold has the lowest priority.
[0083] S5. Perform a strategy switching transition to enable the quadruped robot to smoothly transition between the current motion strategy and the target motion strategy.
[0084] The purpose of the strategy switching transition is to prevent abrupt changes in motion and aircraft instability caused by direct switching between different motion strategies. This strategy switching transition specifically includes the following sub-steps:
[0085] S51. After detecting the switching trigger condition, enter the switching preparation state.
[0086] Upon detecting the handover trigger condition, the system immediately pauses the injection of instructions for the new strategy, sets the handover flag to true, and enters the handover preparation state to begin the handover transition process. Simultaneously, a handover timeout timer is started, with a preset timeout threshold of 1.0 second.
[0087] S52. In the switching preparation state, determine whether the current foot is in the support phase. If it is in the swing phase, wait for it to enter the support phase before performing the switching.
[0088] This step is essentially the determination of the foot support phase. In the switching preparation state, the system reads the ground contact switch signal and foot force sensor data of each foot to determine the current phase state of each foot. The system checks the foot phase of each of the four legs one by one. If a foot is currently in the swing phase, that is, the foot is off the ground, the system waits for that foot to complete the current swing cycle and land into the support phase.
[0089] When all four feet are in the support phase, the condition is met, and the process proceeds to the next step. A maximum waiting time of 0.5 seconds is set. If all feet fail to enter the support phase within 0.5 seconds, a forced switch is executed, and the process is no longer waiting to prevent control interruption due to indefinite waiting.
[0090] S53. Determine whether the current fuselage attitude angle is within the preset safety threshold range. If it exceeds the threshold, perform attitude adjustment first and then switch strategies.
[0091] This step determines the quadruped robot's body posture stability. The system reads the current roll and pitch angles. If the absolute value of the roll angle is less than or equal to 10 degrees and the absolute value of the pitch angle is less than or equal to 15 degrees, the posture conditions are met, and the system proceeds directly to the next step. If the absolute value of the roll angle is greater than 10 degrees or the absolute value of the pitch angle is greater than 15 degrees, the system first calls the posture adjustment controller. By adjusting the support force distribution of each leg and the desired posture of the body, the system adjusts the body posture to a safe range, with the goal of achieving a roll angle of zero degrees and a pitch angle of zero degrees. The condition for completing the posture adjustment is that the posture angle error is less than 2 degrees and lasts for 0.2 seconds. After completion, the system proceeds to the next step.
[0092] S54. When the target motion strategy is started, the first frame control command of the target motion strategy and the last frame control command of the current motion strategy are weighted and transitioned to generate transition period control commands.
[0093] The weighted transition of the control commands specifically includes the following:
[0094] Let the control command of the last frame of the current motion strategy be a vector. The first frame control command of the target motion strategy is a vector. The aforementioned control command vectors each contain the target positions of 12 joints and the target velocities of 12 joints, totaling 24 dimensions.
[0095] Transitional control directives The calculation formula is as follows: (Generated using linear weighting) ,in, These are time-varying weighting coefficients, and The calculation formula is: .Will Substituting into the above formula, we obtain the transition period control instructions. The final calculation formula is: Where t is the transition duration from the start of the switchover, measured in seconds; The preset total transition time.
[0096] S55. Gradually adjust the weighting coefficients to smoothly transition the control command from the current motion strategy to the target motion strategy.
[0097] This step involves the gradual adjustment and transition of the weighting coefficients. Time-varying weighting coefficients. The transition time gradually increases from 0 to 1 over time, adaptively determining the total transition time based on the degree of difference between the current and target strategies. If the current and target strategies belong to the same level, such as both being efficiency-level strategies, the total transition time is 0.3 seconds. If the current and target strategies belong to different levels, such as switching from efficiency-level to security-level, the total transition time is 0.8 seconds. The default total transition time for other cases is 0.5 seconds.
[0098] During the transition, when t equals 0, If t equals 0, the control instruction is exactly equal to the last frame instruction of the current strategy. When half of it, Equal to 0.5, the control command is a weighted mixture of the last frame command of the current policy and the first frame command of the target policy. t equals hour, When the value is 1, the control command is exactly the same as the first frame command of the target strategy. After the transition is complete, the system sets the switching flag to false, and control is completely transferred to the target motion strategy, entering the normal motion execution phase.
[0099] When an anomaly occurs during the handover transition, the anomaly is handled as follows: if the body attitude angle is detected to exceed the safety boundary during the handover transition, i.e., the absolute value of the roll angle is greater than 20 degrees or the absolute value of the pitch angle is greater than 25 degrees, the system immediately interrupts the transition process and forcibly invokes the instability recovery strategy to ensure robot safety.
[0100] S6. Control the quadruped robot to perform motion according to the target motion strategy.
[0101] After the transition is complete, the system generates corresponding joint control commands in each control cycle based on the control parameter set of the target motion strategy. The control cycle is 5 milliseconds, or a control frequency of 200 Hz. The joint control commands include three categories: the first category is joint position commands, which calculate the target angle of each joint through inverse kinematics and are executed by the proportional-derivative controller; the second category is joint velocity commands, which are generated by the motion planner and executed by the velocity controller; and the third category is joint torque commands, which calculate the feedforward torque commands for each joint based on the mapping between the desired contact force at the foot and the Jacobian matrix, achieving hybrid control of force and position.
[0102] The control commands are sent to the servo drivers of each joint via the EtherCAT bus, driving the robot to complete the actual movements. During each control cycle, the system simultaneously records the actual execution data, including the actual joint angles, actual foot contact forces, and actual body posture, for subsequent feedback and optimization.
[0103] S7. During execution, continuously acquire feedback information and adjust the execution parameters of the rule mapping relationship or target motion strategy based on the feedback information.
[0104] This step is the core of the closed-loop optimization mechanism in this embodiment. During strategy execution, the system continuously collects feedback information and initiates two optimization paths—effectiveness evaluation, online update, and offline update—based on the feedback results.
[0105] During each control cycle of the execution phase, the system continuously collects the following three types of feedback information: The first type is foot contact feedback, including the actual contact force of each foot and the moment of contact and departure from the ground. The actual contact force is obtained through a six-dimensional force sensor. The second type is fuselage attitude feedback, including the attitude angle, angular velocity, and acceleration output in real time by the inertial measurement unit. The third type is environmental change feedback, which uses a fusion perception of vision and lidar to detect the appearance of new obstacles or sudden changes in terrain in real time.
[0106] Based on the above feedback information, the system calculates the effectiveness score of the current execution strategy in real time. The evaluation dimensions include posture stability, foot slippage, contact reliability, and velocity tracking. Posture stability is calculated as the deviation between the current posture angle and the desired posture angle, with a normal range of less than or equal to five degrees and an abnormal threshold of greater than ten degrees. Foot slippage is calculated as the average of the real-time slippage rates of each foot, with a normal range of less than 0.15 and an abnormal threshold of greater than 0.25. Contact reliability is calculated as the deviation between the expected landing time and the actual landing time, with a normal range of less than 50 milliseconds and an abnormal threshold of greater than 100 milliseconds. Velocity tracking is calculated as the deviation rate between the actual velocity and the desired velocity, with a normal range of less than 10% and an abnormal threshold of greater than 30%.
[0107] When any evaluation dimension exceeds the abnormal threshold, or the overall effectiveness score is lower than the preset threshold of 0.60, the system determines that the effectiveness of the current strategy is insufficient, immediately triggers the strategy rematching process, and returns to step S3 to re-execute rule matching and strategy selection to achieve rapid risk avoidance.
[0108] The online updates include real-time recording of switching effects, online evaluation of rule validity, determination of validity thresholds and triggering of automatic adjustments, and an automatic rule adjustment mechanism.
[0109] The specific implementation method for real-time recording of switching effects is as follows: During actual operation, the system records each strategy switching event in real time. Each switching record includes the following fields: Switching ID (globally unique identifier); Trigger timestamp; Trigger rule ID (rule number that triggered this switch); Trigger condition type (one of terrain change, slope exceeding threshold, obstacle detection, instability, or task change); Strategy ID before switching; Strategy ID after switching; Snapshot of environmental state during switching; Snapshot of robot state during switching; Transition process data, including actual transition duration, maximum roll angle during transition, maximum pitch angle during transition, and maximum foot slip rate during transition; Post-switching motion effect, including whether the robot successfully traversed the current terrain, average speed within 3 seconds after switching, maximum body tilt angle within 3 seconds after switching, average foot slip rate within 3 seconds after switching, and whether instability recovery was triggered within 5 seconds after switching.
[0110] The specific method for online evaluation of rule effectiveness is as follows: The system maintains a sliding window of length 20 for each rule, storing the switching effect data of the rule's most recent 20 triggers. Based on the sliding window data, the following effectiveness indicators are calculated: the switching success rate is the number of times the strategy was successfully executed after the rule was triggered divided by the total number of rule triggers, where successful strategy execution is defined as successfully traversing the current terrain without triggering instability recovery; the switching stability score is 100 multiplied by one minus the difference between the average maximum tilt angle during the transition period and 25 degrees; the comprehensive effectiveness score is 0.5 multiplied by the switching success rate plus 0.3 multiplied by the switching stability score plus 0.2 multiplied by one minus the speed loss rate, where the speed loss rate is the ratio of speed loss before and after the switch.
[0111] The specific method for determining the validity threshold and triggering automatic adjustment is as follows: when the overall validity score of a rule is lower than the preset threshold of 0.70 in 10 consecutive triggers, the online automatic adjustment process of the rule is triggered.
[0112] The automatic rule adjustment mechanism includes three methods: tightening trigger conditions, relaxing trigger conditions, and redirecting the target strategy. Tightening trigger conditions is used in scenarios with excessively high false trigger rates. When overly lenient trigger conditions lead to frequent false triggers, the system automatically increases the threshold parameter. For example, if a ramp strategy is frequently falsely triggered on flat ground, the system will increase the ramp threshold from five degrees to eight or ten degrees.
[0113] The relaxed trigger conditions are used in scenarios with excessively high missed trigger rates. When the trigger conditions of a rule are too strict, causing it to fail to trigger when it should, the system automatically reduces the threshold parameter. For example, if a climbing strategy fails to trigger in front of an obstacle at a height of 0.25 meters, the system lowers the height threshold from 0.3 meters to 0.2 meters.
[0114] The target policy redirection is used for scenarios with excessively low success rates. When the target policy matched by the rule has a low success rate in a specific scenario, the system selects the best-performing alternative policy in that scenario from the policy library as the new target policy. For example, if the gravel policy has only a 50% success rate on a certain gravel terrain, the system switches the target policy to the traverse policy.
[0115] The offline update includes triggering timing and data aggregation, batch evaluation of rule effects, simulation playback and stress testing, targeted rule reconstruction and version release.
[0116] The specific timing and data aggregation method are as follows: offline updates are initiated by the system on a scheduled basis during non-task periods or manually triggered by engineers. Scheduled initiation can be set to 2:00 AM daily. After offline updates are initiated, the system performs the following data aggregation operations: First, all recent online operation records, switchover logs, success and failure cases, and raw sensor data are imported into the offline database. "Recent" can be set to the past 7 days. Second, the aggregated data is cleaned and labeled. Cleaning includes removing sensor outliers and aligning timestamps; labeling includes marking success or failure tags and terrain category tags.
[0117] The specific method for batch evaluation of rule effectiveness is as follows: using full historical data, recalculate the following evaluation indicators for each rule in the rule base: the matching accuracy rate is the number of times the rule condition is correctly triggered divided by the total number of times the rule is triggered; the execution success rate is the number of times the strategy successfully completes terrain passage after the rule is triggered divided by the total number of times the rule is triggered; the average performance score is the average of the performance scores of all switching records after the rule is triggered.
[0118] The specific methods for simulation playback and stress testing are as follows: Perform the following offline verification operations in the physical simulation environment: First, perform batch playback tests on the current rule base using the historical failure scenario set. The historical failure scenario set is a collection of terrain scenarios that caused the robot to become unstable or fail to pass through during online operation. The physical simulation environment can be a quadruped robot simulation platform built based on PyBullet or Mujoco; Second, identify the uncovered scenarios that still fail under all rule combinations; Finally, record the comprehensive performance indicators of the rule base, such as pass rate, average speed, and energy consumption, under various terrains.
[0119] The specific method for reconstructing the targeted rules is as follows: Based on the evaluation results of batch rule effect assessment, simulation playback, and stress testing, the following rule reconstruction operations are performed:
[0120] For rules with low matching accuracy, adjust their condition thresholds. For example, if the high-speed strategy has a matching accuracy of only 60% on flat ground, analysis reveals that the speed threshold is improperly set, so adjust the speed judgment threshold.
[0121] For rules with low success rates, replace their target strategies. For example, if the grass strategy has only a 55% success rate on slippery grass, select the low-friction ground movement strategy from the strategy library as the new target strategy.
[0122] For identified uncovered scenarios, new rule entries are added. For example, if a scenario combining ice and a slope is found to be uncovered without rules, a new rule is added to map the scenario to a combination of a low-friction ground motion strategy and a slope strategy.
[0123] For cases where the overall performance evaluation fails to meet the standards, batch parameter optimization is performed. Based on simulation data, a Bayesian optimization method is used to collaboratively tune the threshold parameters of multiple rules.
[0124] The specific method for versioned release is as follows: The adjusted new version of the rule base undergoes full-coverage regression testing in a simulation environment, covering all defined terrain scenarios. After confirming the following metrics, the release process begins: the pass rate for all existing scenarios is no less than 95% of the previous version; the pass rate for newly covered scenarios is no less than 80%; and there are no new security risks. The new version of the rule base, after offline verification and engineer review and confirmation, is uniformly deployed to the robot's physical machine via over-the-air upgrade, replacing the old version of the rule base.
[0125] This embodiment employs both offline and online updates to form a spiraling, collaborative closed loop. Online updates are executed during real-time adjustments within the task execution process. The adjustment granularity is small-step fine-tuning, with each adjustment not exceeding ±20%. Security is ensured through amplitude limitations and rollback mechanisms. Data dependency is based on the most recent 20 triggered sliding windows, and its main function is to quickly adapt to current environmental fluctuations.
[0126] Offline updates are performed during batch processing in the intermission period of tasks. The granularity can be adjusted significantly or new rules can be added. Security is guaranteed by simulation pre-verification and manual review. The data dependency is the full historical data. Its main function is to systematically evolve and expand generalization capabilities.
[0127] The collaborative process is as follows: First, offline updates provide an initial rule base validated through simulation, serving as the decision baseline for the robot's online operation. Second, during online operation, online updates are responsible for real-time fine-tuning to address parameter drift issues under the current terrain. Third, historical data accumulated during online operation is integrated into the offline database. Then, offline updates utilize the aggregated full data for periodic reviews, transforming the experience accumulated online into permanent upgrades to the rule base. Finally, the new version of the rule base released by offline updates provides a better initial decision baseline for the next stage of online operation, creating a continuously evolving optimization loop.
[0128] As described above, the present invention can be well implemented.
Claims
1. An adaptive switching control method for the motion strategy of a quadruped robot in complex terrain, characterized in that, Includes the following steps: S1. Construct a motion strategy library that includes at least basic gait strategies, terrain adaptation strategies, and task-level motion strategies; S2. Obtain environmental state information and robot body state information through the airborne sensing system to form a current motion state description vector; S3. Establish a rule mapping relationship between the environmental state, robot state, and task requirements and various motion strategies in the motion strategy library, and match the target motion strategy from the motion strategy library based on the rule mapping relationship. S4. When the matched target motion strategy is different from the currently executed motion strategy, a strategy switch is triggered; S5. Perform a strategy switching transition to enable the quadruped robot to smoothly transition between the current motion strategy and the target motion strategy. S6. Control the quadruped robot to perform motion according to the target motion strategy; S7. During execution, continuously acquire feedback information and adjust the execution parameters of the rule mapping relationship or target motion strategy based on the feedback information.
2. The adaptive switching control method for motion strategy of a quadruped robot in complex terrain according to claim 1, characterized in that, The basic gait strategy described in step S1 includes one or more of the following: walking strategy, fast movement strategy, trotting strategy, crawling low posture movement strategy, stride movement strategy, and self-recovery strategy; The terrain adaptation strategies include one or more of the following: flat hard ground movement strategy, gravel and irregular ground movement strategy, slope movement strategy, grass and soft ground movement strategy, and low friction ground movement strategy; The task-level movement strategies include one or more of the following: stair climbing strategy, positive obstacle climbing strategy, negative obstacle crossing strategy, narrow space passage strategy, and instability recovery strategy.
3. The adaptive switching control method for motion strategy of a quadruped robot in complex terrain according to claim 1, characterized in that, The environmental status information mentioned in step S2 includes one or more of the following: terrain type, ground slope, obstacle type, obstacle size, and ground contact conditions; The robot's body state information includes one or more of the following: body posture, foot contact state, movement speed, stability state, and load state.
4. The adaptive switching control method for motion strategy of a quadruped robot in complex terrain according to claim 3, characterized in that, The rule mapping relationship described in step S3 is in the form of condition-action pairs. Each condition-action pair includes a condition part and an action part. The condition part includes a combination judgment of one or more of the following: environmental state conditions, robot state conditions, and task requirement conditions. The action part includes the target motion strategy identifier and switching parameters.
5. The adaptive switching control method for motion strategy of a quadruped robot in complex terrain according to claim 1, characterized in that, The triggering conditions for switching the triggering strategy in step S4 include one or more of the following: change in terrain type, ground slope exceeding a preset slope threshold, detection of an obstacle and obstacle size exceeding a preset size threshold, robot stability state exceeding a safe range, and change in task requirements.
6. The adaptive switching control method for motion strategy of a quadruped robot in complex terrain according to claim 5, characterized in that, The policy switching transition described in step S5 includes the following sub-steps: S51. After detecting the switching trigger condition, enter the switching preparation state; S52. In the switching preparation state, determine whether the current foot is in the support phase. If it is in the swing phase, wait for it to enter the support phase before performing the switching. S53. Determine whether the current fuselage attitude angle is within the preset safety threshold range. If it exceeds the threshold, perform attitude adjustment first and then switch strategies. S54. When the target motion strategy is started, the first frame control command of the target motion strategy and the last frame control command of the current motion strategy are weighted and transitioned to generate transition period control commands. S55. Gradually adjust the weighting coefficients to smoothly transition the control command from the current motion strategy to the target motion strategy.
7. The adaptive switching control method for motion strategy of a quadruped robot in complex terrain according to claim 1, characterized in that, The feedback information mentioned in step S7 includes one or more of the following: foot contact feedback, fuselage attitude feedback, and environmental change information.
8. The adaptive switching control method for motion strategy of a quadruped robot in complex terrain according to claim 4, characterized in that, The rule mapping relationship described in step S3 supports both offline and online updates. The offline update refers to adjusting rule parameters through simulation or experimental data. The online update refers to recording the motion effect after each strategy switch in the online phase. When the switching effect of a certain rule is continuously lower than a preset threshold, the triggering condition or target motion strategy of that rule is automatically adjusted.