A method and system for optimizing the morphology and motion strategy of a leg of a legged robot
Patent Information
- Application Number
- CN202611071446.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-17
- Publication Date
- 2026-10-16
AI Technical Summary
但就面向多种典型地形单元、在可伸缩连续形态参数空间内进行外层黑箱优化、并与内层近端策略优化微调紧耦合的完整工程化流程而言,仍存在可改进空间:例如,若内层对每一候选形态均执行完整训练,则外层搜索在时间上不可接受;若缺少与形态随机化相结合的预训练先验,则短周期微调难以可靠反映形态优劣;若适应度仅依赖少量评估回合,则难以在随机性与难度课程并存的环境中稳定区分形态差异
1、本发明通过在机器人模型中引入可伸缩肢段,并在复位阶段将伸长量设定为目标值,同时按照肢段长度变化对执行器相关参数进行对应调整,使不同腿长状态能够在统一动力学框架下运行,使机器人能够围绕目标地形连续调节腿部形态,提高了不同形态方案的可比性、可实施性以及对复杂地形的适应能力;
Smart Images

Figure CN122923732A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of legged robots, and more particularly to a method and system for co-optimizing the leg shape and motion strategy of a legged robot. Background Technology
[0002] Legged robots have discrete foot selection and posture adjustment capabilities in unstructured scenarios such as disaster search and rescue and field inspection, and can complete tasks under complex geometric conditions such as steps, ditches, gravel, and narrow passages. With the development of high-fidelity physical simulation and large-scale parallel training environment, the use of deep reinforcement learning to learn walking and running strategies in continuous action space in simulation has become an important way to improve the agility and robustness of legged platforms. A typical method is the quadrupedal motion learning method for challenging terrain constructed using the proximal policy optimization algorithm [1]. At the same time, by randomizing dynamic parameters, sensor noise and ground properties in simulation, it is helpful to narrow the gap between simulation and reality, so that the learned strategy has better generalization ability when deployed. The relevant ideas have been widely adopted in simulation to reality transfer research [2]. Most of the above technical routes optimize the control strategy under the premise of fixed robot body structure, that is, assuming that the link length, joint arrangement and other morphological parameters have been determined in the design stage and will not be changed in the training and inference stages.
[0003] However, fixed limb configurations often struggle to simultaneously meet conflicting task requirements both geometrically and mechanically. For example, shorter limbs are more advantageous for passage through confined spaces like pipes or low obstacles; while longer limbs are generally better for expanding workspace and stabilizing the polygon when traversing significant height differences or climbing steep slopes. Forcing a single limb length configuration may result in situations where certain terrain elements are physically impassable, or generate excessive joint torques and unnecessary energy consumption on passable terrain, thus shortening endurance and increasing actuator workload. In other words, motion performance is determined by the combined effect of limb configuration and control; when limb configuration and control are mismatched, even with advanced control algorithms, the overall system may still fail to fully realize its hardware potential.
[0004] To alleviate the limitations of fixed bodies, industry and academia have explored technical routes for joint optimization or collaborative design of morphology design and motion control. For example, structural parameters are searched in discrete or continuous design variable spaces, and reinforcement learning or simulation evaluation is used as an inner layer performance metric; or deformable and scalable mechanisms are used to change the equivalent leg length or torso scale of the robot during the task. Some studies have also proposed to achieve joint optimization of morphology and control by combining learning and evolution [3]. Other studies focus on cross-morphology general strategies or pre-training-fine-tuning paradigms, so that the same set of network parameters or initialization can still reach a usable level through retraining in a short time after the morphology changes to a certain extent, thereby reducing the computational cost of "training from zero for each new morphology". The above directions have different focuses: some emphasize topology generation and manufacturability, some emphasize online deformable mechanisms, and some emphasize policy transfer efficiency. However, there is still room for improvement in the complete engineering process of performing outer-layer black-box optimization within a scalable continuous morphological parameter space for various typical terrain units, and tightly coupling it with inner-layer proximal strategy optimization fine-tuning. For example, if the inner layer performs full training for each candidate morphology, the outer-layer search becomes unacceptable in terms of time. If there is a lack of pre-training priors combined with morphological randomization, short-cycle fine-tuning cannot reliably reflect the quality of morphology. If fitness depends only on a small number of evaluation rounds, it is difficult to stably distinguish morphological differences in an environment where randomness and difficulty coexist.
[0005] Therefore, in response to the problems of difficulty in simultaneously optimizing the morphological parameters and motion strategies of underlegged robots in complex terrain, high cost of full-scale repetitive training, and difficulty in balancing passability and energy efficiency with fixed leg length, it is necessary to propose a technical solution that can be clearly implemented and can be combined with existing simulation training pipelines. This solution can obtain the optimal terrain-related morphology and matching motion strategy within an acceptable computational budget, and further improve the overall passability in complex scenarios composed of multiple types of terrain connected in sequence by segmented morphological switching.
[0006] Therefore, those skilled in the art are dedicated to developing a method and system for the collaborative optimization of leg morphology and motion strategy in legged robots.
[0007] [1] J. Lee, J. Hwangbo, L. Wellhausen, V. Koltun, and M. Hutter, "Learning quadrupedal locomotion over challenging terrain," Science Robotics, vol.5, no.47, p.eabc5986, 2020.
[0008] [2] XB Peng, M. Andrychowicz, W. Zaremba, and P. Abbeel, "Sim-to-real transfer of robotic control with dynamics randomization," in Proc. IEEEICRA, 2018, pp.3803--3810.
[0009] [3] A. Gupta, S. Savarese, S. Ganguli, and L. Fei-Fei, “Embodiedintelligence via learning and evolution,” Nature Communications, vol.12, p.5721, 2021. Summary of the Invention
[0010] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is that most existing legged robots adopt a fixed leg length structure, which makes it difficult to simultaneously meet the needs of passing through low and narrow terrain and the needs of overcoming obstacles in terrain with high drops and steep slopes, resulting in difficulty in taking into account different terrains.
[0011] To achieve the above objectives, the present invention provides a method for the collaborative optimization of leg morphology and motion strategy of a legged robot, the method comprising: A unified parametric retractable leg morphology modeling method is adopted. Adjustable limb lengths are set in the same robot model. During the reset phase, the elongation is set as the target value, and the relevant parameters of the actuator are adjusted according to the changes in limb length, so that different leg length states can operate under a unified dynamic framework. The two-layer collaborative optimization mechanism combines outer-layer evolutionary search with inner-layer reinforcement learning optimization. The outer layer generates and updates candidate forms in the morphological parameter space, while the inner layer optimizes the control strategy under a given form and feeds back the comprehensive evaluation results composed of terrain passability, motion tracking performance and energy consumption information to the outer layer to guide subsequent searches. A two-stage policy learning method combining morphological randomization pre-training with morphological search and fast fine-tuning is proposed. First, initial policy parameters with cross-morphological transfer capability are obtained by training under multiple random morphological conditions. Then, the initial policy parameters are used as the starting point for fine-tuning candidate morphologies. The method iterates the training for each candidate morphology to obtain evaluable control performance and outputs the optimal morphology and the final policy under the optimal morphology.
[0012] Furthermore, in the parametric scalable leg morphology modeling method, scalable limbs are introduced into the unified robot model, and the extension range of the scalable limbs is defined. Through the collaborative optimization of leg morphology and control strategy, the overall fitness and the expected cumulative reward are maximized.
[0013] in, This is the shape vector of the leg of a legged robot. For strategy parameters, In morphological space Internal fitness The largest and most optimal leg shape. For a given form Lowering the expected return The largest optimal policy parameter, For the strategy parameters Representation control strategy For the comprehensive fitness function, Let be the expected return function of the strategy under given shape and terrain conditions. For the terrain, It is a morphological space.
[0014] Furthermore, in the aforementioned two-layer collaborative optimization mechanism, the inner layer employs a proximal policy optimization to truncate the agent target update policy. The policy network and value network perform gradient ascent on the truncated agent target and jointly optimize it with the value function regression term and entropy reward term to maximize the expected cumulative return.
[0015] in, For strategy parameters The truncated proxy target, To calculate the expectation at time step t, This is a cutoff function used to limit the probability ratio to a certain value. Within the range, For probability ratios, For generalized advantage estimation, For the cutoff radius, The action to be performed at time step t. The state at time step t, The old strategy before the update. This is the time step index in the sampled trajectory.
[0016] Furthermore, in the aforementioned two-layer collaborative optimization mechanism, the outer layer employs a covariance matrix adaptive evolution strategy in the morphological space, extracting multiple candidate morphologies from the current search distribution and updating the candidate morphologies based on the inner layer's optimization results.
[0017] in, For the first The generation One candidate form It follows a normal distribution. The mean, Step size, Let be the covariance matrix.
[0018] Furthermore, in the morphological randomization pre-training stage, the leg morphological vector of the legged robot is independently and uniformly sampled in the feasible region at each round of reset. The single-step reward is decomposed into a velocity tracking term and a regularization term. The prior parameters are obtained through proximal policy optimization in the morphological randomization pre-training stage. Leg shape vector of legged robot Sampling results:
[0019] Single-step reward:
[0020] Near-end strategy optimization goals:
[0021] in, It is a uniform distribution on the morphological parameter space M. Let m be the joint probability distribution of the morphological parameter m. This represents the lower limit of the value of the i-th morphological parameter. This represents the upper limit of the value of the i-th morphological parameter. For single-step rewards, For speed tracking, For regularization terms, In order to expect a discount return, For the decision-making time domain, The state-action trajectory is generated by the interaction between the policy and the environment. This is the discount factor.
[0022] Furthermore, the morphological randomization pre-training phase includes the following steps: S101: Initialize the parameters of the policy network and value network, and load the simulation environment, robot unified model, terrain curriculum and parallel environment configuration; S102: Whenever the environment round is reset, the shape vector of the current round is sampled independently in a uniform distribution on the shape feasible domain, each prism joint is driven to the target elongation position and locked, the leg length is kept unchanged, and the elongation ratio and scaling factor are calculated according to the current limb elongation, and the stiffness, damping, torque limit and velocity limit of the rotation joint are updated simultaneously. S103: In each decision step, the ontological perception state, the normalized morphological code, and the terrain height information obtained by airborne altitude scanning or equivalent perception are input into the policy network, and the policy network outputs the control quantity for each active rotation joint. S104: Collect trajectories by interacting with the environment, calculate rewards and advantage estimates based on single-step rewards, and update the policy network and the value network according to the truncated agent objective; S105: Update the terrain difficulty level according to the single-round progress performance in each parallel environment according to the course rules, and calculate the average difficulty level of all environments. S106: Repeat steps S102 to S105 until the preset convergence criterion is reached, and save the network parameters as prior parameters.
[0023] Furthermore, in the morphology search and rapid fine-tuning stages, each candidate morphology is initialized with the prior parameters output from the morphology randomization pre-training stage. Proximal policy optimization is performed on the terrain variants, the prior parameters are fine-tuned, and the comprehensive fitness accumulated by the fine-tuning is calculated. The optimal morphology and the final policy under the optimal morphology are then output. The overall fitness is calculated in the following manner:
[0024] in, For overall fitness, For the first One candidate form These are the post-trained policy parameters corresponding to the i-th candidate form. The difficulty level of the terrain course. For average terrain course difficulty, For speed tracking reports, To score energy efficiency, The difficulty level of the terrain course. For speed tracking reward coefficient, This is the energy efficiency score coefficient.
[0025] Furthermore, the morphological search and rapid fine-tuning stage includes the following steps: S201: Initialize the covariance matrix adaptive evolution strategy, place the mean of the search distribution at the geometric center of the morphological space or an initial value that is relatively safe in engineering, take the identity matrix as the covariance matrix and set the initial global step size. S202: Select multiple candidate shapes from the current search distribution and prune outbound components back to the boundary of the shape space; S203: For each candidate morphology, fix the morphology in the simulation, lock the leg length and actuator parameters, and use the prior parameters as initial values to perform proximal policy optimization (PPO) fine-tuning iterations on the terrain variant to obtain the fine-tuned estimated parameters. ; S204: Calculate the normalized components from the statistics accumulated during the fine-tuning process. And calculate the overall fitness based on the weighted relationship. ; S205: According to The covariance matrix adaptive evolution strategy CMA-ES is executed to update the mean vector, step size and covariance matrix of the next generation; S206: Repeat steps S202 to S205 until the maximum algebraic sum or convergence criterion is reached, and output the comprehensive fitness. The maximum optimal form and the final strategy under the optimal form.
[0026] On the other hand, the present invention also provides a system for co-optimizing the leg shape and motion strategy of a legged robot. The system uses the method for co-optimizing the leg shape and motion strategy of a legged robot provided by the present invention to co-optimize the leg shape and motion strategy of the legged robot, and outputs the optimal leg shape and the final strategy under the optimal shape.
[0027] Furthermore, the system includes a parametric morphological modeling module, an actuator parameter consistent scaling module, a morphological randomization pre-training module, an outer morphological search and inner control fine-tuning module, and a composite terrain segmentation application module, wherein, The parametric morphology modeling module introduces retractable limbs into the unified robot model and defines the feasible extension range. The actuator parameter consistent scaling module synchronously adjusts the control parameters after the limb length changes in order to maintain the consistency of dynamic comparison under different forms. The control parameters include joint stiffness, damping, torque limiting and velocity limiting, etc. The morphological randomization pre-training module is trained under multiple random morphological conditions to obtain a prior policy with cross-morphological transfer capability. The outer morphology search and inner control fine-tuning module quickly evaluates candidate morphologies and updates the search distribution. The composite terrain segmentation application module activates the corresponding preferred form and control strategy when multiple types of terrain appear in sequence.
[0028] In a preferred embodiment of the present invention, compared with the prior art, the present invention has the following beneficial technical effects: 1. This invention introduces retractable limbs into the robot model and sets the elongation as a target value during the reset phase. At the same time, it adjusts the relevant parameters of the actuator according to the changes in limb length, so that different leg length states can operate under a unified dynamic framework. This allows the robot to continuously adjust the leg shape around the target terrain, improving the comparability, feasibility and adaptability to complex terrain of different shape schemes. 2. This invention obtains initial policy parameters with cross-morphological transfer capability by first training under multiple random morphological conditions, and then uses the initial policy as the starting point for fine-tuning candidate morphologies. This allows each candidate morphology to obtain evaluable control performance with fewer training iterations, significantly reducing the evaluation cost of candidate morphologies, shortening the collaborative optimization time, improving morphological search efficiency, and enhancing the speed of policy adaptation under new morphologies.
[0029] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the overall evolution process of a preferred embodiment of the method for co-optimizing the leg morphology and motion strategy of a legged robot according to the present invention. Figure 2 This is a schematic diagram of the training method in the morphological randomization pre-training stage of a preferred embodiment of the present invention; Figure 3 This is a schematic diagram comparing the fine-tuning effects of the morphology search and rapid fine-tuning stages in a preferred embodiment of the present invention; Figure 4 This is a schematic diagram of the entire process of the Go2 walking embodiment of a preferred embodiment of the present invention, which involves switching modes. Figure 5 This is a schematic diagram of the entire process of Ant, a preferred embodiment of the present invention, in switching mode walking.
[0031] Explanation of the numbering in the diagram: 1-Unitree Go2 robot prototype, 2-Ant robot prototype, 3-Simulated terrain types for training, 4-Actor-Critic network, 5-Robots with different morphological parameters. Detailed Implementation
[0032] The following description, with reference to the accompanying drawings, illustrates several preferred embodiments of the present invention to make its technical content clearer and easier to understand. The present invention can be embodied in many different forms, and the scope of protection of the present invention is not limited to the embodiments mentioned herein.
[0033] In the accompanying drawings, components with the same structure are indicated by the same numerical designation, and components with similar structures or functions are indicated by similar numerical designations. The dimensions and thicknesses of each component shown in the drawings are arbitrary, and the present invention does not limit the dimensions and thicknesses of each component. To make the illustrations clearer, the thickness of some components has been appropriately exaggerated in the drawings.
[0034] like Figure 1 As shown, existing legged robots mostly adopt a fixed leg length structure, which makes it difficult to simultaneously meet the needs of passing through low and narrow terrain and overcoming obstacles in terrain with high drops and steep slopes, resulting in a problem of difficulty in coordinating different terrains. This invention provides a method for the coordinated optimization of leg morphology and motion strategy in legged robots, which includes: A unified parametric modeling method for retractable leg morphology is adopted. Adjustable limb lengths are set in the same robot model. During the reset phase, the elongation is set as the target value, and the relevant parameters of the actuator are adjusted according to the changes in limb length, so that different leg length states can operate under a unified dynamic framework.
[0035] The two-layer collaborative optimization mechanism combines outer-layer evolutionary search with inner-layer reinforcement learning optimization. The outer layer generates and updates candidate forms in the morphological parameter space, while the inner layer optimizes the control strategy under a given form and feeds back the comprehensive evaluation results composed of terrain passability, motion tracking performance and energy consumption information to the outer layer to guide subsequent searches.
[0036] A two-stage policy learning method combining morphological randomization pre-training with morphological search and fast fine-tuning is proposed. First, initial policy parameters with cross-morphological transfer capability are trained under multiple random morphological conditions. Then, the initial policy parameters are used as the starting point for fine-tuning candidate morphologies. The method iterates the training for each candidate morphology to obtain evaluable control performance and outputs the optimal morphology and the final policy under the optimal morphology.
[0037] 1. Parametric Scalable Leg Shape Modeling Method
[0038] In this embodiment, a retractable limb is introduced into the unified robot model, and the extension range of the retractable limb is defined. Through the collaborative optimization of leg morphology and control strategy, the overall fitness and the expected cumulative reward are maximized.
[0039] in, This is the shape vector of the leg of a legged robot. For strategy parameters, In morphological space Internal fitness The largest and most optimal leg shape. For a given form Lowering the expected return The largest optimal policy parameter, For the strategy parameters Representation control strategy For the comprehensive fitness function, Let be the expected return function of the strategy under given shape and terrain conditions. For the terrain, It is a morphological space.
[0040] 2. Two-layer collaborative optimization mechanism
[0041] In this embodiment, the two-layer collaborative optimization mechanism adopts a combination of outer-layer evolutionary search and inner-layer reinforcement learning optimization. The outer layer generates and updates candidate forms in the morphological parameter space, while the inner layer optimizes the control strategy under a given form and feeds back the comprehensive evaluation results composed of terrain passability, motion tracking performance and energy consumption information to the outer layer to guide subsequent searches.
[0042] In this embodiment, the inner layer employs proximal policy optimization to truncate the agent target update policy. The policy network and value network perform gradient ascent on the truncated agent target and jointly optimize it with the value function regression term and entropy reward term to maximize the expected cumulative return.
[0043] in, For strategy parameters The truncated proxy target, To calculate the expectation at time step t, This is a truncation function. For probability ratios, For generalized advantage estimation, For the cutoff radius, The action to be performed at time step t. The state at time step t, The old strategy before the update. This is the time step index in the sampled trajectory.
[0044] The outer layer employs a covariance matrix adaptive evolution strategy in the morphological space, extracting multiple candidate morphologies from the current search distribution and updating the candidate morphologies based on the inner layer optimization results.
[0045] in, For the first The generation One candidate form It follows a normal distribution. The mean, Step size, Let be the covariance matrix.
[0046] 3. Two-stage strategy learning method
[0047] In this embodiment, the two-stage policy learning method combines morphological randomization pre-training with morphological search and fast fine-tuning. First, initial policy parameters with cross-morphological transfer capability are trained under multiple random morphological conditions. Then, the initial policy parameters are used as the starting point for fine-tuning candidate morphologies. The training is iterated for each candidate morphology to obtain evaluable control performance, and the optimal morphology and the final policy under the optimal morphology are output.
[0048] During the morphological randomization pre-training phase, the leg morphological vectors of the legged robot are independently and uniformly sampled within the feasible region at each round of reset. The single-step reward is decomposed into a velocity tracking term and a regularization term. Prior parameters are obtained through proximal policy optimization during the morphological randomization pre-training phase. Leg shape vector of legged robot Sampling results:
[0049] Single-step reward:
[0050] Near-end strategy optimization goals:
[0051] in, It is a uniform distribution on the morphological parameter space M. Let m be the joint probability distribution of the morphological parameter m. This represents the lower limit of the value of the i-th morphological parameter. This represents the upper limit of the value of the i-th morphological parameter. For single-step rewards, For speed tracking, For regularization terms, In order to expect a discount return, For the decision-making time domain, The state-action trajectory is generated by the interaction between the policy and the environment. This is the discount factor.
[0052] In this embodiment, the morphological randomization pre-training stage includes the following steps: S101: Initialize the parameters of the policy network and value network, and load the simulation environment, robot unified model, terrain curriculum and parallel environment configuration; S102: Whenever the environment round is reset, the shape vector of the current round is sampled independently in a uniform distribution on the shape feasible domain, each prism joint is driven to the target elongation position and locked, the leg length is kept unchanged, and the elongation ratio and scaling factor are calculated according to the current limb elongation, and the stiffness, damping, torque limit and velocity limit of the rotation joint are updated simultaneously. S103: In each decision step, the ontological perception state, the normalized morphological code, and the terrain height information obtained by airborne altitude scanning or equivalent perception are input into the policy network, and the policy network outputs the control quantity for each active rotation joint. S104: Collect trajectories by interacting with the environment, calculate rewards and advantage estimates based on single-step rewards, and update the policy network and value network according to the truncated agent objectives; S105: Update the terrain difficulty level according to the single-round progress performance in each parallel environment according to the course rules, and calculate the average difficulty level of all environments. S106: Repeat steps S102 to S105 until the preset convergence criterion is reached, and save the network parameters as prior parameters.
[0053] In the morphology search and fast fine-tuning stages, each candidate morphology is initialized with the prior parameters output from the morphology randomization pre-training stage. Proximal policy optimization is performed on the terrain variants, the prior parameters are fine-tuned, and the comprehensive fitness accumulated by the fine-tuning is calculated. The optimal morphology and the final policy under the optimal morphology are then output. Overall fitness is calculated as follows:
[0054] in, For overall fitness, For the first One candidate form These are the post-trained policy parameters corresponding to the i-th candidate form. The difficulty level of the terrain course. For average terrain course difficulty, For speed tracking reports, To score energy efficiency, The difficulty level of the terrain course. For speed tracking reward coefficient, This is the energy efficiency score coefficient.
[0055] In this embodiment, the morphology search and rapid fine-tuning stage includes the following steps: S201: Initialize the covariance matrix adaptive evolution strategy, place the mean of the search distribution at the geometric center of the morphological space or an initial value that is relatively safe in engineering, take the identity matrix as the covariance matrix and set the initial global step size. S202: Select multiple candidate shapes from the current search distribution and prune outbound components back to the boundary of the shape space; S203: For each candidate morphology, fix the morphology in the simulation, lock the leg length and actuator parameters, use the prior parameters as initial values, and perform proximal policy optimization (PPO) fine-tuning iterations on the terrain variant to obtain the fine-tuned estimated parameters. ; S204: Calculate the normalized components from the statistics accumulated during the fine-tuning process. And calculate the overall fitness based on the weighted relationship. ; S205: According to The covariance matrix adaptive evolution strategy CMA-ES is executed to update the mean vector, step size and covariance matrix of the next generation; S206: Repeat steps S202 to S205 until the maximum algebraic sum or convergence criterion is reached, and output the comprehensive fitness. The maximum optimal form and the final strategy under the optimal form.
[0056] In addition, the present invention also provides a system for co-optimizing the leg shape and motion strategy of a legged robot. The system uses the method for co-optimizing the leg shape and motion strategy of a legged robot provided by the present invention to co-optimize the leg shape and motion strategy of the legged robot, and outputs the optimal leg shape and the final strategy under the optimal leg shape.
[0057] In this embodiment, the system includes a parametric morphological modeling module, an actuator parameter consistent scaling module, a morphological randomization pre-training module, an outer morphological search and inner control fine-tuning module, and a composite terrain segmentation application module. 1) Parametric morphology modeling module: Introduces extendable limbs into the unified robot model and defines the feasible extension range; 2) Actuator parameter consistent scaling module, which synchronously adjusts control parameters after the limb length changes, in order to maintain the consistency of dynamic comparison under different forms. Control parameters include joint stiffness, damping, torque limit and velocity limit, etc. 3) Morphological randomization pre-training module, which trains under multiple random morphological conditions to obtain prior policies with cross-morphological transfer capabilities; 4) The outer morphology search and inner control fine-tuning module quickly evaluates candidate morphologies and updates the search distribution; 5) Composite terrain segmentation application module, which enables the corresponding preferred form and control strategy when multiple types of terrain appear in sequence.
[0058] Compared with the prior art, the method and system for co-optimizing leg morphology and motion strategy of legged robots provided in this invention have the following beneficial effects: 1. Addressing the issue that existing legged robots often employ fixed leg lengths, making it difficult to simultaneously meet the needs of navigating low, narrow terrain and overcoming obstacles in high-altitude, steep terrain, and resulting in a lack of adaptability across different terrains, this invention proposes a unified parametric retractable leg morphology modeling method. This method sets adjustable limb lengths within the same robot model. By introducing retractable limbs into the robot model and setting the extension amount as a target value during the reset phase, while simultaneously adjusting actuator parameters according to changes in limb length, different leg length states can operate within a unified dynamic framework. This allows the robot to continuously adjust its leg morphology around the target terrain, avoiding the need to rebuild a separate model for each morphology. This improves the comparability, feasibility, and adaptability to complex terrains of different morphology solutions.
[0059] 2. Existing morphology and control co-design methods often require retraining the control policy from scratch for each candidate morphology, resulting in high computational costs, long optimization cycles, and difficulty in large-scale searches. This invention proposes a two-stage policy learning method that combines morphology randomization pre-training with short-cycle fine-tuning of candidate morphologies. First, initial policy parameters with cross-morphology transfer capabilities are trained under multiple random morphological conditions. Then, this initial policy is used as the starting point for fine-tuning candidate morphologies, enabling each candidate morphology to achieve evaluable control performance with fewer training iterations. This invention significantly reduces the evaluation cost of candidate morphologies, shortens the co-optimization time, improves morphology search efficiency, and enhances the speed of policy adaptation under new morphologies.
[0060] 3. Existing morphology search and control optimization typically lack an efficient and unified closed-loop mechanism, making it difficult to stably obtain optimal morphologies that match the terrain while ensuring feasibility. This invention proposes a two-layer collaborative optimization mechanism combining outer-layer evolutionary search and inner-layer reinforcement learning optimization. The outer layer generates and updates candidate morphologies within the morphology parameter space, while the inner layer optimizes the control strategy given the morphology. It also feeds back a comprehensive evaluation result, including terrain passability, motion tracking performance, and energy consumption information, to the outer layer to guide subsequent searches. This invention achieves joint optimization of morphology and control without directly differentiating the complex training process, enabling stable selection of optimal morphologies and corresponding control strategies more suitable for the target terrain, thus improving the overall system performance.
[0061] The present invention will now be described in detail with reference to preferred embodiments.
[0062] In view of the fact that most existing legged robots adopt a fixed leg length structure, it is difficult to simultaneously meet the needs of passing through low and narrow terrain and the needs of overcoming obstacles in terrain with high drops and steep slopes, resulting in the difficulty of taking into account different terrains. The present invention provides a method and system for co-optimizing the leg shape and motion strategy of a legged robot. It has clear module boundaries and an engineering-implementable process structure, which can be directly embedded into the existing simulation design, control training and parameter calibration process of legged robots.
[0063] Example A: Mathematical form, learning optimization formula, and process steps of morphological-control collaborative optimization
[0064] The leg shape vector of the legged robot is denoted as... The strategy parameters are denoted as The terrain is recorded as The joint design of morphology and control can be written as a two-layer problem: maximizing the overall fitness in the outer layer and maximizing the expected cumulative return in the inner layer.
[0065] The inner layer employs Proximity Policy Optimization (PPO) to truncate the proxy target update strategy, in the form of:
[0066] in, For probability ratios, For generalized advantage estimation, For the cutoff radius; policy network and value network pair We perform gradient ascent and jointly optimize it with the value function regression term and entropy reward term.
[0067] outer layer in morphological space The above adopts the covariance matrix adaptive evolution strategy (CMA-ES), the first... Extract from the current search distribution Candidate forms:
[0068] Update the mean after sorting the candidates by fitness. Step length With covariance matrix The terrain employs a curriculum mechanism: each parallel environment has a difficulty level. The average difficulty of the entire environment is
[0069] This statistic is used to construct the fitness component related to geometric passability.
[0070] After setting the morphological parameters, for the first There are several retractable segments, with a base length of denoted as . Elongation is The reference elongation is Define the elongation ratio and the actuator scaling factor.
[0071] Rotational joint stiffness Damping Torque limiting according to Scaling, speed limit Scaling is used to ensure consistent dynamics across different leg lengths.
[0072] During the morphological randomization pre-training phase, each round of reset is performed on the feasible region. Independent uniform sampling:
[0073] The single-step reward is decomposed into a speed tracking term and a regularization term:
[0074] in It consists of an exponential kernel for tracking errors of linear velocity and angular velocity. Penalties are imposed on joint torques, accelerations, and irregular contact. The goal of PPO optimization is to achieve the expected discounted return.
[0075] Pre-training Minimize Obtain the prior parameters The process is as follows: Figure 2 As shown.
[0076] In the morphological search phase, for each candidate by Initialization, performed +K times of PPO fine-tuning on more difficult terrain variants to obtain... Instead of arranging separate evaluation rounds, the overall fitness is constructed by fine-tuning cumulative statistics.
[0077] in The normalized average terrain course difficulty in a parallel environment. Derived from the cumulative rewards related to speed tracking, The energy efficiency score is obtained by normalizing the joint torque penalty and then inverse mapping. Preferably take The item is designed to highlight the terrain.
[0078] The first sub-process, morphological randomization pre-training, executes the following steps sequentially, as follows: Figure 1 As shown.
[0079] Step 1: Initialize the parameters of the policy network and value network, and load the simulation environment, robot unified model, terrain curriculum, and parallel environment configuration.
[0080] The purpose of this step is to establish an optimizable starting point for subsequent simultaneous learning under various leg length conditions; by using the same network structure and optimizer settings as the formal fine-tuning, the transfer effect can be avoided due to inconsistencies between pre-training and subsequent stages.
[0081] Step 2, whenever the environment is reset, in the morphologically feasible region The morphological vector of this round is sampled independently using a uniform distribution. Drive each prism joint to the target elongation position and lock it, so that the leg length remains unchanged during this round; at the same time, according to The elongation ratio and scaling factor of the current limb segment are calculated, and the stiffness, damping, torque limit and speed limit of the rotating joint are updated synchronously according to the agreed rules.
[0082] This step is one of the core implementation points of this invention: its principle lies in completing "morphological writing-dynamic consistency maintenance" within the same set of robot assets and the same set of simulation event pipelines, so that different leg length samples generate data under a comparable control and dynamic framework; its direct effect is to avoid repeated modeling and parameter tuning for each candidate leg length, and to provide the policy network with pairwise comparable experience across morphologies, so that the priors learned later truly cover the entire Rather than a local optimum near a single leg length.
[0083] Step 3: In each decision step, the ontological perception state, the normalized morphological code, and the terrain height information obtained by airborne altitude scanning or equivalent perception are input into the strategy network. The strategy network outputs the control quantity for each active rotation joint. The telescopic joint is not used as a motion component and is only set at the round level in step 2.
[0084] The innovative significance of this step lies in decoupling "slow morphological changes" from "fast joint control": the principle is to reduce the dimension of the action space and avoid the strategy from learning high-frequency walking and low-frequency structural changes at the same time scale; the effect is that the training is more stable, and the strategy is less likely to collapse due to sudden changes in the action space when switching leg lengths during the fine-tuning stage, which is conducive to reflecting the prior cross-morphological transferability.
[0085] Step 4: Collect trajectory data by interacting with the environment, calculate the reward for each step according to the aforementioned decomposition method, and calculate... With advantage estimation, and based on the truncated agent objective Update strategies and value networks.
[0086] The purpose of this step is to simultaneously incorporate "whether it can track the desired motion" and "whether it is smooth, energy-saving, and has reasonable contact" into the optimization. The tracking term enables the robot to form usable forward and turning behaviors even with random leg lengths, while the regularization term suppresses excessive joint torques and violent movements, so that the prior strategy is not only "active" but also has the basic quality of being able to be transferred to other leg lengths for further fine-tuning.
[0087] Step 5: Update the terrain difficulty level according to the single-round progress performance in each parallel environment, as per the course rules. And statistically analyze the average difficulty level of the entire environment and other related quantities. .
[0088] The purpose of this step is to gradually increase the geometric difficulty, so that the pre-training data includes both stable segments on easy terrain and challenging segments on difficult terrain. Its effect is to provide a physical source for the terrain-related statistics in the subsequent comprehensive fitness, and to enable the prior policy to partially have the behavioral tendency to "progress to more difficult terrain" during the pre-training stage.
[0089] Step 6: Repeat steps 2 to 5 until the preset number of training steps, reward plateau, or other convergence criteria are reached, and save the network parameters as prior parameters. .
[0090] The purpose of this step is to solidify the experience of "cross-morphological randomization" into reusable initial values; combined with steps 2 to 4, its effect is to obtain a strategy representation that is compatible with various leg lengths, enabling the outer search to perform more efficient analysis on each candidate. Only allocate a limited fine-tuning budget Even at this time, meaningful fitness ranking and usable control policy output can still be obtained.
[0091] The second sub-process, morphology search and candidate evaluation, will be performed sequentially as follows (e.g.) Figure 1 ).
[0092] Step 1, Initialize CMA-ES: Place the mean of the search distribution at the geometric center of M or an engineering-safe initial value, take the identity matrix as the covariance matrix and set the initial global step size.
[0093] The purpose of this step is to establish an updatable Gaussian search model on a morphological continuous space. Since the gradient of fitness with respect to morphological variables is difficult to obtain directly analytically, adopting an evolutionary strategy that relies solely on fitness ranking can ensure that the interface between the outer and inner reinforcement learning layers is simple and robust.
[0094] Step 2, search the algebra pair algebra From the present N candidate morphological vectors in sampling Cut off out-of-bounds components back to the M boundary.
[0095] The purpose of this step is to balance global exploration and local refinement: large covariance and large step size in the early stage are conducive to covering the morphological space, while later updates gradually concentrate the sampling on the high fitness region; pruning ensures that the candidates always correspond to the range of manufacturable leg lengths.
[0096] Step 3, for each candidate (Can be executed in parallel if computing resources allow), fix this shape in the simulation, and use the writing and scaling rules in step 2 to lock the leg length and actuator parameters, based on prior parameters. As initial values, in more challenging terrain variations Execution After several iterations of PPO fine-tuning, we obtain... .
[0097] This step embodies the efficiency innovation of "priority plus short fine-tuning": the principle is to utilize... The pre-encoded multimorphic motion priors reduce the inner-layer solution from a "cold start" to a "small step correction"; the effect is that with a very small computational budget compared to full retraining, it can still provide distinguishable control quality for candidate morphologies, thus enabling the outer-layer search to evaluate a sufficient number of individuals within the engineering time.
[0098] Step 4: After step 3, instead of organizing a separate independent evaluation round, the normalized components are calculated directly from the statistics accumulated during the fine-tuning process. And obtained according to the weighted relationship .
[0099] This step is a key aspect of the evaluation mechanism in this invention: the principle is to combine "strategy approximation optimality" and "fitness reading" into the same fine-tuning process, avoiding repeated long-term iterations for each individual; the effect is to significantly reduce the cost of outer-layer ranking and reduce random fluctuations caused by insufficient evaluation samples, enabling CMA-ES to obtain a more stable ranking signal.
[0100] Step 5, according to Performing the CMA-ES update yields the next generation's mean vector, step size, and covariance matrix. .
[0101] The purpose of this step is to adjust the search direction and shape based on the feedback from the actual fitness distribution; when certain leg length regions continue to obtain high fitness, the distribution will shrink towards that region, thereby accelerating the convergence to a shape zone that matches the target terrain geometry.
[0102] Step 6: Repeat steps 2 through 5 until the maximum algebraic convergence criterion is reached, and output the result that... The largest And corresponding strategies.
[0103] The purpose of this step is to provide paired results of "terrain-specific optimized leg length + matching controller" for subsequent deployment or complex terrain experiments; the effect is to provide a clear numerical solution in an interpretable morphological space, which is convenient for comparison with a fixed leg length baseline and for travel calibration on a physical platform.
[0104] In practical engineering, sub-process one can be completed first to obtain... Then, for each target terrain or terrain family, repeat sub-process two to obtain their respective optimal form. With strategy; the search targets can also be updated in rotation on multi-terrain missions, simply by switching in step 3. With course configuration. The inputs for the entire process are shape boundaries, simulation and terrain configuration, and calculation budget. The output includes weight coefficients; the output consists of optimized morphological parameters and control network parameters, and optionally, training curves and fitness records can be exported for acceptance and comparison.
[0105] Example B: Pre-training and Fine-tuning Control Experiment
[0106] like Figure 3 As shown, the first row shows the performance of the Go2 robot in three tasks: crawling, walking on rough ground, and climbing stairs. The second row shows the performance of the Ant robot in three tasks: traversing narrow paths, walking on rough ground, and climbing slopes.
[0107] To verify the impact of prior quality on subsequent fine-tuning, a control experiment was conducted on six "platform-terrain" combinations.
[0108] Step 1: Under the premise of the same simulation environment, the same network structure and the same optimizer hyperparameters, construct three training pipelines for group A, group B and group C respectively.
[0109] Step 2, Group A first obtains the morphological randomization pre-training sub-process according to Example A. Then, only execute on the target's leg length and the target terrain. Step-by-step fine-tuning; Group B, after obtaining initial values through pre-training only on a single default pattern, also performs the same process. Step-by-step fine-tuning; Group C does not undergo pre-training, but trains from random initialization, with a total number of iterations. (Go2 robot retrieves) Ant-shaped robot ).
[0110] Step 3: Record the average round return at a fixed frequency throughout the fine-tuning process to form a curve that changes with iteration.
[0111] Step 4: Record or capture representative motion footage under the same leg length display configuration to qualitatively observe whether the gait is stable and whether there are falls or violent shaking.
[0112] In the above steps, step 2 directly examines the innovation of "morphological randomization pre-training": its principle is that the prior of group A covers a certain morphology in a distributional sense, while the prior of group B is limited to a single point; the effect is that group A can still maintain a high fine-tuning reward and a smoother curve on candidates that deviate from the default leg length, while group B often shows transfer degradation when it is far away from the pre-trained morphology, and group C is still difficult to catch up with group A as a whole even after three times the iteration, thus supporting the necessity of the prior design with experimental data.
[0113] Example C: Morphological switching in composite sequential terrain
[0114] like Figure 4 and Figure 5 As shown, to verify the performance advantage of "segmented activation of preferred form" over "fixed leg length throughout", a composite terrain scene consisting of two sequentially connected segments was constructed and implemented according to the following steps.
[0115] Step 1: Following the procedures in Examples A and B, independently solve for the optimal form of the terrain in the front and rear sections respectively. and the corresponding fine-tuned strategy parameters .
[0116] Step 2, constructing a complex terrain environment: For the Go2 robot, a combination of "circular low passage + steep slope climbing" is used, with each sub-terrain segment being 12 m long; for the ant-shaped robot, a combination of "narrow passage + slope walking" is used, with each segment being 8 m long.
[0117] Step 3, set up four comparison strategies: (1) short leg fixed; (2) medium leg fixed; (3) long leg fixed; (4) adaptive switching strategy: use in the front end The corresponding strategy operates by adjusting the leg length externally when the geometric boundary of the later stage is detected or the preset mileage threshold is reached. And switch to the corresponding strategy simultaneously. .
[0118] Step 4: Repeat the experiment multiple times under the same random seed conditions, record the maximum forward travel distance and the overall fitness range, and collect process image sequences.
[0119] In this embodiment, step 3 embodies the engineering application of "terrain-specific morphology - control of collaborative optimization results". Its basic principle is that: the geometric constraints of different sub-terrain segments conflict, and a single fixed leg length is difficult to take into account at the same time, which will inevitably lead to a significant decrease in performance in a certain sub-segment; while segmented switching morphology can be specifically adapted to local constraints.
[0120] Experimental results show that the adaptive switching strategy outperforms various fixed-leg-length baseline strategies in both maximum travel distance and overall fitness. Qualitatively, the robot can pass through confined spaces in a compact posture at the front and then switch to a large-span form to complete the climb at the rear, or pass through narrow passages first and then walk on stable slopes, forming a continuous and efficient sequence of motion behaviors.
[0121] Compared with existing solutions that only optimize the controller on a fixed robot body, the technical advantages of this invention are mainly reflected in the following aspects: First, this invention no longer treats the robot's shape as an immutable constant, but instead incorporates it into the design process as an optimizable variable of equal importance to the control strategy. This allows the system to simultaneously weigh various constraints such as "passing through low and narrow passages", "crossing large height differences", "stable support for irregular terrain", and "energy-constrained operation".
[0122] Second, the present invention adopts a unified robot model instead of building an independent model for each candidate form, thus avoiding the problems of repeated modeling, repeated parameter tuning and repeated verification of dynamic configuration during the search process, and significantly improving the efficiency of candidate scheme generation and screening.
[0123] Third, this invention employs a two-layer collaborative structure combining evolutionary search and reinforcement learning fine-tuning, which does not require direct differentiation of the complex inner-layer training process, thus better aligning with the engineering characteristics of black-box optimization for complex robotic systems. Fourth, this invention integrates morphological changes, control training, and performance evaluation into the same data loop, enabling the acquisition of more targeted optimal morphological and strategy combinations for the target terrain within a limited computational budget.
[0124] In terms of platform adaptability, the present invention has been simulated and verified on two types of legged robots with different kinematic structures, indicating that the technical solution of the present invention is not limited to a single platform.
[0125] Taking the quadruped robot Go2 as an example, each leg includes three rotational degrees of freedom: hip abduction / adduction, thigh flexion / extension, and lower leg flexion / extension. Additionally, thigh and lower leg extension / extension are introduced. The basic length of the thigh is 0.138m, corresponding to an extension range of 0 to 0.15m, and the basic length of the lower leg is 0.163m, corresponding to an extension range of 0 to 0.10m.
[0126] Taking the Ant platform as an example, each limb includes two main rotational degrees of freedom: the proximal limb segment and the distal limb segment, and additionally introduces the extension and contraction of the leg segment and the foot segment; among them, the basic length of the proximal leg segment is 0.283m, corresponding to an extension range of 0 to 0.20m, and the basic length of the distal foot segment is 0.566m, corresponding to an extension range of 0 to 0.40m.
[0127] The above results show that the present invention is applicable not only to standard quadruped platforms, but also to general-purpose legged platforms with more abstract structures and different degrees of freedom configurations.
[0128] In terms of control implementation, this invention treats the retractable joints as morphological setting variables rather than real-time motion variables. Specifically, the target morphology is set at the beginning of each training round, and the corresponding retractable joints are locked within that round; the controller only outputs motion commands to the rotational joints. This approach effectively reduces the dimension of the motion space, avoiding the optimization difficulties caused by simultaneously handling fast control and slow structural deformation on the same time scale. Simultaneously, this invention scales the actuator parameters proportionally based on changes in limb length, ensuring that morphological changes do not directly disrupt the controller's original dynamic stability range, thereby improving the comparability of training between different candidate morphologies and the feasibility of deployment.
[0129] In terms of performance metrics, after each candidate morphology undergoes K PPO fine-tunings, the overall fitness is constructed from the cumulative statistics of the fine-tuning. : in, The normalized average terrain course difficulty in a parallel environment. This information was obtained from statistics related to speed tracking rewards. After normalization by joint torque penalty, the energy efficiency score is mapped, with all three terms normalized to [0,1]. = 0.5.
[0130] For each type of terrain, after optimizing the leg length using the CMA-ES algorithm, the resulting combination of thigh length (morphological parameter 1) and calf length (morphological parameter 2) parameters is shown in Table 1.
[0131] The composite sequential terrain consists of two connected segments: Go2 employs a "circular low-lying passage + steep slope climbing" approach, with each segment being 12 m long; Ant employs a "narrow passage + slope walking" approach, with each segment being 8 m long. Comparison strategies included: fixed short-legged, fixed medium-legged, fixed long-legged, and an adaptive-switch strategy that switches to the preferred form at segment boundaries. Evaluation metrics were the maximum forward travel distance and overall fitness (mean ± standard deviation), as shown in Table 2.
[0132] In the complex terrain experiment, the adaptive switching strategy achieved a forward travel distance of 35.2 ± 1.6 m on the Go2 platform, with an overall fitness of approximately 0.52 ± 0.02, significantly outperforming the short / medium / long fixed strategies (19.4 ± 2.1 m, 23.8 ± 1.8 m, and 21.1 ± 1.9 m and their corresponding fitness ranges, respectively). On the Ant platform, the adaptive switching strategy achieved a forward travel distance of 27.4 ± 1.3 m, with an overall fitness of approximately 0.61 ± 0.02, also outperforming the fixed strategies (12.6 ± 1.9 m, 18.9 ± 1.5 m, and 14.8 ± 1.7 m and their corresponding fitness ranges).
[0133] Table 1. Combinations of morphological parameters of the robot optimized under different environments.
[0134] Table 2 Comparison of performance of different morphologies under composite terrain
[0135] From a research and development perspective, this invention can be used as a "digital prototype co-optimization tool" in legged robot product design. In the early stages of product development, a representative terrain set can be pre-constructed based on the target task scenario. This invention allows for the rapid selection of suitable leg length ranges, optimization of morphological parameters, and corresponding control strategies, thereby reducing the cost of repeated trial and error relying on real prototypes. For robot platforms already equipped with retractable leg mechanisms, this invention can be directly used as an offline design tool for morphological parameter calibration and controller initialization. For platforms that do not yet possess active deformation capabilities, this invention can also serve as a reference for modular leg length selection, joint stroke design, and actuator capability matching.
[0136] In terms of application scenarios, this invention is applicable to post-disaster rubble search and rescue, mine and tunnel inspection, mountain transportation, field surveying, inspection of complex warehouse passages, and other mobile robot tasks with significant terrain changes. Especially in complex task chains such as "low-lying passages—rubble obstacles—slope climbing," this invention can serve as an intermediate morphology configuration layer between high-level task planning and low-level motion control, enabling more suitable leg morphology and control strategies based on pre-identified terrain types, thereby improving task success rate and equipment utilization.
[0137] At the engineering implementation level, this invention exhibits good scalability. Although existing experiments primarily verified two morphological parameters—thigh and lower leg lengths—this method can also be extended to more structural parameters, such as torso width, foot end structure dimensions, joint mounting positions, and passive compliant element parameters. For actual product deployment, manufacturing constraints, durability constraints, and safety constraints can be imposed on the search space by combining the structural strength of the physical platform, the rated output of the actuators, sensor placement, and safety interlock logic. This allows the optimal form and control scheme output by this invention to more directly serve the development of real robot systems.
[0138] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A method for co-optimizing leg morphology and motion strategy of a legged robot, characterized in that, The method includes: A unified parametric retractable leg morphology modeling method is adopted. Adjustable limb lengths are set in the same robot model. During the reset phase, the elongation is set as the target value, and the relevant parameters of the actuator are adjusted according to the changes in limb length, so that different leg length states can operate under a unified dynamic framework. The two-layer collaborative optimization mechanism combines outer-layer evolutionary search with inner-layer reinforcement learning optimization. The outer layer generates and updates candidate forms in the morphological parameter space, while the inner layer optimizes the control strategy under a given form and feeds back the comprehensive evaluation results composed of terrain passability, motion tracking performance and energy consumption information to the outer layer to guide subsequent searches. A two-stage policy learning method combining morphological randomization pre-training with morphological search and fast fine-tuning is proposed. First, initial policy parameters with cross-morphological transfer capability are obtained by training under multiple random morphological conditions. Then, the initial policy parameters are used as the starting point for fine-tuning candidate morphologies. The method iterates the training for each candidate morphology to obtain evaluable control performance and outputs the optimal morphology and the final policy under the optimal morphology.
2. The method for co-optimizing leg morphology and motion strategy of a legged robot as described in claim 1, in the parametric retractable leg morphology modeling method, introduces retractable limbs into the unified robot model and defines the extension range of the retractable limbs. Through co-optimization of leg morphology and control strategy, it maximizes the overall fitness and the expected cumulative reward. in, This is the shape vector of the leg of a legged robot. For strategy parameters, In morphological space Internal fitness The largest and most optimal leg shape. For a given form Lowering the expected return The largest optimal policy parameter, For the strategy parameters Representation control strategy For the comprehensive fitness function, Let be the expected return function of the strategy under given shape and terrain conditions. For the terrain, It is a morphological space.
3. The method for co-optimizing leg morphology and motion strategy of a legged robot as described in claim 2, wherein in the two-layer co-optimization mechanism, the inner layer adopts proximal strategy optimization to truncate the agent target update strategy. The policy network and value network perform gradient ascent on the truncated agent target and jointly optimize it with the value function regression term and entropy reward term to maximize the expected cumulative return. in, For strategy parameters The truncated proxy target, To calculate the expectation at time step t, This is a truncation function. For probability ratios, For generalized advantage estimation, For the cutoff radius, The action to be performed at time step t. For the state at time step t, The old strategy before the update. This is the time step index in the sampled trajectory.
4. The method for collaborative optimization of leg morphology and motion strategy of a legged robot as described in claim 3, wherein in the two-layer collaborative optimization mechanism, the outer layer adopts a covariance matrix adaptive evolution strategy in the morphology space, extracts multiple candidate morphologies from the current search distribution, and updates the candidate morphologies according to the optimization results of the inner layer. in, For the first The generation One candidate form It follows a normal distribution. The mean, Step size, Let be the covariance matrix.
5. The method for co-optimizing leg morphology and motion strategy of a legged robot as described in claim 4, wherein during the morphology randomization pre-training stage, the leg morphology vector of the legged robot is independently and uniformly sampled in the feasible region at each round of reset, and the single-step reward is decomposed into a velocity tracking term and a regularization term, and the prior parameters are obtained through proximal policy optimization during the morphology randomization pre-training stage. Leg shape vector of legged robot Sampling results: Single-step reward: Near-end strategy optimization goals: in, It is a uniform distribution on the morphological parameter space M. Let m be the joint probability distribution of the morphological parameter m. This represents the lower limit of the value of the i-th morphological parameter. This represents the upper limit of the value of the i-th morphological parameter. For single-step rewards, For speed tracking, For regularization terms, In order to expect a discount return, For the decision-making time domain, The state-action trajectory is generated by the interaction between the policy and the environment. This is the discount factor.
6. The method for co-optimizing leg morphology and motion strategy of a legged robot as described in claim 5, wherein the morphology randomization pre-training stage includes the following steps: S101: Initialize the parameters of the policy network and value network, and load the simulation environment, robot unified model, terrain curriculum and parallel environment configuration; S102: Whenever the environment round is reset, the shape vector of the current round is sampled independently in a uniform distribution on the shape feasible domain, each prism joint is driven to the target elongation position and locked, the leg length is kept unchanged, and the elongation ratio and scaling factor are calculated according to the current limb elongation, and the stiffness, damping, torque limit and velocity limit of the rotation joint are updated simultaneously. S103: In each decision step, the ontological perception state, the normalized morphological code, and the terrain height information obtained by airborne altitude scanning or equivalent perception are input into the policy network, and the policy network outputs the control quantity for each active rotation joint. S104: Collect trajectories by interacting with the environment, calculate rewards and advantage estimates based on single-step rewards, and update the policy network and the value network according to the truncated agent objective; S105: Update the terrain difficulty level according to the single-round progress performance in each parallel environment according to the course rules, and calculate the average difficulty level of all environments. S106: Repeat steps S102 to S105 until the preset convergence criterion is reached, and save the network parameters as prior parameters.
7. The method for co-optimizing leg morphology and motion strategy of a legged robot as described in claim 6, wherein in the morphology search and rapid fine-tuning stage, each candidate morphology is initialized with the prior parameters output from the morphology randomization pre-training stage, proximal policy optimization is performed on terrain variants, the prior parameters are fine-tuned, and the comprehensive fitness accumulated by the fine-tuning is calculated, and the optimal morphology and the final strategy under the optimal morphology are output. The overall fitness is calculated in the following manner: in, For overall fitness, For the first One candidate form These are the post-trained policy parameters corresponding to the i-th candidate form. The difficulty level of the terrain course. For average terrain course difficulty, For speed tracking reports, To score energy efficiency, The difficulty level of the terrain course. For speed tracking reward coefficient, This is the energy efficiency score coefficient.
8. The method for co-optimizing leg morphology and motion strategy of a legged robot as described in claim 7, wherein the morphology search and rapid fine-tuning stage includes the following steps: S201: Initialize the covariance matrix adaptive evolution strategy, place the mean of the search distribution at the geometric center of the morphological space or an initial value that is relatively safe in engineering, take the identity matrix as the covariance matrix and set the initial global step size. S202: Select multiple candidate shapes from the current search distribution and prune outbound components back to the boundary of the shape space; S203: For each candidate morphology, fix the morphology in the simulation, lock the leg length and actuator parameters, and use the prior parameters as initial values to perform proximal policy optimization (PPO) fine-tuning iterations on the terrain variant to obtain the fine-tuned estimated parameters. ; S204: Calculate the normalized components from the statistics accumulated during the fine-tuning process. And calculate the overall fitness based on the weighted relationship. ; S205: According to The covariance matrix adaptive evolution strategy CMA-ES is executed to update the mean vector, step size and covariance matrix of the next generation; S206: Repeat steps S202 to S205 until the maximum algebraic sum or convergence criterion is reached, and output the comprehensive fitness. The maximum optimal form and the final strategy under the optimal form.
9. A system for collaborative optimization of leg morphology and motion strategy in a legged robot, characterized in that, The system utilizes the collaborative optimization method for leg morphology and motion strategy of a legged robot as described in any one of claims 1-8 to collaboratively optimize the leg morphology and motion strategy of the legged robot, and outputs the optimal leg morphology of the legged robot and the final strategy under the optimal morphology.
10. The leg morphology and motion strategy collaborative optimization system for a legged robot as described in claim 9, wherein the system comprises a parametric morphology modeling module, an actuator parameter consistent scaling module, a morphology randomization pre-training module, an outer morphology search and inner control fine-tuning module, and a composite terrain segmentation application module, wherein, The parametric morphology modeling module introduces retractable limbs into the unified robot model and defines the feasible extension range. The actuator parameter consistent scaling module synchronously adjusts the control parameters after the limb length changes in order to maintain the consistency of dynamic comparison under different forms. The control parameters include joint stiffness, damping, torque limiting and velocity limiting, etc. The morphological randomization pre-training module is trained under multiple random morphological conditions to obtain a prior policy with cross-morphological transfer capability. The outer morphology search and inner control fine-tuning module quickly evaluates candidate morphologies and updates the search distribution. The composite terrain segmentation application module activates the corresponding preferred form and control strategy when multiple types of terrain appear in sequence.