METHOD AND CHIP FOR DETECTING WHETHER ROBOT IS IMPACTED, AND ROBOT

A method for detecting whether a robot is impacted. The method comprises: obtaining an observed speed value and an observed speed direction, and obtaining a predicted speed value at the current moment and a predicted speed direction at the current moment; calculating the absolute value of the difference between the observed speed value and the predicted speed value to obtain a Euclidean distance corresponding to the current speed change; and calculating the cosine value of the included angle between the observed speed direction and the predicted speed direction to obtain a cosine distance corresponding to the current speed change; when the Euclidean distance corresponding to the current speed change is greater than a preset Euclidean distance threshold and the cosine distance corresponding to the current speed change is smaller than a preset cosine distance threshold, using a target impact sensing network model to perform classification processing to obtain a first prediction probability that a robot is impacted at the current moment and a second prediction probability that the robot is impacted at the current moment; and when the first prediction probability that the robot is impacted at the current moment is greater than the second prediction probability that the robot is impacted at the current moment, determining that the robot is impacted. Also provided are a chip for detecting whether a robot is impacted, and a robot.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
FIELD

The present disclosure relates to the field of robot control algorithms, and more particularly to a method for detecting an impact on a robot, a chip, and a robot.

BACKGROUND

In the field of simultaneous localization and mapping (SLAM) for low-cost wheeled-robots, A Correlative Scan Matching (CSM) algorithm is a scan matching algorithm based on a laser radar. Specifically, the CSM algorithm performs scan matching in combination with a search window to obtain a pose in a raster map that is occupied by a laser point cloud with a maximum probability and take the pose as a final pose. However, the accuracy of the CSM algorithm depends heavily on the confidence of an initial search pose.

The prior art may also select the initial search pose as prior information and fuse sensing data from an Inertial Measurement Unit (IMU) and sensing data from a rotary encoder through an Extended Kalman Filter (EKF) framework to derive the robot's final optimized pose.

However, in complex dynamic environments, when a robot moves on a low-friction floor, sideslip of the robot can easily occur if the adhesion of the robot tire is lower. The sideslip of the robot generally refers to a phenomenon in which a lateral displacement (that is, axial displacement) of a robot wheel occurs and it is considered that the robot is impacted. In such cases, the robot is instantaneously moved to an another position without perception of a sensor, that is, it is moved to an another position without any prior information, and then an erroneous pose information (i.e., a computed erroneous state estimation result) occurs based on the sensing data of the rotary encoder on the robot wheel Under the Extended Kalman Filter (EKF) framework, which affects detection of an impact on the robot.

On the other hand, there are roughly three scenarios in which the robot is not impacted: (1) the robot is moved on a smooth floor; (2) the robot deliberately bumps into an obstacle; (3) the robot climbs over an obstacle and its body vibrates. In the scenarios (2) and (3), an acceleration measurement sensed by the inertial measurement unit is greatly changed.

In the scenario (2), if the impact detection is performed by using a related method disclosed in Chinese patent CN113566828A, when a Mahalanob is distance between acceleration samples scanned by the window and an overall set of samples constructed by the acceleration measurement is less than or equal to a preset Mahalanob is distance threshold, the scenario in which the robot is not impacted is excluded. Then, roll and pitch angles of the robot are used to calculated an Euclidean distance between corresponding types of angles to determine the scenario in which the robot is impacted. However, since the acceleration measurement sensed by the IMU can be changed greatly, it is easy to misjudge the scenario in which the robot is impacted, that is, the scenario (2) is actually in a state where the robot is not impacted, but is determined to be in a state where the robot is impacted.

SUMMARY

The present disclosure discloses a method for detecting an impact on a robot, a chip, and a robot.

The method for detecting the impact on the robot includes: step A of obtaining an observed speed magnitude and an observed speed direction, and then of obtaining a predicted speed magnitude and a predicted direction at a current moment based on a Kalman-filter algorithm; step B of calculating an absolute value of a difference between the observed speed magnitude and the predicted speed magnitude to obtain an Euclidean distance corresponding to change of the current speed and of calculating a cosine value of an angle between the observed speed direction and the predicted speed direction to obtain a cosine distance corresponding to the change of the current speed; step C of performing classification processing of a sequence of measurements to be perceived using a target impact perception network model if the Euclidean distance is greater than a preset Euclidean-distance threshold and the cosine distance is less than a preset cosine distance threshold to obtain a first prediction probability that the robot is impacted at the current moment, and a second prediction probability that the robot is impacted at the current moment, where, the target impact perception network model is a trained impact perception network model, the sequence of measurements to be perceived is derived from data collected by a sensing device of the robot, and the sensing device includes an inertial measurement unit (IMU) and a rotary encoder; and step D of determining that the robot is impacted if the first prediction probability is greater than the second prediction probability.

To sum up, the method including the steps A to D in the present disclosure triggers that the target impact perception network model performs classification processing on the data collected by the inertial measurement unit and the rotary encoder by using the Euclidean distance formed between the observed speed magnitude and the predicted speed magnitude and the cosine distance formed by the observed speed direction and the predicted speed direction as a trigger detection starting point, which considers necessity of the target impact perception network model on the classification processing and fuses prediction information of at least two types of sensors collection data in a Kalman-filter architecture. As such, reliability and precision of classification of the target impact perception network model is improved, and determination whether the robot is impacted is made only using comparison of the two prediction probability to overcome misjudgment caused by sudden spikes in IMU readings and thereby improves the accuracy of impact detection.

A chip storing a program is provided, where the program is configured to control a robot to carry out the method for detecting the impact on the robot.

A robot equipped with the chip is provided, where, a left rotary encoder is installed at a left wheel of the robot, a right rotary encoder is installed at a right wheel of the robot, an inertial measurement unit is installed in a body of the robot and includes an accelerometer and a gyroscope.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic flowchart of a method for detecting an impact on a robot disclosed in one embodiment of the present disclosure.

FIG. 2 is a schematic flowchart of a method for performing classification processing of a sequence of measurements to be perceived using a target impact perception network model disclosed in another embodiment of the present disclosure.

FIG. 3 is a schematic flowchart of a method for constructing target impact perception network model disclosed in yet another embodiment of the present disclosure.

FIG. 4 is a schematic flowchart of a method for correcting current pose prediction data and its prior covariance matrix disclosed in a further embodiment of the present disclosure.

DETAILED EMBODIMENTS

To make the objectives, technical solutions, and advantages of the present disclosure clearer, the present disclosure will be described below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described below are provided solely for explaining the present disclosure and not for limiting it. Moreover, those skilled in the art will appreciate that, based on the technical disclosure herein, various design, manufacturing, or production modifications can be made by routine means, and such modifications should not be construed as inadequate disclosure in the present disclosure.

Unless otherwise defined, the technical or scientific terms used herein carry the conventional meanings commonly understood by those of ordinary skilled in the relevant art. The terms “a,” “an,” “one,” “the,” and the like do not imply numerical limitation and may refer to the singular or the plural. The terms “comprise,” “include,” “contain,” “have,” and any variations thereof are intended to cover non-exclusive inclusion; that is, a process, method, system, product, or device that comprises a series of steps or modules is not limited to the stated steps or elements but may include other steps or elements not expressly listed, or may also include inherent steps or elements. The terms “first,” “second,” “third,” and the like are used merely to distinguish similar items and do not signify any particular order.

During simultaneous localization and mapping (SLAM), a wheeled robot uses a Correlative Scan Matching (CSM) algorithm to construct a laser-point-cloud map. The accuracy of the CSM algorithm depends on the confidence in an initial search pose to predict the initial search pose of prior information. Poses of the robot at various position nodes occupied by the robot along the robot's motion trajectory may be calculated by fusing an inertial measurement unit and a rotary encoder within a standard Extended Kalman Filter (EKF) framework. However, the wheeled robot is highly vulnerable to lateral sliding due to the robot being impacted, and due to limited perception of the rotary encoder, the encoder cannot sense the wheel's axial displacement. Consequently, an EKF algorithm that relies on observation information of the rotary encoder obtains erroneous state estimation results, that is, it cannot achieve or approach filtering accuracy when processing the measurement sequence. In addition, when the robot deliberately collides with an obstacle or climbs over one and the chassis vibrates, the accelerometer readings from the IMU can change sharply over a short time window. If the impact detection is performed according to the method including Steps 31-33 disclosed in Chinese patent CN113566828A, when a Markov distance between two batches of acceleration measurement samples is used for threshold judgment, it is determined in advance that the robot will not be impacted, thus resulting in misjudgment.

To solve the problems described above, the present disclosure discloses a method for detecting an impact on a robot. An execution body performing the method is a robot with an inertial measurement unit installed on a body of the robot and rotary encoders respectively installed on left and right wheels of the robot. Essentially, it is a wheeled robot equipped with two types of odometers, which respectively sense a pose state of the body and rotation states of wheel shafts on both sides of the body. As shown in FIG. 1, the method includes following steps A to D.

At the step A an observed speed magnitude and an observed speed direction are obtained and then a predicted speed magnitude and a predicted direction at a current moment are obtained based on a Kalman-filter algorithm, and the step B is performed then. Where, the predicted speed magnitude and the predicted speed direction may together form a predicted speed vector at the current moment; the observed speed magnitude and the observed speed direction may form an observed speed vector, and be outputted by a preset Correlative Scan Matching (CSM) algorithm; because CSM introduces run-time latency, a timestamp of generating the observed speed vector may not coincide with the current moment. For example, the current moment may be obtained by delaying the timestamp of generating the observed speed vector by a short interval. More specifically, the observed speed magnitude and the observed speed direction are speed feature information obtained by searching and matching data collected from the robot's sensing devices—e.g., a pose in a grid map with the highest laser-point occupancy probability obtained by performing scan within a search window during the robot performing the CSM algorithm. The predicted speed magnitude and the predicted speed direction may be obtained by correcting those observed speed magnitude and the observed speed direction through a Kalman-filter algorithm on the basis of the observed speed magnitude and the observed speed direction and belong to optimized pose data updated in the Kalman-filter, where the Kalman-filter algorithm mentioned in the step A is preferably an Extended Kalman Filter (EKF).

At the step B, an absolute value of a difference between the observed speed magnitude and the predicted speed magnitude is calculated to obtain an Euclidean distance corresponding to change of the current speed, and one can judge whether the magnitude discrepancy is significant by comparing the Euclidean distance with a predefined Euclidean-distance threshold; and a cosine value of an angle between the observed speed direction and the predicted speed direction is calculated to obtain a cosine distance corresponding to the change of the current speed, and one can judge whether the directional discrepancy is significant by comparing the cosine distance with a predefined cosine distance threshold; and the step C is performed then.

In the step B, calculation of the absolute value of the difference between the observed speed magnitude and the predicted speed magnitude defines a lateral sliding ratio from a speed magnitude standpoint. That is, the Euclidean distance corresponding to the change of the current speed represents the lateral sliding ratio. In the step B, the cosine value of the angle between the observed speed direction and the predicted speed direction is calculated, and the cosine distance (which may be also referred to as cosine similarity) between the observed speed and the predicted speed from a speed direction is evaluated to represent the lateral sliding ratio. The term speed (or speed measurement) mentioned in the present disclosure generally refers to a speed vector including both a speed magnitude and a speed direction. Preferably, the timestamp of the observed speed value is aligned with, or mapped onto, the timestamp of the predicted speed value, so that delayed data can still be used effectively.

Where, when the Euclidean distance corresponding to the change of the current speed becomes larger and the cosine distance corresponding to the change of the current speed becomes smaller, the similarity between the predicted speed vector and the observed speed vector becomes smaller. That is, the two vectors differ more in both magnitude and direction. Conversely, the closer the predicted speed vector approaches the observed speed vector.

At the step C, if the Euclidean distance is greater than a preset Euclidean distance threshold, and the cosine distance is less than a preset cosine distance threshold, then a classification processing is performed on a sequence of measurements to be perceived using a target impact perception network model, to obtain a first prediction probability that the robot is impacted at the current moment and a second prediction probability that the robot is impacted at the current moment. In the classification processing, probability values are calculated or predicted. The target impact perception network model refers to a trained impact perception neural network. The step D is then executed. Specifically, when the Euclidean distance is greater than the preset Euclidean distance threshold and the cosine distance is less than the preset cosine distance threshold, it indicates a large discrepancy between the observed speed vector and the predicted speed vector at the current moment. This may occur in scenarios where the robot collides with or crosses over obstacles, causing abrupt changes in the acceleration measured by the inertial measurement unit and/or in the wheel rotation speed measured by the rotary encoder. Therefore, such a situation can only serve as a coarse judgment indicating a possible impact on the robot and be used to trigger a fine detection of the impact on the robot. Consequently, the robot must still undergo further precise determination by using the target impact perception network model to perform classification processing of the sequence of measurements to be perceived, so as to obtain a model probability indicating an impacted state or a model probability indicating a non-impacted state.

To construct a lightweight impact perception neural network, the present embodiment designs the target impact perception network model as a binary classification network, so as to calculate a first prediction probability that the robot is impacted at the current moment and a second prediction probability that the robot is impacted at the current moment. Alternatively, it can also calculate the first prediction probability that the robot is not impacted at the current moment and the second prediction probability that the robot is not impacted at the current moment.

It should be noted in the present embodiment that the target impact perception network is used to perform classification processing of a sequence of measurements only after the Euclidean and cosine distances have been evaluated, so as to obtain the first predication probability and the second predication probability. The impact perception network is not trained in real time using the sequence of measurements, which reduces the robot's operational burden and enhances the classification accuracy of the target impact perception network model.

Preferably, the preset Euclidean distance threshold is 0.1, and the preset cosine distance threshold is 0.707, leaving a safety margin in both the distance and angular-cosine criteria.

It should be noted that, in actual robot locomotion, the “non-impact” state can be divided into three forms, namely: the robot travels on a flat surface without obstacles; the robot collides with an obstacle; and the robot traverses a low obstacle and the robot body vibrates. These three forms can be used as negative samples for training the impact perception network model. Therefore, the target impact perception network model is used to perform classification processing of a sequence of measurements formed under the various states. Naturally, an initial impact perception network model/impact perception network needs to be pre-trained with the sequence of measurements, so as to improve extraction accuracy in classification.

Where the sequence of measurements is derived from data collected by the robot's sensing device, including: raw pose data of the robot body along each coordinate axis, and raw wheel-rotation-distance data. The robot's sensing device includes an inertial measurement unit and a rotary encoder (serving as a wheel odometer), both being proprioceptive sensors of the robot body. The sequence of measurements include: a sequence of angular speed measurements obtained about each coordinate axis, a sequence of acceleration measurements directed along each coordinate axis, a sequence of left-wheel-rotation-measurements, or a sequence of right-wheel-rotation-measurements. The sequence of angular speed measurements is collected by a gyroscope in the inertial measurement unit; the sequence of acceleration measurements is collected by an accelerometer in the inertial measurement unit; the sequence of left-wheel-rotation-measurements is collected by the rotary encoder mounted on the left wheel; and the sequence of right-wheel-rotation-measurements is collected by the rotary encoder mounted on the right wheel.

At the step D, if the first prediction probability that the robot is impacted at the current moment is greater than the second prediction probability that the robot is impacted at the current moment, it is determined that the robot is impacted, i.e. a lateral displacement of the robot is detected, thereby completing impact detection on the robot for the current moment (alternatively, predicting the impact state of the robot for the current moment). Equivalently, if the target impact perception network model is used to perform classification processing of the sequence of measurements to obtain a first predication probability that the robot is not impacted at the current moment and a second predication probability that the robot is not impacted at the current moment, when the first prediction probability that the robot is not impacted at the current moment is less than the second prediction probability that the robot is not impacted at the current moment, it is likewise determined that the robot is impacted. It should be noted that the sum of the first prediction probability that the robot is impacted at the current moment and the first prediction probability that the robot is not impacted at the current moment equals 1, and the sum of the second prediction probability that the robot is impacted at the current moment and the second prediction probability that the robot is not impacted at the current moment also equals 1; all four prediction probabilities are generated by the same target impact perception network model.

In summary, the method including the steps A to D in the present disclosure triggers that the target impact perception network model performs classification processing on the data collected by the inertial measurement unit and the rotary encoder by using the Euclidean distance formed between the observed speed magnitude and the predicted speed magnitude and the cosine distance formed by the observed speed direction and the predicted speed direction as a trigger detection starting point, which considers necessity of the target impact perception network model on the classification processing and fuses prediction information of at least two types of sensors collection data in a Kalman-filter architecture. As such, reliability and precision of classification of the target impact perception network model is improved, and determination whether the robot is impacted is made only using comparison of the two prediction probability to overcome misjudgment caused by sudden spikes in IMU readings and thereby improves the accuracy of impact detection.

It should be noted that, in the method disclosed in the present disclosure, the steps A to D are performed in the following sequence: step A is executed firstly, and after the predicted speed magnitude at the current moment and the predicted speed direction at the current moment have been obtained in the step A, the step B is performed; after the Euclidean distance corresponding to change of the current speed and the cosine distance corresponding to change of the current speed have been calculated in the step B, the step C is performed; after the first prediction probability that the robot is impacted at the current moment and the second prediction probability that the robot is impacted at the current moment are obtained in the step C, the step D is performed then, or after an additional comparison between the first prediction probability and the second prediction probability is further performed, the step D is performed; and in the step D, it is determined that the robot is impacted, which may be construed as the robot is currently impacted.

As shown in FIG. 2, in the step C, the performing of the classification processing of the sequence of measurements to be perceived using the target impact perception network model to obtain the first prediction probability that the robot is impacted at the current moment and the second prediction probability that the robot is impacted at the current moment includes following steps C1-C4.

At the step C1, the sequence of measurements to be perceived is extracted using a sliding window from raw data collected by a sensing device of the robot. Then, the step C2 is performed. Extraction of the sequence of measurements to be perceived is performed by means of an orderly scan using a sliding window technique-generally sliding along the robot's motion timeline-so as to successively obtain a plurality of sequences of measurements to be perceived. A single sequence of measurements to be perceived obtained by one sweep of the sliding window corresponds to one type of sequence of measurements to be perceived, i.e. a sequence originating from one sensor type. Specifically, while the sliding window traverses the raw data, it sequentially, in the order of data acquisition, extracts a plurality of sequences of measurements to be perceived. Preferably, a length of the sequence of measurements to be perceived equals a window length of the sliding window, but it may alternatively be one-half, one-quarter or even one-eighth of the window length, such that one sliding window delimits, within the raw data, at least one sequence of measurements to be perceived—i.e. at least one type of sequence of measurements to be perceived—and, within one and the same type of sequence, there is at least one dimension (coordinate-axis dimension) of measurements. Consequently, the robot may, by means of a single sliding window, successively extract a plurality of types of sequences of measurements to be perceived (i.e. sequences for multiple sensor types), or, by means of a plurality of sliding windows, respectively extract one type of sequence of measurements to be perceived.

For example, beginning at an initial moment, the robot measures and records the raw data (i.e., the collected raw data) via the sensing device at each collection period. Given a sliding-window length such that the number of raw-data items contained in the window is N, whenever the recorded raw data of the same sensor reach Nitems, one sequence of measurements to be perceived is extracted; generally, the sliding-window length is equal to N. It should be understood that, while the sliding window traverses its current region, it may extract, from the raw data, the latest buffer of a preset number of frames of the same data type provided by the sensing device, and combine them to form one sequence of measurements to be perceived.

Preferably, both the sequence of measurements to be perceived and the raw data include a vector magnitude and a vector direction angle. The robot's sensing device includes an inertial measurement unit (IMU) and a rotary encoder (i.e., a wheel odometer), both of which are proprioceptive sensors. The sequence of measurements to be perceived may be a sequence of angular speed measurements rotated about each coordinate axis direction, a sequence of acceleration measurements directed along each coordinate axis direction, a sequence of left-wheel-rotation-measurements, or a sequence of right-wheel-rotation-measurements. The sequence of angular speed measurements is collected by a gyroscope in the inertial measurement unit, the sequence of acceleration measurements is collected by an accelerometer in the inertial measurement unit, the sequence of left-wheel-rotation-measurements is collected by the rotary encoder mounted on the left wheel, and the sequence of right-wheel-rotation-measurements is collected by the rotary encoder mounted on the right wheel.

At the step C2, the sequence of measurements to be perceived is input into the target impact perception network model to generate an input feature, and then the step C3 is performed. The target impact perception network model includes a connection layer, and the sequence of measurements to be perceived generates the input feature in the connection layer. Specifically, the robot connects all types of sequences of measurements to be perceived currently extracted within the sliding window along their respective channel dimensions to merge the input feature input into the target impact perception network model. Each type of sequence of measurements to be perceived is a sequence of measurements to be perceived from the same sensor type collected in one time segment and may include several dimensional measurements. One type of sequence of measurements to be perceived can be transmitted through a single-dimension channel; multiple types of sequences of measurements can then be connected in that same channel to merge the input feature. In effect, all types of sequences of measurements collected during one time segment can be combined into an input feature. Preferably, the duration of that time segment equals the sliding window's length, which is also the length of each sequence of measurements to be perceived.

When the sequence of angular speed measurements obtained about each coordinate axis, the sequence of acceleration measurements directed along each coordinate axis, the sequence of left-wheel-rotation-measurements, and the sequence of right-wheel-rotation-measurements are input into the target impact perception network model, they must occupy at least four dimensional channels in the model and be connected with the sequences of measurements to be perceived. In this case, the sequences of measurements connected along their respective channels form the input feature, which corresponds to inertial-pose feature measurements sensed by the inertial measurement unit and/or wheel-rotation-distance feature measurements sensed by the rotary encoders, and are labeled as a set of samples recognized by the target impact perception network model.

At the step C3, the input feature is controlled to sequentially perform convolution operations of the input feature within a plurality of convolutional layers, i.e. the input feature is controlled to encode the input feature within successively stacked convolutional layers, to obtain a discrimination feature, which is an encoding result output by the last layer of convolutional layer (where the successively stacked convolutional layers are traversed one by one) or by the last convolutional layer (where the convolutional layers are traversed along a direction in which the convolutional layers are connected sequentially) and are present in matrix form; the multi-layer convolution operation are completed within the target impact perception network model. The discrimination feature is then input into a pooling layer, where the discrimination features are controlled to perform an average pooling on the discrimination features (mathematically, taking the arithmetic mean of the elements in the discrimination-feature matrix) to generate a target classification feature. The target classification feature is obtained by integrating feature information from the plurality of convolutional layers and the pooling layer within the target impact perception network model and correspond to a target state of features to be classified, and it is determined that the pooling operation is completed inside the target impact perception network model. Then, the step C4 is performed. The target impact perception network model therefore includes the plurality of convolutional layers and the one pooling layer.

In a case that the target impact perception network model includes four one-dimensional convolutional layers, convolution operations are performed sequentially on the input features in the four 1-D convolutional layers to obtain discrimination features, thereby confirming completion of the multi-layer convolution operation within the target impact perception network model and identifying the discrimination features as a cumulative encoding result in the four 1-D convolutional layers, i.e., a result of the convolution operations. The four 1-D convolutional layers are, in sequence, a first convolutional layer (regarded as a first layer of convolutional layer within the target impact perception network model), a second convolutional layer (regarded as a second layer of convolutional layer within the target impact perception network model), a third convolutional layer (regarded as a third layer of convolutional layer within the target impact perception network model) and a fourth convolutional layer (regarded as a fourth layer of convolutional layer within the target impact perception network model). The first, second and third convolutional layers respectively output intermediate variables that constitute sub-encoding results for their corresponding output layers, while the fourth convolutional layer outputs the aforementioned encoding result, i.e. the discrimination feature, which is present in matrix form. The discrimination feature is then input into a pooling layer and then controlled to perform an average-pooling operation on the discrimination feature within the pooling layer to obtain features to be classified-mathematically, taking the mean of all elements in the matrix containing the discrimination features to obtain features to be classified. This confirms completion of the pooling operation within the target impact perception network model by integrating the convolution results of the four 1-D convolutional layers with the average value produced by the single pooling layer, thereby embedding those results in the features to be classified and reducing the overall parameter magnitude of the target impact perception network model.

At the step C4, a softmax algorithm is used to perform classification processing on the target classification feature, so as to obtain a first prediction probability that the robot is impacted at the current moment and a second prediction probability that the robot is impacted at the current moment, so that the target classification feature are connected to two nodes; the classification processing herein includes probability prediction for each classification case, each classification case is a case in which the sequence of measurements to be perceived, or the feature to be classified, is divided by the softmax algorithm into a corresponding class; then the step D disclosed in the foregoing embodiment is performed to perform a final, rather than a preliminary, determination of whether the robot is impacted at the current moment. In the present embodiment, the first prediction probability that the robot is impacted at the current moment is a probability that the sequence of measurements to be perceived is classified as a sequence of measurements extracted under the state that the robot is currently impacted; the second prediction probability that the robot is impacted at the current moment is a probability that the sequence of measurements to be perceived is classified as a sequence of measurements extracted under the state that the robot is not currently impacted.

In this embodiment, the softmax algorithm is arranged, within the target impact perception network model, as a softmax classifier; the softmax classifier is used to calculate, from the target classification feature, a first prediction probability that the robot is impacted at the current moment and a second prediction probability that the robot is not impacted at the current moment; The target classification feature is the information output-after the aforementioned multi-layer convolution operations and pooling operation—from the two nodes to which it is connected, namely: a first node, representing a position where the robot is impacted (belonging to a positive sample required for training the target impact perception network model), and a second node, representing a position where the robot is not impacted (belonging to a negative sample required for training the target impact perception network model). In the present embodiment, the first prediction probability that the robot is impacted at the current moment is a probability that the sequence of measurements to be perceived is classified as the sequence of measurements extracted under the state in which the robot is currently impacted, i.e., a probability assigned by the softmax classifier to the first class, and a probability that the robot's present position falls into the first node; the second prediction probability that the robot is impacted at the current moment is a probability that the sequence of measurements to be perceived is classified as the sequence of measurements extracted under the state in which the robot is currently not impacted, i.e., a probability assigned by the softmax classifier to the second class, and a probability that the robot's present position falls into the second node. As such, the feature extraction capability of the target impact perception network model is improved and misjudgment is reduced.

In summary, the present disclosure uses the above-described target impact perception network model for robot impact detection, which can reduce dependence on computer-storage resources and effectively shorten training time. By virtue of the overall convolution-neural-network architecture of the target impact perception network model, the accuracy with which pose-feature information is classified is improved. Furthermore, the classification result is described by means of the model probabilities for the two classes (the first prediction probability that the robot is impacted at the current moment and the second prediction probability that the robot is not impacted at the current moment) and these probabilities are used as the decision parameters for impact detection, achieves a better balance among three requirements: (i) detection efficiency of the target impact perception network model (or impact perception neural network), (ii) computational-resource consumption, and (iii) detection accuracy for robot impacts.

When the robot climbs over low-profile obstacles such as chair legs or table legs, no external impact is applied, yet the robot body vibrates. In the time sequence of sensor data obtained by the robot, acceleration (measured by the inertial measurement unit) and the angular rate vary markedly within a short collection window. For example, the Euclidean distance between the predicted speed vector and the observed speed vector may be greater than a preset speed-difference threshold, while the cosine distance between the predicted speed vector and the observed speed vector may be less than a preset cosine-function threshold, thereby causing pronounced changes in the corresponding dimensions of the sequence of measurements to be perceived and easily giving rise to misjudgment. In order to discriminate between the scenario in which the robot climbs over low-profile obstacles and merely vibrates, and the scenario in which the robot is impacted and consequently undergoes lateral displacement, the present disclosure uses the target impact perception network model disclosed in the foregoing embodiments to perform classification processing on the sequence of measurements to be perceived, so as to obtain a first prediction probability that the robot is impacted at the current moment and a second prediction probability that the robot is impacted at the current moment. When the first prediction probability is greater than the second prediction probability, it is determined that the robot is impacted, thereby enabling effective detection of the robot's lateral displacement on the basis of the accuracy achieved by the trained target impact perception network model.

It should be noted in the step C that, the execution order of the steps C1 to C4 is as follows:

When the Euclidean distance is greater than the preset Euclidean distance threshold, the cosine distance is less than the preset cosine distance threshold, and the target impact perception network model has already been trained, the step C1 is performed firstly, and after the sequence of measurements to be perceived is extracted in the step C1, the step C2 is performed, where a moment at which the robot's sensing device collects the raw data may precede, or be simultaneous with, a moment of obtaining the observed speed magnitude and the observed speed direction in the step A; after the input features are generated in the step C2, the step C3 is performed; after the target classification features are obtained in the step C3, the step C4 is performed; after the first prediction probability that the robot is impacted at the current moment and the second prediction probability that the robot is impacted at the current moment are obtained in the step C4, the step D is performed.

Preferably, before performing the above-mentioned step D, the method further includes: step C5 of, based on a loss function, using the first predicting probability that the robot is impacted at the current moment and the second prediction probability that the robot is impacted at the current moment; updating model parameters of the target impact perception network model to update the target impact perception network model having the updated model parameters as the target impact perception network model; and inputting the sequence of measurements to be perceived into the updated target impact perception network model again to repeat performing the steps C2 to C5 until a newly calculated loss value is less than a preset loss threshold, and the target impact perception network model having the updated model parameters is updated as the target impact perception network model again. Specifically, each time the model parameters are updated, the target impact perception network model is updated once. The updated target impact perception network model is trained on the same sequence of measurements to be perceived or on the input features generated from the same sequence of measurements to be perceived by: performing multilayer convolution operations and a pooling operation; applying the softmax algorithm to perform classification processing and obtain the latest first and second prediction probabilities; calculating a loss value with a loss function; repeating performing the steps C2 to C5-preferably until the loss function is minimized—the latest first and second prediction probabilities are input into the step D for the impact detection decision.

Where, the loss function is binary cross-entropy, in which the first prediction probability and the latest second prediction probability serve as the two class-prediction results. By configuring the target impact perception network model as a binary classification network, the convolutional neural network used in this embodiment is simplified compared with the prior art, thereby forming a lightweight neural network model.

In the step C5, the target impact perception network model's model parameters are updated by using an Adam algorithm to update weights—that is, updating weight matrices with a gradient-descent algorithm, by iteratively adjusting the weights in this way and continually overwriting the target impact perception network model with its updated version, the loss is driven toward its minimum while simultaneously correcting the bias of the sequence of measurements to be perceived and the weights. As such, the accuracy of the feature extraction of the target impact perception network model is improved, and the feasibility of using the target impact perception network to determine whether the robot is impacted is further improved.

In one embodiment, the target impact perception network model is first constructed before the step C is performed or even before the step A is performed. This target impact perception network model is a pre-trained impact perception neural network. As shown in FIG. 3, the method for constructing the target impact perception network model includes following step 1 to step 6.

At the step 1, the sequence of measurements to be perceived is extracted using a sliding window from the raw data collected by a sensing device of the robot, and then the step 2 is performed. The extraction in the step 1 is performed by means of an orderly scan using a sliding window technique-generally sliding along the robot's motion timeline-so as to successively obtain a plurality of sequences of measurements to be perceived. A single sequence of measurements to be perceived obtained by one sweep of the sliding window corresponds to one type of sequence of measurements to be perceived, i.e. a sequence originating from one sensor type. Specifically, while the sliding window traverses the raw data, it sequentially, in the order of data acquisition, extracts a plurality of sequences of measurements to be perceived. Preferably, a length of the sequence of measurements to be perceived equals a window length of the sliding window, but it may alternatively be one-half, one-quarter or even one-eighth of the window length, such that one sliding window delimits, within the raw data, at least one sequence of measurements to be perceived—i.e. at least one type of sequence of measurements to be perceived—and, within one and the same type of sequence, there is at least one dimension (coordinate-axis dimension) of measurements. Consequently, the robot may, by means of a single sliding window, successively extract a plurality of types of sequences of measurements to be perceived (i.e. sequences for multiple sensor types), or, by means of a plurality of sliding windows, respectively extract one type of sequence of measurements to be perceived.

For example, beginning at an initial moment, the robot measures and records the raw data (i.e., the collected raw data) via the sensing device at each collection period. Given a sliding-window length such that the number of raw-data items contained in the window is N, whenever the recorded raw data of the same sensor reach N items, one sequence of measurements to be perceived is extracted; generally, the sliding-window length is equal to N.

It should be understood that, while the sliding window traverses its current region, it may extract, from the raw data, the latest buffer of a preset number of frames of the same data type provided by the sensing device, and combine them to form one sequence of measurements to be perceived.

Preferably, both the sequence of measurements to be perceived and the raw data include a vector magnitude and a vector direction angle. The robot's sensing device includes an inertial measurement unit (IMU) and a rotary encoder (i.e., a wheel odometer), both of which are proprioceptive sensors. The sequence of measurements to be perceived may be a sequence of angular speed measurements rotated about each coordinate axis direction, a sequence of acceleration measurements directed along each coordinate axis direction, a sequence of left-wheel-rotation-measurements, or a sequence of right-wheel-rotation-measurements. The sequence of angular speed measurements is collected by a gyroscope in the inertial measurement unit, the sequence of acceleration measurements is collected by an accelerometer in the inertial measurement unit, the sequence of left-wheel-rotation-measurements is collected by the rotary encoder mounted on the left wheel, and the sequence of right-wheel-rotation-measurements is collected by the rotary encoder mounted on the right wheel.

At the step 2, the sequences of measurements to be perceived are connected along their corresponding dimension channels to generate the input feature, and then the step 3 is performed. In some embodiments, the robot connects all types of sequences of measurements to be perceived currently extracted within the sliding window along their respective dimension channels to merge the input features input into the target impact perception network model. Each type of sequence of measurements to be perceived is a sequence of measurements to be perceived from the same sensor type collected in one time segment and may include several dimensional measurements. One type of sequence of measurements to be perceived can be transmitted through a single-dimension channel; multiple types of sequences of measurements can then be connected in that same channel to merge the input feature. In effect, all types of sequences of measurements collected during one time segment can be combined into an input feature. Preferably, the duration of that time segment equals the sliding window's length, which is also the length of each sequence of measurements to be perceived.

At the step 3, the input feature is controlled to perform multiple layers of convolution operations followed by single layer pooling operation on the input feature within a pre-constructed impact perception neural network to obtain a feature to be classified, and then the step 4 is performed. Where, the pre-constructed impact perception neural network includes several convolutional layers and one pooling layer. The convolution operation of each convolutional layer is to control the angular speed matrix, acceleration matrix, and left and right wheel rotation distance matrix formed by the input features to perform convolution operations with their corresponding weight matrix respectively. In mathematical operations, it can be equivalent to multiplying each element in the input features of the corresponding convolutional layer with the weight of the same convolutional layer to obtain the matrix of measurements of each dimension (equivalent to training samples within the impact perception neural network); the features output by the last convolutional layer are transmitted to the pooling layer for a pooling operation. The features to be classified obtained through pooling operation are the matrices that need to be classified.

Preferably, the pre-constructed impact perception neural network is constructed in accordance with a construction manner of a convolutional neural network. The impact perception neural network includes multiple convolutional layers and one pooling layer, where the convolutional layers are connected in sequence, the output layer of each convolutional layer is aligned and connected with (i.e., has the same depth as) the input layer of the next convolutional layer. The impact perception neural network constructed in the present embodiment belongs to the convolutional neural network. The impact perception neural network further includes a connection layer. Before all the sequences of measurements to be perceived are input into the impact perception neural network, all dimensional of the sequence of measurements from the inertial measurement unit and all dimensional of the sequence of measurements from the rotary encoder are connected along their respective dimension channel to generate input features, which may constitute a connection layer in the convolutional neural network. After the input features are generated, it should be understood that the sequence of measurements to be perceived is input into the impact perception neural network, and labeled samples to be classified are input into the first layer of convolution layer through a corresponding dimension channel, thereby adapting the input to the first convolution layer of the impact perception neural network, where the adapting input includes a depth adapting of a network layer of the convolution neural network and adapting to channels connected to each dimension. Based on this, the impact perception neural network is constructed layer by layer according to the construction mode of the convolution neural network, to form a convolution neural network in which multiple convolutional layers are stacked and connected.

When the sequence of angular speed measurements, the sequence of acceleration measurements, the sequence of left-wheel-rotation-measurements, and the sequence of right-wheel-rotation-measurements are input into the impact perception neural network, it is necessary to design at least four dimension channels in the convolutional neural network and connect the aforementioned sequences of measurements to be perceived. In this case, the sequences of measurements to be perceived connected to the corresponding dimension channels form the input feature, which is equivalent to constituting the inertial-pose feature measurements sensed by the inertial measurement unit and/or the wheel-rotation-distance feature measurements sensed by the rotary encoder, and is labeled as a set of samples recognized by the convolutional neural network. Further, if the sequence of angular speed measurements includes an angular speed of one dimension obtained by rotation about the yaw-angle direction of the robot, an angular speed of one dimension obtained by rotation about the roll-angle direction of the robot, and an angular speed of one dimension obtained by rotation about the pitch-angle direction of the robot, then the number of dimensions of the channels designed in the impact perception neural network may be increased, and the number of dimensions of the input features may be also increased.

Specifically, in the step 3, the input feature is controlled to sequentially perform convolution operations in the four 1-D convolution layers to obtain a discrimination feature, it is determined that the multi-layer convolution operations have been completed within the impact perception neural network and that this discrimination feature is the encoding result in the four 1-D convolution layers—that is, the result of continuously performing multi-layer convolutions. The four 1-D convolution layers are, in sequence, the first convolution layer (regarded as a first layer of convolution layer in the impact perception neural network), the second convolution layer (regarded as a second layer of convolution layer in the impact perception neural network), the third convolution layer (regarded as a third layer of convolution layer in the impact perception neural network), and the fourth convolution layer (regarded as a fourth layer of convolution layer in the impact perception neural network). The first, second, and third convolution layers output intermediate variables that constitute sub-encoding results for their corresponding output layers, while the fourth convolutional layer outputs the aforementioned encoding result, i.e. the discrimination feature, which is present in matrix form. The discrimination feature is then input into a pooling layer and then controlled to perform an average-pooling operation on the discrimination feature within the pooling layer to obtain features to be classified-mathematically, taking the mean of all elements in the matrix containing the discrimination features to obtain features to be classified. This confirms completion of the pooling operation within the impact perception network model by integrating the convolution results of the four 1-D convolutional layers with the average value produced by the single pooling layer, thereby embedding those results in the features to be classified and reducing the overall parameter magnitude of the impact perception network model.

Preferably, in the present embodiment, an appropriate number of convolution layers and pooling layers, the size of each convolution layer filter, the moving step of each convolution layer filter, and the manner of pooling operations are selected according to the dimensions of the sequence of measurements to be perceived (including the components of a same-dimension vector along each coordinate-axis direction or the rotation components of the same-dimension vector about each coordinate axis), so as to construct the impact perception neural network. The pooling operations may be performed in two ways: taking the maximum value or taking the average value.

At the step 4, the softmax algorithm is used to perform classification processing on the features to be classified described in the step 3, so as to obtain a first impacted prediction probability and a second impacted prediction probability, thereby connecting the features to be classified to two nodes. Where, the classification processing includes probability prediction for each classification case, each classification case is a case in which the sequence of measurements to be perceived, or the feature to be classified, is divided by the softmax algorithm into a corresponding class. Then the step 5 is performed. The softmax algorithm in the step 4 divides the features to be classified into two classes, and fully connects the matrices of the outputs of the multilayer convolution, one-layer pooling operation to the two nodes. Specifically, in the step 4, the softmax algorithm is configured in the impact perception neural network as a softmax classifier; the softmax classifier is used to calculate the first impacted prediction probability and the second impacted prediction probability using the features to be classified. The features to be classified are information output from the two nodes, to which they are connected, after a multi-layer convolution operation and a pooling operation. The two nodes include a first node (representing a position where the robot is impacted (belonging to a positive sample required for training the target impact perception network model)) and a second node (representing a position where the robot is not impacted (belonging to a negative sample required for training the target impact perception network model). In the present embodiment, the first impacted prediction probability is a probability that the sequence of measurements to be perceived or the features to be classified is classified as the sequence of measurements extracted under the state in which the robot is currently impacted, thereby forming a first classification probability generated by the softmax classifier, i.e., a probability that the robot's pose falls into the first node; the second impacted prediction probability is a probability that the sequence of measurements to be perceived or the features to be classified is classified as the sequence of measurements extracted under the state in which the robot is currently not impacted, thereby forming a second classification probability generated by the softmax classifier, i.e., a probability that the robot's pose falls into the second node.

At the step 5, a loss value is calculated using the first impacted prediction probability and the second impacted prediction probability based on a loss function; weights of the impact perception neural network is updated, and then the impact perception neural network is updated with the impact perception neural network having the updated weights; and then the step 6 is performed. Where, the weights that need to be updated in the step 5 are the weights of the convolution layer, i.e., the network's weights. The loss function is binary cross-entropy, in which the first impacted prediction probability and the second impacted prediction probability serve as the two class-prediction results. By configuring the impact perception network model as a binary classification network, the convolutional neural network trained in this embodiment is simplified compared with the prior art, thereby forming a lightweight neural network model.

In the step 5, the method for updating the weights of the impact perception neural network based on the loss function includes updating the weights with the Adam algorithm, i.e., updating the weight matrices using a gradient-descent algorithm, and solving the weights by the gradient descent step by step iteratively, continuously updating the impact perception neural network having the updated weights to the impact perception neural network, so as to obtain the minimized loss value in the step 6, and realizing deviation correction of the sequence of measurements to be perceived and the weights. Thus, the accuracy of feature extraction of the impact perception neural network is improved, and the feasibility of using the impact perception neural network to detect whether the robot is impacted is further improved.

During the process of introducing specific variables for function operations, the loss function includes: L=−(Pgtp log(pp)+(1-Pgtp) log(pnp)), where L is the loss value, configured as the loss value of the impact perception neural network; Pgtp is the ground truth, and when Pgtp=1, it indicates that the current prediction result is that the robot is impacted; pp is the first impacted prediction probability, and pnp is the second impacted prediction probability. When the first impacted prediction probability pp and the second impacted prediction probability Pnp obtained in the step 4 change, the ground truth Pgtp may change, causing the loss value to adaptively change in accordance with the loss function; thus, in the course of updating the weights with the gradient-descent algorithm (Adam algorithm), the loss value is reduced, thereby enhancing the optimization effect of the loss function on the impact perception neural network.

At the step 6, the step 2 to step 5 are repeated, so that the input features generated from each sequence of measurements to be perceived is input into the impact perception neural network having the updated weights, until the most recently calculated loss value falls below a preset loss threshold; and then the impact perception neural network whose weights have just been updated is again taken as the impact perception neural network. Specifically, each time the weights are updated, the impact perception neural network is updated once, and the updated impact perception neural network is trained with the same sequence of measurements to be perceived or the input feature generated therefrom—including: performing the multilayer convolution and pooling operations; performing classification processing by using the softmax algorithm to calculate the newest first and second impacted prediction probabilities; and calculating the loss value based on the loss function. The step 6 is performed by repeating the step 2 to the step 5, preferably to minimize the loss function, and label the impact perception neural network updated in the latest step 5 as the target impact perception network model, thereby completing the training of the full convolutional neural network model.

In repeating the step 2 to the step 5, each time the step 5 is performed, and before the loss value is calculated using the loss function, it is determined whether the first impacted prediction probability obtained in the step 4 is greater than the second impacted prediction probability. If the first impacted prediction probability is greater than the second impacted prediction probability, the ground truth required by the loss function is set to 1, and it is determined that the robot is impacted as the current prediction result. Otherwise, the ground truth required by the loss function is set to 0, and it is determined that the robot is not impacted as the current prediction result. It should be noted that, before the calculated loss value is less than a preset loss threshold, an impact situation of the robot obtained according to a magnitude relationship between the first impacted prediction probability and the second impacted prediction probability is a rough judgment result, that is, the current prediction result. Therefore, a process in which the calculated loss value changes from being greater than or equal to the preset loss threshold to being less than the preset loss threshold is regarded as a process of training of the impact perception neural network, and is also a process of updating the weights, the first impacted prediction probability, the second impacted prediction probability, and the relevant model parameters of the convolution layer, and the relevant model parameters of the pooling layer. In some training embodiments, for rigorous model analysis, the learning rate of the network and the number of vector dimensions within the sequence of measurements to be perceived are adjusted. In a case that the learning rate is set to 0.001, the number of samples inside the single group of sequence of measurements to be perceived is set to 8711, and 228176 groups of sequences of measurements to be perceived are continuously collected, the aforesaid updating of the weights can be iterated 140 times, and the highest accuracy and recall rate are displayed based on the impact perception neural network. The number of iterations herein may be appropriately increased or decreased depending on the need for improved accuracy and considering time costs.

By performing the above steps 1 to 6 sequentially, the present disclosure successively performs multi-layer convolution operations, a pooling operation, classification processing using the Softmax algorithm, calculation of the loss value, and updating of the weights, and trains the target impact perception network model, which not only improves the extraction precision and classification precision of the pose feature, but also reduces the order of magnitude of the parameters of the convolution neural network (or the impact perception neural network). As a result, the constructed target impact perception network model forms a lightweight network model, thereby accelerating the detection of impact situation of the robot.

Based on the above embodiment, in a process of performing classification processing of the sequence of measurements to be perceived using the target impact perception network model, a first prediction probability that the robot is impacted at the current moment and a second prediction probability that the robot is impacted at the current moment are calculated. This is equivalent to updating the first impacted prediction probability as the first prediction probability that the robot is impacted at the current moment and the second impacted predication probability as the second prediction probability that the robot is impacted at the current moment.

It should be noted that, in a process of constructing the target impact perception network model, the execution sequence of Steps 1 to 6 is as follows.

In a case where the sensing device of the robot collects raw data (which may occur prior to or simultaneously with the step A of obtaining the observed speed magnitude and observed speed direction), the step 1 is first performed, and after the sequence of measurements to be perceived is extracted in the step 1, the step 2 is performed. After the input feature is generated in the step 2, the step 3 is performed. After the feature to be classified is obtained in the step 3, the step 4 is performed. After the first impacted prediction probability and the second impacted prediction probability are obtained in the step 4, the step 5 is performed. After the impact perception neural network is updated in the step 5, the step 6 is performed to update the target impact perception network model.

Each time the step 6 is performed, it is first determined whether the latest calculated loss value is less than a preset loss threshold. If it is determined that the latest calculated loss value is greater than or equal to the preset loss threshold, the most recently executed step 5 is returned to the step 2, and the steps 2, 3, 4, and 5 are performed sequentially again, so that a round of repeated execution of the step 2 to the step 5 is formed, and then the weights of the impact perception neural network are updated once, and then the step 6 is performed, and the step 2 to the step 5 are repeatedly executed until it is determined that the newly calculated loss value is less than the preset loss threshold value, and the impact perception neural network having the weights obtained in the newly executed step 5 is marked as the target impact perception network model, thereby providing the target impact perception network model for the subsequent executed step C.

As one embodiment, the impact perception neural network is constructed by sequentially connecting four 1D convolutional layers to form a stack of four continuous convolutional layers, followed by a pooling layer, configuring a kernel size of each of the 1D convolutional layers with a kernel size of 3, and configuring the moving step size of the convolutional layer filters in each of the 1D convolutional layers as 1, and configuring a pooling operation in the pooling layer to be an average operation, so as to construct the impact perception neural network. The weights of the convolutional layers are initialized with random values; and the input features and the weights of the convolutional layer are configured to perform convolution operations within the convolutional layers. Specifically, the four convolutional layers are sequentially connected, ensuring alignment between the output and input layers of each pair of adjacent convolutional layers (i.e., the connected output and input layers have the same depth). The impact perception neural network constructed in this embodiment belongs to a convolutional neural network. The impact perception neural network further includes a connection layer, which integrates the sequence of measurements of the same dimension and generates the input features. Accordingly, the impact perception neural network is constructed layer by layer based on a manner of constructing the convolutional neural network, so as to form a convolutional neural network composed of multiple stacked convolutional layers. Therefore, in this embodiment, according to the dimensionality of the sequence of measurements to be perceived (including the number of components along respective coordinate axes or rotation components around respective coordinate axes), appropriate parameters such as the number of convolutional and pooling layers, the size of convolutional filters, the motion step size of the convolutional filters, and the type of pooling operation are selected by performing the steps 1 to 6, so as to train the target impact perception network model. The resulting model is adaptable to the sequence of measurements of different dimensional sizes (e.g., angular speed sequences, acceleration sequences, left wheel rotation sequences, right wheel rotation sequences, etc.).

As one embodiment, the method for generating the input features includes: based on a type of data collected by the sensing device of the robot (i.e., a sensor type), connecting respective types of sequences of measurements to be perceived along the corresponding dimension channels to generate the input features. Specifically, as a sliding window traverses the raw data, multiple sequences of measurements to be perceived are extracted in sequence according to the chronological order of data collection. The length of the sequence of measurements to be perceived preferably corresponds to a window length of the sliding window, such that one sliding window delineates one sequence of measurements (i.e., one sequence of measurements of a type) within the raw data. Each such sequence contains measurements in at least one dimension (coordinate axis). On this basis, the robot connects currently extracted sequences of measurements of all types along their respective dimension channels and merges and input the input features into the impact perception neural network. Each type of sequence of measurements to be perceived refers to a sequence of measurements collected over a period of time by the same type of sensor and may contain multi-dimensional measurements. A single-type sequence of measurements can be transmitted through a single-dimensional channel, and multiple types of sequences of measurements can be connected in sequence within the same channel to synthesize the input features. Therefore, all types of sequences of measurements collected during one time interval can be regarded as an input feature. Preferably, the length of the one time interval corresponds to the length of one sliding window and serves as the length of the sequence of measurements to be perceived.

In this embodiment, the sensing device of the robot includes an inertial measurement unit and rotary encoders. The inertial measurement unit includes an accelerometer for sensing acceleration measurements and a gyroscope for sensing angular speed measurements. The rotary encoders include a left rotary encoder for sensing the left wheel's rotation measurements and a right rotary encoder for sensing the right wheel's rotation measurements. Therefore, the sequence of measurements to be perceived include a 3-axis angular speed measurement sequence, a 3-axis acceleration measurement sequence, a 1-axis left wheel rotation measurement sequence, and a 1-axis right wheel rotation measurement sequence, such that the dimensionality of the input features is at least eight. The input features are configured in the form of a matrix. Specifically, for one sequence of measurements to be perceived, especially for the 3-axis angular speed measurement sequence and the 3-axis acceleration measurement sequence, each 1-axis measurement sequence is connected to the impact perception neural network along a dimension channel. Each 1-axis measurement sequence corresponds to a sequence of measurements obtained in the robot's yaw, roll, or pitch directions. These 1-axis sequences are vector sequences, and both angular speed measurements and acceleration measurements are set in the form of vectors, arranged as a time sequence according to a timeline. Accordingly, after aligning with the timestamps of the sequence of measurements to be perceived collected in real time by the sensing device, each sequence of measurements to be perceived is labeled as either “impacted” or “non-impacted” by executing steps A to D.

Preferably, the target impact perception neural network model includes four one-dimensional convolutional layers. These four one-dimensional convolutional layers are sequentially referred to as a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer. The input layer of the first convolutional layer has a depth of 8, which is equal to the number of column elements in the input feature. The input features are configured in the form of a matrix and composed of vector combinations of measurements along respective coordinate axes. The depth of the output layer of the first convolutional layer is equal to the depth of the input layer of the second convolutional layer, the depth of the output layer of the second convolutional layer is equal to the depth of the input layer of the third convolutional layer, and the depth of the output layer of the third convolutional layer is equal to the depth of the input layer of the fourth convolutional layer. In this manner, the first through fourth convolutional layers are sequentially connected, forming four sequentially stacked convolutional layers in a three-dimensional coordinate system.

In this preferred embodiment, a ratio between the depth of the input layer and the depth of the output layer in the first convolutional layer is less than a ratio between the depth of the input layer and the depth of the output layer in the second convolutional layer; the ratio between the depth of the input layer and the depth of the output layer in the second convolutional layer is less than the ratio between the depth of the input layer and the depth of the output layer in the third convolutional layer; and the ratio between the depth of the input layer and the depth of the output layer in the third convolutional layer is less than the ratio between the depth of the input layer and the depth of the output layer in the fourth convolutional layer. Where, the reciprocal of the ratio between the depth of the input layer and the depth of the output layer in the second convolutional layer is equal to the ratio between the depth of the input layer and the depth of the output layer in the third convolutional layer.

Illustratively, the depth of the input layer in the first convolutional layer is 8, the depth of the output layer in the first convolutional layer is 64, the depth of the input layer in the second convolutional layer is 64, and the depth of the output layer in the second convolutional layer is 128, the depth of the input layer in the third convolutional layer is 128, the depth of the output layer in the third convolutional layer is 64, the depth of the input layer in the fourth convolutional layer is 64, and the depth of the output layer in the fourth convolutional layer is 2. This configuration can be understood as being advantageous for enabling the impact perception neural network to calculate a first impacted prediction probability and a second impacted prediction probability using the softmax algorithm, while also reducing the number of channels between the convolutional layers and the pooling layers.

The sliding window maintains a constant window length while traversing the raw data. Within the sliding window, the right-end traversal time corresponds to the current moment, and the left-end traversal time is determined by the window length, such that the sequence of measurements to be perceived is configured as a time sequence. To align both endpoints of the sequence of measurements to be perceived with the two ends of the sliding window, the length of the sequence of measurements to be perceived is set to be equal to the window length of the sliding window. This improves the effectiveness of the sliding window in extracting the sequence of measurements to be perceived and reduces the introduction of excessive invalid data.

It should be noted that the raw data includes acceleration measurements and acceleration directions sensed by the accelerometer, angular speed measurements and angular speed directions sensed by the gyroscope, left wheel rotation measurements sensed by the left rotary encoder, and right wheel rotation measurements sensed by the right rotary encoder. The left wheel rotation measurements include the rotation distance or rotation speed of the robot's left wheel; the right wheel rotation measurements include the rotation distance or rotation speed of the robot's right wheel.

Preferably, the window length of the sliding window is set to a value of 30, which serves as the optimal sequence length of the sequence of measurements to be perceived, thereby achieving the best balance between the training efficiency of the impact perception neural network and the classification accuracy. The window length refers to the number of samples framed by the sliding window along the time axis. Here, the training efficiency refers to the efficiency of training the impact perception neural network using the sequence of measurements to be perceived in the steps 1 to 6; the classification accuracy refers to the accuracy of the classification operation performed by the target impact perception network model trained in the step 6, on the sequence of measurements to be perceived or its corresponding training features.

In summary, the sequence of measurements to be perceived having a sequence length of 30 is input into the target impact perception neural network model for classification processing, so as to obtain the first prediction probability that the robot is impacted at the current moment and the second prediction probability that the robot is impacted at the current moment. Compared with the prior art, the order of magnitude of parameters required by the convolutional neural network is reduced, thereby allowing the target impact perception neural network model to occupy less storage space, and forming a lightweight network model. This not only accelerates the detection of impact situation on the robot but also enables deployment on resource-constrained embedded systems.

Before performing classification processing on the sequence of measurements to be perceived using the target impact perception neural network model in the step C, the step A involves obtaining the observed speed value and the observed speed direction, and obtaining the predicted speed value and the predicted speed direction at the current moment based on a Kalman filtering algorithm.

On the other hand, when the robot processes sensor data based on the Correlative Scan Matching (CSM) algorithm or other localization algorithms, it may encounter issues such as untimely data processing and delayed output of pose information. For example, performing window search and matching operations through the CSM algorithm often introduces latency, resulting in measurement data being delayed or arriving out of order. In such cases, measurements from an earlier moment of the same target state may arrive later than measurements from the current moment at the search center—this is referred to as the problem of delayed and disordered measurements. When delayed measurements arrive, using them in conventional Kalman filter-based frameworks can lead to rapid accumulation of sensing errors in the robot's inertial sensors. If only current-moment data is used and delayed measurements are simply discarded, valuable information contained in those measurements is lost, making it difficult to effectively correct the robot's pose.

Based on the aforementioned technical shortcomings, the present disclosure discloses an embodiment, in which the execution method of the step A includes following steps A1-A4, as shown in FIG. 4.

At the step A1, based on a predefined localization algorithm, the robot obtains current pose observation data along with its noise covariance matrix, and configures the current pose observation data present at the current moment and referred to as out-of-sequence pose observation data, and determines that the timestamp of the current pose observation data is earlier than the current moment. The timestamp of the current pose observation data refers to the moment at which the predefined localization algorithm calculates the current pose observation data, and is considered the solution moment of the current pose observation data. Accordingly, the current pose observation data can be interpreted as delayed pose data and sensor data that has been processed by the localization algorithm. The original sensor data includes inertial data collected by the Inertial Measurement Unit and point cloud data collected by the laser sensor. The original sensor data is processed by the localization algorithm to obtain the current pose observation data, which is delayed relative to the moment of original sensor data collection. However, the correlation along the timeline is recorded, including the length of the delay period. The current pose observation data is then subjected to data association processing to obtain historical pose observation data. The step A2 is then performed.

In addition, the noise covariance matrix of the current pose observation data is determined based on the measurement error carried within the pose data output by the localization algorithm. The pose data output by the localization algorithm includes the current pose observation data. The measurement error includes systematic measurement errors from various sources, such as the inertial measurement unit, rotary encoders, and laser sensors, and is used to determine the initial state of the noise covariance matrix of the current pose observation data. Preferably, the localization algorithm is a Correlative Scan Matching algorithm.

The historical pose observation data temporally corresponds to the raw data required to obtain the current pose observation data using the localization algorithm, thereby forming posterior correlations of states at different moment. For example, if the current pose observation data is pose observation data obtained from the latest iteration of pose estimation by the localization algorithm, then the historical pose observation data is pose observation data obtained from the previous iteration of pose estimation by the localization algorithm. The raw data required to calculate the historical pose observation data using the localization algorithm is temporally aligned with that used for calculating the current pose observation data using the localization algorithm. The previous and current matching iterations fall within two adjacent time intervals, with the timestamp of the historical pose observation data being less than that of the current pose observation data, and thus also less than the current moment. The timestamp of the historical pose observation data can be approximated to an integer sampling moment. When the timestamp j of the historical pose observation data equals the timestamp of the current pose observation data minus one, j may be less than the current moment i minus one. This design accounts for the computational delay of the localization algorithm and ensures the effectiveness of Kalman filter-based processing.

At the step A2, based on a kinematic equation, the current pose prediction data is calculated from the current pose observation data; furthermore, the prior covariance matrix of the current pose prediction data is calculated based on a state equation. Then, the step A3 is performed.

In some embodiments, prior to updating and correcting the current pose prediction data and its prior covariance matrix using the Kalman filter algorithm or other associated algorithms, the current pose prediction data calculated in the step A2 may be regarded as the predicted data of the initial state, and the prior covariance matrix of the current pose prediction data calculated in the step A2 may be regarded as the covariance matrix of the initial state.

Specifically, in the step A2, the method for calculating the current pose prediction data from the current pose observation data based on the kinematic equations includes:

    • calculating a current attitude angle qi=qi−d ⊗q{(ωi−ωb)·d}; qi=qi−d q{(ωi−ωb)·d} is a kinematic equation for calculating an attitude angle of the robot. Where: ωj denotes the angular speed measured by the robot's gyroscope at the current moment, wp is the predefined bias angular speed, representing the gyroscope bias of the robot; (ωi−ωb)·d represents the Euler angles of the robot's rotation over the time interval d; q{·} is used to convert Euler angles into quaternions, which can be regarded as a transformation into a rotation matrix; ⊗ represents quaternion multiplication to perform Euler transformation based on the rotation angles around each coordinate axis, and represents the exponential mapping used to convert Euler angles into quaternions; qi−d is the attitude quaternion at the observation moment i−d, and q; is the current attitude angle, both qi and qi−d are expressed in the form of quaternions. qi represents the current attitude angle of the robot in quaternion form.
    • calculating a current speed: vi=vi−d+(Ri−d(ai−ab)+g)d; vi=vi−d+ (Ri−d(ai−ab)+g) d is the kinematic equation used to compute the robot's motion speed. Where ai is the acceleration measured by the robot's accelerometer at the current moment, and ab is a preset bias acceleration, representing the acceleration offset value of the accelerometer installed on the robot; Ri−d is the posterior rotation matrix at observation moment i−d, Ri−d(ai−ab) is used to align the direction of the (ai−ab) adjusted acceleration with the direction of gravitational acceleration g; vi−d is the speed at the observation moment i−d, and vi is the current speed.
    • calculating a current prediction priori displacement:

S i = S i - d + v i - d ⁢ d + 1 2 ⁢ ( R i - d ( a i - a b ) + g ) ⁢ d 2 ; S i = S i - d + v i - d ⁢ d + 1 2 ⁢ ( R i - d ( a i - a b ) + g ) ⁢ d 2

is the kinematic equation used to calculate the robot's displacement over the time interval d. Where, Si−d is a priori displacement predicted at observation moment i−d, representing the robot's prediction position at the observation moment i−d, Si is a priori displacement predicted at the current moment, representing the robot's prediction position at the current moment i.

Then, the current attitude angle qi, the current speed vi, and the current prediction priori displacement Si are combined to form the current pose prediction data Xi, which refers to the pose data at the current moment calculated from the current pose observation data based on the kinematic equations; Where, the current pose observation data qi−d is composed of the attitude at observation moment i−d, the speed vi−d at observation moment i−d, and the priori displacement Si−d predicted at the timestamp of observation moment i−d; the observation moment i−d corresponds to the timestamp of the current pose observation data, and d represents the time interval between the current moment i and observation moment i−d. It should be noted that within the time interval d, gravity acceleration, acceleration bias, and angular speed bias are assumed to remain constant and allowed to be updated once the robot is detected to be in a stationary state.

The step A2 is based on the robot kinematic model, which establishes a state space using the robot's displacement, speed, and acceleration at a given moment, and describes the evolution of the robot's pose over time based on Newton's laws of motion. This formulation facilitates the use of numerical integration methods within the Kalman filter framework to predict a priori displacement, speed, and attitude.

On the other hand, in the step A2, the method for calculating a priori covariance matrix of the current pose prediction data based on the state equation includes:

P i = F ε ⁢ P i - d ⁢ F ε T + F i ⁢ Q i ⁢ F i T ; P i = F ε ⁢ P i - d ⁢ F ε T + F i ⁢ Q i ⁢ F i T

is equivalent to the state equation required for calculating the predicted covariance matrix in the Kalman filter algorithm. Where, Pi−d is a priori covariance matrix of the pose prediction data at observation moment i−d. Fε is the Jacobian matrix of the state equation with respect to the pose prediction data Xi−d at observation moment i−d, which is equivalent to the state transition matrix required by the Kalman filter algorithm; Fi is the Jacobian matrix of the state equation with respect to the measurement noise of the inertial measurement unit; Qi is the noise covariance matrix of the current pose prediction data; Qi is determined by the noise of the inertial measurement unit, an initial value Q0 of Qi is determined by the measurement errors of the inertial measurement unit in distance and orientation, and it can be represented as a diagonal matrix.

At the step A3, based on the delayed disordered observation equation, calculate the Kalman gain matrix using the noise covariance matrix of the current pose observation data and the prior covariance matrix of the current pose prediction data; then proceed to Step A4.

Specifically, in the step A3, the method for calculating the Kalman gain matrix includes:

Ki=PiHT(HPiHT+U)−1; Ki=PiHT(HPiHT+U)−1 is the delayed disordered observation equation, which is an equation for calculating the Kalman gain using the disordered position observation data and its noise covariance matrix. Where Pj is the prior covariance matrix of the current pose prediction data; Where U is the noise covariance matrix of the current pose observation data; the noise covariance matrix of the current pose observation data is determined based on the measurement error included in the pose data output by the positioning algorithm, and can be determined by the inertial measurement unit based on measurement noise; H is the Jacobian matrix of the delayed disordered observation equation with respect to the current pose prediction data, equivalent to the observation matrix in the Kalman filter algorithm. T denotes the transpose of a matrix; (HPiHT+U)−1 is equivalent to taking the inverse of the predicted variance. Ki is the Kalman gain matrix; and i denotes the current moment.

At the step A4, the current pose prediction data is corrected based on a residual between the current pose observation data and historical pose observation data, so as to update the speed vector in the corrected current pose prediction data as the predicted speed vector at the current moment, and to update the speed vector in the current pose observation data as the observed speed vector. The correction may be performed at least once, or after at least one execution of step A3. In combination with the Kalman gain matrix, the prior covariance matrix of the current pose prediction data, and the noise covariance matrix of the current pose observation data, the prior covariance matrix of the current pose prediction data is corrected. The predicted speed vector at the current moment consists of the predicted speed magnitude and predicted speed direction as described in the step A, while the observed speed vector consists of the observed speed magnitude and observed speed direction also described in the step A.

The method for correcting the current pose prediction data in the step A4 includes: Xi|i=Xi+Ki (z−Xi); where let z represent the current pose observation data, expressed as a vector; Xj represents the historical pose observation data; j is the timestamp of the historical observation data, and j<i; let Xi denote the current pose prediction data; Let Xi|i denote the corrected current pose prediction data, Xiļi can be represented as Xi|i−d to indicate a backward prediction state vector from moment i to moment i−d, when the robot is in a stationary state, the predicted state vector can be directly updated to Xi at the next timestamp. Let z−Xj denote the residual between the current pose observation data and the historical pose observation data.

The method for correcting the prior covariance matrix of the current pose prediction data in the step A4 includes:

P i | i = ( I - K i ⁢ H ) ⁢ P i ( I - K i ⁢ H ) T + K i ⁢ U ⁢ K i T ;

where Pi|i is the corrected matrix obtained from the prior covariance matrix Pi, Pi|i can be represented as Pi|i−d to indicate the backward prediction covariance matrix from moment i to moment i−d, when the robot is in a stationary state, it can be directly updated to Pi at the next timestamp; where I is the identity matrix.

It should be noted that, in the step A, the execution order of the steps A1 to A4 includes: in a case that the robot's sensing device collect raw data (which may be synchronized with the raw data acquisition operation mentioned in the step C1 or the step 1) and the raw data is invoked by the preset positioning algorithm to output the current pose observation data, the step A1 is executed first. After the historical pose observation data, current pose observation data, and their noise covariance matrices are obtained in the step A1, the step A2 is performed. After the current pose prediction data and its prior covariance matrix is calculated in the step A2, the step A3 is performed. After the Kalman gain matrix is calculated in the step A3, the step A4 is performed; and the predicted speed vector and the observed speed vector at the current moment are updated in the step A4.

In summary, the foregoing embodiment takes the calculation result output with delay by the preset positioning algorithm as the current pose observation data (i.e., delayed measurement data), and then performs correction of the robot's state information based on the steps A1 to A4 described above. In this way, at the current moment, the pose information and covariance matrix of the delayed measurement data (i.e., the aforementioned current pose observation data) are fully utilized to constrain the sensor error drift of the inertial navigation measurement unit of the robot, thereby effectively correcting the robot's pose information. Moreover, this approach can also provide a real-time speed-based trigger condition for initiating the classification of the sequence of measurements to be perceived using the target impact perception network model.

In some embodiments, after the robot completes a correction of the current pose prediction data and its prior covariance matrix at the current moment, it enters the next moment i+1, and there are following implementations.

When the robot is in a stationary state, the predicted speed vector at the current moment and the prior covariance matrix of the current pose prediction data can be updated by repeatedly performing the step A3 and the step A4, thereby achieving the effect of iterative correction. During the repeated execution of the step A3 to the step A4, the current pose observation data and its noise covariance matrix are not updated with the latest output from the positioning algorithm, and the historical pose observation data is also not updated in Step A. The noise covariance matrix of the current pose observation data may remain unchanged even as the system progresses to the next moment i+1, instead of being updated based on the measurement errors carried by the latest pose data output by the positioning algorithm. Such iterative calculations continue until the number of repeated executions reaches a predefined target number of iterations. The predefined target number of iterations is preset. Then, the speed vector in the corrected current pose prediction data is updated as the predicted speed vector at the current moment, and the speed vector in the current pose observation data is updated as the observed speed vector, thereby completing one round of iterative correction or one round of iterative update.

Alternatively, within a correction cycle, the predicted speed vector at the current moment and the prior covariance matrix of the current pose prediction data can be updated by repeatedly performing Step A2 to Step A4, thereby achieving the effect of iterative correction; During the repeated execution of Step A2 to Step A4, the current pose observation data is updated at each moment i+1 with the corrected current pose prediction data obtained in the previous execution of Step A4. Consequently, in Step A2, the recalculated current pose prediction data and its prior covariance matrix are updated accordingly; in Step A3, the recalculated Kalman gain matrix is also updated. Then, in Step A4, the corrected current pose prediction data is updated based on the residual between the updated current pose observation data and the updated historical pose observation data. Moreover, the prior covariance matrix of the updated current pose prediction data is corrected using the updated Kalman gain matrix, the updated prior covariance matrix, and the updated noise covariance matrix of the current pose observation data. This iterative process continues until the number of repetitions reaches a predefined target number of iterations, which is preset. Finally, the speed vector within the corrected current pose prediction data is updated as the predicted speed vector at the current moment, and the speed vector in the current pose observation data is updated as the observed speed vector, thereby completing one round of iterative correction or one round of iterative update.

As one embodiment, the robot impact detection method further includes:

Starting from an initial moment, sequentially collecting N sets of measurements within a single acquisition cycle, where the timing start point of one collection cycle is a moment m, and the timing end point of the same collection cycle is a moment m+N−1. If multiple collection cycles are set, N sets of measurements are collected within each collection cycle, and a time sequence is formed within a sliding window for each collection cycle. Each set of measurements includes an acceleration measurement, an angular speed measurement, a left wheel rotation measurement, and a right wheel rotation measurement. When the initial moment is configured as the moment when the robot begins to walk, it serves as the timing start point of the first collection cycle.

A weighted mean square error is calculated based on the N sets of measurements collected within one collection cycle, and it is then determined whether the weighted mean square error is lower than a pre-set statistical threshold. The pre-set statistical threshold is a value determined by the inventor through multiple experiments, and is used to define reasonable variation ranges for the acceleration measurements, angular speed measurements, left wheel rotation measurements, and right wheel rotation measurements. Preferably, the reasonable variation ranges correspond to the variation reflected by the weighted mean square threshold calculated based on the acceleration, angular speed, left wheel rotation, and right wheel rotation measurements when the robot is in a stationary state. This is used to detect the degree of deviation of the weighted mean square error from the threshold, thereby determining whether the robot is in a stationary state or has started moving.

Specifically, the method for calculating the weighted mean square error based on the N sets of measurements collected within one collection cycle includes:

γ = 1 N ⁢ ∑ k = m m + N - 1 ⁢ ( 1 σ a 2 ⁢ a k - g ⁢ a _ a _ 2 + 1 σ ω 2 ⁢ ω k 2 + 1 σ r 2 ⁢ r k l 2 + 1 σ r 2 ⁢ r k r 2 ) ;

where, γ denotes the weighted mean square error, which is the weighted mean square error calculated within the said acquisition cycle; ak denotes the acceleration measurement at moment k; ā denotes the average of the N sets of acceleration measurements, used to represent the average acceleration over the time interval from moment m to moment m+N−1, where moment k ranges from the integer m to m+N−1, it is applicable for calculating the weighted mean squared error γ within the framework of the weighted least squares method, when m changes, the original weighted mean squared error γ can be recalculated and updated. σa is the standard deviation of the accelerometer measurement noise, which is preset; The time interval from moment m to moment m+N−1 is one said collection cycle; g is the gravitational acceleration; ωk is the angular speed measurement at moment k; σω is the standard deviation of the gyroscope measurement noise, which is preset;

r k l

is the left wheel rotation measurement at moment k,

r k r

is the right wheel rotation measurement at moment k, σr is the standard deviation of the measurement noise from the left or right rotary encoder, which is preset. Thus, in the process of calculating the weighted mean square error, the standard deviation of the measurement error distribution for each measurement is used as the weight.

When it is determined that the weighted mean square error is lower than the predetermined statistical threshold, the robot is identified as being in a stationary state. When the robot is in a stationary state,

g ⁢ a _ a _

represents the direction of the gravitational acceleration g is adjusted to be parallel to the direction of ā, the acceleration measured by the accelerometer ak is equal to g, and the magnitude of the angular speed measured by the gyroscope ωk is 0, keeping the robot's pose constant; The magnitude of the value measured by the right rotary encoder

r k r

is equal to 0, and the magnitude of the value measured by the left rotary encoder

r k l

is also equal to 0.

In some embodiments, when it is determined that the robot is in a stationary state, the robot directly uses the Kalman filtering algorithm to correct the current pose prediction data and its prior covariance matrix, without performing steps A1 through A4. The Kalman filtering algorithm used here may be an Extended Kalman Filter (EKF), in which the initial search pose in the stationary state is used as prior information.

In yet another embodiment, when it is determined that the robot is in a stationary state, the robot corrects the current pose prediction data and its prior covariance matrix by repeatedly executing steps A3 through A4, thereby updating the predicted speed vector at the current moment. This iterative calculation continues until, within the period during which the robot remains stationary, the updated/corrected current pose prediction data falls within the pose data range of a target state. The robot then proceeds to execute steps B through D.

In some other embodiments, when it is determined that the robot is in a stationary state, the robot updates the bias acceleration using the average of the N sets of acceleration measurements, and updates the bias angular speed using the average of the N sets of angular speed measurements. It then begins to correct the current pose prediction data and its prior covariance matrix by executing steps A2 through A4, thereby updating the predicted speed vector at the current moment. Subsequently, steps B through D are selected for execution. During the re-execution of step A2, the current pose prediction data calculated based on the aforementioned kinematic equations will be updated accordingly—for example, updating the current attitude angle qi, updating the current speed vi, and updating the current prediction prior displacement Si. Thus, the average measurements from the accelerometer and gyroscope while the robot is in a stationary state (namely, the average of the N sets of acceleration and angular speech measurements, respectively) are used to update the bias acceleration and bias angular speed.

Since the wheeled robot vacuum periodically stops moving during planned cleaning, the average measurements from the accelerometer and gyroscope during these stationary periods can be used to update the bias acceleration and bias angular speech. Additionally, a Kalman filter algorithm can be used to correct the current pose prediction data and its prior covariance matrix, thereby compensating for drift in the inertial measurement unit. This enables zero-speed detection and zero-speed speed.

When it is determined that the weighted mean square error is not lower than the preset statistical threshold, the robot is determined not to be in a stationary state. Preferably, steps A1 to A4 are not executed. Instead, based on the Kalman filter algorithm, the left and right wheel rotation measurements are used to respectively calculate the predicted state data of the left and right wheels. These predicted state data are then corrected to obtain the corrected state and covariance matrix. In this way, under the Kalman filter framework, the constraint values can be adaptively adjusted according to the actual motion state of the robot. After filtering, an error correction value for the rotation rate or rotation distance is obtained, which is used to correct the robot's speed error. As a result, the corrected three-dimensional directional speed is derived—that is, the speed components in the three coordinate axes after the current speed (calculated in step A2) has been corrected by the Kalman filter algorithm; this corrected 3D directional speed is then used to update the position error, resulting in the observed speed value and the observed speed direction. Based on the Kalman filter algorithm, the predicted speed value and the predicted speed direction at the current moment are obtained. Steps B to D are then performed to introduce the impact perception neural network, thereby constructing a target impact perception network model that takes into account multiple types of sequences of measurements to be perceived, thereby improving the classification and recognition performance of the impact perception network model. Therefore, by combining the Kalman filter algorithm with the impact perception neural network, complementary advantages are realized, helping improve the accuracy of impact detection on the robot and addressing errors in processing sensor data from the wheel rotary encoders. In cases where an impact on the robot is detected, the corrected three-dimensional directional speed prediction vector is used to adjust the robot's position error, ensuring the accuracy of navigation and positioning results.

It should be noted that a rotary encoder is installed on each of the robot's left and right wheels to measure the rotation amounts of the respective wheels, which are recorded as the left wheel rotation measurement and right wheel rotation measurement, respectively. Both of these measurements support conversion into wheel speed observation data, which can be used in the correction process within the framework of the Kalman filter algorithm.

Specifically, after it is determined that the robot is not in a stationary state, under the computational framework required by the Kalman filter algorithm, the system may first use a predefined wheel speed observation equation to calculate the left wheel observation state data

r k 1

and right wheel observation state data

r k r ,

respectively, based on the left wheel rotation measurement and right wheel rotation measurement, then, based on the state equation, the system calculates the left wheel prediction state data and its prior covariance matrix from the left wheel observation state data and its prior covariance matrix. Similarly, it calculates the right wheel prediction state data and its prior covariance matrix from the right wheel observation state data and its prior covariance matrix. Thus, the predicted state data and prior covariance matrices for both wheels are obtained via the state equations. Next, by introducing motion speed constraints of the robot, the Kalman filtering is performed separately on the left and right wheel predicted state data, yielding the corrected left wheel predicted state data and corrected right wheel predicted state data, thereby forming a nonholonomic constraint correction. Afterward, the corrected predicted state data for the left and right wheels are respectively updated as the left wheel rotation measurement and right wheel rotation measurement. As a result, in cases where it is detected that the robot is impacted, the corrected predicted state data from both wheels are used to compensate for the robot's position error, including lateral speed error.

In this embodiment, the process from calculating the left wheel observation state data and right wheel observation state data to updating the corrected left wheel predicted state data and corrected right wheel predicted state data is equivalent to: using the rotary encoders and the speed observations from the inertial measurement unit and/or nonholonomic constraints-which inherently contain measurement errors—as auxiliary inputs to the Kalman filter, the wheel rotation speeds measured by the rotary encoders are configured as the observation vector, and the current pose prediction data is configured as the state vector, allowing the Kalman filter to perform the measurement update process.

Where, the robot motion speed constraints include speed constraints required for the robot to undergo lateral displacement; the speech constraint conditions required for the robot to undergo lateral displacement include: the magnitude of the current speed component of the robot in the wheel rotation axis direction of the robot (i.e., the magnitude of the lateral speed) is not equal to 0, and the magnitude of the current speed component of the robot in the direction perpendicular to the robot walking plane is equal to 0; the current speed component of the robot in the direction of the wheel rotation axis of the robot is the lateral speed resulting from the lateral displacement of the robot.

After introducing the robot motion speed constraint conditions into the Kalman filter algorithm, the current pose prediction data can be calculated from the current pose observation data according to the kinematic equations in Step A2. The time interval between the current moment and the observation moment can be constrained based on the robot motion speed constraint conditions and the actual motion state of the robot, for example, by setting the observation moment to the previous moment. According to the kinematic equations in Step A2, the robot motion speed constraint conditions impose constraints not only among continuous speed, attitude angle, and displacement, but also on the state increments between the speed of the accelerometer and gyroscope and the preset inertial error estimation, thereby improving the pose prediction accuracy of the Kalman filter algorithm under impact conditions.

It should be noted that Kalman filtering is relatively insensitive to the parameters of the robot motion model (e.g., the kinematic equations in Step A2) and the system's initial values within a certain range, provided that the parameters are configured to ensure that the robot system can effectively “track the target.” Kalman filtering is a system that performs information fusion using temporal information. It applies a weighting to the observation information via the Kalman gain, thereby correcting the uncertainty in the prediction. This correction of uncertainty accumulates over time, and when the correction is toward the true value, the predicted pose data and its prior covariance matrix will gradually converge. Therefore, in the state transition model (the prior of the target) and the observation model (the prior of the sensor), the degree of consistency between the models and the actual process determines the final accuracy of the corrected pose estimation.

A chip is configured to store a program; where the program is used to control a robot to perform the method for detecting the impact on the robot disclosed in the foregoing embodiments, or the chip is configured to control the robot to perform the method for detecting the impact on the robot disclosed in the foregoing embodiments, specifically including: step A of obtaining an observed speed magnitude and an observed speed direction, and then of obtaining a predicted speed magnitude and a predicted direction at a current moment based on a Kalman-filter algorithm; step B of calculating an absolute value of a difference between the observed speed magnitude and the predicted speed magnitude to obtain an Euclidean distance corresponding to change of the current speed and of calculating a cosine value of an angle between the observed speed direction and the predicted speed direction to obtain a cosine distance corresponding to the change of the current speed; step C of performing classification processing of a sequence of measurements to be perceived using a target impact perception network model if the Euclidean distance is greater than a preset Euclidean-distance threshold and the cosine distance is less than a preset cosine distance threshold to obtain a first prediction probability that the robot is impacted at the current moment, and a second prediction probability that the robot is impacted at the current moment, where, the sequence of measurements is derived from data collected by a sensing device of the robot, and the sensing device includes an inertial measurement unit and a rotary encoder; and step D of determining that the robot is impacted if the first prediction probability is greater than the second prediction probability.

It should be noted that, under the control of the chip, the execution sequence of Steps A to D includes: first executing Step A, and after obtaining the predicted speed value and the predicted speed direction at the current moment in Step A, executing Step B; after calculating the Euclidean distance corresponding to change of the current speed and the cosine distance corresponding to the change of the current speed in Step B, executing Step C; after obtaining the first prediction probability that the robot is impacted at the current moment and the second prediction probability that the robot is impacted at the current moment in Step C, executing Step D, or further determining the magnitude relationship between the first prediction probability and the second prediction probability at the current moment before executing Step D; then, based on Step D, determining that the robot is impacted, which can be understood as the robot currently being impacted.

In Steps A to D executed under the control of the chip, the Euclidean distance formed between the observed speed magnitude and the predicted speed magnitude at the current moment, as well as the cosine distance formed between the observed speed direction and the predicted speed direction at the current moment, serve as the trigger detection starting point, which activates the target impact perception network model to perform classification processing on the data collected by the inertial measurement unit and the rotary encoder. This approach not only considers the necessity of classification processing by the target impact perception network model, but also allows for the integration of prediction information under the Kalman filtering framework based on data collected from at least two types of sensors, thereby improving the reliability and accuracy of the classification by the target impact perception network model. Furthermore, the determination is made solely based on the magnitude relationship between the two prediction probabilities, overcoming misjudgment issues caused by sudden value changes in inertial measurement unit readings and enhancing the accuracy of impact detection. The target impact perception network model, being a lightweight neural network model, reduces dependence on the internal memory resources of the chip and accelerates the detection speed of the chip.

The present disclosure further discloses a robot, where the robot is internally equipped with the aforementioned chip, enabling the robot to execute the method for detecting the impact on the robot disclosed in the foregoing embodiments. The left wheel of the robot is installed with a left rotary encoder, and the right wheel is installed with a right rotary encoder. An inertial measurement unit is installed within the body of the robot, the inertial measurement unit including an accelerometer and a gyroscope. Essentially, the robot is a wheeled robot equipped with two types of odometers, which respectively sense the pose state of the robot body and the rotation states of the wheel axles on both sides of the body. The gyroscope is used to measure angular speed, and the accelerometer is used to measure acceleration. The left rotary encoder installed on the robot's left wheel is configured to sense the rotation measurement of the left wheel; the right rotary encoder installed on the robot's right wheel is configured to sense the rotation measurement of the right wheel. Regardless of whether the robot is in a stationary state or not, by executing the impact detection method, misjudgments caused by abrupt changes in the measurements from the inertial measurement unit can be overcome, thereby improving the accuracy of impact detection.

It should be understood by those skilled in the art that the embodiments of the present disclosure may be provided as a method, system, or computer program product. Therefore, the present disclosure may be implemented in the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

The present disclosure is described with reference to the flowcharts and/or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each step of the flowcharts and/or each block of the block diagrams, as well as combinations of steps and/or blocks in the flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which are executed by the processor of the computer or other programmable data processing device, create means for implementing the functions specified in one or more steps of the flowcharts and/or one or more blocks of the block diagrams.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means for implementing the functions specified in one or more steps of the flowcharts and/or one or more blocks of the block diagrams.

These computer program instructions may also be loaded onto a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more steps of the flowcharts and/or one or more blocks of the block diagrams.

It should be noted that the above embodiments are merely intended to illustrate the technical solutions of the present disclosure and not to limit them. Although the present disclosure has been described in detail with reference to the preferred embodiments, those skilled in the art will appreciate that modifications may still be made to the specific implementations or equivalent substitutions may be made for certain technical features without departing from the spirit of the technical solutions of the present disclosure. All such modifications and substitutions shall fall within the scope of the technical solutions claimed by the present disclosure.

Claims

1. A method for detecting an impact on a robot, comprising:

step A of obtaining, by the robot, an observed speed magnitude and an observed speed direction, and obtaining a predicted speed magnitude at a current moment and a predicted speed direction at the current moment based on a Kalman filter algorithm; then performing step B;
the step B of calculating, by the robot, an absolute value of a difference between the observed speed magnitude and the predicted speed magnitude to obtain an Euclidean distance corresponding to change of the current speed; calculating a cosine value of an angle between the observed speed direction and the predicted speed direction to obtain a cosine distance corresponding to the change of the current speed; then performing step C;
the step C of performing classification processing of a sequence of measurements to be perceived using a target impact perception network model in responsive to the Euclidean distance being greater than a preset Euclidean distance threshold and the cosine distance being less than a preset cosine distance threshold, to obtain a first prediction probability that the robot is impacted at the current moment and a second prediction probability that the robot is impacted at the current moment; then performing the step D;
wherein the sequence of measurements to be perceived is derived from data collected by a sensing device of the robot, and the sensing device of the robot comprises an inertial measurement unit and a rotary encoder; and
the step D of determining that the robot is impacted in responsive to the first prediction probability being greater than the second prediction probability;
wherein the first prediction probability is a probability that the sequence of measurements to be perceived is classified as a sequence of measurements extracted when the robot is currently impacted; and the second prediction probability is a probability that the sequence of measurements to be perceived is classified as a sequence of measurements extracted when the robot is currently not impacted.

2. The method of claim 1, wherein the step C of performing classification processing of the sequence of measurements to be perceived using the target impact perception network model comprises:

step C1 of extracting the sequence of measurements to be perceived from raw data collected by the sensing device of the robot using a sliding window;
step C2 of inputting the sequence of measurements to be perceived into the target impact perception network model to generate an input feature;
step C3 of controlling the input feature to sequentially perform a convolution operation on the input feature within a plurality of convolutional layers to obtain a discrimination feature; and then controlling the discrimination feature to perform an average pooling on the discrimination feature within a pooling layer to obtain a target classification feature;
wherein the target impact perception network model comprises a plurality of convolutional layers and one pooling layer; and
step C4 of performing classification processing on the target classification feature using a softmax algorithm to obtain the first prediction probability that the robot is impacted at the current moment and the second prediction probability that the robot is impacted at the current moment.

3. The method of claim 2, wherein the softmax algorithm is configured as a softmax classifier in the target impact perception network model; and

the softmax classifier is configured to calculate the first prediction probability that the robot is impacted at the current moment and the second prediction probability that the robot is impacted at the current moment.

4. The method of claim 1, wherein the target impact perception network model is constructed before the step C is performed;

the constructing of the target impact perception network model comprises:
step 1 of extracting the sequence of measurements to be perceived from raw data collected by the sensing device of the robot using a sliding window;
step 2 of connecting the sequence of measurements to be perceived along corresponding dimension channels to generate an input feature;
step 3 of controlling the input feature to perform multiple layers of convolution operations followed by single layer pooling operation on the input feature within a pre-constructed impact perception neural network to obtain a feature to be classified, wherein the pre-constructed impact perception neural network comprises a plurality of convolutional layers and one pooling layer;
step 4 of performing classification processing on the feature to be classified described in the step 3 using a softmax algorithm to obtain a first impacted prediction probability and a second impacted prediction probability;
step 5 of calculating a loss value using the first impacted prediction probability and the second impacted prediction probability based on a loss function; and updating weights of the impact perception neural network to update the impact perception neural network having the updated weights as the impact perception neural network; wherein the loss function is binary cross-entropy, and the first impacted prediction probability and the second impacted prediction probability are prediction results of two classifications within the loss function; and the weights to be updated in the current step 5 are weights of the convolutional layers; and
step 6 of repeating the steps 2 to 5, until most recently calculated loss value is less than a preset loss threshold, labeling the impact perception neural network having the updated weights obtained in the most recent step 5 as the target impact perception network model, and determining that the impact perception neural network having the updated weights obtained in the most recent step 5 is a trained impact perception neural network.

5. The method of claim 4, wherein, in repeating the steps 2 to 5, each time the step 5 is performed, before the loss value is calculated using the loss function, it is determined whether the first impacted prediction probability obtained in the step 4 is greater than the second impacted prediction probability obtained in the same step 4; in responsive to the first impacted prediction probability being greater than the second impacted prediction probability, the ground truth required by the loss function is set to 1; and in responsive to the first impacted prediction probability being equal to or less than the second impacted prediction probability, the ground truth required by the loss function is set to 0;

wherein the first impacted prediction probability is a probability that the sequence of measurements to be perceived or the feature to be classified is classified as a sequence of measurements extracted when the robot is impacted, to form a first classification probability generated by the softmax algorithm; and the second predicted probability is a probability that the sequence of measurements to be perceived or the feature to be classified is classified as a sequence of measurements extracted when the robot is not impacted, to form a second classification probability generated by the softmax algorithm.

6. The method of claim 5, wherein the loss function comprises:

L=−(Pgtp log(Pp)+(1−Pgtp) log(pnp)), wherein L is the loss value; Pgtp is the ground truth, with Pgtp=1 indicating that a current prediction result corresponds to the robot being impacted; Pp is the first impacted prediction probability, and Pnp is the second impacted prediction probability;
wherein the loss function is binary cross-entropy to design the impact perception neural network as a binary classification network.

7. The method of claim 4, wherein the constructing of the impact perception neural network comprises:

sequentially connecting four one-dimensional convolutional layers to form four stacked convolutional layers, followed by connecting one pooling layer, configuring each of the one-dimensional convolutional layers with a kernel length of 3, and configuring the pooling operation in the pooling layer as an average pooling operation, to form the impact perception neural network;
wherein initial weights of the convolutional layers are randomly generated; and the input feature and the weights of the convolutional layers are configured to perform convolution operations within the convolutional layers;
wherein the step 3 comprises:
controlling the input feature to sequentially perform convolution operations of the input feature within the four one-dimensional convolutional layers to obtain a discrimination feature, and determining that a multi-layer convolution operation has been completed within the impact perception neural network; then inputting the discrimination feature into the pooling layer; and
subsequently controlling the discrimination feature to perform an average pooling operation of the discrimination feature within the pooling layer to obtain a feature to be classified, and determining that the pooling operation has been completed within the impact perception neural network.

8. (canceled)

9. The method of claim 2, wherein the generating of the input feature comprises:

connecting various types of sequences of measurements to be perceived along corresponding dimension channels based on types of data collected by the sensing device of the robot, to synthesize the input feature;
wherein the inertial measurement unit comprises an accelerometer for sensing acceleration measurements and a gyroscope for sensing angular speed measurements; and
the rotary encoder comprises a left rotary encoder for sensing left wheel rotation measurements and a right rotary encoder for sensing right wheel rotation measurements;
wherein the sequence of measurements to be perceived comprises 3-axis angular speed measurement sequences, 3-axis acceleration measurement sequences, 1-axis left wheel rotation measurement sequences, or 1-axis right wheel rotation measurement sequences, such that the number of dimensions of the input feature is greater than or equal to eight; and
the input feature is provided in a matrix form.

10. The method of claim 9, wherein the target impact perception network model comprises four one-dimensional convolutional layers;

the four one-dimensional convolutional layers are sequentially labelled as a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer;
a depth of an input layer in the first convolutional layer is 8, and is equal to the number of column elements in the input feature;
a depth of an output layer in the first convolutional layer is equal to a depth of an input layer in the second convolutional layer, a depth of an output layer in the second convolutional layer is equal to a depth of an input layer in the third convolutional layer, and a depth of an output layer in the third convolutional layer is equal to a depth of the input layer in the fourth convolutional layer, such that the first convolutional layer, the second convolutional layer, the third convolutional layer, and the fourth convolutional layer are sequentially connected;
wherein a ratio between the depth of the input layer in the first convolutional layer and the depth of the output layer in the first convolutional layer is less than a ratio between the depth of the input layer in the second convolutional layer and the depth of the output layer in the second convolutional layer; the ratio between the depth of the input layer in the second convolutional layer and the depth of the output layer in the second convolutional layer is less than a ratio between the depth of the input layer in the third convolutional layer and the depth of the output layer in the third convolutional layer; and the ratio between the depth of the input layer in the third convolutional layer and the depth of the output layer in the third convolutional layer is less than a ratio between the depth of the input layer in the fourth convolutional layer and the depth of the output layer in the fourth convolutional layer.

11. The method of claim 9, wherein the sliding window maintains a constant window length while traversing the raw data;

wherein, within the sliding window, a right-end traversal time of the sliding window corresponds to the current moment, and a left-end traversal time of the sliding window is determined by the window length, such that the sequence of measurements to be perceived is configured as a time sequence; and a length of the sequence of measurements to be perceived is equal to the window length of the sliding window;
the raw data comprises acceleration sensed by the accelerometer, angular speed sensed by the gyroscope, a left wheel rotation measurement sensed by the left rotary encoder, and a right wheel rotation measurement sensed by the right rotary encoder;
the left wheel rotation measurement comprises either a left wheel rotation distance or a left wheel rotation speed of the robot; and
the right wheel rotation measurement comprises either a right wheel rotation distance or a right wheel rotation speed of the robot;
wherein the window length of the sliding window is 30.

12. (canceled)

13. The method of claim 9, wherein the step A comprises:

step A1 of, based on a predefined localization algorithm, the robot obtaining current pose observation data and a noise covariance matrix of the current pose observation data, and configuring the current pose observation data present at the current moment, and determining that a timestamp of the current pose observation data is earlier than the current moment, wherein the timestamp of the current pose observation data is a moment at which the localization algorithm outputs the current pose observation data; then performing an association processing on the current pose observation data to obtain historical pose observation data; wherein the raw data required to obtain the historical pose observation data using the localization algorithm is temporally aligned with the raw data required to obtain the current pose observation data using the localization algorithm; the noise covariance matrix of the current pose observation data is determined based on a measurement error carried within pose data output by the localization algorithm;
step A2 of calculating current pose prediction data from the current pose observation data based on a kinematic equation, and calculating a priori covariance matrix of the current pose prediction data based on a state equation;
step A3 of calculating a Kalman gain matrix using the noise covariance matrix of the current pose observation data and the priori covariance matrix of the current pose prediction data based on a delayed disordered observation equation; and
step A4 of correcting the current pose prediction data based on a residual between the current pose observation data and the historical pose observation data, to update a speed vector in the corrected current pose prediction data as a predicted speed vector at the current moment, and update a speed vector in the current pose observation data as an observed speed vector; and correcting the priori covariance matrix of the current pose prediction data using the Kalman gain matrix, the priori covariance matrix of the current pose prediction data, and the noise covariance matrix of the current pose observation data;
wherein the predicted speed vector at the current moment comprises the predicted speed magnitude and predicted speed direction, and the observed speed vector comprises the observed speed magnitude and observed speed direction.

14. The method of claim 13, wherein the step A3 of calculating the Kalman gain matrix comprises:

Ki=PiHT(HPiHT+U)−1;
wherein Pi is the priori covariance matrix of the current pose prediction data; U is the noise covariance matrix of the current pose observation data; H is a Jacobian matrix of the delayed disordered observation equation with respect to the current pose prediction data; T is a transpose of H; Ki is the Kalman gain matrix; and i is the current moment.

15. The method of claim 14, wherein the step A4 of correcting the current pose prediction data comprises: Xi|i=Xi+Ki (z−Xi); wherein, z is the current pose observation data; Xj is the historical pose observation data, j is a timestamp of the historical pose observation data, and j<i; Xi is the current pose prediction data; Xi|i is the corrected current pose prediction data; z−Xj is a residual between the current pose observation data and the historical pose observation data; and P i | i = ( I - K i ⁢ H ) ⁢ P i ( I - K i ⁢ H ) T + K i ⁢ U ⁢ K i T; wherein: Pi|i is a matrix obtained by correcting the prior covariance matrix Pi to form a covariance matrix of the target state at the current moment; and I is the identity matrix.

the step A4 of correcting the priori covariance matrix of the current pose prediction data comprises:

16. The method of claim 13, wherein the step A2 of calculating the current pose prediction data from the current pose observation data based on the kinematic equation comprises: S i = S i - d + v i - d ⁢ d + 1 2 ⁢ ( R i - d ( a i - a b ) + g ) ⁢ d 2; wherein: Si−d is a prediction prior displacement at an observation moment i−d; and Si is the current prediction prior displacement;

calculating a current attitude angle: qi=qi−d⊗q{(ωi−ωb)·d}; wherein, w; is an angular speed measured by the gyroscope of the robot at the current moment, ωb is a preset angular speed bias; q{ } is used to convert Euler angles into quaternions; ⊗ represents quaternion multiplication; qi−d is an attitude angle at an observation moment i−d, q; is the current attitude angle, qi and qi−d are expressed in a form of the quaternions;
calculating a current speed: vi=vi−d+(Ri−d(ai−ab)+g) d; wherein: ai is an acceleration measured by the accelerometer of the robot at the current moment; ab is a preset bias acceleration; Ri−d is a posterior rotation matrix at an observation moment i−d; vi−d is a speed at the observation moment i−d; and vi is a current speed;
calculating a current prediction prior displacement:
then, combining the current attitude angle qi, the current speed vi, and the current prediction prior displacement Si to form the current pose prediction data Xi;
wherein the current pose observation data comprises the attitude angle qi−d, the speed vi−d, and the prediction prior displacement Si−d,
wherein the observation moment i−d is a timestamp of the current pose observation data, and d is a time interval between the current moment i and the observation moment i−d.

17. The method of claim 16, wherein the step A2 of calculating the priori covariance matrix of the current pose prediction data based on the state equation comprises: P i = F ε ⁢ P i - d ⁢ F ε T + F i ⁢ Q i ⁢ F i T;

wherein, {circumflex over (P)}i is the prior covariance matrix of the current pose prediction data; Pi−d is the prior covariance matrix of the pose prediction data at the observation moment i−d; Fε is a Jacobian matrix of the state equation with respect to the pose prediction data Xi−d at the observation moment i−d; Fi is a Jacobian matrix of the state equation with respect to measurement noise of the inertial measurement unit; Qi is a noise covariance matrix of the current pose prediction data; and an initial value of Qi is determined based on the measurement noise of the inertial measurement unit.

18. The method of claim 16, further comprising:

starting from an initial moment, sequentially colleting N sets of measurements within one collection cycle, wherein a timing start point of the one collection cycle is a moment m, and a timing end point of the same collection cycle is a moment m+N−1; wherein each set of the N sets of measurements comprises an acceleration measurement, an angular speed measurement, a left wheel rotation measurement, and a right wheel rotation measurement;
calculating a weighted mean square error for the N sets of measurements, and then determining whether the weighted mean square error is lower than a preset statistical threshold;
determining that the robot is in a stationary state when it is determined that the weighted mean square error is lower than the preset statistical threshold; updating the bias acceleration using an average of the N sets of acceleration measurements; and updating the bias angular speed using an average of the N sets of angular speed measurements;
determining that the robot is not in a stationary state when it is determined that the weighted mean square error is not lower than the preset statistical threshold; then calculating left wheel prediction state data and right wheel prediction state data respectively using the left wheel rotation measurement and the right wheel rotation measurement based on the Kalman filtering algorithm; and correcting the left wheel prediction state data and the right wheel prediction state data.

19. The method of claim 18, wherein the calculating of the weighted mean square error for the N sets of measurements comprises: γ = 1 N ⁢ ∑ k = m m + N - 1 ⁢ ( 1 σ a 2 ⁢  a k - g ⁢ a _  a _   2 + 1 σ ω 2 ⁢  ω k  2 + 1 σ r 2 ⁢  r k l  2 + 1 σ r 2 ⁢  r k r  2 ); r k l is the left wheel rotation measurement at the moment k; r k r is the right wheel rotation measurement at the moment k; and σr is a standard deviation of the measurement noise of a left rotary encoder or a right rotary encoder, which is preset.

wherein γ is the weighted mean square error; ak is an acceleration measurement at a moment k, ā is an average of the N set of acceleration measurements, σa is a standard deviation of measurement noise of the accelerometer, which is preset; and g is a gravitational acceleration;
ωk is an angular speed measurement at the moment k; and σω is a standard deviation of measurement noise of the gyroscope, which is preset;

20. The method of claim 18, wherein, after it is determined that the robot is not in a stationary state, under a computational framework required by the Kalman filter algorithm, the state equation is used to calculate the left wheel prediction state vector and the prior covariance matrix of the left wheel prediction state vector and further calculate the right wheel prediction state data and the prior covariance matrix of the right wheel prediction state data, Kalman filtering is performed separately on the left wheel prediction state data and the right wheel prediction state data by introducing motion speed constraints of the robot to obtain the corrected left wheel prediction state data and the corrected right wheel prediction state data; and the corrected left wheel prediction state data is updated as the left wheel rotation measurement, and the corrected right wheel prediction state data is updated as the right wheel rotation measurement;

wherein the motion speed constraints of the robot comprise speed constraints required for lateral displacement of the robot;
wherein, the speed constraints required for the lateral displacement of the robot comprise: a magnitude of a current speed component of the robot in a wheel rotation axis direction of the robot being not equal to 0, and a magnitude of a current speed component of the robot in a direction perpendicular to a robot walking plane being equal to 0.

21. A chip configured for storing a program, wherein the program is configured to control a robot to perform a method for detecting an impact on a robot, comprising:

step A of obtaining, by the robot, an observed speed magnitude and an observed speed direction, and obtaining a predicted speed magnitude at a current moment and a predicted speed direction at the current moment based on a Kalman filter algorithm; then performing step B;
the step B of calculating, by the robot, an absolute value of a difference between the observed speed magnitude and the predicted speed magnitude to obtain an Euclidean distance corresponding to change of the current speed; calculating a cosine value of an angle between the observed speed direction and the predicted speed direction to obtain a cosine distance corresponding to the change of the current speed; then performing step C;
the step C of performing classification processing of a sequence of measurements to be perceived using a target impact perception network model in responsive to the Euclidean distance being greater than a preset Euclidean distance threshold and the cosine distance being less than a preset cosine distance threshold, to obtain a first prediction probability that the robot is impacted at the current moment and a second prediction probability that the robot is impacted at the current moment; then performing the step D;
wherein the sequence of measurements to be perceived is derived from data collected by a sensing device of the robot, and the sensing device of the robot comprises an inertial measurement unit and a rotary encoder; and
the step D of determining that the robot is impacted in responsive to the first prediction probability being greater than the second prediction probability;
wherein the first prediction probability is a probability that the sequence of measurements to be perceived is classified as a sequence of measurements extracted when the robot is currently impacted; and the second prediction probability is a probability that the sequence of measurements to be perceived is classified as a sequence of measurements extracted when the robot is currently not impacted.

22. A robot equipped with a chip, wherein a left wheel of the robot is installed with a left rotary encoder, and a right wheel of the robot is installed with a right rotary encoder; and a body of the robot is installed with an inertial measurement unit comprising both an accelerometer and a gyroscope, and wherein the chip is configured for storing a program, and the program is configured to control a robot to perform a method for detecting an impact on a robot, comprising:

step A of obtaining, by the robot, an observed speed magnitude and an observed speed direction, and obtaining a predicted speed magnitude at a current moment and a predicted speed direction at the current moment based on a Kalman filter algorithm; then performing step B;
the step B of calculating, by the robot, an absolute value of a difference between the observed speed magnitude and the predicted speed magnitude to obtain an Euclidean distance corresponding to change of the current speed; calculating a cosine value of an angle between the observed speed direction and the predicted speed direction to obtain a cosine distance corresponding to the change of the current speed; then performing step C;
the step C of performing classification processing of a sequence of measurements to be perceived using a target impact perception network model in responsive to the Euclidean distance being greater than a preset Euclidean distance threshold and the cosine distance being less than a preset cosine distance threshold, to obtain a first prediction probability that the robot is impacted at the current moment and a second prediction probability that the robot is impacted at the current moment; then performing the step D;
wherein the sequence of measurements to be perceived is derived from data collected by a sensing device of the robot, and the sensing device of the robot comprises an inertial measurement unit and a rotary encoder; and
the step D of determining that the robot is impacted in responsive to the first prediction probability being greater than the second prediction probability;
wherein the first prediction probability is a probability that the sequence of measurements to be perceived is classified as a sequence of measurements extracted when the robot is currently impacted; and the second prediction probability is a probability that the sequence of measurements to be perceived is classified as a sequence of measurements extracted when the robot is currently not impacted.
Patent History
Publication number: 20260376897
Type: Application
Filed: Sep 11, 2024
Publication Date: Nov 26, 2026
Applicants: AMICRO SEMICONDUCTOR CO.,LTD. (Zhuhai, Guangdong), HARBIN INSTITUTE OF TECHNOLOGY (Harbin, Heilongjiang)
Inventors: Ke WANG (Zhuhai, Guangdong), Hewen ZHOU (Zhuhai, Guangdong), Minjie BAO (Zhuhai, Guangdong), Kun DAI (Zhuhai, Guangdong), Runze XU (Zhuhai, Guangdong), Gangjun XIAO (Zhuhai, Guangdong)
Application Number: 19/147,202
Classifications
International Classification: G05D 1/617 (20240101); G01P 15/18 (20130101);