CN-117325158-B - Robot detection transverse impact method based on impact sensing neural network
Abstract
The application discloses a robot transverse impact detection method based on an impact sensing neural network, which comprises the steps of A, controlling a sensing device of a robot to acquire original pose data and extracting a measurement value sequence to be sensed from the original pose data, B, classifying the measurement value sequence to be sensed by using the trained impact sensing neural network to obtain a first target prediction probability and a second target prediction probability, and C, judging whether the first target prediction probability is larger than the second target prediction probability, if so, determining that the robot detects the robot to be subjected to transverse impact, otherwise, determining that the robot detects the robot to be not subjected to transverse impact. Therefore, the classification and identification by using the neural network can not be stopped after the validity judgment of the original pose data acquired by the sensing device in real time, and the classification and identification by using the neural network can not be started after the Kalman filtering of the original pose data acquired by the sensing device in real time, so that the efficiency of the robot in detecting the transverse impact is improved.
Inventors
- WANG KE
- ZHOU HEWEN
- BAO MINJIE
- DAI KUN
- XU RUNZE
- XIAO GANGJUN
Assignees
- 珠海一微半导体股份有限公司
- 哈尔滨工业大学
Dates
- Publication Date
- 20260505
- Application Date
- 20230928
Claims (9)
- 1. The robot transverse impact detection method based on the impact sensing neural network is characterized by comprising the following steps of: Step A, a sensing device of a control robot collects original pose data, and a measurement value sequence to be perceived is extracted from the original pose data; Step B, classifying the measurement value sequence to be perceived by utilizing a trained impact perception neural network to obtain a first target prediction probability and a second target prediction probability; Step C, judging whether the first target prediction probability is larger than the second target prediction probability, if so, determining that the robot detects that the robot is subjected to transverse impact, otherwise, determining that the robot detects that the robot is not subjected to transverse impact; the first target prediction probability is the probability that the measured value sequence to be perceived is classified as the measured value sequence extracted under the state that the robot is currently impacted transversely; The construction method of the trained impact sensing neural network comprises the following steps: Step 1, extracting a pre-sensing measured value sequence from pre-acquired pose data by utilizing a sliding window, wherein the length of the pre-sensing measured value sequence is the window length of the sliding window; step 2, connecting the pre-sensing measured value sequences along channels of corresponding dimensions to generate first input features; step 3, controlling the first input characteristic to perform multi-layer convolution operation and one-layer pooling operation in a pre-constructed impact sensing neural network to obtain the characteristic to be classified, wherein the impact sensing neural network is a neural network model constructed according to a construction mode of the convolution neural network, and comprises a plurality of convolution layers and one pooling layer which are continuously stacked; Step 4, classifying the features to be classified by using a softmax algorithm to obtain a first impact prediction probability and a second impact prediction probability; Step 5, calculating a loss value of the impact sensing neural network by using a first impact prediction probability and a second impact prediction probability based on a loss function, and updating the weight of the impact sensing neural network by a gradient descent method based on the loss function to obtain the impact sensing neural network after the weight is updated, wherein the loss function is a binary cross entropy, and the first impact prediction probability and the second impact prediction probability are prediction results of two classifications in the loss function respectively; and 6, repeatedly executing the steps 2 to 5 to realize that the impact sensing neural network with updated weight is input into the pre-sensing measured value sequence until the latest calculated loss value is smaller than a preset loss threshold value, and marking the impact sensing neural network with updated weight as the trained impact sensing neural network.
- 2. The method of claim 1, wherein the softmax algorithm occupies an output layer in the impact sensing neural network in the form of a softmax classifier; The softmax classifier is used for calculating a first impact prediction probability and a second impact prediction probability by utilizing the feature to be classified, wherein the feature to be classified is information output by two nodes connected to the feature to be classified after multilayer convolution operation and pooling operation; wherein the first impact prediction probability is a probability that the feature to be classified is classified as being derived from a measurement value sequence extracted under a state that the robot is impacted transversely, so as to form a1 st classification probability generated by the softmax algorithm; wherein the second impact prediction probability is a probability that the pre-sensed measurement value sequence or the feature to be classified is classified as originating from a measurement value sequence extracted in a state where the robot is not impacted laterally, to form a probability of a 2 nd classification generated by the softmax algorithm.
- 3. The method according to claim 2, wherein in repeating steps 2 to 5, each time the step 5 is performed, before calculating the loss value using the loss function, it is determined whether the first impact prediction probability obtained in step 4 is greater than the second impact prediction probability obtained in step 4, if so, the tag realism value required for the loss function is set to 1 and it is determined that the robot is currently predicted, otherwise, the tag realism value required for the loss function is set to 0 and it is determined that the robot is not currently predicted.
- 4. The method for detecting a lateral impact by a robot according to claim 1, wherein in the step 2, the manner of constructing the impact sensing neural network includes: Sequentially connecting 4 1-dimensional convolution layers, connecting a pooling layer, configuring the kernel length of each 1-dimensional convolution layer to be 3, configuring the moving step length of a convolution filter in each 1-dimensional convolution layer to be 1, and configuring pooling operation in the pooling layer to be an average operation so as to construct the impact sensing neural network; the original values of the weights of the convolution layers are randomly generated and are supported to be updated by the gradient descent method on the basis of determining the loss function, and the first input features and the weights of the convolution layers are configured in the convolution layers to perform convolution operation.
- 5. The method of detecting a lateral impact by a robot according to claim 4, wherein the operation method of step 3 includes: The first input features generated in the step 2 are controlled to sequentially carry out convolution operation in the 4 1-dimensional convolution layers to obtain first distinguishing features, and the first distinguishing features are determined to be the coding results in the 4 1-dimensional convolution layers; and then controlling the first discrimination features to carry out average pooling treatment in the pooling layer to obtain the features to be classified.
- 6. The method of claim 5, wherein the 4 1-dimensional convolution layers are represented as a first convolution layer, a second convolution layer, a third convolution layer, and a fourth convolution layer in that order; The depth of the input layer in the first convolution layer is 8, and the depth of the input layer in the first convolution layer is equal to the width of the first input feature, wherein the width of the first input feature is the column element dimension of the feature matrix in which the first input feature is located; The depth of the output layer in the first convolution layer is equal to the depth of the input layer in the second convolution layer, the depth of the output layer in the second convolution layer is equal to the depth of the input layer in the third convolution layer, and the depth of the output layer in the third convolution layer is equal to the depth of the input layer in the fourth convolution layer, so that the first convolution layer, the second convolution layer, the third convolution layer and the fourth convolution layer are sequentially connected; The depth of the output layer among the fourth convolution layers is 2.
- 7. The method of detecting a lateral impact by a robot according to claim 4, wherein in the step 5, the method of calculating a loss value of the impact sensing neural network using the first impact prediction probability and the second impact prediction probability based on the loss function includes: , wherein, Is a loss value of the impact sensing neural network; Is the true value of the tag and, When=1, it indicates that the current pre-judgment result is that the robot is impacted; is the first predicted probability of being impacted, Is the second probability of being impacted; wherein the loss function is a binary cross entropy to design the impact-aware neural network as a two-class network.
- 8. The method of claim 4, wherein in step 2, the method of connecting the sequence of pre-sensed measurements along the path of the corresponding dimension comprises: Connecting each type of pre-sensing measurement value sequence along a channel of a corresponding dimension according to the type of data acquired by a sensing device of the robot to synthesize the first input characteristic, wherein the pre-sensing measurement value sequence is a 3-axis angular velocity measurement value sequence, a 3-axis acceleration measurement value sequence, a 1-axis left-wheel rotation measurement value sequence or a 1-axis right-wheel rotation measurement value sequence so that the dimension of the first input characteristic is at least equal to 8; The inertial measurement unit arranged in the robot body is used for collecting a 3-axis angular velocity measurement value sequence and a 3-axis acceleration measurement value sequence, and the rotary encoders arranged at the two sides of the robot are respectively used for collecting a 1-axis left wheel rotation measurement value sequence and a 1-axis right wheel rotation measurement value sequence.
- 9. The method of claim 8, wherein in step B, the method of classifying a sequence of measured values to be perceived using a trained impact sensing neural network comprises: Inputting the measurement value sequence to be sensed into the trained impact sensing neural network, and controlling the connection of the measurement value sequence to be sensed along a channel of a corresponding dimension to generate a second input characteristic; And C, performing 4-layer convolution operation and one-layer pooling operation on the second input characteristic in the trained impact sensing neural network to obtain a target classification characteristic, classifying the target classification characteristic by using a softmax algorithm to obtain the first target prediction probability and the second target prediction probability, and executing the step C.
Description
Robot detection transverse impact method based on impact sensing neural network Technical Field The application relates to the field of robot control algorithms, in particular to a method for detecting transverse impact by a robot based on an impact sensing neural network. Background In a complex dynamic environment, when the robot moves on the low-friction ground, sideslip is very easy to occur if the adhesive force of the robot tire is low. The robot sideslip generally refers to a phenomenon that a robot wheel generates lateral displacement (i.e., axial displacement), the robot is regarded as being impacted, the robot is instantaneously moved to other positions under the condition that a sensor does not sense, a rotary encoder mounted on the wheel cannot sense the lateral displacement caused by the impact, and at the moment, the actual pose of the robot is calculated by sensing data of an inertial measurement unit (Inertial measurement unit, IMU). The state that the robot is not impacted is approximately three scenes, namely (1) the robot moves on a smooth ground, (2) the robot actively impacts an obstacle, and (3) the robot passes over the obstacle and body vibration occurs. Under the scene (2) and the scene (3), the acceleration measured value sensed by the inertial measurement unit can change greatly, so that the robot is easy to misjudge when the robot is judged to have transverse displacement by using the predicted pose result under the Kalman filtering (extended KALMAN FILTER, EKF) frame. Disclosure of Invention The application discloses a robot detection transverse impact method based on an impact sensing neural network, which comprises the following specific technical scheme: A robot detection transverse impact method based on an impact sensing neural network comprises the steps of A, controlling a sensing device of a robot to collect original pose data and extracting a measured value sequence to be sensed in the original pose data, B, classifying the measured value sequence to be sensed by using the trained impact sensing neural network to obtain a first target prediction probability and a second target prediction probability, C, judging whether the first target prediction probability is larger than the second target prediction probability, if so, determining that the robot detects the transverse impact, and if not, determining that the robot detects the transverse impact, wherein the first target prediction probability is the probability that the measured value sequence to be sensed is the measured value sequence extracted in the state that the robot is not currently subjected to the transverse impact, and the second target prediction probability is the probability that the measured value sequence to be sensed is the measured value sequence extracted in the state that the robot is not currently subjected to the transverse impact. Compared with the prior art, the method reduces interference of Kalman filtering or other filtering information, makes the trained impact sensing neural network perform classification processing on all acquired original and comprehensive sample data as much as possible, accelerates the efficiency of training and classification processing, does not stop using the neural network for classification recognition after the validity of the original pose data acquired in real time by the sensing device is judged, and does not start using the neural network for classification recognition after the Kalman filtering of the original pose data acquired in real time by the sensing device, thereby improving the efficiency of detecting transverse impact of the robot. The method for constructing the trained impact sensing neural network comprises the steps of 1, extracting a pre-sensing measured value sequence from pre-acquired pose data by utilizing a sliding window, 2, connecting the pre-sensing measured value sequence along a channel with corresponding dimension to generate a first input characteristic, 3, controlling the first input characteristic to perform multi-layer convolution operation and one-layer pooling operation in the pre-constructed impact sensing neural network to obtain a feature to be classified, wherein the impact sensing neural network is a neural network model constructed according to a construction mode of the convolution neural network, the impact sensing neural network comprises a plurality of continuously stacked convolution layers and one pooling layer, 4, classifying the feature to be classified by utilizing a softmax algorithm to obtain a first impact prediction probability and a second impact prediction probability, 5, calculating a loss value of the impact sensing neural network by using the first impact prediction probability and the second impact prediction probability based on a loss function, updating the weighting gradient by the aid of the function, 6, updating the impact sensing neural network to obtain the current impact prediction probability by