Robot-perceived terrain recognition gait control method, system, medium and device
By solving the optimal sole force in a bipedal robot and combining the KNN model for terrain recognition, the problems of high complexity and insufficient stability of terrain recognition in the prior art are solved, and terrain recognition and gait control with high accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411648442.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-11-19
AI Technical Summary
The existing bipedal robot terrain recognition method relies on multiple sensors, and has high computational complexity and cost. It is impossible to ensure the stable operation of the robot and accurate terrain recognition through sole force data alone.
By solving the optimal sole force, combining pitch angle and sole force data, the KNN model is used for terrain recognition, and the pace frequency and gait are adjusted according to the recognition results to ensure the stability and accuracy of the robot in complex terrain.
It improves the accuracy and stability of the robot's terrain recognition in complex terrain, reduces the number and cost of sensors, and improves the adaptability and walking efficiency of the robot under different terrains.
Smart Images

Figure CN119159590B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot perception technology, and in particular to a robot-perceived terrain recognition gait control method, system, medium and equipment. Background Art
[0002] Bipedal robots must be sensitive to terrain features in unknown environments, have the ability to accurately identify these features, and be able to process terrain feature information in real time while making corresponding adjustments to ensure that the robot can smoothly traverse various complex terrains. Therefore, terrain recognition has become a key function of robots, which is of great significance for autonomous gait planning and real-time gait strategy adjustment, and is crucial to improving the adaptability and robustness of bipedal robots in complex and dynamic environments.
[0003] The current robot-based terrain recognition method requires the addition of multiple sensors for data collection, resulting in high computational complexity and cost; the existing terrain recognition method based on bipedal robots, such as the Chinese invention application with application number 202111661244.0, entitled A Robot Terrain Recognition and Speed Control Method and System, only uses the plantar force data obtained by the plantar pressure sensor to characterize the terrain characteristics, but it lacks the optimal plantar force constraint for the robot. When only the plantar force data is used, the robot cannot be guaranteed to operate stably, and thus the accuracy of terrain recognition cannot be guaranteed. Summary of the invention
[0004] In order to solve the above problems, the present invention proposes a robot-perceived terrain recognition gait control method, system, medium and equipment. The method first solves the optimal plantar force to ensure that the robot can operate stably. Under the constraint of the optimal plantar force, the pitch angle and plantar force are used as classification features to obtain the ruggedness of the terrain, realize terrain classification, and adjust the robot's step frequency and gait accordingly. While ensuring high-accuracy terrain recognition, the stability of the bipedal robot moving on different terrains is improved.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a robot-perceived terrain recognition gait control method, comprising:
[0007] Based on the optimal plantar force, the pitch angle data and plantar force data of the bipedal robot are obtained;
[0008] Input the pitch angle data and the plantar force data into the trained KNN model to identify the terrain on which the current robot is walking, and obtain a terrain recognition result;
[0009] The robot controller receives the terrain recognition result, and adjusts the robot's step frequency and gait according to a preset gait control strategy based on the result.
[0010] Preferably, the steps for solving the optimal plantar force are specifically as follows:
[0011] The force analysis and modeling of the biped robot are carried out to obtain the reaction force on the soles of the two feet and the position vectors pointing to the soles of the two feet from the center of mass.
[0012] The center-of-mass motion state equation is constructed based on the plantar reaction force and position vector of both feet, and it is simplified to obtain the center-of-mass dynamic equation including the expected center-of-mass linear acceleration and the expected fuselage angular velocity;
[0013] Construct constraints based on stable motion;
[0014] The optimization equation is constructed according to the center of mass dynamics equation and constraints, and the cost function is simplified to a standard quadratic programming problem, which is solved to obtain the optimal plantar force.
[0015] Preferably, the center of mass dynamics equation is:
[0016]
[0017] in, is a 3×3 identity matrix, and Respectively represent the position vector of the foot end in the world coordinate system, is the position vector of the center of mass in the world coordinate system, and the position vector is obtained by estimating the state of the robot itself; , Represent the plantar forces of both feet, m is the rigid body mass of the biped robot after being simplified into a single rigid body, represents the acceleration due to gravity, I represents the moment of inertia, and They are the expected center-of-mass linear acceleration and the expected body angular velocity, respectively, which are calculated by designing a PD controller.
[0018] Preferably, the constraining conditions based on stable motion specifically include:
[0019]
[0020] in, represents the friction cone constraint, , , Represent the plantar force in the x-axis, y-axis, and z-axis directions, respectively. and are the maximum and minimum plantar force thresholds, respectively.
[0021] Preferably, the pitch angle data includes three-axis angular velocity information, which is obtained by a sensor installed at the center of the head of the bipedal robot; the Y-axis of the sensor is consistent with the forward direction of the robot, the X-axis is parallel to the lateral direction of the robot chassis, and the Z-axis is perpendicular to the chassis plane; the angular velocity information of the Y-axis, X-axis and Z-axis are respectively used to represent the motion information of the robot in forward and backward tilting, left and right tilting and turning motion.
[0022] Preferably, the training process of the KNN model specifically includes:
[0023] Drive the bipedal robot to autonomously navigate on flat terrain and rugged terrain, and obtain sample data sets D1 and D2 containing roll angle, pitch angle and plantar force respectively;
[0024] The coefficient of variation and variance of each sample data are extracted as features, and the data set is divided into a training set and a validation set; wherein, the coefficient of variation and variance are calculated using a sliding window algorithm, and the window size and interval are determined according to the data printing frequency;
[0025] The KNN algorithm was applied for training, and the feature combination with the highest classification accuracy was selected for experimental verification. The success rate of each group of tests was recorded to determine the best k value to optimize the model performance.
[0026] Preferably, the gait control strategy includes:
[0027] When the robot is on rough terrain, slow down the robot's movement frequency and choose a walking gait;
[0028] When the robot is on flat terrain, speed up the robot's movement frequency and select the flying gait.
[0029] In a second aspect, the present invention provides a robot-perceived terrain recognition gait control system, comprising:
[0030] A data acquisition module, used for acquiring the pitch angle data and the plantar force data of the bipedal robot based on the optimal plantar force;
[0031] A terrain recognition module is used to input the pitch angle data and the plantar force data into the trained KNN model to recognize the terrain on which the current robot is walking and obtain a terrain recognition result;
[0032] The gait control module is used for the robot controller to receive the terrain recognition result, and adjust the robot's step frequency and gait according to the preset gait control strategy based on the result.
[0033] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the robot-perceived terrain recognition gait control method described in the first aspect.
[0034] In a fourth aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the robot-perceived terrain recognition gait control method described in the first aspect are implemented.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] (1) Compared with terrain recognition that relies solely on plantar force signals, the present invention achieves a more comprehensive and in-depth perception of the robot's walking environment by first determining the optimal plantar force and simultaneously collecting plantar force and pitch angle information under this constraint. The determination of the optimal plantar force ensures that the robot can maintain a stable and efficient gait during walking, while the addition of pitch angle data further enriches the dimension of terrain recognition. Under the condition of effectively controlling the number of sensors, this fusion of multi-source information not only improves the accuracy and robustness of terrain recognition, enabling the robot to more accurately identify the characteristics of different terrains, but also provides more detailed terrain feedback for the robot controller. On this basis, the robot can intelligently adjust the step frequency and gait according to the recognition results, thereby maintaining the best walking performance and stability in various complex terrains. The comprehensive perception and intelligent adjustment strategy provided by the present invention significantly improves the robot's adaptive ability and task execution ability in unknown or changing environments while reducing the cost of use.
[0037] (2) The present invention analyzes and models the force on the bipedal robot, solves the optimal plantar force, and further constructs the center of mass dynamics equation and constraint conditions, providing a precise mathematical basis for the robot's gait control, helping the robot to maintain a stable motion state during walking and improving the stability and safety of walking.
[0038] (3) According to the terrain recognition results, the robot controller can adjust the robot's step frequency and gait according to the preset gait control strategy. In rugged terrain, the robot can slow down the movement step frequency and choose a more stable walking gait; while in flat terrain, it can speed up the movement step frequency and choose a more efficient flying gait. This flexible gait adjustment strategy enables the robot to maintain the best walking effect in different terrains, improving the robot's walking efficiency and adaptability.
[0039] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their description are used to explain the present invention but do not constitute a limitation of the present invention.
[0041] Figure 1 A main flow chart of a robot-perceived terrain recognition gait control method provided by an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of a time series window provided by an embodiment of the present invention;
[0043] Figure 3 A simplified analysis diagram of a single rigid body model provided in an embodiment of the present invention;
[0044] Figure 4 The friction cone constraint of the plantar force provided by the embodiment of the present invention;
[0045] Figure 5 Pitch angle and plantar force curves on flat ground and grass provided by an embodiment of the present invention;
[0046] Figure 6 A schematic diagram of the flight gait phase relationship provided by an embodiment of the present invention;
[0047] Figure 7 A schematic diagram of the walking gait phase relationship provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0049] Embodiment 1
[0050] like Figure 1 As shown, this embodiment discloses a robot-perceived terrain recognition gait control method, comprising the following steps:
[0051] S1: Based on the optimal plantar force, obtain the pitch angle data and plantar force data of the bipedal robot;
[0052] S2: input the pitch angle data and the plantar force data into the trained KNN model, identify the terrain on which the current robot is walking, and obtain a terrain recognition result;
[0053] S3: The robot controller receives the terrain recognition result, and adjusts the robot's step frequency and gait based on the result according to a preset gait control strategy.
[0054] Next, combine Figure 1 , a robot-perceived terrain recognition gait control method disclosed in this embodiment is described in detail. This embodiment feeds back the pitch angle and plantar force of the bipedal robot, and inputs these data into the trained K nearest neighbor (KNN) model to achieve terrain recognition.
[0055] 1. Obtaining the pitch angle
[0056] In order to perceive the motion state of the bipedal robot on different terrains in real time, this embodiment uses an inertial measurement unit (IMU) sensor to capture the motion information generated by the robot's interaction with the ground during movement: the pitch angle. As an important component of the robot's navigation system, the IMU sensor integrates an accelerometer and a gyroscope, and can simultaneously output three-axis acceleration and three-axis angular velocity data. It has excellent sensitivity and accuracy, and is therefore widely used in the fields of motion measurement and somatosensory interaction.
[0057] The IMU sensor is installed at the center of the bipedal robot's head, where the sensor's Y-axis is consistent with the robot's forward direction, the X-axis is parallel to the lateral direction of the chassis, and the Z-axis is perpendicular to the chassis plane. In this way, the acceleration information of the X-axis, Y-axis, and Z-axis can reflect the robot's motion state in the lateral, forward, and vertical directions, respectively. The corresponding angular velocity information can reveal the dynamic changes of the robot in left and right tilt, front and back tilt, and steering movements.
[0058] When a bipedal robot moves at a certain speed on different terrains, each channel of the IMU will generate a unique signal waveform due to the interaction between the robot and the ground. The differences between these signals provide the basis for the classification and recognition of different terrains.
[0059] The real-time data collected by the IMU sensor is a typical continuous time series data. In this embodiment, a sliding window is used to perform frame processing on the continuous data collected by the IMU sensor, and the continuous data is divided into independent data frames. The "window length" here defines the number of data points contained in each data frame, which determines the time range covered by each data frame; and the "window step size" defines the speed at which the window moves on the data stream, that is, the degree of overlap or interval between two adjacent data frames, such as Figure 2 Frame processing converts continuous, infinite time series data into a series of fixed-length data frames, thereby adapting to algorithm processing requirements, improving data processing efficiency, reducing memory usage, and facilitating subsequent terrain recognition tasks.
[0060] To ensure the accuracy and real-time nature of the data, the sampling frequency is set to 500 Hz in this embodiment. During the acquisition process, the IMU sensor will record the acceleration changes of the chassis in the lateral, forward and vertical directions, as well as the angular velocity changes of the chassis in left and right tilt, front and back tilt and steering movements.
[0061] 2. Acquisition of plantar force
[0062] When discussing the dynamic model of the biped robot, this embodiment adopts a highly generalized method to simplify it into a framework of a single rigid body system. The core of this abstraction is to simplify the external forces acting on the entire system into the mechanical effects on the contact interface between the sole and the ground.
[0063] exist Figure 3 middle, and Represent the plantar reaction forces of the left and right legs in three-dimensional space. After model optimization, the application points, magnitudes, and directions of these plantar forces remain constant, ensuring the accuracy of the simplified model. and As position vectors, they start from the center of mass and point to the soles of the left and right legs respectively, and they are precisely defined in the world coordinate system.
[0064] Based on the simplified single rigid body model, this embodiment constructs a set of simplified dynamic equations based on the basic principles of physics, Newton's second law and the angular momentum conservation equation, to accurately describe the center of mass motion state of the model:
[0065]
[0066] In the formula, m is the rigid body mass of the biped robot after being simplified into a single rigid body, represents the linear acceleration at the center of mass of the robot, represents the acceleration due to gravity, represents the plantar reaction force, represents the position vector, Represents the angular momentum of a rigid body system, which is given by the moment of inertia I and the angular velocity express.
[0067] Expanding and simplifying the left side of the equal sign, we can get:
[0068]
[0069] in, is the angular acceleration at the center of mass of the robot.
[0070] Since the fuselage can be approximately regarded as a relatively symmetrical cuboid, its product of inertia can be ignored relative to the moment of inertia, so:
[0071]
[0072] in, , , Respectively represent the angular velocity in the x, y, and z directions at the center of mass of the robot; , , They represent the robot's moment of inertia around the x, y, and z axes respectively.
[0073] During the stable motion of the robot, the robot has a relatively small angular velocity, so the quadratic terms of the angular velocity are all considered to be 0. Further simplification can be obtained:
[0074]
[0075] Furthermore, a unified center-of-mass dynamics equation can be obtained:
[0076]
[0077] In the formula, is a 3×3 identity matrix, and Respectively represent the position vector of the foot end in the world coordinate system, is the position vector of the center of mass in the world coordinate system. The above variables can be obtained through the robot's own state estimation. In order to express the compactness of the structure, the superscript is dropped. and are the desired center-of-mass linear acceleration and the desired fuselage angular velocity, respectively, both of which can be calculated by designing the corresponding PD controller. The desired center-of-mass acceleration can be calculated as:
[0078]
[0079] In the formula, and are the desired center of mass position and the desired center of mass velocity, respectively, which are generated by the user's control command input and trajectory planning. and are the PD controller gain coefficients, all of which are positive definite diagonal matrices.
[0080] Similarly, the expected fuselage angular acceleration can be calculated as:
[0081]
[0082] In the formula, and are the expected fuselage attitude and the measured fuselage attitude, respectively. and They represent the rotation matrices in the desired attitude and measured body attitude mapping SO(3), respectively, and can be used to measure the attitude error. and are PD gain coefficients, all of which are positive definite diagonal matrices.
[0083] When solving the optimal plantar configuration, a series of physical constraints need to be considered to ensure the rationality and practicality of the calculation. When the swinging leg is in the air phase, the plantar should be regarded as a point without external force, that is, the plantar reaction force is strictly set to zero. Furthermore, for the plantar force in the vertical direction (z-axis), its amplitude is reasonably defined at the maximum threshold value in view of physical reality. With minimum threshold to prevent unrealistic infinity.
[0084] To ensure that the robot does not slip when in contact with the ground, the horizontal plantar force component must not exceed the limit value determined by the vertical component and the ground friction coefficient μ. This condition essentially places the plantar force vector in a conical space defined by the friction characteristics, which is the so-called friction cone constraint. Figure 4 The geometry of this constraint is intuitively demonstrated.
[0085] The friction cone constraint can be expressed as:
[0086]
[0087] Since the above formula is a nonlinear constraint, in order to add the plantar force constraint to the linear optimization calculation of the plantar force, it is modified into a linear friction constraint:
[0088]
[0089] It can also be written in matrix form:
[0090]
[0091] The desired plantar force can then be expressed as the following optimization problem:
[0092]
[0093] In the formula, Include , , , is a positive definite diagonal matrix used to describe the error weight of the plantar force following the desired motion state, It is also a positive definite diagonal matrix, which is used to avoid the penalty coefficient of excessive plantar force, and the constraint condition is used to satisfy the linear friction constraints of the two soles. It can be seen that the cost function described in the above formula is a convex function, which can be solved by quadratic programming problem. The standard quadratic programming problem can be expressed as:
[0094]
[0095] Therefore, it is necessary to transform the cost function in the formula and simplify it into a standard quadratic programming problem:
[0096]
[0097] In the formula, no The function of will not affect the quadratic programming problem and can be regarded as a constant term. Therefore, the matrix in the above formula 、 and Can be expressed as:
[0098]
[0099] So far, the optimal plantar force solution problem described has been transformed into a quadratic programming problem. When designing the plantar configuration, this embodiment not only considers the optimal force distribution, but also introduces physical constraints (such as the maximum and minimum force thresholds), which helps to ensure the practicality and safety of the model. In the air phase of the swing leg, the plantar reaction force is strictly set to zero, which is a fine control of the robot's dynamic behavior and helps to more accurately simulate and control the robot's walking dynamics.
[0100] By first configuring the optimal plantar force, this embodiment can provide a set of constraints for the bipedal robot that are suitable for its motion characteristics. These constraints not only ensure the stability of the robot during operation, but also provide an accurate and reliable basis for the subsequent collection of pitch angle and plantar force data. Only by ensuring the stable operation of the robot can accurate data be collected, providing strong support for further optimizing the performance of the robot and improving walking efficiency.
[0101] (III) KNN model training
[0102] In order to ensure the effectiveness of the KNN model, this embodiment uses K-fold crossover to evaluate the model. The original training data set is equally divided into k sub-data sets, and multiple training and verification are performed.
[0103] First, the entire training set is divided into k subsets to ensure that each subset contains approximately the same number of samples. Then, k iterations are performed. In each iteration, one subset is selected as the validation set, and the remaining K-1 subsets are used as training sets. Use K-1 subsets to train the model, and evaluate the performance of the model on the selected validation set to obtain the evaluation result of that iteration. Then replace the validation set and repeat the above steps until each subset is regarded as a validation set. A total of k iterations were performed and k evaluation results were obtained. Finally, the average of these k evaluation results is calculated as the final accuracy result of the model performance. This average can more comprehensively reflect the performance of the model on different data subsets, thereby avoiding the deviation that may be caused by a single division.
[0104] Specifically, the bipedal robot autonomously navigates on flat ground and grass, while obtaining proprioceptive information from feedback, such as roll angle , Pitch angle and estimated plantar force , obtain the flat land dataset D1 and the grassland dataset D2.
[0105]
[0106] Each sample data is the roll angle, pitch angle and plantar force information of the bipedal robot at that moment.
[0107] Since the printing frequency of the data is 100 Hz, the printed data is a large number of discrete points, so the statistical characteristics of the data are extracted as the characteristics of the data. Here, the coefficient of variation and variance of the data are selected as statistical characteristics and data characteristics, where the calculation formula of the coefficient of variation is:
[0108]
[0109] Where CV stands for coefficient of variation, represents the standard deviation of the data, Represents the average value of the data. After calculating the coefficient of variation and variance, we get the matrix N:
[0110]
[0111] in, , , Represent the coefficients of variation of the roll angle, pitch angle and estimated plantar force data, , , Represent the variance of the roll angle, pitch angle and estimated plantar force data, respectively.
[0112] For the data sets D1 and D2, they are evenly divided into 100 subsets N1, N2...N100 respectively. For each subset N1, the coefficient of variation and variance are calculated every 100 data according to the sliding window algorithm, and the window interval is 50 data. After the calculation, the flat data set D1 is defined as label 0, representing the flat terrain; the grass data set D2 is defined as label 1, representing the grass terrain. The 200 subsets are merged and shuffled, and divided into 70% training sets and 30% validation sets according to the steps of the KNN algorithm, where the division of the training set and the validation set is random. In the preprocessing stage here, the robot's roll angle, pitch angle and estimated plantar force are used as input, and the corresponding coefficient of variation and variance are used as output.
[0113] For the KNN algorithm, the calculated coefficient of variation and variance of the robot's roll angle, pitch angle, and estimated plantar force are used as two features of the KNN algorithm for training. The two features of different data are combined in pairs, and all possibilities are traversed to calculate the accuracy of the training.
[0114]
[0115] in, .
[0116] As a specific implementation method, the variance of the pitch angle and the variance of the plantar force are selected as two classification features of the KNN classification algorithm for classifying flat terrain and grass terrain, and the accuracy rate is the highest. Therefore, this solution is selected for experimental verification.
[0117] In an embodiment, a bipedal robot is driven to pass through two terrains with the same step frequency gait, and a data set is formed by sampling. The entire data set is divided into a training set and a test set. Using a K-fold cross validation method, preferably, the data set is divided 10 times and 5 times, respectively, and the results of multiple evaluations are averaged to reduce the impact of model overfitting. The ratio of training data to test data is preferably set to 7:3, and the training data includes pitch angles and forefoot plantar pressures under five hard flat and soft grass terrains.
[0118] The robot is made to move on flat terrain, and its pitch angle and estimated plantar force are recorded in real time. The variance of the recorded data is calculated every 100 data points, and the data is input into the KNN model to obtain the classification result (output classification label 0 or 1). The classification result is printed every 0.1s. The same is true for grass terrain, and finally the classification results and accuracy of flat terrain and grass terrain are obtained.
[0119] The accuracy of terrain recognition is one of the key indicators to measure the performance of the terrain detection algorithm of the bipedal robot. When the robot moves on a specific ground, the output of the ground feature perception algorithm is recorded in real time (recording frequency is 10Hz). On each terrain, at least 100 terrain recognition results are recorded continuously. If the kth recognition is correct, it is recorded. =1, otherwise 0. Assume that a total of n experiments were conducted. Then the success rate of the test is:
[0120]
[0121] After completing two typical ground tests, a group of tests ends and the success rate of each group of tests is recorded. Finally, the average success rate of all groups is recorded.
[0122] In the KNN algorithm, the choice of k value has an important impact on the model performance. Therefore, the analysis ideas of the KNN algorithm will be applied to calculate the prediction accuracy of the training set and the test set in this data set when the k value ranges from 1 to 20. By comparing the accuracy under different k values, the best k value can be determined to optimize the model performance.
[0123] When the K-fold cross validation is divided into 10 times, the prediction accuracy of the test set is shown in Table 1.
[0124]
[0125] When the K-fold cross validation is divided into 5 times, the prediction accuracy of the test set is shown in Table 2.
[0126]
[0127] It can be seen from the table that the best choice for the test set accuracy from low to high is k=9, and when it is greater than 9, the accuracy tends to decrease, so the preferred k value in this embodiment is 9.
[0128] Then, a KNN model is constructed. In this embodiment, K=9 is selected to process the training and test data, and the pitch angle and plantar force curves on hard flat ground and grass are obtained, as shown in FIG. Figure 5 As shown:
[0129] It can be seen that in the hard flat land and soft grass terrain environments, the two selected indicators have significant differences, so they are suitable as feature values for classification.
[0130] The sampling frequency of the robot was set to 500Hz and the printing frequency was 100Hz. The output frequency of the test results was 10Hz. The robot was tested for more than 10 seconds and at least 100 test results were printed. The accuracy of the printed results was calculated. Five real-time tests were performed on grass and hard flat surfaces, and the test accuracy was recorded. Taking the first test as an example, a total of 158 tests were performed, of which 157 were correct, with an accuracy of:
[0131]
[0132] The experimental results and average accuracy of the other four groups are shown in Table 3.
[0133]
[0134] The test results show that the KNN classification algorithm can achieve an accuracy rate of more than 90% for hard ground and grass, which can meet the requirements of real-time detection. At the same time, the robot changes the control strategy in real time according to the test results to adapt to different movement requirements.
[0135] Here, the robot's gait and step frequency are adjusted according to the detection results.
[0136] 4. Gait control
[0137] The biped robot has a small number of limbs and a relatively simple gait combination. The biped robot of this embodiment is designed with two gaits, one of which is a walking mode with a complete bipedal vacant phase. Figure 6 As shown in Figure 1, it is defined as flying walking; the other is a walking pattern with a bipedal support phase, such as Figure 7 As shown, it is defined as walking gait.
[0138] Figure 6 and Figure 7 In the figure, two circular diagrams show the phase relationship of the biped robot in different gait modes. The circles in each diagram represent the legs of the robot, while the arrows and colors inside the circles are used to represent the different phases and characteristics of the gait. The blue arrow represents the robot's swing phase, the black arrow represents the support phase, and the yellow arrow represents the phase offset.
[0139] Among them, in bipedal walking, the support phase refers to the stage when the legs are in contact with the ground and support the weight of the robot. In the support phase, the legs provide the necessary stability and strength to maintain the robot's standing and walking; the swing phase refers to the stage when the legs move in the air and are not in contact with the ground. In the swing phase, the legs are ready to move to the next support position to continue walking or running.
[0140]
[0141] In the Flying walking gait, the duty cycle is <0.5, and in the Walking gait, the duty cycle is >0.5.
[0142] Preferably, when the robot is in a rugged environment, such as the grass in this experiment, the robot's movement frequency will be appropriately slowed down, and the support phase duty factor of the bipedal robot will be , select a walking gait so that it can adjust its balance faster in a rugged environment; on flat terrain, appropriately increase the step frequency, and the support phase occupancy factor of the bipedal robot , select the flight gait. Other control strategies such as friction coefficient will be adjusted in real time according to the ruggedness of the terrain.
[0143] It should be understood that those skilled in the art can adjust the support phase space factor according to actual conditions, and this embodiment only provides an optional solution.
[0144] This specific embodiment realizes accurate judgment of different terrains by real-time acquisition of the pitch angle data and plantar force data of the bipedal robot, and uses the trained KNN model for terrain recognition. It not only improves the adaptability of the robot in complex environments, but also ensures its stability and safety during walking. At the same time, by solving the optimal plantar force, the center of mass dynamics equation and constraint conditions are constructed, providing an accurate mathematical model for the gait control of the robot. On this basis, the robot controller can flexibly adjust the step frequency and gait according to the terrain recognition results, so as to maintain steady walking in rugged terrain and improve walking efficiency in flat terrain. This intelligent terrain recognition and gait control method provides a new solution for the autonomous walking and navigation of bipedal robots, and has important practical application value.
[0145] Embodiment 2
[0146] This embodiment provides a robot-perceived terrain recognition gait control system, including:
[0147] A data acquisition module, used for acquiring the pitch angle data and the plantar force data of the bipedal robot based on the optimal plantar force;
[0148] A terrain recognition module is used to input the pitch angle data and the plantar force data into the trained KNN model to recognize the terrain on which the current robot is walking and obtain a terrain recognition result;
[0149] The gait control module is used for the robot controller to receive the terrain recognition result, and adjust the robot's step frequency and gait according to the preset gait control strategy based on the result.
[0150] This embodiment collects the pitch angle data and plantar force data of the bipedal robot in real time under the constraint of the optimal plantar force, and inputs them into the trained KNN model. It can accurately identify the terrain on which the robot is currently walking and realize adaptive walking on different terrains, thereby improving the adaptability and stability of the robot in complex environments and avoiding problems such as falling or walking difficulties caused by terrain changes.
[0151] Embodiment 3
[0152] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps in the robot-perceived terrain recognition gait control method as described in the first embodiment are implemented.
[0153] Embodiment 4
[0154] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the robot-perceived terrain recognition gait control method described in the first embodiment are implemented.
[0155] The steps or modules involved in the above embodiments 2 to 4 correspond to those in embodiment 1. For the specific implementation, please refer to the relevant description of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A robot-perceived terrain recognition gait control method, characterized in that: include: Based on the optimal plantar force, the pitch angle data and plantar force data of the bipedal robot are obtained; Input the pitch angle data and the plantar force data into the trained KNN model to identify the terrain on which the current robot is walking, and obtain a terrain recognition result; The robot controller receives the terrain recognition result, and adjusts the robot's step frequency and gait according to a preset gait control strategy based on the result; The training process of the KNN model specifically includes: Drive the bipedal robot to autonomously navigate on flat terrain and rugged terrain, and obtain sample data sets D1 and D2 containing roll angle, pitch angle and plantar force respectively; The coefficient of variation and variance of each sample data are extracted as features, and the data set is divided into a training set and a validation set; wherein, the coefficient of variation and variance are calculated using a sliding window algorithm, and the window size and interval are determined according to the data printing frequency; The KNN algorithm was applied for training, and the feature combination with the highest classification accuracy was selected for experimental verification. The success rate of each group of tests was recorded to determine the best k value to optimize the model performance.
2. A robot-perceived terrain recognition gait control method as claimed in claim 1, characterized in that: The steps for solving the optimal plantar force are specifically as follows: The force analysis and modeling of the biped robot are carried out to obtain the reaction force on the soles of the two feet and the position vectors pointing to the soles of the two feet from the center of mass. The center-of-mass motion state equation is constructed based on the plantar reaction force and position vector of both feet, and it is simplified to obtain the center-of-mass dynamic equation including the expected center-of-mass linear acceleration and the expected fuselage angular velocity; Construct constraints based on stable motion; The optimization equation is constructed according to the center of mass dynamics equation and constraints, and the cost function is simplified to a standard quadratic programming problem, which is solved to obtain the optimal plantar force.
3. A robot-perceived terrain recognition gait control method as claimed in claim 2, characterized in that: The center-of-mass dynamic equation is: in, is a 3×3 identity matrix, and Respectively represent the position vector of the foot end in the world coordinate system, is the position vector of the center of mass in the world coordinate system, and the position vector is obtained by estimating the state of the robot itself; , Represent the plantar forces of both feet, m is the rigid body mass of the biped robot after being simplified into a single rigid body, represents the acceleration due to gravity, I represents the moment of inertia, and They are the expected center-of-mass linear acceleration and the expected body angular velocity, respectively, which are calculated by designing a PD controller.
4. A robot-perceived terrain recognition gait control method as claimed in claim 2, characterized in that: The constraint conditions constructed based on stable motion specifically include: in, represents the friction cone constraint, , , Represent the plantar force in the x-axis, y-axis, and z-axis directions, respectively. and are the maximum and minimum plantar force thresholds, respectively.
5. The robot-perceived terrain recognition gait control method according to claim 1, characterized in that: The pitch angle data includes three-axis angular velocity information, which is obtained by a sensor installed at the center of the head of the bipedal robot; the Y-axis of the sensor is consistent with the forward direction of the robot, the X-axis is parallel to the lateral direction of the robot chassis, and the Z-axis is perpendicular to the chassis plane; the angular velocity information of the Y-axis, X-axis and Z-axis are respectively used to represent the motion information of the robot in forward and backward tilting, left and right tilting and turning motion.
6. A robot-perceived terrain recognition gait control method as claimed in claim 1, characterized in that: The gait control strategy includes: When the robot is on rough terrain, slow down the robot's movement frequency and choose a walking gait; When the robot is on flat terrain, speed up the robot's movement frequency and select the flying gait.
7. A robot-perceived terrain recognition gait control system, characterized in that: include: A data acquisition module, used for acquiring the pitch angle data and the plantar force data of the bipedal robot based on the optimal plantar force; A terrain recognition module is used to input the pitch angle data and the plantar force data into the trained KNN model to recognize the terrain on which the current robot is walking and obtain a terrain recognition result; A gait control module is used for the robot controller to receive the terrain recognition result, and adjust the robot's step frequency and gait according to a preset gait control strategy based on the result; The training process of the KNN model specifically includes: Drive the bipedal robot to autonomously navigate on flat terrain and rugged terrain, and obtain sample data sets D1 and D2 containing roll angle, pitch angle and plantar force respectively; The coefficient of variation and variance of each sample data are extracted as features, and the data set is divided into a training set and a validation set; wherein, the coefficient of variation and variance are calculated using a sliding window algorithm, and the window size and interval are determined according to the data printing frequency; The KNN algorithm was applied for training, and the feature combination with the highest classification accuracy was selected for experimental verification. The success rate of each group of tests was recorded to determine the best k value to optimize the model performance.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a robot-perceived terrain recognition gait control method as described in any one of claims 1-7 are implemented.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the robot-perceived terrain recognition gait control method as described in any one of claims 1-6 are implemented.
Citation Information
Patent Citations
Robot terrain recognition and speed control method and system
CN114474053A
Spine quadruped robot energy consumption control method based on complex terrain perception
CN118884984A