Robot off-ground state detection model training method and device
By applying vertical and lateral external forces in the robot training environment to construct training samples and using a neural network model to detect the lift-off state, the problem of the robot's misjudgment in complex dynamic environments is solved, and more accurate and stable lift-off state identification and control are achieved.
Patent Information
- Application Number
- CN202511006980.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-07-22
AI Technical Summary
Existing robot lift-off state detection methods are prone to misjudgment in complex dynamic environments, especially under horizontal disturbances. It is difficult to accurately identify the true lift-off state, which affects the correct execution of the control strategy and system stability.
By applying vertical and lateral external forces to the robot in a training environment, training sample data containing different disturbance causes is constructed, and a neural network model is used to detect the off-ground state. The model parameters are optimized in combination with a joint loss function to achieve recognition and classification of different disturbance directions.
It improves the accuracy and stability of the robot's off-ground state detection, reduces the misjudgment rate of traditional methods, and enhances the recognition ability and interpretability of the control strategy in complex dynamic environments.
Smart Images

Figure CN120503217B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of sensors and robots, and in particular to a method and device for training a robot's off-ground state detection model. Background Art
[0002] In the field of robot motion control, accurate detection of the off-ground state is of great significance for ensuring the stable operation of the robot and avoiding out-of-control behavior.
[0003] Traditional detection of a robot's ground-lift status typically relies on sensors. In some related technologies, such as the Chinese patent application with publication number CN116360431A, multiple distance sensors installed on a wheeled robot are used to initially determine whether the robot has touched the ground, and load feedback from the wheel hub motors is used to further confirm whether the robot has lifted off the ground. While these methods can provide basic detection capabilities in static or slow motion, they are prone to misjudgment in the presence of human occlusion, error fluctuations, or interference from complex terrain, and cannot meet the requirements for precise detection in highly dynamic and changing environments.
[0004] To reduce reliance on sensors, some related technologies use dynamic models to estimate a robot's off-the-ground state. For example, in Chinese patent application publication number CN118056744A, the force applied to the foot end is inferred by calculating the torque of the leg joint motor. This is then combined with the overall force and the force threshold of a single leg to determine whether the robot is off the ground. Upon detecting off-the-ground, the legged robot enters a protective mode. This method improves detection accuracy and is suitable for multi-legged robots, but it still relies on traditional mechanical estimation and is difficult to adapt to scenarios with drastic changes in dynamic forces or incomplete observation information.
[0005] It is particularly important to note that in actual deployment, when bipedal or two-legged robots experience horizontal disturbances such as dragging or pushing due to external forces, the force changes on the foot end caused by such disturbances are often misinterpreted as lift-off. Because this lift-off state is not a vertical separation caused by the robot's own active behavior, such as jumping, but rather a false contact release induced by non-vertical external forces, it cannot be equated with the robot's actual lift-off behavior. Without effective identification and differentiation of the disturbance direction and behavioral characteristics, it is easy to cause false detection of lift-off, thereby affecting the correct execution of protection mechanisms or action strategies in subsequent control modules, and even causing erroneous responses and instability in system operation.
[0006] Therefore, there is an urgent need to provide a new robot lift-off state detection solution to maintain stable and accurate lift-off recognition effect in complex dynamic environments. Summary of the Invention
[0007] The present disclosure provides a robot lift-off state detection model training method and device to achieve highly robust recognition of the robot's lift-off state, thereby improving the accuracy of lift-off judgment and the adaptability of deployment, and enhancing the robot's stability and control response capabilities in multi-scenario operation.
[0008] Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
[0009] According to a first aspect of the present disclosure, a method for training a robot lift-off state detection model is provided, comprising:
[0010] In a training environment, applying a vertical external force to the robot to obtain first training sample data; wherein the first training sample data includes simulated motion perception data and a first category of robot off-ground state;
[0011] In the training environment, applying a lateral external force to the robot to obtain second training sample data; wherein the second training sample data includes simulated motion perception data and a second category of robot off-ground state;
[0012] Inputting the simulated motion perception data into the neural network model to be trained, so that the neural network model to be trained outputs the predicted robot's lift-off state and category;
[0013] The joint loss is calculated based on the predicted robot lift-off state and category and the robot lift-off state and category in each training sample data, and the neural network model to be trained is updated based on the joint loss to obtain a robot lift-off state detection model.
[0014] In an exemplary embodiment of the present disclosure, the simulated motion perception data includes joint positions, joint velocities, and joint torques.
[0015] In an exemplary embodiment of the present disclosure, the simulated motion perception data includes joint positions, joint velocities, joint torques, and inertial measurement data.
[0016] In an exemplary embodiment of the present disclosure, the simulated motion perception data is input into the neural network model to be trained, so that the neural network model to be trained outputs the predicted robot lift-off state and category, including:
[0017] Preprocess the simulated motion perception data to obtain a time series feature vector;
[0018] The time series feature vector is input into the neural network model to be trained to obtain the predicted robot's lift-off state and category.
[0019] In an exemplary embodiment of the present disclosure, the neural network to be trained includes:
[0020] Input layer, used to receive time series feature vectors;
[0021] The hidden layer is used to extract time series features from the time series feature vector using a preset neural network model to obtain a time series feature representation;
[0022] The output layer is used to map the time series feature representation into a state category prediction value, and determine the predicted robot lift-off state and the corresponding category based on the state category prediction value.
[0023] In an exemplary embodiment of the present disclosure, preprocessing is performed on the simulated motion perception data to obtain a time series feature vector, including:
[0024] Normalizing the simulated motion perception data, and segmenting the normalized simulated motion perception data according to a preset time window to generate time series feature data;
[0025] The time series feature data are spliced in the order of time windows to obtain the time series feature vector.
[0026] In an exemplary embodiment of the present disclosure, applying a vertical external force to a robot in a training environment to obtain first training sample data includes:
[0027] In a robot dynamics simulation environment for reinforcement learning training, a vertical external force is applied to the robot to lift the robot off the ground, and simulated motion perception data of the robot during the lifting process and the first category of robot lifting state are collected to constitute first training sample data.
[0028] In an exemplary embodiment of the present disclosure, in a training environment, applying a lateral external force to a robot to obtain second training sample data includes:
[0029] In a robot dynamics simulation environment used for reinforcement learning training, a lateral external force is applied to the robot to make it leave the ground, and simulated motion perception data of the robot during the lifting process and the second category of robot lifting state are collected to constitute the second training sample data.
[0030] In an exemplary embodiment of the present disclosure, calculating the joint loss based on the predicted robot lift-off state and category and the robot lift-off state and category in each training sample data includes:
[0031] Calculate the state loss based on the predicted robot lift-off state and the robot lift-off state in each training sample data;
[0032] Calculate the category loss based on the predicted category and the category in each training sample data;
[0033] Calculate the joint loss based on the state loss and category loss.
[0034] In an exemplary embodiment of the present disclosure, calculating the joint loss based on the state loss and the category loss includes:
[0035] according to:
[0036]
[0037] Calculating joint loss ;
[0038] in, is the state loss, is the category loss, is the first i The robot's off-ground state of the training sample, is the first i The category corresponding to the robot's off-ground state of the training sample, For the i The robot's ground-lift state predicted by the training samples, For the i The category corresponding to the robot's off-ground state predicted by the training samples, is the number of batch samples, and λ is a hyperparameter used to balance state loss and category loss.
[0039] In an exemplary embodiment of the present disclosure, calculating the state loss according to the predicted robot lift-off state and the robot lift-off state in each training sample data includes:
[0040]
[0041] in, is the state loss, is the first i The robot's off-ground state of the training sample, For the i The robot's off-ground state is predicted based on the training samples.
[0042] In an exemplary embodiment of the present disclosure, calculating the category loss according to the predicted category and the category in each training sample data includes:
[0043]
[0044] in , is the category loss, , is the first i The category corresponding to the robot's off-ground state of the training sample, , for thei The category corresponding to the robot's off-ground state predicted by the training samples, is the number of categories, For the i The training samples are predicted to be k The probability of the categories, is the indicator function, hour, ,exist hour, .
[0045] According to a second aspect of the present disclosure, a method for detecting a robot off-ground state is provided, comprising:
[0046] Obtain the robot's motion perception data;
[0047] Input the motion perception data into the pre-trained robot lift-off state detection model to detect the robot's lift-off state;
[0048] The robot off-ground state detection model is obtained according to the robot off-ground state detection model training method in the first aspect of the present disclosure.
[0049] In an exemplary embodiment of the present disclosure, when it is detected that the robot is in an off-ground state, the first category or the second category corresponding to the off-ground state is output.
[0050] In an exemplary embodiment of the present disclosure, the method further includes:
[0051] When it is determined that the robot is in the off-ground state and the category corresponding to the off-ground state belongs to the first category, the robot is controlled to switch from the current motion mode to the protection mode.
[0052] In an exemplary embodiment of the present disclosure, the method further includes:
[0053] When it is determined that the robot is in the off-ground state and the category corresponding to the off-ground state belongs to the first category, the robot is controlled to stop moving or enter a damping state.
[0054] According to a third aspect of the present disclosure, a robot lift-off state detection model training device is provided, comprising:
[0055] A first training data acquisition module is configured to apply a vertical external force to the robot in a training environment to obtain first training sample data; wherein the first training sample data includes simulated motion perception data and a first category of robot lift-off state;
[0056] A second training data acquisition module is configured to apply a lateral external force to the robot in a training environment to obtain second training sample data; wherein the second training sample data includes simulated motion perception data and a second category of robot off-ground state;
[0057] A lift-off state prediction module is used to input the simulated motion perception data into the neural network model to be trained, so that the neural network model to be trained outputs the predicted lift-off state and category of the robot;
[0058] The network model training module is used to calculate the joint loss based on the predicted robot's lift-off state and category and the robot's lift-off state and category in each training sample data, and to update the neural network model to be trained based on the joint loss to obtain a robot lift-off state detection model.
[0059] According to a fourth aspect of the present disclosure, there is provided a robot off-ground state detection device, comprising:
[0060] A perception data acquisition module is used to obtain the robot's motion perception data;
[0061] The lift-off state detection module is used to input motion perception data into a pre-trained robot lift-off state detection model to perform lift-off state detection on the robot;
[0062] The robot off-ground state detection model is obtained according to the robot off-ground state detection model training method in the first aspect of the present disclosure.
[0063] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0064] processor; and
[0065] The memory stores computer-readable instructions, which implement the method of the above embodiment when executed by the processor.
[0066] According to a fourth aspect of the present disclosure, there is provided a robot comprising:
[0067] processor; and
[0068] The memory stores computer-readable instructions, which implement the method of the above embodiment when executed by the processor.
[0069] In an exemplary embodiment of the present disclosure, the robot includes any one of a legged robot, a quadruped robot, a biped robot, a wheeled robot, a wheel-legged robot, a quadrupedal robot, a humanoid robot, and a mobile robot.
[0070] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program code instructions are stored. When the computer program code instructions are called by a processor of a robot, the robot executes the method as described in the above embodiment.
[0071] It can be seen from the above technical solutions that the present disclosure has at least one of the following advantages and positive effects:
[0072] The present disclosure provides a method for training a robot lift-off state detection model. By applying vertical and lateral external forces to the robot in a training environment, training sample data containing different disturbance causes is constructed, and the simulated motion perception data is input into the neural network model to be trained. The model parameters are optimized by a joint loss function, so that the robot lift-off state detection model finally trained has the ability to distinguish lift-off states induced by different disturbance directions. Therefore, in actual deployment, it can address the high misjudgment rate of traditional detection schemes based on hub motor feedback or foot-end force feedback in dynamic scenarios, and avoid the lift-off state recognition deviation caused by human occlusion, complex terrain interference, or indistinguishable force disturbance directions. The present disclosure does not need to rely on foot-end contact sensors or multi-point force feedback devices, and overcomes the reliability deficiencies in related technologies caused by the complex structure, fragility, and inconvenient maintenance of external physical sensors. At the same time, it avoids the problem that traditional dynamic estimation methods are highly dependent on robot structural parameters and are difficult to adapt to conditions with severe force fluctuations. Furthermore, by explicitly constructing liftoff states under vertical and lateral disturbances and labeling them with different category labels, the neural network model is equipped with the ability to extract and attribute features specific to the disturbance direction, thereby enhancing the model's recognition stability and directional perception robustness in complex dynamic interference scenarios in actual deployment environments. Furthermore, the introduced joint loss function balances state recognition accuracy and category discrimination consistency, enabling the trained detection model to not only determine liftoff but also output the cause and category of the liftoff behavior. This provides more interpretable state information support for subsequent control modules, helping to accurately trigger or inhibit protection mechanisms and avoid the problem of incorrect control strategy execution caused by misjudgment of liftoff type in related solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0074] Figure 1A system architecture diagram is shown to which the robot off-ground state detection model training method and the robot off-ground state detection method in the embodiments of the present disclosure can be applied.
[0075] Figure 2 A flow chart of a method for training a robot off-ground state detection model in an embodiment of the present disclosure is shown.
[0076] Figure 3 A schematic diagram of a robot dynamics simulation environment in an embodiment of the present disclosure is shown.
[0077] Figure 4 A schematic diagram of a process for predicting the robot's ground-lift state and category in an embodiment of the present disclosure is shown.
[0078] Figure 5 A schematic diagram of a process for calculating joint loss in an embodiment of the present disclosure is shown.
[0079] Figure 6 A schematic diagram illustrating the principles of a robot lift-off state detection model training method in an embodiment of the present disclosure is shown.
[0080] Figure 7 A flow chart of a method for detecting a robot's off-ground state in an embodiment of the present disclosure is shown.
[0081] Figure 8 A schematic diagram showing the principle of a method for detecting a robot's off-ground state in an embodiment of the present disclosure is shown.
[0082] Figure 9 A block diagram of a robot off-ground state detection model training device in an embodiment of the present disclosure is shown.
[0083] Figure 10 A block diagram of a robot off-ground state detection device in an embodiment of the present disclosure is shown.
[0084] Figure 11 A schematic diagram of a robot in an embodiment of the present disclosure is shown.
[0085] Figure 12 A schematic diagram of another robot in an embodiment of the present disclosure is shown.
[0086] Figure 13 A schematic diagram of another robot in an embodiment of the present disclosure is shown.
[0087] Figure 14 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present disclosure is shown.
[0088] Figure 15 A schematic diagram of a computer-readable storage medium in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0089] In this disclosure, the terms "first" and "second" are used for descriptive purposes only and do not indicate relative importance or imply the number of technical features. Therefore, "first" and "second" may explicitly or implicitly include at least one of these features. "Multiple" means at least two, unless expressly limited otherwise.
[0090] Figure 1 A system architecture diagram is shown to which the robot off-ground state detection model training method and the robot off-ground state detection method in the embodiments of the present disclosure can be applied.
[0091] like Figure 1 As shown, system architecture 100 may include a terminal device 101, a robot 102, a network 103, and a server 104. Terminal device 101 includes, but is not limited to, desktop computers, laptops, smartphones, and tablet computers. Terminal device 101 can serve as an interactive interface, providing visualization capabilities to display the operating status and motion trajectory of robot 102. It can also be used to configure training parameters, control the training process, monitor model training status, and support sending motion control commands to robot 102.
[0092] Taking the robot off-ground state detection model training method in the embodiment of the present disclosure as an example, the robot 102 is deployed in a training environment and is equipped with a variety of sensors to collect its own motion state information under different tasks. It can execute action strategies under the control of the server 104 to complete the corresponding training tasks. Exemplarily, the robot 102 can generate simulated motion perception data under the action of external forces for constructing training sample data. Specifically, the robot 102 generates first category training sample data and second category training sample data in the process of receiving vertical external forces and lateral external forces applied by the terminal device 101 or the environmental device. In the example implementation of the present disclosure, various types of training sample data include simulated motion perception data collected by the robot 102 through built-in sensors such as an inertial measurement unit and the corresponding robot off-ground state category.
[0093] Server 104 is equipped with a training module for implementing a robot lift-off detection model. For example, it can receive training sample data from robot 102, store it, and preprocess it. The simulated motion perception data is then fed into the neural network model to be trained, resulting in a predicted robot lift-off state and its category. A joint loss function is calculated based on the predicted results and the true labels in the training samples, and the model parameters are iteratively optimized. After training is complete, the final trained robot lift-off detection model is saved and deployed to robot 102 for inference applications, enabling the joint recognition of lift-off states and lift-off categories.
[0094] The network 103 is used to provide a medium for communication links between the terminal device 101, the robot 102 and the server 104. The network 103 may include various connection types, such as wired, wireless communication links or fiber optic cables, etc. It should be understood that Figure 1 The number and types of terminal devices, robots, networks, and servers in the embodiment are merely illustrative. Depending on the implementation requirements, any number and type of terminal devices, robots, networks, and servers may be used.
[0095] Through the coordinated operation of various parts in the system architecture 100, a neural network model with the ability to recognize and classify off-ground states can be efficiently trained, providing key support for the robot's abnormal state perception, self-stabilizing control and fault-tolerant mechanism.
[0096] The present disclosure provides a method for training a robot off-ground state detection model. Figure 2 As shown, the method may include the following steps S201 to S204:
[0097] Step S201: applying a vertical external force to the robot in a training environment to obtain first training sample data; wherein the first training sample data includes simulated motion perception data and a first category of robot off-ground state;
[0098] Step S202: applying a lateral external force to the robot in a training environment to obtain second training sample data; wherein the second training sample data includes simulated motion perception data and a second category of robot off-ground state;
[0099] Step S203: inputting the simulated motion perception data into the neural network model to be trained, so that the neural network model to be trained outputs the predicted robot lift-off state and category;
[0100] Step S204 , calculating the joint loss based on the predicted robot lift-off state and category and the robot lift-off state and category in each training sample data, and updating the neural network model to be trained based on the joint loss to obtain a robot lift-off state detection model.
[0101] The robot lift-off state detection model training method provided in the example embodiment of the present disclosure is implemented. By applying vertical and lateral external forces to the robot in a training environment, training samples containing different disturbance causes are collected, and the simulated motion perception data is input into the neural network model for training. The constructed robot lift-off state detection model has the ability to distinguish the lift-off state induced by the disturbance direction, which can effectively reduce the misjudgment rate of traditional motor-based or force feedback methods in dynamic scenarios. This method does not need to rely on foot-end sensors or complex force feedback devices, which improves the reliability of the system, reduces the dependence on structural parameters, and enhances the adaptability under complex disturbances. In addition, through category labeling, direction perception and attribution capabilities are achieved, and the recognition stability of the model in complex dynamic environments is improved. The final detection model can output the lift-off state and its cause, which improves the interpretability and response accuracy of the control strategy.
[0102] The following describes in detail the training method for the robot lift-off state detection model in this exemplary embodiment.
[0103] In step S201 , in a training environment, a vertical external force is applied to the robot to obtain first training sample data; wherein the first training sample data includes simulated motion perception data and a first category of robot off-ground state.
[0104] The training environment refers to the robot dynamics simulation environment used for reinforcement learning training. Figure 3 The figure shows a schematic diagram of a robot dynamics simulation environment in this example embodiment. It should be noted that this training environment has been used to train robots' ground-walking strategies. Its physical modeling accuracy and motion scene settings have been verified, and it exhibits good stability and simulation realism. In this disclosed example embodiment, by directly deploying the training process of the robot's lift-off state detection model within this training environment, the existing simulation training platform can be fully reused, avoiding the development and debugging costs required to rebuild a dedicated training environment. Moreover, carrying out lift-off state detection tasks on this basis can also efficiently collect training data that closely resembles real-world control scenarios. For example, the reinforcement learning training environment in this example embodiment can be built based on physics engines such as PyBullet (a Python version of the Bullet physics engine) or MuJoCo (Multi-Joint dynamics with Contact, a multi-joint dynamics engine with contact modeling), and integrate virtual joint encoders, torque sensors, and IMU (Inertial Measurement Unit) modules.
[0105] It is understood that the training environment should include mechanisms for external force intervention, synchronous sensor data collection, and controllable robot posture changes to facilitate the collection of high-quality lift-off training samples. Multiple sensor types can be integrated into the training environment, including but not limited to inertial measurement devices, force sensors, and joint encoders, to obtain multimodal sensory data during lift-off events.
[0106] However, during the training process, in order to prevent the lift-off state detection task from interfering with the existing level-ground walking control strategy, all network parameters except for the lift-off state detection task can be frozen. That is, only the network parameters of the neural network model to be trained for lift-off detection will be updated during training, ensuring that the existing strategy network remains unchanged.
[0107] For example, in a robot dynamics simulation environment used for reinforcement learning training, a vertical external force can be applied to the robot to make the robot leave the ground, and simulated motion perception data of the robot during the lifting process and the first category of robot lifting state are collected to constitute the first training sample data.
[0108] A vertical external force refers to an external mechanical force applied to the robot body in the direction of gravity, used to cause the robot to lift off the ground vertically, simulating a real-world jump. This type of external force application offers strong intervention and controllability, significantly improving the ability to represent lift-off states in training sample data. For example, in a reinforcement learning training environment for a bipedal robot, vertical external force can be applied via a gravity perturbation module, while lateral external force can be achieved via a horizontal impulse generator; however, this exemplary embodiment is not limited to these.
[0109] In a real-world environment, the robot can be lifted upward by a human operator, or pulled upward by a mechanical structure such as an electric hanger, to lift the robot off the ground under the action of a vertical external force. Furthermore, the vertical external force applied to the robot can be applied to the upper torso of the robot or other stable structure near its center of gravity. This is not a limitation in this disclosure; as long as the applied vertical force can completely lift the robot's legs off the ground, it will suffice.
[0110] Simulated motion perception data refers to perception data generated in a simulation environment during the training phase that reflects the robot's dynamic state and serves as input for neural network model training. This data simulates the robot's state changes when subjected to external forces or when performing specific actions, and serves as the foundational features for the neural network model to learn about its lift-off state.
[0111] For example, the simulated motion sensing data may include the joint position, joint velocity, and joint torque corresponding to each joint of the robot to reflect the posture changes and dynamic characteristics of the robot during the lift-off process. Among them, the joint position represents the current angle or linear displacement of the joint, which is used to describe the robot posture, such as collecting the joint position through the encoder on the motor shaft. The joint velocity represents the rate of change of the joint angle, which is used to describe the dynamic motion behavior of the joint, such as it can be obtained through encoder position differential calculation, or directly output through the built-in speed measuring motor. The joint torque represents the current output torque of the joint driver, which is used to evaluate the joint load state and joint response capability, such as through direct measurement by a torque sensor installed on the joint shaft or motor output end, or indirectly estimated by the drive current.
[0112] For another example, in order to improve the recognition accuracy of the neural network model for different off-ground states, the simulated motion perception data can also include inertial measurement data, such as obtaining the robot's linear acceleration through the accelerometer in the inertial measurement device equipped with the robot and obtaining joint angular velocity information through the gyroscope.
[0113] Introducing inertial measurement data as an auxiliary input feature during the training process helps improve the model's ability to distinguish different motion states. This is especially true when the robot undergoes violent dynamic responses due to external forces such as pushing, pulling, and dragging. This can effectively avoid misjudging such states as off-the-ground states where protective measures need to be taken.
[0114] Of course, the specific composition of the simulated motion perception data can be flexibly configured according to the needs and accuracy requirements of the training task, and this disclosure does not limit this.
[0115] In the example embodiments of the present disclosure, the first category of robot lift-off states includes a first robot lift-off state and a corresponding first category. The first robot lift-off state indicates whether the robot lifts off due to a vertical external force, and the first category identifies whether the robot lifts off due to a vertical external force, distinguishing it from other types of lift-off situations.
[0116] This step actively induces the robot to lift off the ground by applying a controllable vertical external force in the training environment, thereby constructing representative training sample data. This allows the collected simulated motion perception data to cover the typical lift-off state change process. By simultaneously labeling the first category of robot lift-off states, a complete and clearly labeled supervision sample is formed, thereby providing a high-quality data foundation for the effective training of the subsequent lift-off state detection model.
[0117] In step S202, in a training environment, a lateral external force is applied to the robot to obtain second training sample data; wherein the second training sample data includes simulated motion perception data and a second category of robot off-ground state.
[0118] Exemplarily, in a robot dynamics simulation environment for reinforcement learning training, a lateral external force is applied to the robot to lift the robot off the ground, and simulated motion perception data of the robot during the lifting process and the lifting state of the second category of robots are collected to constitute second training sample data.
[0119] A lateral external force refers to an external mechanical force applied to the robot primarily in the horizontal direction, non-collinear with the direction of gravity, to cause the robot to lift off the ground, as opposed to vertically. For example, a lateral external force can be a periodic or intermittent push, pull, or drag applied to the robot to simulate the effects of a lateral impact, traction disturbance, or unbalanced external force in real-world scenarios, resulting in a momentary suspended or lifted-off state.
[0120] For example, for a bipedal robot, a human operator can apply thrust from the side, front, or rear of the robot, or pull the robot horizontally or diagonally using a mechanical structure such as an electric hanger, so that the robot momentarily lifts off the ground under the action of a lateral external force. Furthermore, when applying a lateral external force to the robot, the force can be applied to the upper part of the robot's trunk or other stable structure near its center of gravity. This is not a limitation in this disclosure; as long as the applied lateral external force can completely lift the robot's legs off the ground, it will suffice.
[0121] It is understandable that the simulated motion perception data in the second training sample data may include joint positions, joint velocities, and joint torques collected synchronously during the application of a lateral external force to the robot, and may further include inertial measurement data. Accordingly, the second category of robot lift-off states includes a second robot lift-off state and a corresponding second category. The second robot lift-off state is used to indicate whether the robot lifts off the ground under the intervention of a lateral external force, and the second category is used to identify whether the robot lifts off the ground under the action of a lateral external force, and is used to distinguish it from a lift-off state caused by a vertical external force.
[0122] The second training sample data, combined with the first training sample data, builds the model's ability to perceive lift-off states under different external forces. By systematically applying lateral forces in a training environment and collecting corresponding state data, the model's accuracy and robustness in recognizing lift-off states in complex scenarios can be effectively improved.
[0123] In step S203, the simulated motion perception data is input into the neural network model to be trained, so that the neural network model to be trained outputs the predicted robot's off-ground state and category.
[0124] For example, the simulated motion perception data obtained through steps S201 and S202 can be input into the neural network model to be trained, so that the neural network model learns and outputs a prediction result, which includes the robot's lift-off state and category. It is understood that the robot's lift-off state includes a lift-off state and a non-lift-off state. The category refers to the category to which the robot belongs when it is in the lift-off state, including a first category and a second category. The first category identifies lift-off caused by a vertical external force, and the second category identifies lift-off caused by a lateral external force.
[0125] Among them, the neural network model to be trained can be flexibly selected according to the task requirements. It can be a simple multi-layer perceptron or convolutional neural network, or a recurrent neural network with time series modeling capabilities. It can also adopt a Transformer structure or graph neural network that integrates an attention mechanism to improve the ability to distinguish complex off-the-ground states. The present disclosure does not limit the specific type of the neural network model to be trained.
[0126] In some example implementations, reference Figure 4 As shown, step S203 may include the following steps S401 and S402:
[0127] Step S401 : pre-processing the simulated motion perception data to obtain a time series feature vector.
[0128] Since simulated motion perception data contains multi-channel and multi-modal input sources, such as joint position, joint velocity, joint torque, linear acceleration, angular velocity, etc., it is necessary to preprocess the simulated motion perception data to facilitate the efficient extraction of feature information from the neural network model to be trained and improve the training convergence effect of the model.
[0129] For example, the simulated motion perception data may be normalized, and the normalized simulated motion perception data may be segmented according to a preset time window to generate time series feature data.
[0130] Specifically, simulated motion perception data, such as joint position, joint velocity, joint torque, and linear acceleration, are numerically normalized based on historical statistical characteristics. For example, linear normalization can be performed on simulated motion perception data, such as scaling each data type to the interval [0, 1]. Alternatively, Z-score (zero mean) normalization can be performed on simulated motion perception data to eliminate numerical differences between different physical dimensions, thus avoiding gradient imbalance or convergence difficulties during training.
[0131] Then, the normalized simulated motion perception data is segmented according to the preset time window length. For example, the preset time window length can be 100ms, 200ms, etc., which is not limited in the present disclosure. It can be understood that each time window corresponds to a continuous sequence of sensor data, reflecting the dynamic state changes of the robot within the time period. For example, in order to ensure that the constructed training samples have sufficient coverage and time continuity, the normalized simulated motion perception data can be segmented by a sliding window method, that is, sliding on the time axis with a fixed step size, gradually intercepting multiple windows, and generating multiple non-overlapping time series feature data.
[0132] The time series feature data is then concatenated according to the time window sequence to obtain a time series feature vector. Specifically, the time series feature data within each time window can be concatenated according to the time window sequence, and the data from different channels can be arranged in order to construct a complete time series feature vector. This vector serves as the input to the neural network model to be trained. For example, it can be a three-dimensional tensor denoted as [B, T, C], where B is the number of samples input in a training session, T is the number of time steps (i.e., the time window length), and C is the number of perceptual channels per time step.
[0133] This step can effectively convert multi-source, continuous, and heterogeneous perception data into input vectors with standardized structures and consistent feature distribution, enabling the neural network model to fully learn the temporal characteristics of the robot's state changes before and after leaving the ground, thereby improving the accuracy and robustness of the lift-off state judgment.
[0134] Step S402: Input the time series feature vector into the neural network model to be trained to obtain the predicted robot's lift-off state and category.
[0135] The neural network to be trained may include an input layer, a hidden layer, and an output layer. Specifically, the input layer is used to receive a time series feature vector. The hidden layer is used to extract time series features from the time series feature vector using a preset neural network model to obtain a time series feature representation. For example, the hidden layer may adopt a recurrent neural network, a long short-term memory network, a one-dimensional convolutional network, a gated recurrent unit, or a Transformer structure. The hidden layer extracts a high-order feature representation that can reflect the state evolution trend of the robot by modeling the temporal dependency between multiple frames of perception information, and obtains a set of compressed time series feature representations as a basis for judging the off-the-ground state. The output layer is used to map the time series feature representation into a state category prediction value, and determine the predicted robot off-the-ground state and the corresponding category based on the state category prediction value.
[0136] Exemplarily, the output layer may include a first output head and a second output head in parallel, each used to identify whether the robot is in a lift-off state and to identify the category of the lift-off state. The first output head is used to map the temporal feature representation into a state prediction value, and to determine the predicted lift-off state of the robot based on the state prediction value. Specifically, the first output head may include a fully connected layer containing two types of states, combined with softmax The activation function outputs the classification probabilities of "off the ground" and "not off the ground." The predicted robot state is then determined based on the maximum probability of this output. For example, if the state probabilities output by the first output head are 0.8 and 0.2, the robot is determined to be off the ground.
[0137] The second output head is used to map the same temporal feature representation into a category prediction value, and determine the category corresponding to the predicted robot lift-off state according to the category prediction value. Specifically, the second output head may include a softmax The activated fully connected layer outputs a probability distribution for "class 1" and "class 2." This probability distribution can then be used to determine the specific class of the current liftoff state. For example, if the class probabilities output by the second output head are 0.2 and 0.8, the current liftoff state can be determined to be class 2, triggered by lateral external force.
[0138] This parallel structure allows the neural network to simultaneously output both "lift-off" and "lift-off reason" in the same forward propagation, achieving decoupled modeling of state recognition and classification. This facilitates multi-task training, independent error feedback, and flexible use of different subtask outputs during deployment. Of course, the output layer can also contain only a single output head, which can simultaneously output the predicted robot lift-off state and category, but this disclosure is not limited to this.
[0139] In this step, the neural network model to be trained can accurately model the robot's motion perception sequence under different disturbance conditions, realize automatic identification of whether it is off the ground and its off-ground trigger category, and significantly improve the intelligence level and generalization ability of off-ground state detection.
[0140] In step S204, the joint loss is calculated based on the predicted robot lift-off state and category and the robot lift-off state and category in each training sample data, and the neural network model to be trained is updated based on the joint loss to obtain a robot lift-off state detection model.
[0141] In the example implementation of the present disclosure, the prediction results output by the neural network model are compared with the corresponding true labels in each training sample data, and a joint loss function is constructed accordingly to guide the parameter optimization process of the neural network model to be trained.
[0142] Specifically, the neural network model outputs two results during the forward propagation phase: the predicted robot lift-off state and the corresponding category for that lift-off state. The training sample data also includes corresponding supervisory labels, indicating whether the robot is lift-off and the category of that lift-off state. By comparing the predicted results with the true labels, the state recognition error and the category classification error can be calculated.
[0143] To achieve joint optimization of the two tasks, a joint loss can be constructed. This loss consists of two parts: a state loss and a class loss. The state loss measures the accuracy of the trained neural network model in distinguishing between "off-the-ground" and "on-the-ground," while the class loss measures the network's accuracy in distinguishing between "first category" and "second category." By setting appropriate weights, the two loss terms can be balanced according to task importance, ensuring that the network maintains both classification accuracy and state discrimination stability.
[0144] In each round of training, backpropagation and gradient updates are performed on all trainable parameters of the neural network model to be trained based on the joint loss, gradually optimizing the model's feature extraction and discrimination performance. Ultimately, a robot lift-off detection model is developed that accurately determines whether the robot is off the ground and identifies its lift-off category. Furthermore, the model's training process can be iteratively updated using algorithms such as stochastic gradient descent until the model reaches the desired accuracy or the loss converges.
[0145] In some example implementations, reference Figure 5 As shown, the process of calculating the joint loss may include the following steps S501 to S503:
[0146] Step S501, calculating the state loss based on the predicted robot lift-off state and the robot lift-off state in each training sample data;
[0147] For example, the state loss can be calculated according to formula (1):
[0148] (1)
[0149] in, is the state loss, is the first i The robot's off-ground state of the training sample, For the i The robot's ground-lift state is predicted by the training samples. Approaching When , the state loss is smaller, on the contrary, when Deviation , the state loss increases, which prompts the network to adjust parameters to improve prediction accuracy during training.
[0150] Step S502, calculating the category loss based on the predicted category and the category in each training sample data;
[0151] For example, the category loss can be calculated according to formula (2), including:
[0152] (2)
[0153] in , is the category loss, , is the first i The category corresponding to the robot's off-ground state of the training sample, , for the i The category corresponding to the robot's off-ground state predicted by the training samples, is the number of categories, For the i The training samples are predicted to be k The probability of the categories, is the indicator function, hour, ,exist hour, , which is used to select the predicted probability corresponding to the correct category for joint loss calculation.
[0154] Step S503, calculating the joint loss based on the state loss and the category loss;
[0155] For example, you can:
[0156] (3)
[0157] Calculating joint loss ;in, is the state loss, is the category loss, is the first i The robot's off-ground state of the training sample, is the first i The category corresponding to the robot's off-ground state of the training sample, For the i The robot's ground-lift state predicted by the training samples, For the i The category corresponding to the robot's off-ground state predicted by the training samples, is the number of batch samples, and λ is a hyperparameter used to balance state loss and category loss.
[0158] Through this joint training mechanism, the neural network model can simultaneously learn the key features of the two tasks of off-ground state discrimination and category classification, achieving high-precision, multi-category robot off-ground state recognition capabilities.
[0159] Of course, a task-based optimization strategy can also be adopted, that is, independent loss functions are constructed for the state recognition task and the category discrimination task respectively, and backpropagation and parameter updates are performed at different stages to improve the convergence speed and generalization ability of each task. The present invention is not limited to this, and the joint optimization or separate optimization method can be flexibly selected according to the model structure and application requirements.
[0160] refer to Figure 6 As shown in FIG, a schematic diagram of the principle of a robot off-ground state detection model training method is shown. Figure 6 In the example, a vertical external force F1 can be applied to the robot to cause it to lift off the ground. During this process, the robot's simulated motion perception data is synchronously collected and combined with the first category of robot lift-off states to form first training sample data 601. A lateral external force F2 can be applied to the robot to cause it to lift off the ground due to a non-vertical external force. Similarly, simulated motion perception data of the robot during the lift-off process is collected and combined with the second category of robot lift-off states to form second training sample data 602. The first training sample data 601 and the second training sample data 602 are then used as input to the neural network model to be trained 603 for joint training. During the training process, state loss and category loss are respectively constructed to optimize the classification accuracy of the model output. Backpropagation and parameter updates are then performed using the joint loss to complete the model training process, ultimately resulting in a robot lift-off state detection model 604. This model has the ability to infer and judge the input robot motion perception data and can output whether the robot is off the ground and the trigger category when it is in the lift-off state.
[0161] By introducing vertical and lateral external forces as trigger conditions, the distribution characteristics of training data can be enriched, improving the model's generalization ability for lift-off states. Furthermore, by jointly training simulated motion perception data with category labels, the robot can recognize and classify lift-off states under different external force disturbances. The resulting robot lift-off state detection model is deployable and real-time, and can be integrated into robotic systems for lift-off monitoring, mode switching, or safety protection in real-world operations.
[0162] The exemplary embodiment of the present disclosure also provides a method for detecting a robot off-ground state, referring to Figure 7 As shown, the method may include the following steps S701 and S702:
[0163] Step S701: Acquire motion perception data of the robot.
[0164] Unlike the simulated motion perception data used in the training phase, the motion perception data in this step refers to the sensor data collected in real time by various sensors onboard the robot after the model is deployed. This motion perception data includes, but is not limited to, the joint positions, joint velocities, and joint torques of each joint, as well as inertial measurement data provided by the inertial measurement device, which comprehensively reflects the robot's current posture and dynamic motion state. This motion perception data serves as the input basis for the subsequent lift-off state detection model, providing reliable perceptual support for online state determination.
[0165] Step S702: Input the motion sensing data into a pre-trained robot lift-off state detection model to perform lift-off state detection on the robot.
[0166] Motion perception data is fed into a trained and deployed robot lift-off detection model. This model extracts and discriminates features from the motion perception data, detecting whether the robot is currently lift-off. This detection process relies on inference based on the characteristic patterns learned during training, eliminating the need for additional labeling and enabling real-time automatic recognition of the robot's lift-off state.
[0167] It can be understood that the robot off-ground state detection model is trained according to the robot off-ground state detection model training method described in detail in other embodiments of the present disclosure, and will not be repeated here.
[0168] Additionally, when the robot is detected to be in a lift-off state, the first or second category corresponding to the lift-off state is output. Specifically, when the pre-trained robot lift-off state detection model determines that the robot is in a lift-off state, the model also outputs the category corresponding to the lift-off state to further indicate the triggering mechanism of the lift-off event. The category corresponding to the lift-off state can be the first or second category, corresponding to lift-off states caused by vertical or lateral external forces, respectively, to classify and identify different types of lift-off situations.
[0169] Furthermore, when it is determined that the robot is in a lift-off state and the lift-off state corresponds to the first category, that is, when it is determined that the robot is currently in a lift-off state and the lift-off state corresponds to the lift-off state caused by a vertical external force, the robot can be controlled to stop movement or enter a damping state according to a preset control strategy. For example, the robot can be controlled to switch from a current motion mode to a protection mode. In other words, when it is detected that the robot is lifted off the ground due to a vertical disturbance, protective control actions can be proactively taken to reduce the risk of instability or structural damage that may occur during subsequent movement.
[0170] Exemplarily, the protection mode may include, but is not limited to: controlling the joints of the robot to enter the damping mode to buffer the dynamic response, reducing the output power of the joints to avoid high-energy impact, limiting the update frequency of the control instructions to reduce the response amplitude, and executing a set of preset safety actions such as bending the legs, folding the limbs, entering a static posture, etc., to quickly restore the stability of the system. The present disclosure does not specifically limit the control strategy adopted in the protection mode.
[0171] refer to Figure 8 As shown in FIG, a schematic diagram of the principle of a method for detecting a robot's off-ground state is shown. Figure 8 In the process, after the robot lift-off state detection model 604 is deployed to the robot, the robot's current motion mode is set to the level ground walking mode. The robot then performs a regular walking task according to the preset level ground walking strategy. During the robot's motion, the robot's motion perception data 801 can be obtained and input into the robot lift-off state detection model 604 in real time to determine whether the robot is currently in contact with the ground. If the robot lift-off state detection model 604 detects that the robot is currently in the non-lift-off state 802, the robot continues to maintain the level ground walking mode and continues to perform lift-off detection using the robot lift-off state detection model 604. If the robot lift-off state detection model 604 detects that the robot is currently in the lift-off state 803, the robot is controlled to switch from the current motion mode to the protection mode to handle lift-off behavior, such as performing posture adjustment and stability control to ensure a smooth landing of the robot. Finally, the robot automatically switches back to the level ground walking mode to continue performing the walking task.
[0172] By leveraging the robot's lift-off detection model for real-time lift-off state estimation and dynamically switching the robot's control strategy when it detects lift-off, the system can effectively switch to a protection mode, or intermediate buffer state, while the robot is off the ground. This improves the robot's operational stability and safety, helping it cope with external disturbances or stable control requirements in unusual terrain.
[0173] For example, referring to the table below, statistics show that the solution in the exemplary embodiment of the present disclosure has a significant improvement in accuracy and recall compared to the traditional solution:
[0174]
[0175] In an exemplary embodiment of the present disclosure, a robot off-ground state detection model training device is also provided. Figure 9 As shown, the robot lift-off state detection model training device 900 includes a first training data acquisition module 901, a second training data acquisition module 902, a lift-off state prediction module 903 and a network model training module 904, wherein:
[0176] A first training data acquisition module 901 is configured to apply a vertical external force to the robot in a training environment to obtain first training sample data; wherein the first training sample data includes simulated motion perception data and a first category of robot lift-off state;
[0177] A second training data acquisition module 902 is configured to apply a lateral external force to the robot in a training environment to obtain second training sample data; wherein the second training sample data includes simulated motion perception data and a second category of robot off-ground state;
[0178] The lift-off state prediction module 903 is used to input the simulated motion perception data into the neural network model to be trained, so that the neural network model to be trained outputs the predicted lift-off state and category of the robot;
[0179] The network model training module 904 is used to calculate the joint loss based on the predicted robot lift-off state and category and the robot lift-off state and category in each training sample data, and update the neural network model to be trained based on the joint loss to obtain a robot lift-off state detection model.
[0180] The specific details of each module in the above-mentioned robot lift-off state detection model training device have been described in detail in the corresponding robot lift-off state detection model training method, so they will not be repeated here.
[0181] In an exemplary embodiment of the present disclosure, a device for detecting a robot's off-ground state is also provided. Figure 10 As shown, the robot off-ground state detection device 1000 includes a perception data acquisition module 1001 and a off-ground state detection module 1002, wherein:
[0182] The perception data acquisition module 1001 is used to obtain the robot's motion perception data;
[0183] The lift-off state detection module 1002 is used to input motion sensing data into a pre-trained robot lift-off state detection model to perform lift-off state detection on the robot;
[0184] The robot off-ground state detection model is obtained according to the robot off-ground state detection model training method in the embodiment of the present disclosure.
[0185] The specific details of each module in the above-mentioned robot off-ground state detection device have been described in detail in the corresponding robot off-ground state detection method, so they will not be repeated here.
[0186] In an exemplary embodiment of the present disclosure, a robot is further provided, which includes a processor and a memory, wherein computer-readable instructions are stored in the memory, and the computer-readable instructions implement the above method when executed by the processor. The robot includes any one of a legged robot and a wheeled robot. The legged robot can be a quadruped robot, a biped robot, etc., and the wheeled robot can be a wheeled-legged robot, such as a quadrupedal robot. Of course, other types of mobile robots can also be used, and the present disclosure does not limit this. Reference Figures 11 to 13 As shown, three different robot schematics are shown respectively.
[0187] refer to Figure 14 As shown, an electronic device capable of implementing the above method is also provided. The electronic device 1400 includes a processor 1401 and a memory 1402. The memory 1402 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 1401, the method in the embodiment of the present disclosure is implemented.
[0188] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is further provided, on which computer program code instructions are stored. When the computer program code instructions are called by a processor of a robot, the robot executes the method as described in the embodiment.
[0189] refer to Figure 15 As shown, a program product 1500 for implementing the above-described method according to an embodiment of the present disclosure is described. This program product 1500 may be implemented in a portable compact disc read-only memory (CD-ROM) and include program code, and may be executed on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0190] Through the description of the above embodiments, it will be readily understood by those skilled in the art that the example embodiments described herein can be implemented via software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CDROM, USB flash drive, or mobile hard drive) or on a network and includes several instructions to enable a computing device (such as a personal computer, server, touch terminal, or network device) to execute the methods according to the embodiments of the present disclosure.
[0191] Finally, the above preferred embodiments are intended only to illustrate the technical solutions of this application and are not intended to be limiting. Although this application has been described in detail, those skilled in the art will appreciate that variations in form and detail may be made without departing from the scope of the claims. The dimensions of the drawings are not related to the actual objects and may be modified arbitrarily.
Claims
1. A robot off-ground state detection model training method, characterized in that: include: In a training environment, applying a vertical external force to the robot to obtain first training sample data; wherein the first training sample data includes simulated motion perception data and a first category of robot off-ground state; In a training environment, applying a lateral external force to the robot to obtain second training sample data; wherein the second training sample data includes simulated motion perception data and a second category of robot off-ground state; Inputting the simulated motion perception data into a neural network model to be trained, so that the neural network model to be trained outputs a predicted robot lift-off state and category; A joint loss is calculated based on the predicted robot lift-off state and category and the robot lift-off state and category in each of the training sample data, and the neural network model to be trained is updated based on the joint loss to obtain a robot lift-off state detection model.
2. The robot off-ground state detection model training method according to claim 1, characterized in that: The simulated motion sensing data includes joint positions, joint velocities, and joint torques.
3. The robot off-ground state detection model training method according to claim 1, characterized in that: The simulated motion perception data includes joint positions, joint velocities, joint torques and inertial measurement data.
4. The robot off-ground state detection model training method according to claim 1, characterized in that: Inputting the simulated motion perception data into the neural network model to be trained so that the neural network model to be trained outputs the predicted robot lift-off state and category, including: Preprocessing the simulated motion perception data to obtain a time series feature vector; The time series feature vector is input into the neural network model to be trained to obtain the predicted robot lift-off state and category.
5. The robot off-ground state detection model training method according to claim 4, characterized in that: The neural network to be trained includes: An input layer, configured to receive the time series feature vector; A hidden layer is used to extract time series features from the time series feature vector using a preset neural network model to obtain a time series feature representation; The output layer is used to map the time series feature representation into a state category prediction value, and determine the predicted robot lift-off state and the corresponding category based on the state category prediction value.
6. The robot off-ground state detection model training method according to claim 4, characterized in that: The preprocessing of the simulated motion perception data to obtain a time series feature vector includes: Normalizing the simulated motion perception data, and segmenting the normalized simulated motion perception data according to a preset time window to generate time series feature data; The time series feature data are spliced in the order of time windows to obtain the time series feature vector.
7. The robot off-ground state detection model training method according to claim 1, characterized in that: Applying a vertical external force to the robot in the training environment to obtain first training sample data includes: In a robot dynamics simulation environment for reinforcement learning training, a vertical external force is applied to the robot to lift the robot off the ground, and simulated motion perception data of the robot during the lifting process and the lifting state of the first category of robots are collected to constitute the first training sample data.
8. The robot off-ground state detection model training method according to claim 1, characterized in that: Applying a lateral external force to the robot in the training environment to obtain second training sample data includes: In a robot dynamics simulation environment for reinforcement learning training, a lateral external force is applied to the robot to make the robot leave the ground, and simulated motion perception data of the robot during the lifting process and the lifting state of the second category robot are collected to constitute the second training sample data.
9. The robot off-ground state detection model training method according to claim 1, characterized in that: The calculating of the joint loss based on the predicted robot lift-off state and category and the robot lift-off state and category in each of the training sample data includes: Calculating a state loss based on the predicted robot lift-off state and the robot lift-off state in each of the training sample data; Calculating category loss based on the predicted category and the category in each of the training sample data; The joint loss is calculated according to the state loss and the category loss.
10. The robot off-ground state detection model training method according to claim 9, characterized in that: The calculating the joint loss according to the state loss and the category loss includes: according to: Calculating joint loss ; in, is the state loss, is the category loss, is the first i The robot's off-ground state of the training sample, is the first i The category corresponding to the robot's off-ground state of the training sample, For the i The robot's ground-lift state predicted by the training samples, For the i The category corresponding to the robot's off-ground state predicted by the training samples, is the number of batch samples, and λ is a hyperparameter used to balance state loss and category loss.
11. The robot lift-off state detection model training method according to claim 9, characterized in that: The calculating the state loss according to the predicted robot lift-off state and the robot lift-off state in each training sample data includes: in, is the state loss, is the first i The robot's off-ground state of the training sample, For the i The robot's off-ground state is predicted based on the training samples.
12. The robot lift-off state detection model training method according to claim 9, characterized in that: The calculating the category loss according to the predicted category and the category in each of the training sample data includes: in , is the category loss, , is the first i The category corresponding to the robot's off-ground state of the training sample, , for the i The category corresponding to the robot's off-ground state predicted by the training samples, is the number of categories, For the i The training samples are predicted to be k The probability of the categories, is the indicator function, hour, ,exist hour, .
13. A method for detecting a robot's off-ground state, characterized in that: include: Obtain the robot's motion perception data; Inputting the motion sensing data into a pre-trained robot lift-off state detection model to perform lift-off state detection on the robot; The robot off-ground state detection model is obtained according to the robot off-ground state detection model training method according to any one of claims 1 to 12.
14. The method for detecting a robot's off-ground state according to claim 13, wherein: The method further comprises: When it is detected that the robot is in a lift-off state, the first category or the second category corresponding to the lift-off state is output.
15. The method for detecting a robot's off-ground state according to claim 14, wherein: The method further comprises: When it is determined that the robot is in the off-ground state and the category corresponding to the off-ground state belongs to the first category, the robot is controlled to switch from the current motion mode to the protection mode.
16. The method for detecting a robot's off-ground state according to claim 14, wherein: The method further comprises: When it is determined that the robot is in the off-ground state and the category corresponding to the off-ground state belongs to the first category, the robot is controlled to stop moving or enter a damping state.
17. A robot off-ground state detection model training device, characterized in that: include: A first training data acquisition module is configured to apply a vertical external force to the robot in a training environment to obtain first training sample data; wherein the first training sample data includes simulated motion perception data and a first category of robot off-ground state; A second training data acquisition module is configured to apply a lateral external force to the robot in a training environment to obtain second training sample data; wherein the second training sample data includes simulated motion perception data and a second category of robot off-ground state; A lift-off state prediction module, configured to input the simulated motion perception data into a neural network model to be trained, so that the neural network model to be trained outputs a predicted lift-off state and category of the robot; The network model training module is used to calculate the joint loss based on the predicted robot lift-off state and category and the robot lift-off state and category in each training sample data, and to update the neural network model to be trained based on the joint loss to obtain a robot lift-off state detection model.
18. A robot off-ground state detection device, characterized in that: include: A perception data acquisition module is used to obtain the robot's motion perception data; A lift-off state detection module, configured to input the motion sensing data into a pre-trained robot lift-off state detection model to perform lift-off state detection on the robot; The robot off-ground state detection model is obtained according to the robot off-ground state detection model training method according to any one of claims 1 to 12.
19. An electronic device, characterized in that: include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of claims 1 to 16.
20. A robot, characterized in that: include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of claims 1 to 16.
21. The robot according to claim 20, characterized in that The robot includes any one of a leg-type robot and a wheel-type robot.
22. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program code instructions, which, when called by a processor of a robot, enable the robot to execute the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Ground clearance detection method and device and mobile robot
CN116360431A
Robot control method and device based on ground clearance detection and robot
CN118056744A
Off-ground detection method and device, mobile robot and storage medium
CN112603202A
Mobile robot with anti-overturning function and anti-overturning method
CN114670243A