Speed estimation method and training method and device of speed estimation model

The trained speed estimation model uses robot fuselage perception data to perform speed estimation, solving the problem of inaccurate speed estimation in the prior art, real-time and accurate speed estimation in complex environments, and simplifying the model training process.

CN120254318APending Publication Date: 2025-07-04BEIJING XIAOMI ROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510389230.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-04

Smart Images

  • Figure CN120254318A_ABST
    Figure CN120254318A_ABST
Patent Text Reader

Abstract

The invention provides a speed estimation method and a training method and device of a speed estimation model, and the method comprises the steps: obtaining input data in real time through a speed estimation model obtained through training under the indication of a fuselage speed estimation instruction, the body speed information of the foot-type robot is estimated based on the body sensing data of the foot-type robot included in the input data, and the speed estimation model does not need to acquire the sole contact state of the foot-type robot, so that the accuracy of body speed estimation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robot control technology, and particularly relates to a speed estimation method, a training method and device for a speed estimation model. Background Art

[0002] The legged robot is an important embodiment of bionics and robot technology. It has good environmental adaptability, a wide range of motion, and strong load capacity. It has a certain ability of autonomous operation and can perform tasks such as rough mountain transportation, dangerous disaster rescue, and military reconnaissance, and has received extensive attention.

[0003] During the operation of the legged robot, it is necessary to estimate the body speed of the legged robot. The speed estimation methods in related technologies have low accuracy. Summary of the Invention

[0004] This application aims to solve at least one of the technical problems in related technologies to some extent.

[0005] Therefore, this application proposes a speed estimation method, a training method and device for a speed estimation model to improve the estimation accuracy of the body speed information.

[0006] The first aspect embodiment of this application proposes a speed estimation method, including:

[0007] Responding to a body speed estimation instruction, obtaining input data; wherein, the input data includes the body perception data of the legged robot;

[0008] Using a speed estimation model to perform body speed estimation processing on the legged robot according to the input data, and obtaining the body speed information of the legged robot.

[0009] The second aspect embodiment of this application proposes a training method for a speed estimation model, including:

[0010] Obtaining a training set; wherein, the training samples in the training set include the sample body perception data and sample body speed information of a sample legged robot in at least one simulated terrain environment in a simulation environment;

[0011] Using the training set to perform training processing on the speed estimation model, and obtaining a trained speed estimation model.

[0012] The third aspect embodiment of this application proposes a speed estimation device, including:

[0013] An obtaining module, configured to obtain input data in response to a body speed estimation instruction; wherein, the input data includes the body perception data of the legged robot;

[0014] An estimation module, configured to perform body speed estimation processing on the legged robot according to the input data by using a speed estimation model, so as to obtain the body speed information of the legged robot.

[0015] A fourth aspect embodiment of the present application provides a training device for a speed estimation model, including:

[0016] An acquisition module, configured to acquire a training set; wherein, the training samples in the training set include sample body perception data and sample body speed information of a sample legged robot in at least one simulated terrain environment in a simulation environment;

[0017] A training module, configured to perform training processing on the speed estimation model by using the training set to obtain a trained speed estimation model.

[0018] A fifth aspect embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the foregoing aspect is implemented.

[0019] A sixth aspect embodiment of the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in the foregoing aspect is implemented.

[0020] The speed estimation method, the training method and device for the speed estimation model provided by the present application, through the trained speed estimation model, obtain input data in real time under the instruction of the body speed estimation instruction, and estimate the body speed information of the legged robot based on the body perception data of the legged robot included in the input data. The speed estimation model does not need to obtain the sole contact state of the legged robot, thereby improving the accuracy of the body speed estimation.

[0021] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where:

[0023] Figure 1 is a schematic flowchart of a speed estimation method provided by an embodiment of the present application;

[0024] Figure 2 is a schematic flowchart of another training method for a speed estimation model provided by an embodiment of the present application;

[0025] Figure 3Schematic flowchart of another method for training a speed estimation model provided by an embodiment of the present application;

[0026] Figure 4 Schematic structural diagram of a speed estimation model provided by an embodiment of the present application;

[0027] Figure 5 Schematic flowchart of another method for training a speed estimation model provided by an embodiment of the present application;

[0028] Figure 6 Schematic structural diagram of a speed estimation device provided by an embodiment of the present application;

[0029] Figure 7 Schematic structural diagram of a training device for a speed estimation model provided by an embodiment of the present application;

[0030] Figure 8 Schematic structural diagram of an electronic device provided by an embodiment of the present application; Detailed implementation manners

[0031] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application, and should not be construed as a limitation of the present application.

[0032] In related technologies, the research on legged robots has become increasingly popular. Among them, bipedal humanoid robots are considered to be intelligent forms. However, the speed estimation of legged robots remains an unsolved problem. In related technologies, traditional state estimation methods based on Kalman filtering require accurate knowledge of the foot contact state of the robot. However, it is difficult to obtain an accurate contact state with traditional estimation methods, and it is greatly affected by environmental disturbances, resulting in low accuracy of speed estimation.

[0033] Therefore, the present application proposes a speed estimation method, a training method and device for a speed estimation model. Through the trained speed estimation model, input data is obtained in real time under the instruction of the body speed estimation instruction, and based on the body perception data of the legged robot included in the input data, the body speed information of the legged robot is estimated. The speed estimation model does not need to obtain the foot contact state of the legged robot, improving the accuracy of body speed estimation.

[0034] The speed estimation method, the training method and device for the speed estimation model of the embodiments of the present application will be described below with reference to the accompanying drawings.

[0035] Figure 1 Schematic flowchart of a speed estimation method provided by an embodiment of the present application.

[0036] As an implementation, the speed estimation method of the embodiments of the present application can be configured in a speed estimation device, and the speed estimation device can be applied to any electronic device so that the electronic device can perform the speed estimation function.

[0037] Among them, the electronic device can be any device with computing power. For example, it can be a mobile terminal, and the mobile terminal can be a hardware device such as a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a legged robot, etc. with various operating systems, touch screens, and / or display screens.

[0038] As Figure 1 shown, the method may include the following steps:

[0039] Step 101, in response to the body speed estimation instruction, obtain input data; among them, the input data includes the body perception data of the legged robot.

[0040] Among them, the body perception data includes at least one of the following: body attitude, body angular velocity information, joint angle information, and joint angular velocity information. Among them, in one example, the perception data includes the data directly collected by the sensor, and each is directly collected. In another example, it includes the directly collected data and the data determined based on the collected data. Among them, as an example, the body attitude and angular velocity information are measured by the inertial measurement unit IMU, and the joint angle information and joint angular velocity information can be measured by the joint encoder. Among them, the joint encoder is a sensor that plays a crucial role in legged robots and automation systems.

[0041] Among them, both the angle information and angular velocity information of the joint are used to indicate the dynamic state of the joint movement and are used to predict the body speed information of the legged robot.

[0042] Among them, the body attitude of the legged robot refers to the direction of the legged robot in three-dimensional space, including the Euler angles in three directions in three-dimensional space. As an implementation, it can be determined by the data collected by the sensor, and the sensor includes at least one of an inertial measurement unit IMU, an image sensor, and a lidar.

[0043] In one implementation of the embodiment of the present application, when the body perception data of the legged robot changes, a body speed estimation instruction is triggered. Among them, when it is monitored that the body perception data changes, usually the body speed of the robot will also change. For example, when it is determined based on the body perception data that there is an obstacle ahead, etc., usually the body speed of the robot will also change. Therefore, when it is monitored that the body perception data changes, a body speed estimation instruction needs to be triggered to obtain input data, so as to realize the speed estimation of the legged robot at the correct time, meet the real-time requirement, and improve the accuracy of speed estimation.

[0044] Step 102, use the speed estimation model to perform body speed estimation processing on the legged robot according to the input data to obtain the body speed information of the legged robot.

[0045] Among them, the body speed information includes the linear velocity in the x direction, the linear velocity in the y direction, and the angular velocity in the yaw direction. Among them, the yaw direction is a parameter that describes the rotation direction of the legged robot around the vertical axis in three-dimensional space. When the legged robot needs to adjust its traveling direction, it will change its heading by rotating around the vertical axis, so that the legged robot can flexibly adjust its direction in a complex environment.

[0046] As an example, the legged robot is a bipedal humanoid robot.

[0047] Among them, the speed estimation model is a neural network model obtained through deep learning training. For example, it is a memory network model, and specifically it can be a Long Short-Term Memory (LSTM).

[0048] As an implementation, the speed estimation model is trained in combination with training data. Among them, the training data includes the input data and body speed information of the legged robot in at least one simulated terrain environment in the simulation environment. Among them, the simulated terrain environment includes complex terrain, uneven terrain, slope terrain, muddy and slippery terrain, etc., to simulate the real terrain environment, so as to improve the adaptability of the trained speed estimation model to different scenarios and improve the generalization ability and recognition accuracy in different scenarios.

[0049] In the speed estimation method of the embodiment of the present application, through the trained speed estimation model, input data is obtained in real time under the instruction of the body speed estimation instruction, and based on the body perception data of the legged robot included in the input data, the body speed information of the legged robot is estimated. And the speed estimation model does not need to obtain the sole contact state of the legged robot, which improves the accuracy of speed estimation and the adaptability of the scenario.

[0050] Based on the above embodiments, in one implementation manner of the embodiments of the present application, the input data includes the body perception data of the legged robot at at least two time points, where at least two time points include: the current time point when the body speed estimation instruction is received, and at least one historical time point before the current time point. As an example, the time points include 3 time points, that is, the current time point t i One frame of data collected from the legged robot, including the body perception data of the legged robot and the current time point t i The previous historical time point t i-1 The body perception data of the legged robot, the previous historical time point t i-1 The previous historical time point t i-2 The body perception data of the legged robot. Wherein, when the input data is N consecutive frames of data, when the data at the current time point is updated, the input data at the current time point is updated, and the earliest frame of input data is discarded, so as to update the continuous multi-frame data in time, improve the accuracy of the input data, rely on continuous multi-frame observation data to predict the body speed information, the speed estimation model has a certain memory, compared with predicting using one frame of data, the estimated data is more stable and less affected by instantaneous environmental impacts. At the same time, there is no need to perform kinematic modeling on the robot, which is simple and efficient.

[0051] In one implementation manner of the embodiments of the present application, the body perception data further includes the expected position information of each joint of the legged robot, which is used to assist in predicting the body speed information. The expected position information of each joint can be predicted based on the input data. As one implementation manner, it can be predicted through the actor-critic model. Since the input data includes data at at least two time points, based on the expected position information of each joint at at least two time points, the speed information of the joint can be inferred, and thus the body speed information of the legged robot can be inferred, increasing the data dimension of the model input data and improving the accuracy of the body speed information prediction.

[0052] Based on the above embodiments, Figure 2 It is a schematic flowchart of another method for training a speed estimation model provided by the embodiments of the present application, as Figure 2 shown. This method includes the following steps:

[0053] Step 201, obtain a training set, where the training samples in the training set include the sample body perception data and the sample body speed information of the sample legged robot in at least one simulated terrain environment in the simulation environment.

[0054] Among them, a simulated terrain environment is provided. The terrain environment includes complex terrains, and the complex terrains include at least one of uneven terrains, slope terrains, muddy and slippery terrains, etc., so as to simulate a real terrain environment, enabling the model to adapt to different terrain environments during the training process, identify the contact state between the legged robot and the ground in the simulated real terrain environment state, and making the trained speed estimation model adaptable to different scenarios, improving the generalization ability and recognition accuracy in different scenarios. As an example, the complex terrain, such as wet and uneven roadside, or includes steps, etc.

[0055] In the embodiments of the present application, a simulated terrain environment is provided, including at least one, so that the training samples include data under at least one simulated terrain environment. As a implementation manner, the sample legged robot is one, and the training sample includes data of one sample legged robot under at least one simulated terrain environment; as another implementation manner, the number of sample legged robots is multiple, and the simulated terrain environments where the multiple sample legged robots are located are different. Thus, the training sample includes data of each sample legged robot under the corresponding simulated terrain environment. By setting multiple legged robots, the multiple legged robots can be of the same type of robot to identify the differences between the same type of robots during the model training process, improving the recognition accuracy. The multiple legged robots can be of different types of legged robots. By training the model with data of multiple types of legged robots under different simulated terrain environments, the recognition ability of the model for multiple types of robots is improved.

[0056] Among them, the sample body speed information includes the linear velocity in the x direction, the linear velocity in the y direction, and the angular velocity in the yaw direction. Among them, the yaw direction is a parameter describing the rotation direction of the legged robot around the vertical axis in three-dimensional space. When the legged robot needs to adjust the traveling direction, it will change the heading by rotating around the vertical axis, enabling the legged robot to flexibly adjust the direction in a complex environment.

[0057] The sample body perception data includes at least one of the following: body attitude, body angular velocity information, joint angle information, and joint angular velocity information.

[0058] Among them, the relevant explanations about the body perception data in the foregoing embodiments also apply to this embodiment, with the same principle, which will not be elaborated here.

[0059] Step 202: Use the training set to perform training processing on the speed estimation model to obtain the trained speed estimation model.

[0060] In one implementation of the embodiment of the present application, for any training sample in the training set, the sample body perception data of the sample legged robot in the training sample is input into the speed estimation model to obtain the predicted body speed information output by the speed estimation model. According to the sample body speed information, the predicted body speed information in the training sample, and the loss function of the speed estimation model, the loss function value is determined, and the parameters of the speed estimation model are adjusted according to the loss function value to obtain the trained speed estimation model.

[0061] Among them, the loss function is, for example, the MSE function (mean square error) or the optimizer selects Adam (adaptive momentum method). The model sets multiple training epochs. Any epoch refers to the process of the model completely processing the entire training data set once. For each epoch, the model will traverse the corresponding training samples, complete a forward propagation to calculate the loss function, and then backpropagate to calculate the gradient, so as to update the parameters of the speed estimation model until all epochs are trained or the loss function is less than the threshold, and the training process ends to obtain the trained speed estimation model.

[0062] The training method of the speed estimation model in the embodiment of the present application, the training sample includes the sample body perception data of the sample legged robot in at least one simulated terrain environment in the simulation environment, so that the trained speed estimation model can adapt to different terrain environments, and at the same time, it is not necessary to obtain the feedback information of the scene, improving the generalization ability and prediction accuracy in various terrain environments.

[0063] Based on the above embodiment, Figure 3 is a schematic flowchart of another training method of the speed estimation model provided by the embodiment of the present application, as Figure 3 shown, the method includes the following steps:

[0064] Step 301, obtain the simulation data of the sample legged robot at multiple consecutive time points in at least one simulated terrain environment in the simulation environment.

[0065] In the implementation of the present application, the sample legged robot is driven to run in the simulation environment to obtain the simulation data of the sample legged robot at multiple consecutive time points. Among them, the simulation data includes the sample body perception data and the sample body speed information. Among them, the sample body perception data can refer to the relevant explanations of the body perception data in the foregoing embodiments, and the principle is the same, so it will not be elaborated here.

[0066] As an implementation, since the simulated data is based on the data collected by sensors, and there are errors in the data collection by sensors. At the same time, there are also errors between different batches of the same type of sensors. In order to cover the differences between different prototypes and measurement differences, and to simulate the errors existing in the real environment, random noise addition processing can be performed on at least one of the sample body perception data in the simulated data.

[0067] Among them, as an implementation, random noise is added to at least one of the sample body attitude and body angular velocity information to simulate the observation errors of a real IMU.

[0068] Among them, for the mechanical structure of the sample robot, for example, random noise is added to the position or direction of the rod (link), which can simulate the machining errors of real hardware and make up for the kinematic differences.

[0069] As a second implementation, random noise is added to the sample body perception data. For example, random noise is added to at least one of the joint angle and joint angular velocity to simulate the coding errors of the joint encoders in the legged robot.

[0070] Among them, the random noise added to the above different data can be a corresponding random value. For example, a random value of the angle is added to the joint angle.

[0071] As a third implementation, in the simulation environment, random impact forces are applied during the operation of the legged robot to simulate the external environment disturbances, so as to collect the simulated data when the legged robot is impacted.

[0072] It should be noted that the multiple random noises and environmental disturbances in the foregoing multiple implementations can be added simultaneously to cover the differences between different prototypes and the influence of environmental disturbances, improve the model training effect, and achieve better speed estimation results without parameter adjustment during the deployment of the real machine.

[0073] Step 302, extract the first simulated data from the simulated data at multiple consecutive time points.

[0074] In an implementation of the embodiment of the present application, the simulated data at multiple consecutive time points is shuffled to obtain a shuffling result, and randomly extracted from the shuffling result. The extracted simulated data is determined as the first simulated data. By shuffling the consecutive simulated data and randomly extracting from the shuffling result, the extracted first simulated data is independent of each other, which can reduce the dependence of the model on the order of training samples, avoid the model learning the patterns related to the data order, thereby improving the generalization ability of the model. At the same time, it makes the training sample distribution of each training batch more uniform, which helps to optimize the algorithm (such as gradient descent), update the model parameters more effectively, and improve the training efficiency and effect.

[0075] Step 303: Determine a training set according to the first simulated data.

[0076] As an implementation, add the obtained first simulated data to the training set to obtain a training set for training the speed estimation model.

[0077] As an implementation, for each piece of the first simulated data, perform data standardization processing to ensure more uniform search in each dimension during model training and improve the training effect of the model. Among them, the models in the embodiments of the present application are all speed estimation models, which are simply referred to as models for the convenience of description. Among them, data standardization processing is to convert randomly distributed data into a standard normal distribution.

[0078] Step 304: Use the training set to perform training processing on the speed estimation model to obtain a trained speed estimation model.

[0079] As an implementation, before starting training, the speed estimation model can be initialized, including initializing the optimizer and model parameters, setting the number of training batches, the threshold of the loss function, etc.

[0080] Among them, the explanations about the speed estimation model in the foregoing embodiments also apply to this embodiment, with the same principle and will not be elaborated here.

[0081] As an example, Figure 4 is a schematic structural diagram of a speed estimation model provided by an embodiment of the present application. As Figure 4 shown, the input data of the speed estimation model includes O t which is the data at the current time point, and O t-1 which is the data at a historical time point before the current time, called the data at the first historical time point, and O t-n the data at the Nth historical time point before the current time. The data at each time point includes the body perception data of the sample legged robot. The input data also includes the labeled sample body speed information as the ground truth.

[0082] As an implementation, the input data is N consecutive frames of data. In each control cycle, update the data at the current time point and discard the earliest frame of data to achieve timely update of the current input data. After two-layer memory network LSTM inference, take the last frame of data output by the last LSTM network, and then perform prediction through a fully connected layer neural network to obtain the predicted body speed information at the current time point. Compared with the method of kinematic modeling of the legged robot in the related art, the speed estimation model trained in the present application is simple and efficient in recognition.

[0083] Furthermore, the loss function value of the loss function is determined according to the difference between the predicted fuselage speed information and the labeled sample fuselage speed information, and the speed estimation model is adjusted according to the loss function value to obtain a trained speed estimation model. For specific explanations, reference can be made to the relevant descriptions in the foregoing embodiments. Since the principle is the same, it will not be elaborated here.

[0084] In the training method of the speed estimation model according to the embodiments of the present application, the training samples include the sample fuselage perception data of the sample legged robot in at least one simulated terrain environment in the simulation environment, so that the trained speed estimation model can adapt to different terrain environments and improve the generalization ability and prediction accuracy in various terrain environments. By adding random noise to the training samples to simulate the errors existing in the real environment, the trained model can cover the differences of different prototypes when used in the real scenario, improve the training effect of the model, and achieve better speed estimation results without parameter adjustment when actually deployed on the real machine.

[0085] Based on the foregoing embodiments, Figure 5 FIG. is a schematic flowchart of another training method of the speed estimation model provided by the embodiments of the present application. As Figure 5 shown, the method includes the following steps:

[0086] Step 501, obtain a training set, where the training samples in the training set include the sample fuselage perception data and the sample fuselage speed information of the sample legged robot in at least one simulated terrain environment in the simulation environment.

[0087] Step 502, use the training set to perform training processing on the speed estimation model to obtain a trained speed estimation model.

[0088] Among them, for Step 501 and Step 502, reference can be made to the relevant explanations in the foregoing embodiments. Since the principle is the same, it will not be elaborated here.

[0089] Step 503, obtain a test set, and determine the test error of the trained speed estimation model on the test set according to the test set.

[0090] Among them, for the test samples in the test set, reference can be made to the generation method of the training samples in the foregoing training set. Since the principle is the same, it will not be elaborated here.

[0091] Step 504, in the case where the test error is greater than or equal to the error threshold, use the training set to perform training processing on the speed estimation model again.

[0092] In the embodiments of the present application, the test error of the trained speed estimation model on the test set is determined through the prediction set. If the test error is greater than or equal to the error threshold, it indicates that the speed estimation model is overfitted. The training epoch of the speed estimation model can be appropriately reduced and the speed estimation model can be retrained. The training process can refer to the relevant explanations in the foregoing embodiments, with the same principle and will not be elaborated here until the test data error meets the requirements, and the final estimator network is obtained. Furthermore, the speed estimation model is converted into a file that can be deployed on the legged robot and deployed on the real legged robot to estimate the body speed of the legged robot in the real scenario.

[0093] The training method of the speed estimation model in the embodiments of the present application judges the training effect of the speed estimation model through the test set and retrains when the training effect is not satisfied, improving the training effect of the speed estimation model to improve the estimation effect in the actual scenario.

[0094] Based on the above embodiments, the embodiments of the present application are mainly applied to the field of legged robot motion control, especially the motion control scenario based on learning-base. In the case where the legged robot lacks effective environmental feedback (such as the sole contact state of the robot) and the sensors have noise, the speed estimation model trained by using the model training method of the embodiments of the present application has better anti-interference performance and realizes real-time and accurate speed estimation.

[0095] To implement the above embodiments, the embodiments of the present application also propose a speed estimation device.

[0096] Figure 6 It is a schematic structural diagram of a speed estimation device provided by the embodiments of the present application.

[0097] As Figure 6 shown, the device may include:

[0098] An acquisition module 61, configured to acquire input data in response to a body speed estimation instruction; wherein, the input data includes the body perception data of the legged robot.

[0099] An estimation module 62, configured to perform body speed estimation processing on the legged robot according to the input data by using a speed estimation model, and obtain the body speed information of the legged robot.

[0100] Further, in an implementation manner of the embodiments of the present application, the input data includes the body perception data of the legged robot at at least two time points; the at least two time points include: the current time point when the body speed estimation instruction is received, and at least one historical time point before the current time point.

[0101] In an implementation manner of the embodiment of the present application, the obtaining module 61 is further configured to:

[0102] When the body perception data changes, trigger the body speed estimation instruction.

[0103] In an implementation manner of the embodiment of the present application, the body perception data includes at least one of the following: body attitude, body angular velocity information, joint angle information, and joint angular velocity information.

[0104] In an implementation manner of the embodiment of the present application, the speed estimation model is trained in combination with training data; the training data includes input data of a legged robot and body speed information in at least one simulated terrain environment in a simulation environment.

[0105] In an implementation manner of the embodiment of the present application, the speed estimation model is a memory network model.

[0106] It should be noted that the foregoing explanation of the method embodiment also applies to the device of this embodiment, and will not be elaborated here.

[0107] The speed estimation device proposed by the present application, through the trained speed estimation model, obtains input data in real time under the instruction of the body speed estimation instruction, and estimates the body speed information of the legged robot based on the body perception data of the legged robot included in the input data, realizing real-time body speed estimation and improving the accuracy of body speed estimation.

[0108] To implement the above embodiment, the embodiment of the present application also proposes a training device for a speed estimation model.

[0109] Figure 7 It is a schematic structural diagram of a training device for a speed estimation model provided by an embodiment of the present application.

[0110] As Figure 7 shown, the device may include:

[0111] An obtaining module 71, configured to obtain a training set; wherein, the training samples in the training set include sample body perception data and sample body speed information of a sample legged robot in at least one simulated terrain environment in a simulation environment.

[0112] A training module 72, configured to perform training processing on the speed estimation model by using the training set to obtain a trained speed estimation model.

[0113] Further, in an implementation manner of the embodiment of the present application, the obtaining module 71 is further configured to:

[0114] Obtain simulation data of a sample legged robot at multiple consecutive time points in at least one simulated terrain environment in the simulation environment; the simulation data includes sample fuselage perception data and sample fuselage speed information;

[0115] Extract first simulation data from the simulation data at multiple said consecutive time points;

[0116] Determine the training set according to the first simulation data.

[0117] In an implementation manner of the embodiment of the present application, the obtaining module 71 is further configured to:

[0118] Perform a shuffling process on the simulation data at multiple said consecutive time points to obtain a shuffling result;

[0119] Randomly extract from the shuffling result, and determine the extracted simulation data as the first simulation data.

[0120] In an implementation manner of the embodiment of the present application, the number of the sample legged robots is multiple; the simulated terrain environments where the multiple sample legged robots are located are different.

[0121] In an implementation manner of the embodiment of the present application, the device further includes:

[0122] An adding module, configured to perform a random noise adding process on the sample fuselage perception data in the training set.

[0123] In an implementation manner of the embodiment of the present application, the training module 72 is further configured to:

[0124] Input the sample fuselage perception data of the sample legged robot in the training sample into the speed estimation model, and obtain the predicted fuselage speed information output by the speed estimation model;

[0125] According to the sample fuselage speed information, the predicted fuselage speed information in the training sample, and the loss function of the speed estimation model, determine the loss function value;

[0126] Perform parameter adjustment processing on the speed estimation model according to the loss function value to obtain a trained speed estimation model.

[0127] In an implementation manner of the embodiment of the present application, the device further includes an evaluation module, and the evaluation module is configured to:

[0128] Obtain a test set, and determine the test error of the trained speed estimation model on the test set according to the test set;

[0129] When the test error is greater than or equal to the error threshold, the training set is used to re - perform the training process on the speed estimation model.

[0130] It should be noted that the foregoing explanation of the method embodiments also applies to the devices of these embodiments, and will not be repeated here.

[0131] The training device of the speed estimation model according to the embodiments of the present application, where the training samples include the sample fuselage perception data of the sample legged robot in at least one simulated terrain environment in the simulation environment, so that the trained speed estimation model can adapt to different terrain environments and improve the generalization ability and prediction accuracy in various terrain environments. Adding random noise to the training samples to simulate the errors existing in the real environment, so that when the trained model is used in the real scenario, the differences of different prototypes can be covered, improving the model training effect, and enabling better speed estimation results to be achieved without parameter adjustment during actual machine deployment.

[0132] To implement the above - mentioned embodiments, the present application also proposes a non - transitory computer - readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in the foregoing method embodiments is implemented.

[0133] To implement the above - mentioned embodiments, the present application also proposes a computer program product, on which a computer program is stored. When the computer program is executed by a processor, the method described in the foregoing method embodiments is implemented.

[0134] To implement the above - mentioned embodiments, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the foregoing method embodiments is implemented.

[0135] Figure 8 It is a schematic structural diagram of an electronic device provided by the embodiments of the present application. For example, the electronic device 800 can be a legged robot, a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0136] Refer to Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0137] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-described methods. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0138] The memory 804 is configured to store various types of data to support the operation of the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0139] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0140] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each of the front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0141] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.

[0142] The I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a power button, and a lock button.

[0143] The sensor component 814 includes one or more sensors for providing an assessment of various aspects of the status of the electronic device 800. For example, the sensor component 814 can detect the on / off state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor component 814 can also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor component 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 814 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0144] The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices in a wired or wireless manner. The electronic device 800 can access a wireless network based on communication standards, such as WiFi, 4G, or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0145] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.

[0146] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the above instructions can be executed by a processor 820 of the electronic device 800 to complete the above method. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, magnetic tape, a floppy disk, and an optical data storage device, etc.

[0147] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without conflict, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0148] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0149] Any process or method description in the flowchart or described in other ways herein may be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logic function or process, and the scope of the preferred embodiments of the present application includes additional implementations, where the functions may be executed in a substantially simultaneous manner or in an order opposite to that shown or discussed, according to the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.

[0150] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.

[0151] It should be understood that various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having suitable combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0152] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0153] In addition, each functional unit in various embodiments of the present application may be integrated into one processing module, may exist separately as individual physical units, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0154] The above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disc, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. A speed estimation method, characterized in that The method includes: In response to a fuselage speed estimation instruction, obtaining input data; wherein, the input data includes the fuselage perception data of the legged robot. Using a speed estimation model to perform fuselage speed estimation processing on the legged robot according to the input data to obtain the fuselage speed information of the legged robot.

2. The method according to claim 1, characterized in that, The input data includes the fuselage perception data of the legged robot at at least two time points. Among the at least two time points, it includes: the current time point when the fuselage speed estimation instruction is received, and at least one historical time point before the current time point.

3. The method according to claim 1 or 2, characterized in that, The responding to the fuselage speed estimation instruction includes: Triggering the fuselage speed estimation instruction when the fuselage perception data changes.

4. The method according to claim 1, wherein The fuselage perception data includes at least one of the following: fuselage attitude, fuselage angular velocity information, joint angle information, joint angular velocity information.

5. The method according to claim 1, wherein The speed estimation model is obtained by training in combination with training data. The training data includes the input data and the fuselage speed information of the legged robot in at least one simulated terrain environment in a simulation environment.

6. The method according to claim 1 or 5, characterized in that, The speed estimation model is a memory network model.

7. A training method for a speed estimation model, characterized in that The method includes: Obtaining a training set; wherein, the training samples in the training set include the sample fuselage perception data and the sample fuselage speed information of the sample legged robot in at least one simulated terrain environment in a simulation environment. Using the training set to perform training processing on the speed estimation model to obtain a trained speed estimation model.

8. The method according to claim 7, wherein The obtaining the training set includes: Obtaining the simulation data of the sample legged robot at multiple consecutive time points in at least one simulated terrain environment in a simulation environment; the simulation data includes the sample fuselage perception data and the sample fuselage speed information. Extracting first simulation data from the simulation data at multiple consecutive time points. Determining the training set according to the first simulation data.

9. The method according to claim 8, wherein The extracting the first simulation data from the simulation data at multiple consecutive time points includes: Performing a shuffling process on the simulation data at multiple consecutive time points to obtain a shuffling result. Randomly extracting from the shuffling result and determining the extracted simulation data as the first simulation data.

10. The method according to claim 7 or 8, characterized in that, The number of the sample legged robots is multiple. The simulated terrain environments where the multiple sample legged robots are located are different.

11. The method according to claim 7 or 8, characterized in that, The method further includes: Performing a random noise addition process on the sample fuselage perception data in the training set.

12. The method according to claim 7, characterized in that, The using the training set to perform training processing on the speed estimation model includes: Inputting the sample fuselage perception data of the sample legged robot in the training sample into the speed estimation model to obtain the predicted fuselage speed information output by the speed estimation model. Determining the loss function value according to the sample fuselage speed information, the predicted fuselage speed information in the training sample, and the loss function of the speed estimation model. Performing parameter adjustment processing on the speed estimation model according to the loss function value to obtain a trained speed estimation model.

13. The method according to claim 7 or 12, characterized in that, The method further includes: Obtaining a test set. Determining the test error of the trained speed estimation model on the test set according to the test set. When the test error is greater than or equal to the error threshold, the training process is re-executed on the speed estimation model using the training set.

14. A speed estimation device, characterized in that, It includes: An acquisition module, configured to acquire input data in response to a fuselage speed estimation instruction; wherein, the input data includes the fuselage perception data of the legged robot. An estimation module, configured to perform a fuselage speed estimation process on the legged robot according to the input data using a speed estimation model, so as to obtain the fuselage speed information of the legged robot.

15. A training device for a speed estimation model, characterized in that, The device includes: An acquisition module, configured to acquire a training set; wherein, the training samples in the training set include the sample fuselage perception data and sample fuselage speed information of a sample legged robot in at least one simulated terrain environment in a simulation environment. A training module, configured to perform a training process on a speed estimation model using the training set to obtain a trained speed estimation model.

16. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method according to any one of claims 1-6, or implements the method according to any one of claims 7-13.

17. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method according to any one of claims 1-6, or implements the method according to any one of claims 7-13.