Quadruped robot and control method of joint module of quadruped robot
By constructing a local terrain height map and using a reinforcement learning module to correct joint torque commands, the problem of mismatch between joint control commands and actual terrain requirements caused by the lack of local terrain perception in existing technologies is solved, thereby improving the motion stability and reliability of quadruped robots.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-18
- Publication Date
- 2026-04-21
AI Technical Summary
The specific problem that the existing technology has failed to effectively solve is how to control the joint module in complex terrain. The existing technology has failed to effectively perceive the height undulation characteristics of the local terrain, resulting in a mismatch between the joint control commands and the actual terrain requirements. This leads to a chain of problems such as the robot's feet slipping, sudden changes in joint force, and gait instability, which reduces the control accuracy and reliable operation capability of the joint module.
By acquiring the robot's current body pose, 3D terrain point cloud data, and motion state, a local terrain height map is constructed to determine the terrain height of the expected contact point at the foot. Combined with a reinforcement learning module, joint torque commands are corrected to achieve precise planning and control of joint trajectories.
It improves the control precision and response speed of the joint module, reduces wear on joint components, and ensures the robot's motion stability and reliable operation in unstructured terrain.
Smart Images

Figure CN121900451A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and in particular to a control method for a quadruped robot and its joint module. Background Technology
[0002] Quadruped robots, with their excellent terrain adaptability, have broad application prospects in complex scenarios such as disaster relief, field exploration, and military reconnaissance. As the core component for the motion execution of quadruped robots, the joint module's control precision and response speed directly determine the robot's motion stability and mobility in different terrains. Therefore, the rationality of joint module control is crucial to the robot's adaptability to complex terrains.
[0003] Currently, most control methods for quadruped robot joint modules rely on preset gait strategies, simplified terrain assumptions, or feedback controllers with fixed parameters. These methods can achieve basic motion functions in flat or structured environments. However, when faced with unstructured, complex, and undulating terrain, existing methods fail to adequately perceive the height variations in local terrain, making it impossible to predict the impact of sudden terrain changes on the joint module. This results in a mismatch between the generated joint module control commands and the actual terrain requirements, leading to a chain reaction of problems such as the robot's feet slipping, sudden changes in joint force, and gait instability. This not only reduces the control accuracy of the joint module and accelerates the wear of joint components, but can also cause the robot to tip over in severe cases, ultimately limiting the robot's reliable operation in unstructured terrain. Summary of the Invention
[0004] This invention provides a control method for a quadruped robot and its joint module, which solves the core problem of mismatch between joint control commands and actual terrain requirements due to insufficient perception of local terrain. It avoids chain problems such as foot slippage, sudden changes in joint force, and gait instability, improves the control accuracy and response speed of the joint module, reduces wear on joint components, and ensures the robot's motion stability and reliable operation in unstructured terrain.
[0005] In a first aspect, the present invention provides a control method for a quadruped robot joint module, comprising: The robot's current body pose, the 3D point cloud data of the terrain in the current direction of movement, and the current motion state are obtained. Based on the 3D point cloud data, a local terrain height map with the current body pose as the origin is constructed. Based on the local terrain height map and the current planned landing area of each of the robot's feet, the local terrain height at the expected contact point of each foot in the next support phase is determined. Based on the local terrain height of each foot end, the current operating state, and the current height of the robot's center of mass, the target joint trajectory to be executed by each joint module in the swing phase is determined. Based on the target joint trajectory and the current joint angle of each joint module, the joint torque command is corrected by combining the current running state and the pre-built reinforcement learning module to obtain the target torque control command of each joint module.
[0006] In a second aspect, the present invention also provides a quadruped robot, applied to a control method for a quadruped robot joint module as described in the first aspect; the quadruped robot includes: The state perception and terrain map construction module is used to acquire the robot's current body pose, the three-dimensional point cloud data of the terrain in the current direction of movement, and the current motion state, and to construct a local terrain height map with the current body pose as the origin based on the three-dimensional point cloud data. The terrain height determination module is used to determine the local terrain height at the expected contact point of each foot in the next support phase based on the local terrain height map and the position of the currently planned landing area of each foot of the robot. The trajectory generation module is used to determine the target joint trajectory to be executed by each joint module in the swing phase based on the local terrain height of each foot end, the current operating state, and the current center of mass height of the robot. The joint torque command correction module is used to correct the joint torque command based on the target joint trajectory and the current joint angle of each joint module, combined with the current running state and the pre-built reinforcement learning module, so as to obtain the target torque control command of each joint module.
[0007] Thirdly, the present invention also provides an electronic device, comprising: a memory for storing computer software programs; and a processor for reading and executing the computer software programs, thereby implementing the control method for the quadruped robot joint module as described above.
[0008] Fourthly, the present invention also provides a non-transitory computer-readable storage medium storing a computer software program, which, when executed by a processor, implements the control method for the quadruped robot joint module as described above.
[0009] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the control method for the quadruped robot joint module as described above.
[0010] The control method for the quadruped robot joint module provided in this embodiment of the invention constructs a local terrain height map with the current robot pose as the origin by using 3D point cloud data of the terrain in the current forward direction. This results in a basic data model that accurately represents the local terrain height undulations around the robot. Based on this basic data model and the position of the planned landing area of each foot, the local terrain height at the expected contact point of each foot in the next support phase is determined, achieving accurate prediction of the terrain height at the foot landing point. Then, by combining the local terrain height of each foot with the current operating state and the current center of mass height of the robot, the target joint trajectory to be executed by each joint module in the swing phase is determined, enabling... Joint trajectory planning can adapt to local terrain undulations, avoiding trajectory mismatch with actual terrain caused by lack of terrain perception. Finally, based on the target joint trajectory and the current joint angle of each joint module, combined with the current operating state and pre-built reinforcement learning module, the joint torque command is corrected and the target torque control command is obtained. This achieves dynamic optimization and precise calibration of joint control commands, ultimately solving the core problem of mismatch between joint control commands and actual terrain requirements due to insufficient perception of local terrain. It effectively avoids chain problems such as foot slippage, sudden changes in joint force, and gait instability, improves the control accuracy and response speed of joint modules, reduces wear on joint components, and ensures the robot's motion stability and reliable operation capability in unstructured terrain. Attached Figure Description
[0011] Figure 1 This is a flowchart illustrating the control method for a quadruped robot joint module provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the quadruped robot provided in an embodiment of the present invention; Figure 3 An embodiment diagram of the electronic device provided in this invention; Figure 4 An embodiment diagram of a computer-readable storage medium provided in accordance with the present invention. Detailed Implementation
[0012] 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.
[0013] In the description of this invention, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.
[0014] See Figure 1 , Figure 1 This is a flowchart illustrating the control method for a quadruped robot joint module provided by the present invention. In this embodiment, the execution subject of the control method for the quadruped robot joint module is a quadruped robot. Therefore, the control method for the quadruped robot joint module includes: Step 10: Obtain the robot's current body pose, the 3D point cloud data of the terrain in the current forward direction, and the current motion state. Based on the 3D point cloud data, construct a local terrain height map with the current body pose as the origin.
[0015] Optionally, the quadruped robot acquires its current pose using an inertial measurement unit (IMU) and odometry, collects 3D terrain point cloud data along its current direction of travel using a depth camera, and gathers its current motion state using a motion controller and motor drivers. The current pose includes the robot's 3D position coordinates (…). Aircraft pitch angle (Rotation angle around the transverse axis of the fuselage, positive for front end lifting and negative for rear end lifting), fuselage roll angle (Rotation angle around the longitudinal axis of the robot body, with leftward lifting being positive and rightward lifting being negative), etc.; 3D point cloud data is a set of 3D spatial coordinates of a large number of discrete points on the terrain surface obtained by calculating the reflection of laser beams or infrared beams emitted by the depth camera after reflection from the terrain surface. The acquisition range is an area with a preset distance L (e.g., 2m) and a preset width W (e.g., 1.5m) in front of the robot, and the output data is a set of 3D point cloud coordinates of the terrain within this area. ,in The total number of point cloud data; the current motion state includes the robot's forward speed. (Linear velocity along the direction of travel), forward acceleration (Linear acceleration along the direction of travel); robot gait phase (The range of values is) (0 represents the start of the swing phase, 0.5 represents the middle of the swing phase, and 1 represents the start of the support phase); the current joint angle of each joint module. , This refers to the total number of robot joint modules; the joint angle is defined as the angle between the joint link and the body's reference axis (clockwise is positive, counterclockwise is negative); and the phase current amplitude of each joint drive motor. , These correspond to the motors respectively. Three-phase current amplitude).
[0016] Furthermore, after obtaining the 3D point cloud data, the quadruped robot will acquire the 3D position coordinates in the robot's current pose. Set as the origin of the local coordinate system and with the robot's forward direction as the local coordinate system The positive axis is defined in a local coordinate system with the left side of the robot body as the coordinate system. The positive axis, with a local coordinate system perpendicular to the ground and pointing upwards. The positive axis represents the set of 3D point cloud coordinates in the global coordinate system acquired by the depth camera. The transformation formula for switching to a local coordinate system is as follows: ; in, For the first The coordinates of a point cloud data in a local coordinate system For the roll angle of the aircraft, This represents the aircraft's pitch angle. Then, the local coordinate system... The plane is designed according to the preset grid size. The grid is divided into multiple grid cells at a depth of 0.05m. ,in for Grid number in the axial direction, for The grid number along the axis. For each grid cell. The calculated point cloud data within the grid will be used to... The average value of the axis coordinates is used as the terrain height value corresponding to that grid cell. Finally, the terrain height values of all grid cells are calculated. Arranged according to grid number, a local terrain height map with the current machine pose as the origin is constructed. ,in for Total number of grid cells in the axial direction for Total number of grid cells in the axial direction.
[0017] In one embodiment, taking a quadruped robot as an example, the robot is equipped with a six-axis inertial measurement unit, a wheeled odometry system, a binocular depth camera, and 12 joint modules (3 joints per leg).
[0018] The inertial measurement unit and odometry acquire the robot's current body pose, including three-dimensional position coordinates. Aircraft pitch angle (The front end is slightly raised), the roll angle of the aircraft. (The right side is slightly raised). The binocular depth camera captures data from the front along the robot's direction of travel. width The terrain of the region is output as a set of three-dimensional point cloud data. It contains 10,000 point cloud coordinate data. The motion controller and motor driver acquire the robot's current motion state, including its forward speed. Forward acceleration ; Gait phase (In the early stage of the swing phase), the current joint angles of the 12 joint modules Phase current amplitude of each joint drive motor
[0019] Based on the collected data, the origin of the local coordinate system is first set as... The direction of travel is On the positive axis, the left side of the fuselage is The positive direction of the axis is perpendicular to the ground and upwards. Positive axis direction. Based on the coordinate transformation formula, the global point cloud coordinates... Transform to local coordinate system and substitute The local coordinates are calculated. According to grid size For local coordinate system The plane is divided into grids to obtain... grid cells ( Then, for the grid cells... Statistical analysis of 50 point cloud data within this grid The average value of the axis coordinates is calculated as follows: That is, the terrain height value of the grid. Finally, all of them Arrange the height values of each raster cell to generate a local terrain height map. Ultimately, this height map clearly reflects the front of the robot. The terrain undulations within the area, such as the presence of a depth point of 0. The recessed area and a height of The raised area.
[0020] Step 20: Based on the local terrain height map and the current planned landing area of each foot of the robot, determine the local terrain height at the expected contact point of each foot in the next support phase.
[0021] Optionally, after obtaining the local terrain height map, the quadruped robot first plans its gait according to preset gait rules, combined with the robot's current forward speed. and gait phase The current planned landing area of each leg's foot in the local coordinate system is planned. ( These correspond to the robot's left front leg, right front leg, left hind leg, and right hind leg, respectively. And this landing area... Local coordinate system A rectangular region in the plane, whose positional parameters include the coordinates of the region's center. and area size ,in To settle in the area along Length in the axial direction, The width of the landing area along the axial direction.
[0022] Furthermore, after determining the location of the planned landing area for each of the quadruped robots, the robot then... Extract the local topographic elevation map of this area. All corresponding raster cells And calculate the landing area. Terrain height values of all grid cells within variance The formula for calculating its variance is: ;in, To settle in the area The number of grid cells within. To settle in the area The average terrain height values of all raster cells within the raster. And based on variance... The size determines the flatness of the terrain in the landing area: if ( If a preset flatness threshold is set (e.g., 0.001 square meters), the terrain of the landing area is determined to be flat, and the center coordinates of the landing area are selected. The corresponding grid cell terrain height value is used as the terrain height of the expected contact point at the foot; if If the terrain of the landing area is undulating, the grid cell coordinates corresponding to the terrain height value that is closest to the robot's current center of mass height are selected as the expected contact point of the foot. Finally, for the selected expected contact point on the foot... In the local topographic elevation map Find the grid cell corresponding to the point in the middle. Extract the terrain height value of the grid cell. It was determined to be the first The local terrain height at the expected contact point of each foot in the next support phase. .
[0023] Continuing with the above embodiment, the parameters of the planned landing areas for the robot's four legs are as follows: Left foreleg landing area : Center coordinates Area size , The area where the right foreleg lands. : Center coordinates Area size , The area where the left hind leg lands. : Center coordinates Area size , The area where the right hind leg lands. : Center coordinates Area size , Preset flatness threshold Next, extract the area where the left foreleg lands. The corresponding grid cell contains 16 grid cells, and the average terrain height value is calculated. ,variance If the terrain is flat, then the area is considered to be flat.
[0024] Extract the landing area of the right foreleg The corresponding grid cell contains 16 grid cells, and the average terrain height value is calculated. ,variance If so, it can be determined that the terrain of the area is undulating.
[0025] Therefore, based on the fact that the terrain in the area where the left foreleg lands is flat, the center coordinates are selected. Corresponding grid cell terrain height value Determine the local terrain height of the expected contact point at the end of the left forefoot. The terrain where the robot's right foreleg lands is undulating; the robot's current center of gravity height is... Find the terrain height value closest within the landing area. The grid cell, whose coordinates are The corresponding terrain height value Determine the local terrain height of the expected contact point at the tip of the right forefoot. Similarly, the local terrain height at the expected contact point of the left hind leg foot was calculated. The local terrain height at the expected contact point of the right hind leg foot .
[0026] Step 30: Based on the local terrain height of each foot end, the current operating state, and the current height of the robot's center of mass, determine the target joint trajectory to be executed by each joint module in the swing phase.
[0027] Optionally, after obtaining the local terrain height of each leg, the quadruped robot combines it with its current operating state and the robot's current center of mass height to determine the target joint trajectory to be executed by each joint module in the swing phase, thereby providing trajectory basis for the generation of joint torque commands, as described in steps 301-306. The robot's current center of mass height is calculated from the robot's pose data collected by the inertial measurement unit combined with the robot's structural parameters (length of each link, joint position) to obtain the three-dimensional coordinates of the robot's current center of mass. ) Determined, that is This represents the current height of the robot's center of gravity.
[0028] Step 40: Based on the target joint trajectory and the current joint angle of each joint module, and combined with the current running status and the pre-built reinforcement learning module, the joint torque command is corrected to obtain the target torque control command of each joint module.
[0029] Optionally, after determining the target joint trajectory for each joint module, the quadruped robot, based on the acquired current joint angles and current operating states of each joint module, and in conjunction with a pre-built reinforcement learning module, corrects the joint torque commands to generate target torque control commands for each joint module, achieving high-precision control of the joint modules, as described in steps 401-405. The reinforcement learning module is essentially a policy guidance signal source. Its training process is based on the robot's motion data in complex terrain, using the robot's motion stability (including foot slip rate, joint force fluctuation amplitude, and body tilt rate) as the reward function, and training a policy network through a proximal policy optimization (PPO) algorithm. The robot's current motion state parameters (velocity, acceleration, gait phase, motor phase current amplitude) and target joint trajectory parameters are input into the policy network of the reinforcement learning module, outputting directional policy gradient information. This information is used to determine whether the current trajectory correction meets the long-term task optimization objective and does not interfere with the underlying deterministic control loop.
[0030] This invention constructs a local terrain height map with the current robot pose and the terrain along the current direction of travel using 3D point cloud data. This results in a basic data model that accurately represents the height undulations of the local terrain surrounding the robot. Based on this local terrain height map, and combined with the current planned landing area of each foot, the local terrain height at the expected contact point of each foot in the next support phase is determined, enabling accurate prediction of the terrain height at the foot landing point. Furthermore, by combining the local terrain height of each foot with the current operating state and the robot's current center of mass height, the target joint trajectory to be executed by each joint module in the swing phase is determined, allowing joint trajectory planning to be appropriately... By incorporating local terrain undulations, the system avoids trajectory mismatches with actual terrain caused by a lack of terrain perception. Finally, based on the target joint trajectory and the current joint angles of each joint module, combined with the current operating status and pre-built reinforcement learning modules, the system corrects joint torque commands and obtains target torque control commands. This achieves dynamic optimization and precise calibration of joint control commands, ultimately solving the core problem of mismatch between joint control commands and actual terrain requirements due to insufficient perception of local terrain. It effectively avoids a chain reaction of problems such as foot slippage, sudden changes in joint force, and gait instability, improves the control accuracy and response speed of joint modules, reduces wear on joint components, and ensures the robot's motion stability and reliable operation in unstructured terrain.
[0031] In one embodiment, steps 301-306 include: Step 301: Based on the difference between the local terrain height of each foot and the current height of the robot's center of mass, the vertical drop of each foot relative to the center of mass is obtained.
[0032] Optionally, the quadruped robot determines the local terrain height at the expected contact point of each leg in the next support phase. ( (These correspond to the ends of the robot's left front leg, right front leg, left hind leg, and right hind leg, respectively), and the current height of the robot's center of gravity. (Calculated by combining the robot's pose data collected by the inertial measurement unit with the robot's structural parameters), the vertical drop is calculated using difference calculation, and the formula is: in, For the first The vertical drop of each foot relative to the body's center of mass; if This indicates that the expected contact point of the foot is below the height of the body's center of gravity, and the foot needs to move downwards to the contact point; if This indicates that the expected contact point of the foot with the terrain is higher than the height of the body's center of gravity, and the foot needs to be raised to avoid the terrain protrusion.
[0033] Step 302: Based on the vertical drop and the vertical velocity component in the current operating state, determine the dynamic height increment to be compensated for at each foot in the swing phase.
[0034] Optionally, the quadruped robot can use the calculated vertical drop of each leg relative to the body's center of mass. And the vertical velocity component of the robot body extracted from the robot's current motion state. The parameters are calculated from the triaxial velocity data of the aircraft collected by the inertial measurement unit. This indicates that the body is moving vertically upwards. This represents the body moving vertically downwards. The formula is derived using kinematic differential equations: ; Calculate the dynamic height increment to be compensated for at each foot during the swing phase. This dynamic height increment is the correction amount for compensating for the influence of the body's vertical motion on the foot landing height. For the first The dynamic height increment of each foot tip to be compensated during the swing phase; For the first The duration of the swing phase at each foot is determined by the robot's current gait phase. and gait cycle The calculation formula is as follows: gait cycle Based on the robot's current forward speed and step length Determined, and satisfying .
[0035] Step 303: Based on the dynamic height increment and the maximum obstacle height on the corresponding foot path in the three-dimensional point cloud data, a safety constraint analysis is performed to obtain the safety lifting benchmark for each foot in the swing phase.
[0036] Optionally, the quadruped robot performs a safety constraint analysis based on the obtained dynamic height increment and the maximum obstacle height on the determined foot path from the three-dimensional point cloud data. This aims to solve the safety and rationality of the movement during the foot swing in unstructured, complex, and undulating outdoor terrain (such as scree slopes, gullies, bushes, and irregular protrusions), thereby obtaining a more accurate and adaptable safety lifting benchmark for each foot in the swing phase in unstructured, complex, and undulating outdoor terrain, as described in steps 3031-3034.
[0037] Step 304: Based on the safety lifting reference and the body pitch angle in the current body pose of the robot, perform geometric correction to obtain the target end-effector lifting height of each foot in the body coordinate system.
[0038] Optionally, the quadruped robot obtains a safe lifting reference for each leg end during the swing phase. Then, it is compared with the body pitch angle in the obtained robot's current body pose parameters. ( This indicates that the front of the machine body has been raised. (This refers to the rear end of the aircraft being lifted.) The pitch angle causes a geometric deviation between the actual lifting height of the feet in the aircraft coordinate system and the safe lifting reference. Trigonometric functions are used to correct the pitch attitude. The correction formula is derived based on the geometric projection relationship of the aircraft pitch angle, specifically: ;in, For the first The height of the target end of each foot in the body coordinate system; This is the pitch attitude correction factor, used to compensate for the projection deviation of the foot lift height caused by the aircraft's pitch; when hour, The target end elevation height is equal to the safe elevation benchmark, and no geometric correction is required.
[0039] Step 305: Based on the target end lifting height and the position of the current planned landing area of each foot, the spatial coordinates are unified to obtain the spatial target landing point coordinates of each foot in the swing phase.
[0040] Optionally, the quadruped robot can adjust the lifting height of each leg end in the target end coordinate system based on the obtained height. Based on the determined location parameters of the current planned landing areas for each foot, the horizontal coordinates of the center of the landing area in the local coordinate system are extracted. Spatial coordinates are unified by aligning the horizontal coordinates of the target's landing point with the horizontal coordinates of the landing area's center. The vertical coordinates are determined by the target's end-lift height and the local terrain height at the expected contact point of the foot. This yields the spatial target landing point coordinates for each foot during the swing phase. The formula for calculating these spatial coordinates is as follows: ;in, For the first The coordinates of the landing point of the spatial target at the foot end during the swing phase; The vertical target position of the foot in the body coordinate system is determined to ensure that the height of the foot when it reaches the expected contact point meets the requirements for safety and dynamic compensation.
[0041] Step 306: Based on the coordinates of the landing point of the spatial target and the structure of the robot's legs, the joint trajectory is mapped to obtain the target joint trajectory to be executed by each joint module in the swing phase.
[0042] Optionally, after obtaining the coordinates of the landing point of the spatial target, the quadruped robot combines them with the structural parameters of the robot's legs. Through the mapping of joint trajectories, the target joint trajectory to be executed by each joint module in the swing phase is obtained, thereby providing a trajectory basis for torque command correction, as in steps 3061-3063.
[0043] This invention quantifies the height deviation between the foot and the body's center of mass by calculating the vertical drop, then compensates for the dynamic height increase by combining the body's vertical movement speed, and subsequently determines the safe lifting benchmark by obstacle height constraints. After eliminating the geometric deviation of the body's pitch attitude, it obtains the precise coordinates of the spatial target foot landing point. Finally, it generates the target joint trajectory of each joint module through joint inverse kinematics mapping, realizing adaptive trajectory planning based on real-time terrain perception and body movement state. It can predict the undulation characteristics of unstructured terrain in advance, accurately control the foot movement trajectory, and effectively avoid problems such as foot missteps and sudden changes in joint force.
[0044] In one embodiment, the process of steps 3031-3034 includes: Step 3031: Based on the three-dimensional point cloud data and the expected swing path of each foot in the swing phase, determine the set of spatial positions of all point cloud points along the expected swing path in the body coordinate system.
[0045] Optionally, the quadruped robot can use the acquired 3D point cloud data set of the terrain in its current direction of travel. (Coordinate values acquired by the depth camera in the global coordinate system), and the determined position of each foot's current planned landing area, combined with the pre-planned movement trajectory of the foot from its current position to the expected contact point in step 305, determine the first... The expected swing path of each foot This path is from the current position at the foot in the body coordinate system. To the expected contact point The spatial curve has a path width of a preset threshold. (e.g., 0.05m) to cover areas that the foot might touch during a swing. Then, the point cloud data in the global coordinate system... Transform to the body coordinate system, using the same coordinate transformation matrix as in step 10. Finally, for the expected swing path of each foot... Construct a spatial filtering region: using path curves With the central axis as the axis, and the path width as the axis. Cylindrical spatial region with radius Traverse all transformed body coordinate system point cloud points. Determine whether a point cloud point is located in a spatial region. The internal condition is the path curve from the point cloud. vertical distance The coordinates of the point cloud points that meet the conditions are summarized to obtain the first... The set of spatial positions of all point cloud points along the swing path of a foot in the body coordinate system
[0046] Step 3032: Determine the maximum obstacle height on the corresponding foot path based on the spatial location set, and filter between dynamic demand and obstacle height based on dynamic height increment and maximum obstacle height to obtain the basic safety lifting demand during foot swing.
[0047] Optionally, the quadruped robot uses the determined set of point cloud spatial positions of the expected swing paths of each leg. and the dynamic height increments of each foot tip calculated in step 302 First, extract the maximum obstacle height along the path, which is the highest elevation value of the terrain within the expected swing path of the foot, from the cloud spatial location set. Extract all point cloud points Axis coordinates Take its maximum value as the first value. Maximum obstacle height on the foot path Next, the obstacle avoidance requirement height and the dynamic compensation requirement height are determined, where the obstacle avoidance requirement height... The minimum height the foot needs to be raised above the maximum obstacle height is equal to the difference between the maximum obstacle height and the terrain height at the expected foot contact point; dynamic compensation height requirement. The dynamic height increment that needs to be compensated for at the foot is equal to And then filter the two requirements, taking the maximum value as the first... Basic safety lifting requirements during foot swing. This is to ensure that the basic safety elevation requirements simultaneously meet the dual requirements of obstacle avoidance and dynamic compensation.
[0048] Step 3033: Based on the basic safety lifting requirements and the roll angle in the current aircraft posture, perform asymmetric correction of the aircraft tilt effect to obtain the corrected safety lifting height.
[0049] Optionally, the quadruped robot can be lifted based on the determined basic safety requirements of each leg end. and the obtained body roll angle , is the rotation angle of the body about its longitudinal axis. This indicates that the left side of the aircraft is raised. This indicates that the right side of the aircraft is raised. When the aircraft tilts, the actual ground clearance of the foot on the raised side decreases, requiring an increase in the lifting height; conversely, the actual ground clearance of the foot on the lowered side increases, allowing for a reduction in the lifting height. Therefore, the correction factor is related to the sine of the roll angle to achieve asymmetric correction. Based on this, the foot tilt correction factor is first determined. For the left foot , For the right foot , Therefore, when using this correction factor to adjust the basic safety rise requirement, the result is the [number of]th [factors]. Corrected safety lifting height at the foot end The calculation formula is as follows: Among them, when (Left side raised), left foot correction coefficient Increased elevation; right foot correction factor The elevation decreases; when (No tilt) The adjusted height is equal to the basic safety improvement requirement.
[0050] Step 3034: Based on the corrected safe lifting height and the curvature characteristics of the swing path of each foot, path obstacle compensation is performed to obtain the safe lifting reference of each foot in the swing phase.
[0051] Optionally, the quadruped robot adjusts the safe lifting height based on the foot end determined in step 3033. First extract the first Expected swing path of the foot The curvature characteristics are determined by the path curvature radius. Quantization then yields the formula for calculating the radius of curvature: ;in, The path in the body coordinate system The first derivative of a plane; It is the second derivative; A smaller radius indicates a more curved path, making it easier for the foot to collide with obstacles during foot movements. Therefore, based on the path's radius of curvature... Calculate the obstacle avoidance compensation coefficient Since this coefficient is inversely proportional to the radius of curvature of the path, the formula is: ;in, For the preset curvature compensation coefficient (e.g.) ); Units are The more winding the path (smaller) The larger the value, the higher the compensation height. Finally, the first obstacle is calculated based on the determined obstacle avoidance compensation coefficient. Safety lifting benchmark for each foot tip during the swing phase The calculation formula is as follows: .
[0052] This invention employs path point cloud filtering in the body coordinate system to accurately pinpoint terrain obstacles within the foot swing range. It then combines dynamic height increment filtering to determine basic safety lifting requirements, balancing obstacle avoidance and dynamic compensation. Subsequently, it uses body roll angle to achieve asymmetric correction of the left and right feet, eliminating gap deviations caused by lateral tilt. Finally, it performs obstacle avoidance compensation based on path curvature characteristics, adapting to swing paths with varying degrees of curvature. This overcomes the limitations of traditional fixed thresholds for safety lifting height, achieving dynamic adaptive constraints based on real-time terrain, body posture, and path characteristics. It can accurately calculate a safety lifting benchmark that meets multi-dimensional requirements, ensuring the foot completely avoids terrain obstacles during swing while preventing unnecessary excessive lifting.
[0053] In one embodiment, the process of steps 3061-3063 includes: Step 3061: Based on the coordinates of the landing point of the spatial target and the linkage geometry parameters of the robot's leg structure, construct the target end motion trajectory function corresponding to each foot.
[0054] Optionally, the quadruped robot uses the pre-determined coordinates of the spatial target landing point of each foot during the swing phase. And the spatial coordinates of each foot at the start of the swing phase. The initial position coordinates are obtained by combining the current joint angles acquired in step 10 with the leg's forward kinematics equations. This is further combined with the link geometry parameters of the robot's leg structure, including the parameters of each leg. A series joint module (in this example) (corresponding to the hip pitch joint, hip yaw joint, and knee pitch joint), and determine the link length parameter as follows. ( Corresponding to four legs, Corresponding to each link of a single leg), link offset Joint torsion angle These are all inherent structural parameters of the robot's legs. The swing phase duration within the current motion state obtained in step 10 is also used. To ensure the smoothness of foot movement and avoid joint impact, a seventh-order polynomial interpolation algorithm is used to construct the target end-effector trajectory function. This ensures that the position, velocity, acceleration, and jerk of the trajectory are all zero at the start and end times, and also satisfies the dynamic constraints of the joint module.
[0055] Therefore, respectively for the body coordinate system Three independent trajectory functions are constructed in three directions, and the time domain of the trajectory is... ,in The starting time of the swing phase, This is the moment when the oscillation phase terminates. For the first... The expression for the seventh-order polynomial trajectory function of the foot tip in three directions is: ; in, Let be the coefficients of the seventh-degree polynomial in each direction; the boundary conditions for solving the coefficients are: Position constraints: ; ; ; Speed constraints: ; ; ; Acceleration constraints: ; ; ; jerk constraints: ; ; .
[0056] Finally, by simultaneously solving the above 16 boundary condition equations, the polynomial coefficients in each direction are obtained, and the trajectory function of the foot target's end motion is determined.
[0057] Step 3062: Based on the target end motion trajectory function and the robot leg structure, perform inverse kinematics analysis to obtain the target joint angle sequence of each joint module in the swing phase.
[0058] Optionally, the quadruped robot uses a determined end-effector trajectory function for each leg. , , Link geometry parameters of robot leg structure , , and the current joint angle of each joint module Inverse kinematics analysis is performed using an improved Newton-Raphson iterative algorithm. The analytical steps are as follows: ;in, This represents the real-time position of the foot in the body coordinate system. For the first The homogeneous transformation matrix of each joint, derived from the joint angles. The geometric parameters of the connecting rod are determined; Let be the position of the foot in the coordinate system of the end of the leg. Therefore, the goal of solving the inverse kinematics is to find the position of the foot at any given time. foot position Solve for joint angles that satisfy the forward kinematic equations .
[0059] Furthermore, in the iterative solution process, the iterative formula of the improved Newton-Raphson iterative algorithm is as follows: ;in, For the first The joint angle values for the next iteration; Let be the Jacobian matrix for the leg, whose elements are the partial derivatives of the foot position with respect to the joint angle; Damping factor (in this example) ); for identity matrix; Let be the deviation vector between the actual position of the foot and the position calculated iteratively. The iteration termination condition is the magnitude of the deviation vector. ( (For the preset precision threshold), the iteration result at this time This is the target joint angle at that moment. Finally, the swing phase duration... According to the preset time step (In this example) Discretize the data to obtain a set of discrete time points. For each discrete time point The improved Newton-Raphson iterative algorithm is executed to obtain the target joint angle at that moment. Arrange the target joint angles at all discrete time points in chronological order to obtain the first... One leg The target joint angle sequence of each joint module in the swing phase is as follows: .
[0060] Step 3063: Based on the target joint angle sequence and the starting time of the swing phase in the current motion state, encapsulate and integrate them to obtain the target joint trajectory to be executed by each joint module in the swing phase.
[0061] Optionally, the quadruped robot uses the target joint angle sequence of each joint module obtained in step 3062. and the starting time of the swing phase within the current motion state. This parameter represents the absolute moment within the robot's gait cycle, synchronously recorded by the system clock. It also calls the time step of the swing phase. This is used to determine the absolute time corresponding to each angle value in the target joint trajectory. A one-to-one correspondence between absolute time and target joint angle is established, converting the relative time of discrete time points into absolute time, ensuring that the joint module controller can execute angle commands according to accurate time nodes. Furthermore, during the encapsulation and integration process, the numerical values of the target joint angle sequence are not changed; only the time dimension is mapped and information is combined to ensure the timing accuracy of the trajectory. Finally, for the ... One leg Each joint module has a target joint trajectory. Given a sequence of binary tuples, the expression is: ; in, For the first The absolute time corresponding to each discrete time point; The target joint angle corresponds to this absolute moment; the binary sequence is arranged in chronological order of the absolute moments to form the complete target joint trajectory.
[0062] This invention constructs a smooth foot trajectory function using a seventh-order polynomial interpolation algorithm to satisfy joint dynamics constraints; it achieves high-precision inverse kinematic analysis based on an improved Newton-Raphson iterative algorithm to establish a precise mapping between foot position and joint angle; and it generates a target joint trajectory with a clear time sequence through encapsulation and integration of absolute time, overcoming the limitations of coarse discrete point interpolation, poor iterative stability, and lack of temporal information in traditional joint trajectory planning. This achieves high-precision, smooth, and temporal conversion from foot trajectory to joint trajectory, ensuring that the joint module can move smoothly according to the preset trajectory and effectively avoiding joint impact and sudden force changes.
[0063] In one embodiment, the process of steps 401-405 includes: Step 401: Based on the target joint trajectory of each joint module and the current joint angle of each joint module, determine the joint trajectory deviation of each joint module in the current control cycle.
[0064] Optionally, the quadruped robot determines the target joint trajectory to be executed by each joint module during the swing phase. Extract the current control cycle Corresponding target joint angle ,in And obtain the current joint angle of each joint module. The angle is acquired in real time by a joint angle sensor. Within the current control cycle, the difference between the actual angle of the joint module and the target trajectory angle is calculated using the following formula: ;in, For the first One leg Each joint module in the current control cycle The deviation of the joint trajectory within; if This indicates that the current angle of the joint is less than the target angle, and the driving torque needs to be increased to rotate the joint towards the target angle; if This indicates that the current joint angle is greater than the target angle, and the driving torque needs to be reduced or the braking torque applied to bring the joint back to the target angle. This current control cycle is the minimum instruction execution time unit of the robot joint module control system. And in this example .
[0065] Step 402: Based on the joint trajectory deviation and the linear and angular velocities of the body in the current operating state, an analysis of the influence of motion state is performed to obtain the dynamic compensation coefficients of each joint module.
[0066] Optionally, the quadruped robot can calculate the joint trajectory deviation of each joint module. Combined with the robot's linear velocity and angular velocity obtained in step 10 during its current motion state, including: linear velocity in the forward direction of the robot. lateral linear velocity Vertical linear velocity ; the body around Axis pitch angular velocity , around Shaft roll angular velocity , around Axis yaw rate Since the linear and angular velocities of the body alter the dynamic load on the joint modules, thus affecting the accuracy of joint trajectory tracking, a nonlinear calculation model for the dynamic compensation coefficient is constructed by quantifying the degree of this influence using a dynamic compensation coefficient. The formula for this dynamic compensation coefficient is as follows: ;in, For the first One leg The dynamic compensation coefficients for each joint module have a range of values. ; The modulus of the linear velocity of the body: The modulus of the body's angular velocity; The maximum linear velocity of the robot body (as in this example) ); The maximum angular velocity of the robot body (in this example) The closer the body's movement speed is to its maximum value, the smaller the dynamic compensation coefficient, requiring a greater correction to joint trajectory deviations; when the body is stationary, No additional dynamic compensation is required.
[0067] Step 403: Based on the dynamic compensation coefficient and the joint trajectory deviation, the initial trajectory is corrected to obtain the corrected trajectory increment of each joint module.
[0068] Optionally, the quadruped robot uses the dynamic compensation coefficients of each joint module calculated in section 402. and the joint trajectory deviation of each joint module calculated in step 401. Through dynamic compensation logic: the smaller the dynamic compensation coefficient, the greater the interference of the body's motion state on joint trajectory tracking, and the greater the required correction trajectory increment, thus offsetting the impact of load changes caused by the motion state. Therefore, a correction formula is constructed. The correction trajectory increments for each joint module are calculated, ensuring that the final correction trajectory increments represent the additional angle adjustments required for the joint modules after considering the influence of the body's motion state. For the first One leg The correction trajectory increment for each joint module.
[0069] Step 404: Based on the correction trajectory increment and the contact status identifier of each foot in the current running state, the effective correction trajectory increment of each joint module is obtained by filtering.
[0070] Optionally, after the quadruped robot obtains the corrected trajectory increment, in order to avoid the serious defects of the traditional foot contact state recognition method based on the threshold of a single foot force sensor or simple kinematic position judgment in unstructured and complex undulating outdoor terrain, the obtained corrected trajectory increment is filtered according to the contact state identifier of each foot in the current operating state, and finally the effective corrected trajectory increments of each joint module that are effectively supported (i.e. effectively in contact with the ground) are selected, as in steps 4041-4044.
[0071] Step 405: Based on the effective correction trajectory increment combined with the reinforcement learning module, the current joint angle of each joint module and the current running state, the torque command is collaboratively corrected to obtain the target torque control command for each joint module.
[0072] Optionally, after determining all effective correction trajectory increments, the quadruped robot combines them with the reinforcement learning module, the current joint angles of each joint module, and the current operating state to perform torque command collaborative correction, thereby obtaining the target torque control command for each joint module and realizing high-precision closed-loop control of the joint modules, as described in steps 4051-4054.
[0073] This invention accurately quantifies joint trajectory deviation by calculating the difference between the target trajectory and the current angle. Then, combining the influence of the body's linear and angular velocities, it calculates dynamic compensation coefficients and generates a correction trajectory increment. Subsequently, based on the foot contact state identifier, it filters out effective correction amounts to avoid the risk of body instability caused by significant adjustments to the support phase joints. Finally, it integrates the leg dynamics model and the policy gradient information from the reinforcement learning module to achieve coordinated correction of torque commands. This overcomes the limitations of traditional joint torque control relying on fixed-parameter PID adjustment, realizing adaptive torque correction based on real-time trajectory deviation, motion state, and foot contact state. This effectively counteracts the interference of changes in body motion state on joint control in unstructured terrain, avoids sudden changes in joint force and gait instability, and significantly improves the motion stability and joint module control accuracy of the quadruped robot in complex terrain.
[0074] In one embodiment, the process of steps 4041-4044 includes: Step 4041: Based on the correction trajectory increment and the expected contact point height of each foot in the local terrain height map, a geometric comparison is performed to obtain the actual penetration depth deviation of each foot.
[0075] Optionally, the quadruped robot corrects the trajectory increment based on the calculated values of each joint module. (Incremental values representing the joint angles that require additional adjustment) and the expected contact point height of each foot end in the next support phase, as determined in step 20. The vertical coordinates are extracted from the local terrain height map and represent the vertical coordinates in the robot's coordinate system. Combining the link geometry parameters of the robot's leg structure, and based on the forward kinematics equations, a mapping relationship is established between the joint angle increment and the vertical displacement increment of the foot, denoted as the vertical displacement increment of the foot. This parameter has a linear mapping relationship with the correction trajectory increment. ,in This represents the vertical component of the Jacobian matrix for the leg. Next, the actual penetration depth deviation of each foot tip is calculated, which is the vertical displacement increment of the foot tip due to joint trajectory correction, relative to the expected terrain height at the contact point. This reflects whether the foot tip will penetrate the terrain surface or remain suspended above the terrain. The calculation formula is as follows: ;in, For the first Each foot end in the current control cycle The actual penetration depth deviation within; The vertical position of the target at the foot is determined by the coordinates of the landing point of the spatial target; if This indicates that the increase in vertical displacement of the foot is too large, posing a risk of penetrating the terrain; if This indicates that the vertical displacement increment of the foot is insufficient, posing a risk of being suspended above the terrain.
[0076] Step 4042: Based on the actual penetration depth deviation and the preset terrain soft and hard discrimination threshold, perform confidence conversion to obtain the terrain embedding confidence of each foot end.
[0077] Optionally, the quadruped robot can calculate the actual penetration depth deviation of each foot. And preset terrain hardness / softness discrimination thresholds, including hard terrain penetration thresholds. and soft terrain embedding threshold The foot penetration depth exceeds [amount] on hard terrain. The contact state determination fails, and the foot embedding amount is less than [a certain value] in soft terrain. Effective contact is determined at this point. Then, based on the actual penetration depth deviation of the foot, a probability value is calculated indicating whether effective contact has been formed between the foot and the terrain; the value range is... The closer the confidence level is to 1, the higher the probability of effective contact between the foot and the terrain; the closer it is to 0, the higher the probability of ineffective contact. Therefore, a piecewise nonlinear function is used for transformation, and its formula is: ; in, For the first The confidence level of the terrain embedding at each foot end; The standard deviation of the Gaussian distribution is used to transform the confidence level and smooth the transition interval of the piecewise function.
[0078] Step 4043: Based on the terrain embedding confidence, combined with the phase current amplitude characteristics of the drive motors of each joint module and the reference current amplitude of the corresponding joint module under no-load conditions, determine the electromechanical cooperative contact strength index of each foot end.
[0079] Optionally, the quadruped robot embeds the terrain at each foot based on the calculated confidence level. Combined with the real-time phase current amplitude of the drive motor of each joint module The data is collected in real time by the motor controller, reflecting the actual load on the joint module. It also calls upon the reference current amplitude of each joint module's drive motor under no-load conditions. These are inherent characteristic parameters of the motor, obtained from the motor's factory calibration, such as the reference current amplitude of all joint motors in this example. By combining the confidence level of geometric contact between the foot and the terrain with the load current characteristics of the joint motor, a comprehensive assessment of the contact strength between the foot and the terrain is achieved, thereby determining the electromechanical cooperative contact strength index. A higher index value indicates more stable contact; therefore, its calculation formula is as follows: ; in, For the first The foot tip corresponds to the first Electromechanical contact strength index of each joint module; The threshold for determining motor load current is set. When the real-time current amplitude of the motor exceeds the sum of the reference current amplitude and the threshold, it is determined that there is a significant load on the joint. The function is the hyperbolic tangent function, used to normalize the difference in current amplitude to... The range is designed to avoid index saturation caused by current overload. Furthermore, the electromechanical contact strength index at the foot level is the average of the corresponding joint indices, calculated using the formula: ,in This refers to the number of joints in a single leg.
[0080] Step 4044: Based on the electromechanical collaborative contact strength index and the preset contact strength activation threshold, determine the contact state identifier of each foot end, and filter the correction trajectory increment constraint based on the contact state identifier to obtain the effective correction trajectory increment of each joint module.
[0081] Optionally, the quadruped robot can use the calculated electromechanical cooperative contact strength index of each leg end. Combined with a preset contact intensity activation threshold When the electromechanical contact strength index of the foot tip exceeds a certain threshold, the foot is determined to be in the support phase; when it is below the threshold, the foot is determined to be in the swing phase. That is, the obtained foot contact state identifier is a binary discrete variable used to distinguish between the support and swing phases of the foot. The formula is as follows: ;in, This indicates that the foot is in a supporting phase, forming effective and stable contact with the terrain; This indicates that the foot is in the swing phase and has not formed effective stable contact with the terrain, thus determining the foot contact state. Subsequently, the trajectory increments are corrected based on the calculated values for each joint module. The screening process is based on the following logic: For the support phase, the foot bears the body load, and joint trajectory correction must prioritize maintaining support stability, with the correction amount limited to a minimal range; for the swing phase, the foot has no load constraint and can perform full correction. Therefore, a nonlinear constraint function is used for screening, with the following formula: ; in, For the first One leg Effective correction trajectory increment for each joint module; This is a joint correction constraint threshold used to control the decay rate of the correction under the support phase; when (Supporting phase) When the correction amount decreases exponentially as the magnitude of the original correction amount increases; when During the (oscillating phase), the exponent term is 1, and the correction amount has no decay.
[0082] This invention accurately quantifies the risk of foot penetration by comparing the trajectory increment with the terrain height. Then, based on the terrain's hardness and softness characteristics, the geometric deviation is converted into contact confidence. Subsequently, motor current load characteristics are integrated to construct an electromechanical collaborative contact strength index, achieving dual contact verification in both geometric and electrical dimensions. Finally, the trajectory increment is corrected based on the contact strength index, ensuring the stability constraint of the support phase joint correction and the full execution of the swing phase joint correction. This overcomes the limitations of traditional contact state determination relying solely on a single force sensor signal, achieving multi-dimensional, high-precision foot contact state recognition and adaptive constraint of trajectory correction. This effectively avoids body instability caused by large corrections of the support phase joint while ensuring the accuracy of swing phase joint trajectory tracking.
[0083] In one embodiment, the process of steps 4051-4054 includes: Step 4051: Based on the effective correction trajectory increment combined with the policy gradient direction output by the reinforcement learning module, determine the policy guidance correction amount for each joint module.
[0084] Optionally, the quadruped robot can effectively correct the trajectory increment based on the determined joint modules. That is, the joint angle correction after contact state filtering, which is the policy gradient direction output by the pre-built reinforcement learning module. This module is trained based on the Deep Deterministic Policy Gradient (DDPG) algorithm, with the robot's current state as the input. (Including body posture, joint angles, foot contact state, etc.), the output is the policy gradient direction in the joint torque motion space, where the positive or negative sign of the gradient direction represents the optimization trend of torque adjustment. Then, based on the effective correction trajectory increment and the policy gradient direction, a policy gradient gain coefficient is constructed to balance the weights of the effective trajectory increment and the policy gradient direction. ,like Finally, the policy guidance correction amount for each joint module is determined based on the constructed policy gradient gain coefficient. This policy guidance correction amount is a torque dimension correction amount applied to the effective trajectory increment based on the global optimization policy of reinforcement learning. Its direction is determined by the policy gradient, and its magnitude is constrained by both the effective trajectory increment and the gain coefficient. The calculation formula is as follows: ; in, For the first One leg Strategy guidance correction amount for each joint module; The function is used to normalize the policy gradient direction to The interval is used to avoid saturation of the correction amount due to excessively large gradient values; finally, when the policy gradient direction is consistent with the effective trajectory increment direction, the correction amount is positively enhanced; when the two directions are opposite, the correction amount is negatively suppressed, thus realizing torque optimization guided by the policy.
[0085] Step 4052: Based on the strategy-guided correction amount and the current joint angular velocity of each joint module, perform motion inertia influence analysis to obtain the inertial impedance adjustment factor of each joint module; the current joint angular velocity is determined by dividing the difference between the current joint angle at the current time and the previous control cycle time by the control cycle duration.
[0086] Optionally, the quadruped robot can guide the correction amount based on the calculated strategies of each joint module. First, calculate the current joint angular velocity of each joint module. That is, it is obtained by dividing the difference in joint angle between the current moment and the previous control cycle by the duration of the control cycle. The calculation formula is as follows: ; in, To control cycle duration; This refers to the joint angle from the previous control cycle. The inertial characteristic coefficient is determined based on the quantified influence of the joint angular velocity on the inertial impedance. Subsequently, when analyzing the effects of motion inertia, the core logic is as follows: the greater the joint angular velocity, the stronger the motion inertia, requiring increased joint impedance to suppress inertial impact; conversely, the smaller the joint angular velocity, the weaker the motion inertia, allowing for a reduction in joint impedance to improve trajectory tracking sensitivity. Therefore, the formula for calculating the inertial impedance adjustment factor is: ; in, For the first One leg The inertial impedance adjustment factor for each joint module has a value range of [value range missing]. ; This is the absolute value of the current angular velocity of the joint; This is the sign function. When the strategy-guided correction is in the same direction as the joint angular velocity, the sign is positive, and the impedance adjustment factor enhances the torque. When the directions are opposite, the sign is negative, and the impedance adjustment factor weakens the torque, thus achieving adaptive compensation for inertial shock.
[0087] Step 4053: Based on the inertial impedance adjustment factor and the strategy guidance correction amount, the command mapping is performed to obtain the basic torque command of each joint module.
[0088] Optionally, the quadruped robot adjusts the inertial impedance of each joint module according to the inertial impedance adjustment factor calculated in step 4052. and the strategy guidance correction amount for each joint module calculated in step 4051. Determine the reference value of joint torque. This is the basic torque required for the joint module to maintain static balance, determined by the joint's gravitational load, such as the pitch joint of the right foreleg hip in this example. Hip joint lateral joint Knee joint flexion and extension joint Then, based on the joint torque reference value, a strategy-guided correction amount adjusted by inertial impedance is superimposed to obtain the torque base command that balances static equilibrium and dynamic optimization. Its calculation formula is: ;in, For the first One leg The torque base command for each joint module is weighted by the inertial impedance adjustment factor to optimize the torque command under dynamic inertial compensation.
[0089] Step 4054: Based on the torque base command and the body attitude tilt angle in the current operating state, tilt attitude compensation is performed to obtain the target torque control command for each joint module.
[0090] Optionally, the quadruped robot uses the basic torque commands for each joint module calculated in step 4053. And the robot's body attitude tilt angle obtained in step 10 during its current operating state, including the rotation... Pitch angle of the axis and around Roll angle of the shaft As in this example Construct the attitude compensation coefficient matrix. , of which elements This is the compensation coefficient for the pitch angle at the hip joint. This is the compensation coefficient for the roll angle on the hip joint's pitch joint; the other elements are defined similarly. Then, tilt attitude compensation is performed based on the attitude compensation coefficient. The logic for tilt attitude compensation is as follows: when the aircraft pitches or rolls, joints at different positions need to bear additional balancing torques, and the compensation amount is linearly related to the aircraft's tilt angle. Therefore, the formula for calculating the target torque control command is: ; in, For the first One leg Target torque control commands for each joint module; and For the posture compensation coefficient matrix, the elements corresponding to the joint types are: for the right foreleg hip joint pitch joint, if selected... and .
[0091] This invention transforms the global optimization strategy of reinforcement learning into a strategy-guided correction amount for joint torque, achieving synergy between local control and global optimization. Subsequently, an inertial impedance adjustment factor is calculated based on the joint motion angular velocity to compensate for the interference of motion inertia on torque commands. Then, a basic torque command that balances static balance and dynamic optimization is generated through command mapping. Finally, tilt compensation is performed by combining the body's attitude tilt angle to obtain precise target torque control commands. This overcomes the limitations of traditional joint torque control that relies solely on model prediction or single feedback adjustment, achieving multi-dimensional fusion optimization of reinforcement learning strategies, motion inertial characteristics, and body attitude states. It effectively improves the trajectory tracking accuracy and anti-interference capability of the joint module in unstructured terrain, avoiding sudden changes in joint force and body instability.
[0092] Furthermore, the robot joint module provided by the present invention will be described below. The control method of the robot joint module described below and the quadruped robot joint module described above can be referred to in correspondence.
[0093] Optional, refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of the quadruped robot provided by the present invention. The quadruped robot includes: The state perception and terrain map construction module 210 is used to acquire the robot's current body pose, the three-dimensional point cloud data of the terrain in the current forward direction, and the current motion state, and to construct a local terrain height map with the current body pose as the origin based on the three-dimensional point cloud data. The terrain height determination module 220 is used to determine the local terrain height at the expected contact point of each foot in the next support phase based on the local terrain height map and the position of the currently planned landing area of each foot of the robot. The trajectory generation module 230 is used to determine the target joint trajectory to be executed by each joint module in the swing phase based on the local terrain height of each foot end, the current running state, and the current center of mass height of the robot. The joint torque command correction module 240 is used to correct the joint torque command based on the target joint trajectory and the current joint angle of each joint module, combined with the current running status and the pre-built reinforcement learning module, so as to obtain the target torque control command of each joint module.
[0094] This invention constructs a local terrain height map with the current robot pose and the terrain along the current direction of travel using 3D point cloud data. This results in a basic data model that accurately represents the height undulations of the local terrain surrounding the robot. Based on this local terrain height map, and combined with the current planned landing area of each foot, the local terrain height at the expected contact point of each foot in the next support phase is determined, enabling accurate prediction of the terrain height at the foot landing point. Furthermore, by combining the local terrain height of each foot with the current operating state and the robot's current center of mass height, the target joint trajectory to be executed by each joint module in the swing phase is determined, allowing joint trajectory planning to be appropriately... By incorporating local terrain undulations, the system avoids trajectory mismatches with actual terrain caused by a lack of terrain perception. Finally, based on the target joint trajectory and the current joint angles of each joint module, combined with the current operating status and pre-built reinforcement learning modules, the system corrects joint torque commands and obtains target torque control commands. This achieves dynamic optimization and precise calibration of joint control commands, ultimately solving the core problem of mismatch between joint control commands and actual terrain requirements due to insufficient perception of local terrain. It effectively avoids a chain reaction of problems such as foot slippage, sudden changes in joint force, and gait instability, improves the control accuracy and response speed of joint modules, reduces wear on joint components, and ensures the robot's motion stability and reliable operation in unstructured terrain.
[0095] Please see Figure 3 , Figure 3 An embodiment diagram of an electronic device provided in accordance with the present invention. For example... Figure 3 As shown, an embodiment of the present invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it performs the following steps: The robot's current body pose, the 3D point cloud data of the terrain in the current direction of movement, and the current motion state are obtained. Based on the 3D point cloud data, a local terrain height map with the current body pose as the origin is constructed. Based on the local terrain height map and the current planned landing area of each of the robot's feet, the local terrain height at the expected contact point of each foot in the next support phase is determined. Based on the local terrain height of each foot end, the current operating status, and the current height of the robot's center of mass, the target joint trajectory to be executed by each joint module in the swing phase is determined. Based on the target joint trajectory and the current joint angle of each joint module, the joint torque command is corrected by combining the current running status and the pre-built reinforcement learning module, so as to obtain the target torque control command of each joint module.
[0096] Please see Figure 4 , Figure 4 An embodiment diagram of a computer-readable storage medium provided in accordance with an embodiment of the present invention is shown. Figure 4 As shown, this embodiment provides a computer-readable storage medium 400 on which a computer program 311 is stored. When the computer program 311 is executed by a processor, it performs the following steps: The robot's current body pose, the 3D point cloud data of the terrain in the current direction of movement, and the current motion state are obtained. Based on the 3D point cloud data, a local terrain height map with the current body pose as the origin is constructed. Based on the local terrain height map and the current planned landing area of each of the robot's feet, the local terrain height at the expected contact point of each foot in the next support phase is determined. Based on the local terrain height of each foot end, the current operating status, and the current height of the robot's center of mass, the target joint trajectory to be executed by each joint module in the swing phase is determined. Based on the target joint trajectory and the current joint angle of each joint module, the joint torque command is corrected by combining the current running status and the pre-built reinforcement learning module, so as to obtain the target torque control command of each joint module.
[0097] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the control method for the quadruped robot joint module provided by the above methods, the method including: The robot's current body pose, the 3D point cloud data of the terrain in the current direction of movement, and the current motion state are obtained. Based on the 3D point cloud data, a local terrain height map with the current body pose as the origin is constructed. Based on the local terrain height map and the current planned landing area of each of the robot's feet, the local terrain height at the expected contact point of each foot in the next support phase is determined. Based on the local terrain height of each foot end, the current operating status, and the current height of the robot's center of mass, the target joint trajectory to be executed by each joint module in the swing phase is determined. Based on the target joint trajectory and the current joint angle of each joint module, the joint torque command is corrected by combining the current running status and the pre-built reinforcement learning module, so as to obtain the target torque control command of each joint module.
[0098] The joint module embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A control method for a quadruped robot joint module, characterized in that, include: The robot's current body pose, the 3D point cloud data of the terrain in the current direction of movement, and the current motion state are obtained. Based on the 3D point cloud data, a local terrain height map with the current body pose as the origin is constructed. Based on the local terrain height map and the current planned landing area of each of the robot's feet, the local terrain height at the expected contact point of each foot in the next support phase is determined. Based on the local terrain height of each foot end, the current operating state, and the current height of the robot's center of mass, the target joint trajectory to be executed by each joint module in the swing phase is determined. Based on the target joint trajectory and the current joint angle of each joint module, the joint torque command is corrected by combining the current running state and the pre-built reinforcement learning module to obtain the target torque control command of each joint module.
2. The control method for the quadruped robot joint module according to claim 1, characterized in that, The obtained target torque control commands for each joint module include: Based on the target joint trajectory of each joint module and the current joint angle of each joint module, determine the joint trajectory deviation of each joint module in the current control cycle. Based on the joint trajectory deviation and the linear velocity and angular velocity of the body in the current operating state, a motion state influence analysis is performed to obtain the dynamic compensation coefficient of each joint module. Based on the dynamic compensation coefficient and the joint trajectory deviation, the initial trajectory is corrected to obtain the corrected trajectory increment of each joint module. Based on the corrected trajectory increment and the contact status identifier of each foot in the current operating state, the effective corrected trajectory increment of each joint module is obtained by filtering. Based on the effective correction trajectory increment, combined with the reinforcement learning module, the current joint angle of each joint module, and the current operating state, the torque command is collaboratively corrected to obtain the target torque control command for each joint module.
3. The control method for the quadruped robot joint module according to claim 2, characterized in that, The method of collaboratively correcting torque commands based on the effective correction trajectory increment, combined with the reinforcement learning module, the current joint angles of each joint module, and the current operating state, to obtain the target torque control commands for each joint module includes: Based on the effective correction trajectory increment and the policy gradient direction output by the reinforcement learning module, the policy guidance correction amount of each joint module is determined. Based on the strategy-guided correction amount and the current joint angular velocity of each joint module, an inertial influence analysis is performed to obtain the inertial impedance adjustment factor of each joint module; the current joint angular velocity is determined by dividing the difference between the current joint angle at the current moment and the current joint angle at the previous control cycle moment by the control cycle duration. Based on the inertial impedance adjustment factor and the strategy guidance correction amount, command mapping is performed to obtain the basic torque command for each joint module; Based on the torque base command and the tilt angle of the body in the current operating state, tilt attitude compensation is performed to obtain the target torque control command for each joint module.
4. The control method for the quadruped robot joint module according to claim 2, characterized in that, The effective corrected trajectory increments for each joint module are obtained by filtering based on the corrected trajectory increments and the contact state identifiers of each foot in the current operating state, including: Based on the geometric comparison between the corrected trajectory increment and the expected contact point height of each foot in the local terrain height map, the actual penetration depth deviation of each foot is obtained. Based on the actual penetration depth deviation and the preset terrain softness / hardness discrimination threshold, the confidence level is converted to obtain the terrain embedding confidence level of each foot. Based on the terrain embedding confidence, combined with the phase current amplitude characteristics of the drive motors of each joint module and the reference current amplitude of the corresponding joint module under no-load conditions, the electromechanical cooperative contact strength index of each foot end is determined. Based on the electromechanical contact strength index and the preset contact strength activation threshold, the contact state identifier of each foot is determined, and the correction trajectory increment constraint is filtered based on the contact state identifier to obtain the effective correction trajectory increment of each joint module.
5. The control method for the quadruped robot joint module according to claim 1, characterized in that, The determination of the target joint trajectory to be executed by each joint module in the swing phase, based on the local terrain height of each foot end, the current operating state, and the robot's current center of mass height, includes: The vertical drop of each foot relative to the body's center of mass is obtained by processing the difference between the local terrain height of each foot and the robot's current center of mass. Based on the vertical drop and the vertical velocity component in the current operating state, the dynamic height increment to be compensated for at each foot in the swing phase is determined. Based on the dynamic height increment and the maximum obstacle height on the corresponding foot path in the three-dimensional point cloud data, a safety constraint analysis is performed to obtain the safe lifting benchmark for each foot in the swing phase. Based on the aforementioned safe lifting benchmark and the body pitch angle in the current body pose of the robot, geometric correction is performed to obtain the target end-effector lifting height of each foot in the body coordinate system; Based on the target end lifting height and the position of the current planned landing area of each foot, the spatial coordinates are unified to obtain the spatial target landing point coordinates of each foot in the swing phase. Based on the coordinates of the landing point of the spatial target and the structure of the robot's legs, the joint trajectory is mapped to obtain the target joint trajectory to be executed by each joint module in the swing phase.
6. The control method for the quadruped robot joint module according to claim 5, characterized in that, The mapping of joint trajectories based on the coordinates of the spatial target landing point and the robot's leg structure yields the target joint trajectory to be executed by each joint module in the swing phase, including: Based on the coordinates of the landing point of the spatial target and the linkage geometry parameters of the robot's leg structure, construct the target end motion trajectory function corresponding to each foot. Based on the target end motion trajectory function and the robot leg structure, inverse kinematics analysis is performed to obtain the target joint angle sequence of each joint module in the swing phase; Based on the target joint angle sequence and the starting time of the swing phase in the current motion state, the target joint trajectory to be executed by each joint module in the swing phase is obtained.
7. The control method for the quadruped robot joint module according to claim 5, characterized in that, The safety constraint analysis based on the dynamic height increment and the maximum obstacle height on the corresponding foot path in the three-dimensional point cloud data is used to obtain the safe lifting benchmark for each foot in the swing phase, including: Based on the three-dimensional point cloud data and the expected swing path of each foot in the swing phase, the set of spatial positions of all point cloud points along the expected swing path in the body coordinate system is determined. Based on the set of spatial locations, the maximum obstacle height on the corresponding foot path is determined, and based on the dynamic height increment and the maximum obstacle height, the dynamic requirements and obstacle height are filtered to obtain the basic safety lifting requirements during the foot swing process. Based on the aforementioned basic safety lifting requirements and combined with the roll angle in the current aircraft posture, asymmetric correction of the aircraft tilt effect is performed to obtain the corrected safety lifting height. Based on the corrected safety lift height and the curvature characteristics of each foot swing path, obstacle avoidance compensation is performed to obtain the safety lift reference for each foot in the swing phase.
8. A quadruped robot, characterized in that, A control method for a quadruped robot joint module as described in any one of claims 1 to 7; the quadruped robot comprising: The state perception and terrain map construction module is used to acquire the robot's current body pose, the three-dimensional point cloud data of the terrain in the current direction of movement, and the current motion state, and to construct a local terrain height map with the current body pose as the origin based on the three-dimensional point cloud data. The terrain height determination module is used to determine the local terrain height at the expected contact point of each foot in the next support phase based on the local terrain height map and the position of the currently planned landing area of each foot of the robot. The trajectory generation module is used to determine the target joint trajectory to be executed by each joint module in the swing phase based on the local terrain height of each foot end, the current operating state, and the current center of mass height of the robot. The joint torque command correction module is used to correct the joint torque command based on the target joint trajectory and the current joint angle of each joint module, combined with the current running state and the pre-built reinforcement learning module, so as to obtain the target torque control command of each joint module.
9. An electronic device, characterized in that, include: Memory, used to store computer software programs; A processor is configured to read and execute the computer software program, wherein when the processor executes the computer software program, it implements the control method for the quadruped robot joint module as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that, The storage medium stores a computer software program, which, when executed by a processor, implements the control method for the quadruped robot joint module as described in any one of claims 1 to 7.