Positioning method for autonomous mobile device, electronic device and storage medium

By combining data from wheel encoders and observation sensors in autonomous mobile devices, and using the extended Kalman filter algorithm for positioning correction, the problem of positioning drift caused by wheel slippage is solved and the positioning accuracy is improved.

CN112697153BActive Publication Date: 2024-10-15GUANGDONG MIDEA WHITE HOME APPLIANCE TECH INNOVATION CENT CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011626457.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-10-15
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

When the wheels of autonomous mobile equipment slip, the wheel encoder measurement does not match the actual operation, causing the positioning results to drift and unable to position accurately.

Method used

By using the detection results of the wheel encoder as input to predict the state transition of the current value of the state vector, the detection results of the observation sensors are used to construct the observation vector, the predicted value of the state vector is updated, and the extended Kalman filter algorithm is used for correction. Obtain higher-precision positioning results.

Benefits of technology

It effectively prevents positioning drift caused by wheel encoder slippage, improves positioning accuracy, and ensures that autonomous mobile devices can navigate accurately under different ground conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112697153B_ABST
    Figure CN112697153B_ABST
Patent Text Reader

Abstract

The present application discloses a positioning method, electronic device and storage medium for an autonomous mobile device, the positioning method comprising: using the detection result of the wheel encoder of the autonomous mobile device as input to predict the state transition of the current value of the state vector to obtain the predicted value of the state vector, wherein the state vector includes at least one of the first speed and the first angular velocity and the detection error of the wheel encoder; constructing an observation vector using the detection result of the observation sensor; and updating the predicted value of the state vector using the observation vector to obtain an estimated value of the state vector. The present application obtains the predicted value of the state vector through the wheel encoder, and updates the predicted value using the observation vector constructed by the observation sensor, that is, the predicted value is corrected using the observation vector to obtain a more accurate predicted value result, thereby preventing positioning drift caused by the slippage of the wheel encoder, and thus failing to accurately position, and improving positioning accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of mobile device positioning, and in particular to a positioning method, electronic device, and storage medium for an autonomous mobile device. Background Art

[0002] Autonomous mobile devices typically use wheel encoders as odometers for navigation and positioning, working in conjunction with other sensors. When the wheels of an autonomous mobile device slip, the wheel encoder measurements don't match the actual movement of the autonomous device, causing drift in the overall positioning results and making accurate positioning impossible. Summary of the Invention

[0003] The present application at least provides a positioning method, electronic device and storage medium for an autonomous mobile device to solve the problem of positioning drift and inability to accurately position the autonomous mobile device when the wheels slip.

[0004] A first aspect of the present application provides a positioning method for an autonomous mobile device, the positioning method comprising:

[0005] performing state transition prediction on a current value of a state vector using a detection result of a wheel encoder of the autonomous mobile device as input to obtain a predicted value of the state vector, wherein the state vector includes at least one of a first velocity and a first angular velocity and a detection error of the wheel encoder;

[0006] Construct an observation vector using the detection results of the observation sensor;

[0007] The predicted value of the state vector is updated using the observation vector to obtain the estimated value of the state vector.

[0008] Optionally, the detection result of the wheel encoder includes the detection result of the left wheel encoder and the detection result of the right wheel encoder.

[0009] Optionally, the state vector includes a first speed, and the detection error of the wheel encoder includes a detection error of a left wheel encoder and a detection error of a right wheel encoder;

[0010] Before the step of using the detection results of the wheel encoders of the autonomous mobile device as input to predict the state transition of the current value of the state vector, the method further includes:

[0011] Adjusting the first speed so that the first speed is equal to the average of the first difference and the second difference;

[0012] The first difference is the difference between the detection result of the left wheel encoder and the detection error, and the second difference is the difference between the detection result of the right wheel encoder and the detection error.

[0013] Optionally, the state vector includes a first angular velocity, and the detection error of the wheel encoder includes a detection error of a left wheel encoder and a detection error of a right wheel encoder;

[0014] Before the step of using the detection results of the wheel encoders of the autonomous mobile device as input to predict the state transition of the current value of the state vector, the method further includes:

[0015] Adjusting the first angular velocity so that the first angular velocity is equal to the ratio of the difference between the first difference and the second difference to the wheelbase;

[0016] The first difference is the difference between the detection result and the detection error of the left wheel encoder, the second difference is the difference between the detection result and the detection error of the right wheel encoder, and the wheelbase is the distance between the left wheel and the right wheel of the autonomous mobile device.

[0017] Optionally, the observation sensor includes an optical flow sensor, and the observation vector includes the second velocity and the second angular velocity detected by the optical flow sensor.

[0018] Optionally, the state vector further includes coordinates and a first angle, the observation sensor further includes a gyroscope, and the observation vector includes a second angle detected by the gyroscope.

[0019] Optionally, the step of updating the predicted value of the state vector using the observation vector includes:

[0020] The predicted value of the state vector is updated through the extended Kalman filter algorithm.

[0021] Optionally, the positioning method further includes:

[0022] It is determined whether the detection error of the wheel encoder is greater than a preset threshold value, and in response to being greater than the preset threshold value, an alarm signal is generated.

[0023] A second aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is configured to execute program instructions stored in the memory to implement the positioning method for an autonomous mobile device in the first aspect.

[0024] A third aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implements the positioning method for an autonomous mobile device in the first aspect.

[0025] Different from the prior art, the positioning method of the present application includes: using the detection results of the wheel encoder of the autonomous mobile device as input to predict the state transition of the current value of the state vector to obtain a predicted value of the state vector, wherein the state vector includes at least one of a first velocity and a first angular velocity and the detection error of the wheel encoder; constructing an observation vector using the detection results of the observation sensor; and updating the predicted value of the state vector using the observation vector to obtain an estimated value of the state vector. The present application obtains the predicted value of the state vector through the wheel encoder and updates the predicted value using the observation vector constructed by the observation sensor, that is, correcting the predicted value using the observation vector to obtain a more accurate predicted value result, thereby preventing positioning drift caused by wheel encoder slippage, which in turn makes accurate positioning impossible, and improving positioning accuracy.

[0026] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0028] Figure 1 This is a flow chart of an embodiment of a positioning method for an autonomous mobile device provided by the present application;

[0029] Figure 2 yes Figure 1 A schematic diagram of the specific flow of step S13 in the provided positioning method;

[0030] Figure 3 yes Figure 1 A schematic diagram of the flow chart before step S11 in the provided positioning method;

[0031] Figure 4 This is a schematic diagram of the framework of an embodiment of an electronic device provided by the present application;

[0032] Figure 5 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by this application. DETAILED DESCRIPTION

[0033] To help those skilled in the art better understand the technical solutions of this application, the following is a further detailed description of the positioning method, electronic device, and storage medium for an autonomous mobile device provided by this application, in conjunction with the accompanying drawings and specific embodiments. It should be understood that the embodiments described are only a portion of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] The terms "first," "second," and the like in this application are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0035] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of a positioning method for an autonomous mobile device provided by the present application.

[0036] The autonomous mobile device positioning method of the present application may be executed by an autonomous mobile device. For example, the positioning method may be executed by a terminal device, a server, or other processing device. The autonomous mobile device may be a sweeping robot, a service robot, or a shopping guide robot. In some possible implementations, the positioning method may be implemented by a processor invoking computer-readable instructions stored in a memory.

[0037] This embodiment takes a sweeping robot as an autonomous mobile device as an example. Specifically, the positioning method of the embodiment of the present disclosure may include the following steps:

[0038] Step S11: using the detection result of the wheel encoder of the autonomous mobile device as input to perform state transition prediction on the current value of the state vector to obtain a predicted value of the state vector.

[0039] In which, the autonomous mobile device sets at least one of the first speed and the first angular velocity and the detection error of the wheel encoder as a state vector, that is, the state vector includes at least one of the first speed and the first angular velocity and the detection error of the wheel encoder, and the detection results of the wheel encoder include the detection results of the left wheel encoder and the detection results of the right wheel encoder.

[0040] Specifically, the state vector may include the first speed and a detection error of the wheel encoder; or, include the first angular speed and a detection error of the wheel encoder; or include the first speed, the first angular speed, and a detection error of the wheel encoder.

[0041] Optionally, the wheel encoder includes a single-wheel encoder consisting of a driving wheel and a driven wheel, or a dual-wheel encoder consisting of a left-wheel encoder and a right-wheel encoder. This embodiment takes the dual-wheel encoder as an example to illustrate the working principle of the wheel encoder.

[0042] When the autonomous mobile device performs a turning operation, the autonomous mobile device can obtain the moving speed of the left wheel and the moving speed of the right wheel of the autonomous mobile device through the left wheel encoder and the right wheel encoder, respectively. Combined with the wheelbase between the left and right wheels, the forward speed and steering angular velocity can be deduced, and then the position information and steering angle information of the autonomous mobile device can be deduced. The specific derivation process is as follows:

[0043] 1. The autonomous mobile device is detected through the wheel encoder, and the detection results of the left wheel encoder and the right wheel encoder are obtained to obtain the moving speed v of the left wheel of the autonomous mobile device. l and the speed v of the right wheel r ;

[0044] 2. The autonomous mobile device calculates the forward speed v of the autonomous mobile device using formula (1), that is, the forward speed v of the autonomous mobile device is equal to the moving speed v of the left wheel of the autonomous mobile device l and the speed v of the right wheel r The steering angular velocity ω of the autonomous mobile device is calculated using formula (2), that is, the steering angular velocity ω of the autonomous mobile device is equal to the moving speed v of the left wheel of the autonomous mobile device l and the speed v of the right wheel r The difference is divided by the wheelbase between the left and right wheels of the autonomous mobile device. Formula (1) and formula (2) are as follows:

[0045]

[0046]

[0047] Among them, this application derives formulas based on a rectangular coordinate system, specifically taking the front of the head of the autonomous mobile device as the positive X direction, the right of the head of the autonomous mobile device as the positive Y direction, and the top of the head of the autonomous mobile device as the positive Z direction.

[0048] Specifically, v is the forward velocity of the autonomous mobile device, specifically the forward velocity measured at the center of the line connecting the left and right wheels. ω is the steering angular velocity of the autonomous mobile device, specifically the steering angular velocity measured at the center of the line connecting the left and right wheels. When the left and right wheels of the autonomous mobile device perform coaxial circular motion, the angular velocity of the left wheel is equal to the angular velocity of the right wheel, and also equal to the steering angular velocity ω. L is the wheelbase between the left and right wheels of the autonomous mobile device, a calibration parameter of the autonomous mobile device.

[0049] 3. The autonomous mobile device divides the motion trajectory into multiple straight lines according to time differentiation. The left and right wheels can be used as the end points, and the position transformation of the center position of the line connecting the end points can be calculated. The specific calculation formulas are shown in formulas (3), (4) and (5):

[0050] x'=x+v*cosθ*Δt (3)

[0051] y'=y+v*sinθ*Δt (4)

[0052] θ'=θ+ω*Δt (5)

[0053] The initial coordinates of the center position of the line connecting the left and right wheels are (x, y), and the coordinates of the center position of the autonomous mobile device after the turning operation are (x', y'). θ is the angle between the line connecting the left and right wheels and the x-axis before the autonomous mobile device turns, and θ' is the angle between the line connecting the left and right wheels and the x-axis after the autonomous mobile device turns. Specifically, angle θ is a first angle that the autonomous mobile device can detect using a gyroscope. Optionally, in other embodiments, the autonomous mobile device can also detect angle θ using an incremental encoder, a photoelectric sensor, or an angle sensor.

[0054] Combining the above formulas, the kinematic model of the autonomous mobile device can be obtained, as shown in formula (6):

[0055]

[0056] Therefore, after the autonomous mobile device obtains the forward velocity v, the steering angular velocity ω, and the angle θ, the coordinates (x', y') of the autonomous mobile device after the turning operation can be obtained by iterative calculation using formulas (3), (4), and (5).

[0057] Because the wheel encoders include a left wheel encoder and a right wheel encoder, when the autonomous mobile device obtains the moving speed of the left wheel and the moving speed of the right wheel through the wheel encoders, there are detection errors. That is, both the left wheel encoder and the right wheel encoder have detection errors, resulting in measurement errors in the forward velocity v and steering angular velocity ω calculated by the wheel encoders.

[0058] Therefore, before executing step S11, the following steps may be performed: Figure 3 Steps S16 and S17 shown, Figure 3 yes Figure 1 The flowchart before step S11 in the provided positioning method includes the following steps:

[0059] Step S16: adjusting the first speed so that the first speed is equal to the average value of the first difference and the second difference.

[0060] The autonomous mobile device sets the first speed v as a state vector, that is, the state vector includes the first speed v, which can be specifically the forward speed v in step S11. The autonomous mobile device adjusts the first speed v so that the first speed v satisfies the first correction formula, as shown in formula (7), that is, the first speed v is equal to the average of the first difference and the second difference, as shown below:

[0061]

[0062] The first difference is the difference between the detection result and the detection error of the left wheel encoder, and the second difference is the difference between the detection result and the detection error of the right wheel encoder. 1m and e 1b is the detection result and detection error of one of the left wheel encoder and the right wheel encoder, e 2m and e 2b is the detection result and detection error of the other one of the left wheel encoder and the right wheel encoder. 1m and e 1b is the detection result and detection error of the left wheel encoder, e 2m and e 2b is the detection result and detection error of the right wheel encoder; or, e 2m and e 2b is the detection result and detection error of the left wheel encoder, e 1m and e 1b is the detection result and detection error of the right wheel encoder.

[0063] Step S17: adjusting the first angular velocity so that the first angular velocity is equal to the ratio of the difference between the first difference and the second difference to the wheelbase.

[0064] The autonomous mobile device sets the first angular velocity ω as a state vector, that is, the state vector includes the first angular velocity ω, which can specifically be the steering angular velocity ω in step S11. The autonomous mobile device adjusts the first angular velocity ω so that the first angular velocity ω satisfies the second correction formula, as shown in formula (8), that is, the first angular velocity ω is equal to the ratio of the difference between the first difference and the second difference to the wheelbase, as shown below:

[0065]

[0066] The first difference is the difference between the detection result and the detection error of the left wheel encoder, the second difference is the difference between the detection result and the detection error of the right wheel encoder, and the wheelbase is the distance between the left and right wheels of the autonomous mobile device. 1m and e 1b is the detection result and detection error of one of the left wheel encoder and the right wheel encoder, e 2m and e 2b is the detection result and detection error of the other one of the left wheel encoder and the right wheel encoder. 1m and e 1b is the detection result and detection error of the left wheel encoder, e 2m and e 2b is the detection result and detection error of the right wheel encoder; or, e 2m and e 2b is the detection result and detection error of the left wheel encoder, e 1m and e 1b is the detection result and detection error of the right wheel encoder. L is the distance between the left and right wheels of the autonomous mobile device.

[0067] When the wheel encoder has a large measurement error, that is, the wheel encoder reading e 1m or e 2m If the displacement is larger or smaller than the actual wheel displacement, then the filter will get a larger e when running normally. 1b or e 2b , autonomous mobile devices will e 1m With e 1b or e 2m With e 2b By bringing them into the correction model formed by combining the first correction formula and the second correction formula, accurate first velocity v and first angular velocity ω can still be obtained, so that the positioning information of the autonomous mobile device will not have a large deviation.

[0068] Specifically, when the wheel encoder reading e 1m or e 2m When the wheel displacement is larger than the actual wheel displacement, the detection error e of the wheel encoder is 1b or e 2bIf it is a positive number, the autonomous mobile device will read the wheel encoder e 1m or e 2m Subtract the detection error e of the wheel encoder 1b or e 2b , and then obtain a displacement value close to the actual wheel displacement, and further calculate a more accurate first velocity v and first angular velocity ω through the first correction formula or the second correction formula.

[0069] When the wheel encoder reading e 1m or e 2m When the wheel encoder’s detection error is smaller than the actual wheel displacement, e 1b or e 2b If it is a negative number, the autonomous mobile device will read the wheel encoder e 1m or e 2m Subtract the detection error e of the wheel encoder 1b or e 2b , that is, the wheel encoder reading e 1m or e 2m Compensation is performed to obtain a displacement value close to the actual wheel displacement, and a more accurate first velocity v and first angular velocity ω are further calculated using the first correction formula or the second correction formula.

[0070] There is no specific order between step S16 and step S17. The autonomous mobile device may first execute step S16 and then execute step S17; or, the autonomous mobile device may first execute step S17 and then execute step S16; or, the autonomous mobile device may execute step S16 and step S17 simultaneously.

[0071] Combining steps S11, S16, and S17, the autonomous mobile device can obtain the state vector X = (x, y, v, ω, θ, e 1b ,e 2b ), the detection result of the wheel encoder of the autonomous mobile device is used as input to predict the state transition of the current value of the state vector to obtain the predicted value of the state vector.

[0072] Among them, the autonomous mobile device further obtains the estimated covariance P and the state transfer equation f, and performs state transfer prediction on the current value of the state vector according to the state vector X, the estimated covariance P and the state transfer equation f to obtain the predicted value of the state vector

[0073] Specifically, the autonomous mobile device takes the last moment as moment t-1, and the state vector of the last moment as X t-1 , the estimated covariance is P t-1, according to the state vector X, the estimated covariance P and the state transfer equation f, the current value of the state vector is predicted to obtain the predicted value of the state vector at the current moment, that is, at time t and the predicted covariance is Among them, the formulas for state transition prediction are shown in formula (9) and formula (10):

[0074]

[0075]

[0076] Among them, F J is the Jacobian matrix of the state transfer equation f, Q t-1 is the state transition covariance.

[0077] Specifically, the state transfer equation f is shown in formula (11), and the Jacobian matrix F of the state transfer equation f is J As shown in formula (12):

[0078]

[0079]

[0080] Among them, e 1m and e 1b is the detection result and detection error of one of the left wheel encoder and the right wheel encoder within Δt time, e 2m and e 2b is the detection result and detection error of the other one of the left wheel encoder and the right wheel encoder within Δt time. For example, e 1m and e 1b is the detection result and detection error of the left wheel encoder within Δt time, e 2m and e 2b is the detection result and detection error of the right wheel encoder within Δt time; or, e 2m and e 2b is the detection result and detection error of the left wheel encoder within Δt time, e 1m and e 1b is the detection result and detection error of the right wheel encoder within Δt time. L is the distance between the left and right wheels of the autonomous mobile device.

[0081] Furthermore, autonomous mobile devices are combined with the predicted covariance And the observation equation of the wheel encoder, the Kalman gain K can be calculated t Specifically, the calculation formula is shown in formula (13):

[0082]

[0083] Among them, R t-1 is the observation covariance, is the Jacobian matrix of the observation equation, that is, the observation matrix. Specifically, the observation matrix As shown in formula (14):

[0084]

[0085] When an autonomous mobile device is turning and a low obstacle or insufficient friction appears on the ground, causing the chassis of the autonomous mobile device to get stuck or the wheels to slip, the measurement data of the wheel sensor will deviate from the actual situation. The position information calculated according to the kinematic model will be inaccurate, that is, the coordinates will be inaccurate, resulting in errors. Over time, the cumulative error of the wheel encoder will become larger and larger, causing the positioning calculation of the autonomous mobile device to deviate further and further from the actual situation.

[0086] For example, when a sweeping robot is cleaning the indoor floor, if a small toy appears on the indoor floor to be cleaned, the sweeping robot will move forward while maintaining its moving direction. During the movement, the small toy will be stuck on the chassis of the sweeping robot, forcing one side of the sweeping robot to be lifted off the ground, causing the wheels of the sweeping robot on the side off the ground to idle. At this time, the measurement data of the wheel sensor is less than the actual running distance of the wheel, resulting in errors in the measurement data of the wheel sensor.

[0087] Or, when the sweeping robot is cleaning the indoor floor, if there is uncleaned water on the indoor floor to be cleaned, since the sweeping robot maintains the same moving direction and moves forward, when the sweeping robot moves along the moving direction to the floor with water, the wheels of the sweeping robot slip, causing the sweeping robot to move a distance greater than the distance the sweeping robot travels on normal ground. At this time, the wheel sensor measurement data is greater than the actual wheel running distance, resulting in errors in the wheel sensor measurement data.

[0088] Therefore, the autonomous mobile device needs to correct the positioning calculation result of the wheel encoder and execute step S12 to obtain the predicted value of the state vector The updated observation vector, step S12 is specifically as follows.

[0089] Step S12: Construct an observation vector using the detection results of the observation sensor.

[0090] The observation sensor of this embodiment includes an optical flow sensor and a gyroscope. The detection result of the optical flow sensor includes the second speed v ots and the second angular velocity ω ots The detection result of the gyroscope includes the second angle θ gyroTherefore, the observation vector Z includes the second velocity v detected by the optical flow sensor ots and the second angular velocity ω ots and a second angle θ detected by the gyroscope gyro , that is, Z=(v ots ,ω ots ,θ gyro ). Specifically, the second speed v ots and the second angular velocity ω ots They are the optical flow sensor readings, that is, the speed and angular velocity obtained after the optical flow pixel values ​​are scaled and converted into coordinates.

[0091] Specifically, the optical flow sensor continuously captures surface images of an object at the moving rate through the IAS. The DSP then analyzes the resulting digital image matrix. Since two adjacent images always share common features, the average motion of these surface features can be determined by comparing the positional changes of these feature points. The analysis results are ultimately converted into two-dimensional coordinate offsets and stored as pixel counts in specific registers, enabling the detection of moving objects.

[0092] The autonomous mobile device obtains different detection images during the movement of the autonomous mobile device through the optical flow sensor, and determines the moving speed of the autonomous mobile device by detecting the movement of light spots and dark spots in the image. The speed and angular velocity obtained by the optical flow sensor are further integrated to achieve positioning operation.

[0093] A gyroscope is a device used to sense and maintain direction, designed based on the theory of conservation of angular momentum. It primarily consists of a rotatable rotor located at the center of an axis. Gyroscopes exploit the property that when an object rotates at high speed, its angular momentum is substantial, causing the axis of rotation to remain stable in one direction. Once the gyroscope begins to rotate, the rotor's angular momentum causes it to resist changes in direction. Traditional inertial gyroscopes are primarily mechanical, requiring high standards for process engineering and complex structures. Their accuracy is limited by numerous factors. With the gradual advancement of technology, more advanced gyroscopes have emerged, including fiber optic gyroscopes and laser gyroscopes.

[0094] The gyroscope is an upgraded version of the accelerometer. The accelerometer can detect and sense linear motion along a certain axis, while the three-axis gyroscope can jointly detect the motion of the measurement target through the three-dimensional space surrounded by the gyroscope's X-axis, Y-axis, and Z-axis. That is, the gyroscope can detect and sense linear motion and motion in 3D space, thereby identifying the direction, confirming the posture of the measurement target, and calculating the angular velocity of the measurement target.

[0095] In this embodiment, the autonomous mobile device identifies the moving direction of the autonomous mobile device, confirms the posture of the autonomous mobile device, and calculates the angular velocity of the autonomous mobile device through the gyroscope.

[0096] After the autonomous mobile device obtains the observation vector Z constructed by the observation sensor through step S12, the autonomous mobile device can use the observation vector Z to predict the state vector obtained in step S11. The update is performed, and the specific implementation steps are shown in step S13.

[0097] Step S13: Use the observation vector to update the predicted value of the state vector to obtain the estimated value of the state vector.

[0098] Among them, the autonomous mobile device can observe the vector Z = (v ots ,ω ots ,θ gyro ) contains the second velocity v ots , the second angular velocity ω ots and the second angle θ gyro For the state vector X=(x,y,v,ω,θ,e 1b ,e 2b ) in the first velocity v, the first angular velocity ω, and the first angle θ are updated to obtain the estimated value X of the state vector t and the estimated covariance P t .

[0099] Specifically, the update formulas are shown in formula (15) and formula (16):

[0100]

[0101]

[0102] The estimated value X of the state vector obtained by the autonomous mobile device in this embodiment through formula (15) and formula (16) is t and the estimated covariance P t , that is, obtaining the positioning information of the autonomous mobile device at time t.

[0103] The autonomous mobile device predicts the state vector obtained in step S11 based on the observation vector Z obtained in step S12. t For updates, please continue to refer to the specific flow chart Figure 2 , Figure 2 yes Figure 1 The specific flow diagram of step S13 in the positioning method provided is as follows. Specifically, it includes the following steps:

[0104] Step S14: Update the predicted value of the state vector using the extended Kalman filter algorithm.

[0105] Among them, the wheel encoder of the autonomous mobile device can provide wheel speed observation, the gyroscope of the autonomous mobile device can provide angle observation, and the optical flow sensor of the autonomous mobile device can provide speed observation. In this embodiment, the autonomous mobile device uses the observations of the wheel encoder, gyroscope and optical flow sensor to form an extended Kalman filter algorithm to realize the state vector Specifically, the coefficients of each dimension of the observation covariance matrix R decrease in confidence and increase in covariance, in the order of gyroscope, wheel encoder, and optical flow sensor.

[0106] Specifically, under an ideal kinematic model, that is, under the kinematic model of the autonomous mobile device, the estimated value of the wheel speed observed by the wheel encoder of the autonomous mobile device is used to deduce the first velocity v and the first angular velocity ω. The resulting error is corrected by the first correction formula and the second correction formula of the wheel encoder, and the detection result of the optical flow sensor including the second velocity v ots and the second angular velocity ω ots Correction: The autonomous mobile device uses the estimated value of the wheel speed observed by the wheel encoder to deduce the first angle θ, and the resulting error is detected by the gyroscope and the second angle θ gyro Correction: The observations of the wheel encoder gyroscope and the optical flow sensor can form a classic extended Kalman filter model (EKF).

[0107] After the autonomous mobile device completes step S14, it can obtain the estimated value X of the updated state vector t and the estimated covariance P t , that is, obtain the positioning information of the autonomous mobile device at time t. At this time, the autonomous mobile device keeps moving, and returns to step S11, and uses the estimated value X of the state vector t and the estimated covariance P t As the input of the previous moment, combined with the state transfer equation f, the predicted state vector and the predicted covariance of the next moment are calculated to obtain the positioning information of the next moment.

[0108] Step S15: confirm whether the detection error of the wheel encoder is greater than a preset threshold, and generate an alarm signal in response to being greater than the preset threshold.

[0109] The detection error of the wheel encoder includes the detection error of the left wheel encoder e 1b , and the detection error e of the right wheel encoder 2b When the detection error of the wheel encoder is less than or equal to the preset threshold, that is, the detection error of the left wheel encoder e 1b , and the detection error e of the right wheel encoder 2bWhen both are less than or equal to the preset threshold, it proves that the wheel encoder is working normally.

[0110] When detecting the detection error e of the left wheel encoder 1b and / or the detection error e of the right wheel encoder 2b When it is too large, the detection error e of the left wheel encoder 1b and / or the detection error e of the right wheel encoder 2b That is, when the value is greater than a preset threshold, it proves that the wheel encoder is working abnormally, and the autonomous mobile device generates an alarm signal and takes corresponding measures to restore the abnormally working wheel encoder to normal.

[0111] Specifically, the autonomous mobile device can be controlled to shut down and restart, the detection data of the wheel encoder can be cleared, and the current position can be used as the initial position to re-perform the positioning operation; or the autonomous mobile device can be controlled to stop moving, and an alarm signal can be transmitted to the mobile terminal through a signal transmitter, and the position of the autonomous mobile device can be adjusted through human intervention.

[0112] For example, when a sweeping robot is cleaning an indoor floor, if there is uncleaned water on the indoor floor to be cleaned, the sweeping robot maintains its moving direction and moves forward. When the sweeping robot moves to the floor with water, the wheels slip, causing a large detection error in the measurement data of the wheel sensor. The sweeping robot automatically shuts down and restarts, clears the detection data of the wheel encoder, uses the current position as the initial position, restarts cleaning, and performs positioning operations.

[0113] Or, when the sweeping robot moves over the steps, one side of the sweeping robot falls off the step, causing the chassis of the sweeping robot to be stuck with the edge of the step and unable to move, thereby causing the wheels to idle, resulting in a large detection error in the measurement data of the wheel sensor. At this time, an alarm signal is transmitted to the mobile phone connected to the sweeping robot signal through wireless communication. The user receives the alarm signal and moves to the sweeping robot, and manually moves the sweeping robot to an open ground so that the sweeping robot can restart cleaning and perform positioning operations.

[0114] Different from the prior art, the positioning method of the present application includes: using the detection results of the wheel encoder of the autonomous mobile device as input to predict the state transition of the current value of the state vector to obtain a predicted value of the state vector, wherein the state vector includes at least one of a first velocity and a first angular velocity and the detection error of the wheel encoder; constructing an observation vector using the detection results of the observation sensor; and updating the predicted value of the state vector using the observation vector to obtain an estimated value of the state vector. The present application obtains the predicted value of the state vector through the wheel encoder and updates the predicted value using the observation vector constructed by the observation sensor, that is, correcting the predicted value using the observation vector to obtain a more accurate predicted value result, thereby preventing positioning drift caused by wheel encoder slippage, which in turn makes accurate positioning impossible, and improving positioning accuracy.

[0115] In the prior art, autonomous mobile devices include those that utilize a combination of wheel sensors and optical flow sensors. Specifically, when the wheel sensors are functioning properly, the autonomous mobile device uses the wheel sensors to obtain the speeds of the left and right wheels. Combined with the wheelbase, this information can be used to derive the forward speed and steering angular velocity of the autonomous mobile device, and further, its position and angle information, thereby enabling the autonomous mobile device to be positioned. However, when the wheel sensors are malfunctioning, the autonomous mobile device uses the optical flow sensors to integrate and accumulate the speed information to obtain position information, replacing the detection data from the wheel sensors to achieve positioning. This approach fails to effectively model and estimate measurement errors, nor does it effectively integrate the information from the optical flow sensors.

[0116] This application uses an extended Kalman filter algorithm to automatically reduce the weight of erroneous wheel sensor inputs, achieving data fusion of wheel sensors, gyroscopes, and optical flow sensors, making the multi-sensor fusion positioning method more reliable. At the same time, by monitoring the detection error of the wheel encoder in real time, it can accurately detect abnormal working conditions of the wheel encoder, helping the application layer to adopt more reasonable and effective response strategies.

[0117] Optionally, in other embodiments, an attitude sensor (IMU, Inertial Measurement Unit) may be used instead of the optical flow sensor to achieve correction of the wheel sensor detection data.

[0118] See also Figure 4 , Figure 4is a schematic diagram of the framework of an embodiment of an electronic device provided in this application. Electronic device 40 includes a memory 41 and a processor 42 coupled to each other. Processor 42 is configured to execute program instructions stored in memory 41 to implement the steps of any of the aforementioned robot trajectory planning method embodiments. In a specific implementation scenario, electronic device 40 may include, but is not limited to, a microcomputer and a server. Furthermore, electronic device 40 may also include mobile devices such as laptops and tablet computers, which are not limited herein.

[0119] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in the trajectory planning method embodiment of any of the above-mentioned robots. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip.

[0120] See also Figure 5 , Figure 5 The computer-readable storage medium 50 stores program instructions 51 that can be executed by a processor, and the program instructions 51 are used to implement the steps of any of the above-mentioned robot trajectory planning method embodiments.

[0121] In some embodiments, the functions or modules included in the device provided in this embodiment can be used to execute the method described in the above method embodiment. Its specific implementation can refer to the description of the above method embodiment. For the sake of brevity, it will not be repeated here.

[0122] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.

[0123] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation methods described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0124] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0125] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

Claims

1. A positioning method for an autonomous mobile device, characterized in that: The positioning method comprises: Using the detection result of the wheel encoder of the autonomous mobile device as input to perform state transition prediction on the current value of the state vector to obtain a predicted value of the state vector, wherein the state vector includes a first speed, a first angular speed, a coordinate, and a detection error of the wheel encoder; Constructing an observation vector using the detection result of the observation sensor; wherein the observation sensor includes an optical flow sensor, and the observation vector includes a second velocity and a second angular velocity detected by the optical flow sensor; Using the observation vector to update the predicted value of the state vector to obtain an estimated value of the state vector; Wherein, the detection result of the wheel encoder includes the detection result of the left wheel encoder and the detection result of the right wheel encoder, and the detection error of the wheel encoder includes the detection error of the left wheel encoder and the detection error of the right wheel encoder; Before the step of using the detection result of the wheel encoder of the autonomous mobile device as input to predict the state transition of the current value of the state vector, the method further comprises: Adjusting the first speed so that the first speed is equal to an average value of the first difference and the second difference; The first difference is the difference between the detection result of the left wheel encoder and the detection error, and the second difference is the difference between the detection result of the right wheel encoder and the detection error.

2. The positioning method according to claim 1, characterized in that: Before the step of using the detection result of the wheel encoder of the autonomous mobile device as input to predict the state transition of the current value of the state vector, the method further comprises: Adjusting the first angular velocity so that the first angular velocity is equal to the ratio of the difference between the first difference and the second difference to the wheelbase; The wheelbase is the distance between the left wheel and the right wheel of the autonomous mobile device.

3. The positioning method according to claim 1, characterized in that: The state vector further includes a first angle, the observation sensor further includes a gyroscope, and the observation vector includes a second angle detected by the gyroscope.

4. The positioning method according to claim 1, characterized in that: The step of updating the predicted value of the state vector by using the observation vector comprises: The predicted value of the state vector is updated by an extended Kalman filter algorithm.

5. The positioning method according to claim 1, characterized in that: The positioning method further comprises: It is confirmed whether the detection error of the wheel encoder is greater than a preset threshold value, and in response to being greater than the preset threshold value, an alarm signal is generated.

6. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the positioning method of the autonomous mobile device as claimed in any one of claims 1 to 5.

7. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the positioning method of the autonomous mobile device according to any one of claims 1 to 5 is implemented.