Positioning method of lawn mower, lawn mower, computer device and storage medium

CN122708752APending Publication Date: 2026-09-08QINGTING INTELLIGENT TECHNOLOGY (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610726667.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-25
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

现有技术中,通常假定所有传感器数据(如激光雷达、IMU、轮速计)均可稳定获取,并基于完整数据流进行状态估计,然而,在嵌入式平台实际运行中,受内存资源、IO带宽或内部通信干扰等限制,部分传感器数据可能发生短暂中断(持续一秒至数秒)

Benefits of technology

[0014] The beneficial effects of this invention are as follows: By monitoring the data inflow and outflow of each sensor data buffer queue, an integrity check is proactively triggered when data changes occur in any queue, and data identifiers are generated for each queue. When at least one unusable identifier exists, the corresponding positioning processing mode is adaptively selected based on the identifier combination. Finally, the data is processed based on the selected mode to obtain positioning data. This avoids forcibly using incomplete data or directly interrupting positioning when data is missing, improving the robustness of positioning. Even during periods of partial sensor data interruption, continuous and usable positioning data can still be output, thereby ensuring uninterrupted operation of the lawnmower robot and reducing human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122708752A_ABST
    Figure CN122708752A_ABST
Patent Text Reader

Abstract

This application relates to the field of lawnmower positioning technology, disclosing a lawnmower positioning method, a lawnmower, a computer device, and a storage medium. The method includes: monitoring the data inflow and outflow of multiple sensor data buffer queues; when data inflow or outflow occurs in any sensor data buffer queue, detecting whether the integrity of each sensor data buffer queue meets a preset availability condition; generating data identifiers for each sensor data buffer queue based on the detection results; when each sensor data buffer queue has at least one unusable data identifier, determining a corresponding positioning processing mode based on the data identifiers of each sensor data buffer queue; and processing each sensor data buffer queue according to the positioning processing mode to obtain positioning data. This invention avoids forcibly using incomplete data or directly interrupting positioning when data is missing, thus improving the robustness of positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of lawnmower positioning technology, and more particularly to a lawnmower positioning method, a lawnmower, a computer device, and a storage medium. Background Technology

[0002] When lawnmowers operate in fields, they typically use multi-sensor fusion for localization and mapping. Current technologies generally assume that all sensor data (such as LiDAR, IMU, and wheel speedometer) can be acquired stably, and state estimation is performed based on the complete data stream. However, in actual operation on embedded platforms, limitations such as memory resources, I / O bandwidth, or internal communication interference can cause brief interruptions (lasting from one to several seconds) in some sensor data. When the environmental perception data cache or motion state data cache is missing, traditional algorithms cannot handle this anomaly correctly, often leading to interrupted pose estimation, output jitter, or complete failure. This forces the robot to stop moving or deviate from its path, severely impacting the continuity and safety of lawnmower operations. Summary of the Invention

[0003] Based on this, it is necessary to address the positioning technology problems of existing lawnmowers by proposing a positioning method for lawnmowers, a lawnmower, computer equipment, and storage media.

[0004] In a first aspect, a method for positioning a lawnmower is provided, the method comprising: Monitor the data entry and exit status of multiple sensor data cache queues; wherein, the multiple sensor data cache queues include at least one environmental perception data cache queue and one motion state data cache queue; When data enters or leaves any sensor data buffer queue, check whether the integrity of each sensor data buffer queue meets the preset availability conditions. Data identifiers are generated for each of the sensor data cache queues based on the detection results; wherein, the data identifiers include available and unavailable; When the data identifier of each of the sensor data cache queues has at least one unusable data identifier, the corresponding positioning processing mode is determined according to the data identifier of each of the sensor data cache queues. The location processing mode is used to process the data cache queues of each sensor to obtain location data.

[0005] Further, the step of detecting whether the integrity of each of the sensor data buffer queues meets the preset availability conditions includes: The current data frame to be processed in the environmental awareness data cache queue is used as the current reference frame; wherein, the current reference frame has a start time and an end time; Obtain the second timestamp of each data in the motion state data cache queue, and determine whether there is data whose second timestamp covers the start time to end time; If it exists, then the integrity of the motion state data cache queue is determined to meet the preset availability condition; If it does not exist, it is determined that the integrity of the motion state data cache queue does not meet the preset availability condition.

[0006] Furthermore, the motion state data cache queue includes a first motion state data cache queue and a second motion state data cache queue; wherein, the first motion state data cache queue is used to cache angular velocity and acceleration data collected by the inertial measurement unit, and the second motion state data cache queue is used to cache displacement or velocity data collected by the wheel odometer or wheel speedometer. The step of generating data identifiers for each of the sensor data cache queues based on the detection results includes: When the second motion state data buffer queue does not meet the preset availability conditions, determine whether the current reference frame is the second to last data frame in the environment perception data buffer queue and whether the number of data in the environment perception data buffer queue is greater than the preset threshold. If so, interpolation is performed using the second motion state data buffer queue before and after the start and end times of the current reference frame, and the interpolated data is marked as available; otherwise, the number of consecutive detection failures is incremented by one. When the number of consecutive detection failures exceeds a preset threshold, the data in the second motion state data cache queue will be marked as unavailable.

[0007] Furthermore, the positioning processing mode includes at least one of the following: First processing mode: When the data identifiers of the environmental perception data cache queue and the first motion state data cache queue are both available, and the data identifier of the second motion state data cache queue is unavailable, state prediction is performed based on the first motion state data cache queue, and state update is performed based on the environmental perception data cache queue to obtain positioning data; Second processing mode: When the data identifiers of the environmental perception data cache queue and the first motion state data cache queue are both unavailable, and the data identifier of the second motion state data cache queue is available, the state is recursively calculated based on the second motion state data cache queue to obtain the positioning data; The third processing mode: When the data identifiers of the environmental perception data cache queue, the first motion state data cache queue, and the second motion state data cache queue are all available, state prediction is performed based on the first motion state data cache queue, and state updates are performed based on the environmental perception data cache queue and the second motion state data cache queue respectively to obtain positioning data.

[0008] Furthermore, when the positioning processing mode is the second processing mode, the step of obtaining positioning data by performing state recursion based on the second motion state data cache queue includes: Obtain the second motion state data buffer queue sequence corresponding to the current reference frame; Based on the state estimate at the start of the current reference frame and the recursive relationship between adjacent readings in the second motion state data buffer queue sequence, the state prediction at the end of the current reference frame is obtained by recursion. The velocity prediction value at the end of the current reference frame is calculated based on the translation difference and time difference between the second motion state data buffer queue of the current reference frame and the previous reference frame.

[0009] Furthermore, when in the first processing mode, the method further includes: Read the data identifier from the second motion state data cache queue; If the data identifiers of the current reference frame and the previous reference frame are both available, then the motion state observation value of the current reference frame is calculated based on the pose estimation value of the previous reference frame, the wheel speed meter interpolation result corresponding to the current reference frame in the second motion state data buffer queue, and the wheel speed meter interpolation result corresponding to the previous reference frame in the second motion state data buffer queue. After predicting the state based on the first motion state data cache queue, the state is updated using the environmental perception data cache queue and the second motion state observation value, respectively.

[0010] Furthermore, after the step of detecting whether the integrity of each sensor data buffer queue meets the preset availability conditions when data enters or leaves any sensor data buffer queue, the method further includes: The integrity of the data buffer queue of each sensor is continuously detected, and it is determined whether the duration of the unmet preset availability condition exceeds the first preset threshold. If the threshold is exceeded, the system will automatically enter relocation mode to perform a relocation operation.

[0011] Secondly, a lawnmower is provided, the lawnmower comprising: The monitoring module is used to monitor the data entry and exit of multiple sensor data cache queues; wherein, the multiple sensor data cache queues include at least one environmental perception data cache queue and one motion state data cache queue. The detection module is used to detect whether the integrity of each sensor data buffer queue meets the preset availability conditions when data enters or leaves any sensor data buffer queue. A generation module is used to generate data identifiers for each of the sensor data cache queues based on the detection results; wherein, the data identifiers include available and unavailable; The determination module is used to determine the corresponding positioning processing mode based on the data identifier of each of the sensor data cache queues when the data identifier of each of the sensor data cache queues has at least one unusable data identifier. The processing module is used to process the data cache queues of each sensor according to the positioning processing mode in order to obtain positioning data.

[0012] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described lawnmower positioning method.

[0013] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described lawnmower positioning method.

[0014] The beneficial effects of this invention are as follows: By monitoring the data inflow and outflow of each sensor data buffer queue, an integrity check is proactively triggered when data changes occur in any queue, and data identifiers are generated for each queue. When at least one unusable identifier exists, the corresponding positioning processing mode is adaptively selected based on the identifier combination. Finally, the data is processed based on the selected mode to obtain positioning data. This avoids forcibly using incomplete data or directly interrupting positioning when data is missing, improving the robustness of positioning. Even during periods of partial sensor data interruption, continuous and usable positioning data can still be output, thereby ensuring uninterrupted operation of the lawnmower robot and reducing human intervention. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] in: Figure 1 This is an application environment diagram of the lawnmower positioning method in one embodiment; Figure 2 This is a flowchart illustrating the positioning of a lawnmower in one embodiment; Figure 3 This is a structural block diagram of the positioning device for a lawnmower in one embodiment; Figure 4 A structural block diagram of a computer device in one embodiment. Figure 5This is a structural block diagram of a computer device in another embodiment. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] The lawnmower positioning method provided in this embodiment of the invention can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network. The server can monitor the data entry and exit of multiple sensor data cache queues through the client; wherein the multiple sensor data cache queues include at least one environmental perception data cache queue and one motion state data cache queue; when data enters or exits any sensor data cache queue, the integrity of each sensor data cache queue is checked to see if it meets a preset availability condition; based on the detection result, a data identifier is generated for each sensor data cache queue; wherein the data identifier includes available and unavailable; when the data identifier of each sensor data cache queue has at least one unavailable data identifier, the corresponding positioning processing mode is determined based on the data identifier of each sensor data cache queue; the positioning processing mode is used to process each sensor data cache queue to obtain positioning data. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.

[0019] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a lawnmower positioning method provided in an embodiment of the present invention includes the following steps: S1: Monitor the data entry and exit status of multiple sensor data cache queues; wherein, the multiple sensor data cache queues include at least one environmental perception data cache queue and one motion state data cache queue; S2: When data enters or leaves any sensor data buffer queue, check whether the integrity of each sensor data buffer queue meets the preset availability conditions; S3: Generate data identifiers for each of the sensor data cache queues based on the detection results; wherein, the data identifiers include available and unavailable; S4: When the data identifier of each of the sensor data cache queues has at least one unusable data identifier, the corresponding positioning processing mode is determined according to the data identifier of each of the sensor data cache queues. S5: Process the data cache queues of each sensor according to the positioning processing mode to obtain positioning data.

[0020] As described in step S1 above, the data entry and exit status of multiple sensor data buffer queues is monitored; wherein, the multiple sensor data buffer queues include at least one environmental perception data buffer queue and one motion state data buffer queue. In actual systems, different sensors generate data at different frequencies and with different delays. To ensure the real-time performance and consistency of subsequent positioning processing, it is necessary to set up an independent data buffer queue for each sensor and monitor in real time whether new data is written to each queue and whether data is retrieved for processing. The buffer queues contain at least two types of data: one is the environmental perception data buffer queue, used to perceive the characteristics of the surrounding environment; the other is the motion state data buffer queue, used to calculate relative pose changes. For example, a lawnmower robot is equipped with four sensors: a lidar (outputting point cloud data, 10Hz), a binocular camera (outputting image frames, 30Hz), an IMU (Inertial Measurement Unit, outputting acceleration and angular velocity, 200Hz), and a wheel speed meter (outputting wheel pulses, 100Hz). These four types of data are cached in separate queues: queue A (point cloud), queue B (image data), queue C (IMU data), and queue D (wheel speed data). The monitoring program continuously checks the push (data write) and pop (data retrieval) events of each queue using callback functions or polling. For instance, when the lidar completes a frame scan and triggers an interrupt, pushing point cloud data into queue A, the monitoring module records a "data entry event in queue A." Similarly, when the localization algorithm retrieves a batch of IMU data from queue C for pre-integration, the monitoring module records a "data retrieval event in queue C."

[0021] As described in step S2 above, when data enters or leaves any sensor data buffer queue, the integrity of each sensor data buffer queue is checked to see if it meets the preset availability conditions. Since different sensors have different data generation rates, transmission delays, and packet loss probabilities, some queues may experience backlogs, idle periods, or data asynchrony. To improve positioning robustness, continuous detection is not required; instead, "event-driven" detection is used. That is, as soon as data entry or exit is detected in any queue, an integrity check is immediately performed on all sensor buffer queues. The integrity check determines whether the data currently stored in each queue meets the preset "availability conditions." These availability conditions can be preset according to sensor characteristics and positioning requirements, such as: whether the number of data frames in the queue reaches a minimum threshold (e.g., at least one frame); whether the timestamp span between the latest and oldest data in the queue exceeds the maximum allowable delay; and whether there are obvious time jumps or missing data in the queue. Only when all queues meet their respective availability conditions is the system considered healthy; otherwise, the corresponding queue will be marked as incomplete. Example: Continuing with the above autonomous driving scenario. The preset available conditions are as follows: LiDAR queue A: contains at least one frame of point cloud data, and the difference between the timestamp of this frame and the latest IMU timestamp is <100ms; Camera queue B: contains at least one frame of image data, and the difference between the image timestamp and the latest IMU timestamp is <80ms; IMU queue C: contains at least 10 consecutive sets of acceleration / angular velocity measurements, with no gaps greater than 5ms in time; Wheel speed queue D: contains at least 5 wheel speed pulse accumulation values, and the timestamp of the latest value is no later than 50ms of the current system time. Assuming that at a certain moment, data enters IMU queue C (a new set of IMU data is written), triggering an integrity check, queues A, B, C, and D are immediately checked: it is found that the timestamp of the latest point cloud in queue A is 200ms later than the current system time (due to a brief LiDAR pause), failing the condition of less than 100ms, therefore queue A is determined to be "incomplete"; queue C itself has 20 consecutive sets of data, satisfying the condition; queues B and D also satisfy the condition. At this point, the detection result is: A incomplete, B complete, C complete, D complete.

[0022] As described in step S3 above, data identifiers are generated for each of the sensor data cache queues based on the detection results; wherein, the data identifiers include available and unavailable. Each sensor cache queue corresponds to an identifier, with a value of "available" or "unavailable". The generation rule of the identifiers can be directly mapped: if a queue meets the preset availability conditions, then the identifier is "available"; otherwise, it is "unavailable". This identifier is instantaneous and is recalculated and updated after each detection is triggered, reflecting the data status of each queue at the current moment (or within an adjacent short time window). The data identifiers are logically independent of the original data itself. For example, if the detection results are: queue A (point cloud) incomplete, queue B (image) complete, queue C (IMU) complete, queue D (wheel speed) complete, the generated data identifiers are as follows: LiDAR queue A → "unavailable", camera queue B → "available", IMU queue C → "available", wheel speed queue D → "available". The data identifier is a binary state flag, corresponding one-to-one with each sensor data cache queue, used to characterize whether the data in the current queue meets the preset availability conditions. This identifier is updated after each integrity check is triggered and can be queried in real time by the subsequent positioning mode decision module.

[0023] As described in step S4 above, when each of the sensor data cache queues has at least one unavailable data identifier, the corresponding positioning processing mode is determined based on the data identifiers of each sensor data cache queue. The positioning processing mode is a combination of a set of predefined sensor data processing strategies and state estimation algorithms. Each mode corresponds to a specific combination of data identifiers, defining how to read, fuse, or discard data in each cache queue to calculate the positioning result under that combination. First, it is determined whether there is at least one "unavailable" data identifier in all queues. If all are "available," it indicates that all sensor data is complete, and the standard fusion positioning mode can be entered. Conversely, if even one queue is unavailable, it indicates that the current data source is missing or abnormal, and all sensor data cannot be simply fused directly. A corresponding positioning processing mode needs to be matched or calculated from a predefined mode library based on the current "available / unavailable" identifier combination (i.e., a state code) of each queue. For example, some modes disable data from unavailable queues and only use available queues for positioning; some modes enable data prediction or interpolation to complete missing queues; and some modes reduce the positioning output frequency or switch to a pure estimation mode. The relationship between patterns and identifiers can be a many-to-one mapping, or it can be achieved through decision trees or rule engines. For example: 1. When only a minor sensor (such as a wheel speed sensor) is unavailable, while major sensors such as lidar and IMU are available, the data from the unavailable queue is disabled, and only the data from the remaining available queues is used for state estimation (e.g., using only the IMU + lidar LIO (LiDAR-Inertial Odometry) mode). 2. When the IMU is temporarily unavailable (the gap is less than a threshold) but the wheel speed sensor and lidar are available, interpolation is performed using the wheel speed sensor data and the IMU data from the preceding and following times to generate a virtual IMU measurement value, and the complete state prediction and update process continues. 3. When both lidar and IMU are unavailable (e.g., lidar / IMU module lag), but the wheel speed sensor data is complete, only the wheel speed sensor is used to recursively deduce the pose; no lidar observation updates are performed, and the state covariance increases over time. 4. If the interruption time of the LiDAR or IMU exceeds the threshold (e.g., >0.5s), and the system is in a mowing task, normal navigation is paused, and active relocalization is initiated: branch and boundary search is performed using the 2D height maps of the local and global maps, combined with NDT (Normal Distributions Transform) matching, and the accurate pose is restored before switching back to standard mode. 5. If all sensors are marked as unavailable, or if a critical sensor (such as LiDAR) remains unavailable for more than a safety threshold (e.g., 1s), the system is deemed unable to maintain any reliable positioning, an alarm is reported to the upper-level central platform, and the system switches to idle mode and stops moving.6. When only the visual sensor is unavailable, but both the LiDAR and IMU are available, the positioning frequency does not decrease. However, when the LiDAR is unavailable, even if the wheel speed sensor and IMU are available, the positioning output frequency is forced to drop to the update frequency of the wheel speed sensor or IMU, and an uncertainty flag is added. However, when sensor data is missing for an extended period, even with the above adaptive processing mode, the positioning error will accumulate over time and exceed the tolerance range. Therefore, the system also incorporates a continuous anomaly detection mechanism, which actively triggers repositioning when the unavailability state persists for too long.

[0024] As described in step S5 above, the data buffer queues of each sensor are processed according to the positioning processing mode to obtain positioning data. According to the determined positioning processing mode, operations such as reading, transforming, fusing, or discarding data in each sensor buffer queue are performed to finally calculate the positioning data such as the position, attitude, and velocity of the carrier. The processing logic differs significantly between different modes: In the fully available mode, timestamp-aligned data frames are retrieved from all queues and input into a multi-sensor fusion filter (such as extended Kalman filter or graph optimization) to output the optimal pose estimate; in the partially unavailable mode, queues marked as "unavailable" are skipped, and only data from the "available" queues are read. The covariance matrix or process model of the fusion algorithm may be adjusted to prevent abnormal data from contaminating the positioning results; in some extreme modes, motion model prediction (such as a constant velocity model) may need to be activated to compensate for missing observations. The processing of the queues themselves may also include data cleaning (such as discarding outdated data frames) or dynamically adjusting the queue length. The final output positioning data can be 6-DOF pose and velocity, acceleration, etc., for use by upper-level planning and control.

[0025] In this application, the environmental perception data cache queue specifically refers to sensor data used to perceive the geometric or semantic features of the environment surrounding the lawnmower, such as lidar point cloud data or depth image data. The motion state data cache queue is divided into two categories: the first motion state data cache queue refers to angular velocity and acceleration data collected by the inertial measurement unit (IMU), used for short-term high-precision state recursion; the second motion state data cache queue refers to displacement or velocity data collected by the wheel odometer or wheel speedometer, used to provide constraints for local pose changes.

[0026] In one embodiment, step S2, which detects whether the integrity of each of the sensor data cache queues meets a preset availability condition, includes: S201: The current data frame to be processed in the environmental perception data buffer queue is used as the current reference frame; wherein, the current reference frame has a start time and an end time; S202: Obtain the second timestamp of each data in the motion state data cache queue, and determine whether there is data whose second timestamp covers the start time to end time; S203: If it exists, then determine that the integrity of the motion state data cache queue meets the preset availability condition; S204: If it does not exist, then it is determined that the integrity of the motion state data cache queue does not meet the preset availability condition.

[0027] As described in step S201 above, the current data frame to be processed in the environmental perception data cache queue is used as the current reference frame; wherein, the current reference frame has a start time and an end time. The environmental perception data cache queue typically comes from sensors such as LiDAR, depth cameras, and millimeter-wave radar. The acquisition of each data frame is not instantaneous, but rather involves a scanning or exposure process. Therefore, the frame is naturally associated with a start time and an end time. For example, a rotating LiDAR scans one revolution, which takes a certain amount of time, and the point cloud frames generated within this revolution correspond to a time interval. It is permissible to select the current data frame to be processed in the queue as the current reference frame. This can be either the oldest frame about to be processed at the head of the queue or the newest frame at the tail of the queue, depending on the system design. For example, suppose a lawnmower robot is equipped with a 40-line rotating LiDAR at a speed of 10Hz, completing a 360° scan every 100ms and generating a point cloud frame. Frame A of this point cloud starts at 1000ms (scanning begins) and ends at 1100ms (scanning complete). This frame is retrieved from the LiDAR cache queue as the current reference frame. The queue may also contain the previous frame (990ms–1090ms) and the next frame (1100ms–1200ms), but the earliest or latest frame is selected based on the processing order. For simplicity, this example selects the most recently arrived frame as the reference frame. The two timestamps of this reference frame (start 1000ms, end 1100ms) will be used for subsequent IMU data coverage checks. The current data frame to be processed in the environmental perception data cache queue is used as the current reference frame. This reference frame primarily provides a time reference window and itself has the start and end times of data acquisition.

[0028] As described in step S202 above, the second timestamp of each data point in the motion state data cache queue is obtained, and it is determined whether there is data whose second timestamp covers the start time to end time. The motion state data cache queue typically carries a high-precision second timestamp for each data point, recording the physical sampling time of the data. Since the sampling frequency of the motion state data cache queue is generally much higher than the frame rate of the environmental perception data cache queue, there are often multiple motion state data cache queue points within the time interval of a perception data frame. The second timestamps of all data points in the motion state data cache queue are obtained, and each queue is checked to see if at least one motion state data cache queue exists whose timestamp falls within the closed interval formed by the start and end times of the reference frame (or an open interval can be used as needed). If it exists, it indicates that the corresponding motion changes were recorded simultaneously during the acquisition of this perception frame, providing basic data for subsequent motion distortion correction (e.g., removing point cloud deformation caused by the lawnmower's own movement). If it does not exist, it means that synchronous motion observation was lacking during the perception data acquisition, and directly using this frame's perception data may lead to significant errors. In some embodiments, a time tolerance τ (e.g., 5ms) can be introduced, which is the largest second timestamp plus the time tolerance and the smallest second timestamp minus the time tolerance, to obtain a larger range for compensating for clock synchronization errors.

[0029] As described in step S203 above, if it exists, the integrity of the motion state data cache queue is determined to meet the preset availability condition. When the timestamp of at least one data in the motion state data cache queue can cover the entire acquisition time interval of the environmental perception data cache queue frame, the motion state data cache queue is considered "complete" for the currently selected reference frame. Here, "complete" specifically means that it meets the basic premise of fusion processing from the perspective of time synchronization and observation continuity. Meeting this condition means that the motion state data cache queue can be used to perform motion compensation on the environmental perception data cache queue frame, or to achieve high-precision timestamp interpolation and alignment. This determination result serves as the basis for generating data identifiers, that is, the motion state data cache queue is marked as available.

[0030] As described in step S204 above, if the condition does not exist, it is determined that the integrity of the motion state data cache queue does not meet the preset availability condition. When the timestamp of any data in the motion state data cache queue falls between the start and end times of the environmental perception reference frame, it is determined that the integrity of the motion state data cache queue does not meet the preset availability condition. That is, during the acquisition of the current perception frame, there is a lack of synchronized motion state observation. The reasons for this situation may include: a malfunction of the motion state sensor or data packet loss; severe backlog or idling in the motion state data cache queue; and misalignment of the time base between the environmental perception frame and the motion state data cache queue. Under this determination, the motion state data cache queue is marked as "unavailable".

[0031] In one embodiment, the motion state data cache queue includes a first motion state data cache queue and a second motion state data cache queue; wherein, the first motion state data cache queue is used to cache angular velocity and acceleration data collected by the inertial measurement unit, and the second motion state data cache queue is used to cache displacement or velocity data collected by the wheel odometer or wheel speedometer. Step S3, which generates data identifiers for each of the sensor data cache queues based on the detection results, includes: S301: When the second motion state data buffer queue does not meet the preset availability conditions, determine whether the current reference frame is the second to last data frame in the environmental perception data buffer queue and whether the number of data in the environmental perception data buffer queue is greater than the preset threshold. S302: If so, interpolate using the second motion state data buffer queue before and after the start and end times of the current reference frame, and mark the interpolated data as available; otherwise, increment the number of consecutive detection failures by one. S303: When the number of consecutive detection failures exceeds the preset threshold, the data identifier of the second motion state data cache queue is marked as unavailable.

[0032] As described in step S301 above, when the second motion state data buffer queue does not meet the preset availability conditions, it is determined whether the current reference frame is the second-to-last data frame in the environmental perception data buffer queue and whether the number of data in the environmental perception data buffer queue is greater than a preset threshold. The second motion state data buffer queue typically provides linear velocity, wheel pulse count, or displacement increment. Its sampling frequency is relatively low and it is easily affected by slippage, road bumps, and temporary loss of sensor signals, resulting in no usable data within the acquisition time interval of a certain environmental perception data buffer queue frame. First, it is determined whether the current environmental perception data buffer queue frame used as the reference frame is the "second-to-last" data frame in the queue, and the total number of data in the entire environmental perception data buffer queue is required to be greater than a preset threshold. The preset threshold is set according to the system latency tolerance and computing resources, for example, set to 3, to ensure that there are enough subsequent frames in the queue for smooth transition. When the queue length is less than the preset threshold, the interpolation condition is not met, and it is directly marked as unavailable. The reason for choosing the second-to-last frame instead of the last one is that in sliding window processing, the last frame may not have been fully received or may be about to be removed, while the second-to-last frame is usually stable and can be used to trigger data prediction or interpolation, avoiding frequent unavailability judgments due to boundary effects. For example: Suppose the LiDAR cache queue of a lawnmower currently contains 5 point cloud frames, ordered from oldest to newest as F1, F2, F3, F4, and F5 (F5 being the latest frame), with a preset threshold of 3 (i.e., the queue size is greater than 3). The current processing flow selects F4 as the current reference frame (i.e., the second-to-last frame). The wheel odometer buffer queue should provide the corresponding speed or displacement data within the acquisition time interval of F4. However, due to brief communication interference from the wheel speed sensor, no timestamp in the queue falls within this interval, which means the preset availability condition is not met. At this time, S301 is triggered: it is found that F4 is the second to last frame in the environmental perception queue (because the last one is F5), and the total number of frames in the queue is 5>3, so the condition is met. Therefore, it enters the interpolation compensation branch. If F3 (the third to last frame) is selected, the "second to last" condition is not met, and it directly enters the failure counting process.

[0033] As described in step S302 above, if so, interpolation is performed using the second motion state data cache queues before and after the start and end times of the current reference frame, and the interpolated data is marked as usable; otherwise, the consecutive detection failure count is incremented by one. This means the current environmental perception frame is considered valuable for interpolation compensation because there are subsequent frames in the queue to maintain processing continuity. The system actively searches the second motion state data cache queues for the nearest valid data point before and after the start time of the reference frame, and similarly for the end time. Then, linear or spline interpolation is performed on these discrete second motion state data cache queues to generate a virtual estimated data corresponding to the reference frame's acquisition time period. The interpolated data is marked as "usable," indicating that the motion state data cache queue has passed the integrity check in this detection. Conversely, if the condition is not met, interpolation is not performed, and the "consecutive detection failure count" counter is incremented by one, awaiting subsequent cumulative judgment. If, during an integrity check, the second motion state data cache queue meets the preset availability condition (regardless of whether interpolation is used), the consecutive failure check counter is reset to zero. If the data identifier of this queue has been marked as 'unavailable', it will be restored to 'available' after meeting the availability condition for a preset number of consecutive times (e.g., 10 times).

[0034] As described in step S303 above, when the number of consecutive detection failures exceeds a preset threshold, the data identifier of the second motion state data cache queue is marked as unavailable. Since each integrity check increments the consecutive detection failure count if the conditions are not met, this counter records the number of consecutive occurrences of "detection failure without interpolation correction." A preset threshold is set; when the number of consecutive failures exceeds this threshold, it indicates that the second motion state data cache queue is not experiencing an occasional, single loss, but rather a persistent inability to meet integrity requirements. For example, there might be a complete failure of the wheel speed sensor, a complete communication interruption, or excessive data latency. In this case, it is considered meaningless to continue attempting interpolation or waiting, and the data identifier of the second motion state data cache queue is officially marked as "unavailable."

[0035] In one embodiment, the positioning processing mode includes at least one of the following: First processing mode: When the data identifiers of the environmental perception data cache queue and the first motion state data cache queue are both available, and the data identifier of the second motion state data cache queue is unavailable, state prediction is performed based on the first motion state data cache queue, and state update is performed based on the environmental perception data cache queue to obtain positioning data; Second processing mode: When the data identifiers of the environmental perception data cache queue and the first motion state data cache queue are both unavailable, and the data identifier of the second motion state data cache queue is available, the state is recursively calculated based on the second motion state data cache queue to obtain the positioning data; The third processing mode: When the data identifiers of the environmental perception data cache queue, the first motion state data cache queue, and the second motion state data cache queue are all available, state prediction is performed based on the first motion state data cache queue, and state updates are performed based on the environmental perception data cache queue and the second motion state data cache queue respectively to obtain positioning data.

[0036] In this embodiment, the first processing mode is when both the environmental perception data cache queue and the first motion state data cache queue are available, but the second motion state data cache queue is unavailable. In fusion positioning, the IMU has the characteristics of high frequency and high short-term accuracy, making it suitable for state prediction, but it suffers from long-term drift; the environmental perception data cache queue can provide absolute or relative observations to correct prediction errors. When wheel speed data is unavailable, wheel speed updates are abandoned, and a filtering structure of "IMU prediction + environmental perception update" is adopted instead. For example, in the extended Kalman filter, IMU data drives the motion model for time updates, and the environmental perception data cache queue is used as the measurement value for measurement updates. For example, suppose a lawnmower robot is driving on a slippery, icy or snowy surface. The wheel speedometer outputs severely distorted displacement data due to tire slippage, causing the second motion state data buffer queue to be marked as "unavailable." However, the LiDAR point cloud and IMU data are normal, so the robot enters the first processing mode. Within one filtering cycle, it first reads the acceleration and angular velocity data from the IMU buffer queue for the most recent 10ms. Through integration, it predicts the lawnmower's pose change from the previous moment to the current moment. Next, it retrieves a frame of point cloud data from the LiDAR queue and matches it with an existing map or the previous frame of point cloud data to obtain the observed pose correction. After fusing the prediction and observation using an extended Kalman filter, it outputs the final positioning data. Because it does not use slipping wheel speed data, the positioning result avoids sideslip errors caused by wheel speed false alarms. This mode is particularly effective when the robot enters scenarios where wheel speed is prone to failure, such as sand or grass.

[0037] The second processing mode occurs when both the environmental perception data cache queue and IMU data are unavailable, leaving only wheel odometer or wheel speedometer data. Due to the lack of absolute observations and acceleration / angular velocity information, complex filtering and fusion are impossible, necessitating a simple dead reckoning method: based on the displacement increment output by the wheel speedometer and the known pose from the previous moment, the current position and heading are recursively derived using the lawnmower's kinematic model. This recursive method accumulates errors over time, especially with rapid heading errors when no direction correction is available. Therefore, this mode is typically used as an emergency short-term positioning solution, while simultaneously issuing an alarm and attempting to recover other sensors. Nevertheless, in short-distance travel or low-speed scenarios, this mode can still provide acceptable positioning results.

[0038] The third processing mode is the most ideal and complete fusion positioning mode. All data from the three types of sensors are deemed usable. In this mode, high-frequency IMUs are fully utilized for short-term, high-precision state prediction, while environmental perception data buffer queues and wheeled odometry serve as two complementary measurement sources for state updates. The environmental perception data buffer queue can provide global or local corrections without cumulative drift, but its frequency is relatively low; the wheeled odometry can provide high-frequency, low-noise local displacement increments, but it suffers from long-term drift and slippage errors. By using filters to weightedly fuse the predicted values ​​with the two types of observations, higher positioning accuracy and robustness can be achieved.

[0039] In one embodiment, when the positioning processing mode is the second processing mode, the step of obtaining positioning data by performing state recursion based on the second motion state data cache queue includes: S401: Obtain the second motion state data buffer queue sequence corresponding to the current reference frame; S402: Based on the state estimate at the start of the current reference frame and the recursive relationship between adjacent readings in the second motion state data buffer queue sequence, the state prediction at the end of the current reference frame is obtained by recursion. S403: Calculate the velocity prediction value at the end of the current reference frame based on the translation difference and time difference between the second motion state data buffer queue of the current reference frame and the previous reference frame.

[0040] As described in steps S401-S403 above, in the second processing mode (i.e., the mode that uses only wheel velocity meter data for pose recursion), it is first necessary to extract the wheel velocity meter observation sequence corresponding to the current reference frame from the data packet. The current reference frame refers to the time window covered by a frame of lidar data (although the lidar data may be unavailable, the time interval still exists). The second motion state data buffer queue sequence corresponds to all wheel velocity meter readings collected within this time window, and each reading contains the relative pose transformation (including rotation and translation components) in the wheel velocity meter coordinate system. The data packet stores all wheel velocity meter data from the start time to the end time, denoted as . , indicating the first The pose estimate of the frame is a 4x4 matrix. , It is a 3x3 rotation matrix. It is a 3x1 translation vector. It is a zero vector with 1 row and 3 columns. It is the first The frame velocity estimate is a 3x1 vector. and They are the first The frame's accelerometer offset estimates are all 3-row, 1-column vectors. ,in It is the wheel speedometer interpolation result at the end of the radar data in the previous frame. This is the current wheel velocities reading. First, the wheel velocities pose in the world frame at the previous moment is obtained by multiplying the IMU pose at the previous moment by extrinsic parameters. These extrinsic parameters are rotation and translation matrices obtained beforehand through hand-eye calibration and are treated as known constants during use. Then, the wheel velocities pose at the current moment is recursively derived through the relative motion of the wheel velocities themselves. Finally, the inverse transformation of the extrinsic parameters yields the current IMU pose in the world frame. This recursion is performed sequentially for j=1,2,…,Jk to obtain… With only wheel velocities data available, velocity cannot be directly obtained through IMU acceleration integration. Here, the world coordinate system is W, the IMU coordinate system is I, and the wheel velocities coordinate system is O. Therefore, the linear velocity needs to be estimated using the translation difference between the last two readings of the wheel velocities sequence and the corresponding time difference. Specifically, the predicted value of the current frame velocity is calculated. The calculation method is as follows: .

[0041] in, It is the first The wheel speedometer observation and the first The difference in timestamps between the wheel speedometer observations. It is the translation vector of the last segment of relative motion in the wheel speed gauge coordinate system. It is the IMU rotation matrix obtained recursively at the end of the current frame; It is the rotational part of the extrinsic parameters; This represents the rotation matrix for the relative motion of the last segment of the wheel speedometer. Its transpose is used to transform the translation vector from the wheel speedometer's end coordinate system to its starting coordinate system. Because only prediction is performed and no update is done, the predicted value... It is the state estimation result of the current frame rate. .

[0042] In one embodiment, when in the first processing mode, the method further includes: S411: Read the data identifier of the second motion state data buffer queue; S412: If the data identifiers of the current reference frame and the previous reference frame are both available, then calculate the motion state observation value of the current reference frame based on the pose estimation value of the previous reference frame, the wheel speed meter interpolation result corresponding to the current reference frame in the second motion state data buffer queue, and the wheel speed meter interpolation result corresponding to the previous reference frame in the second motion state data buffer queue. S413: After predicting the state based on the first motion state data cache queue, update the state using the environmental perception data cache queue and the second motion state observation value respectively.

[0043] As described in steps S411-S413 above, it should be noted that if the second motion state data cache queue identifier is updated to be available after interpolation compensation, the actual fusion strategy adopted will be equivalent to the third processing mode, that is, updating simultaneously using the environmental perception data cache queue and the second motion state observation value. Read the data identifier of the second motion state data cache queue. In the normal process of the first processing mode, the second motion state data cache queue was originally considered unavailable, so wheel speed data would not be used. After interpolation compensation, the data identifier of the second motion state data cache queue may be temporarily marked as "available" under certain conditions. Therefore, it is necessary to first read the current data identifier of the queue, rather than directly assuming it is unavailable. If the data identifiers of the current reference frame and the previous reference frame are both available, then the motion state observation value of the current reference frame is calculated based on the pose estimation value of the previous reference frame, the wheel speed meter interpolation result corresponding to the current reference frame in the second motion state data cache queue, and the wheel speed meter interpolation result corresponding to the previous reference frame in the second motion state data cache queue. Starting from the pose estimation value of the previous reference frame, and combining the wheel speed meter interpolation results of the previous reference frame and the wheel speed meter interpolation results of the current reference frame, the wheel speed recursive pose change from the end time of the previous reference frame to the end time of the current reference frame can be calculated. Then, this pose change obtained by pure wheel speed recursion is added to the pose estimation value of the previous reference frame to obtain the pose of the current frame predicted by wheel speed (i.e., motion state observation value).

[0044] After state prediction based on the first motion state data cache queue, state updates are performed using the environmental awareness data cache queue and the second motion state observations, respectively. First, the first motion state data cache queue (IMU) is used for high-frequency state prediction because the IMU can provide short-term, high-precision pose recursion. Then, in the measurement update phase, instead of using only the environmental awareness data cache queue, two independent observation sources are used simultaneously: one is the observation provided by the environmental awareness data cache queue, and the other is the calculated second motion state observation. The two observations are fused using a filter according to their respective covariance weights to update the state estimate.

[0045] In one embodiment, after step S2, which checks whether the integrity of each sensor data buffer queue meets a preset availability condition when data enters or leaves any sensor data buffer queue, the method further includes: S311: Continuously detect the integrity of the data buffer queue of each sensor and determine whether the duration of the unmet preset availability condition exceeds the first preset threshold. S312: If the first preset threshold is exceeded, the system will actively enter the relocation mode to perform a relocation operation.

[0046] As described in step S311 above, the integrity of each sensor data buffer queue is continuously monitored, and it is determined whether the duration of the failure to meet the preset availability conditions exceeds a first preset threshold. Since sensors may experience malfunctions or data anomalies lasting for several seconds or even longer, an occasional single detection failure is insufficient to trigger a system-level response. However, a prolonged incomplete state can lead to an unacceptable accumulation of positioning errors. Therefore, it is required to continuously monitor the integrity status of each sensor data buffer queue and time the "failure to meet the preset availability conditions" state. A persistent anomaly is considered to have occurred only when the duration of a queue (or multiple queues) continuously in an incomplete state exceeds a preset first threshold.

[0047] As described in step S312 above, if the first preset threshold is exceeded, the system actively enters the relocation mode to perform a relocation operation. When it is detected that the unavailability duration of one or more sensor data cache queues has exceeded the first preset threshold, it is determined that the current positioning system is in an unreliable state. Continuing to use the original filtering or recursive results may lead to serious deviations or even endanger safety, and the "relocation mode" is actively triggered. The relocation mode uses the still available sensors to re-determine the absolute pose of the carrier in the global or local coordinate system. For example: global matching based on high-precision maps and LiDAR point clouds, loop closure detection and relocation based on the visual bag-of-words model, position correction using GPS, or requiring the lawnmower to stop and use backup sensors for initialization. After the relocation operation is completed, a high-confidence initial pose is obtained, and then the normal filtering and fusion process can be restarted, and the timestamps of each cache queue are aligned with this pose.

[0048] Reference Figure 3 The present invention provides a lawnmower, the lawnmower comprising: The monitoring module 801 is used to monitor the data entry and exit of multiple sensor data cache queues; wherein, the multiple sensor data cache queues include at least one environmental perception data cache queue and one motion state data cache queue. The detection module 802 is used to detect whether the integrity of each sensor data buffer queue meets the preset availability conditions when data enters or leaves any sensor data buffer queue. The generation module 803 is used to generate data identifiers for each of the sensor data cache queues based on the detection results; wherein, the data identifiers include available and unavailable; The determination module 804 is used to determine the corresponding positioning processing mode based on the data identifier of each sensor data cache queue when the data identifier of each sensor data cache queue has at least one unusable data identifier. The processing module 805 is used to process the data cache queues of each sensor according to the positioning processing mode in order to obtain positioning data.

[0049] In one embodiment, the detection module 802 includes: The current reference frame acquisition submodule is used to take the current data frame to be processed in the environment-aware data cache queue as the current reference frame; wherein, the current reference frame has a start time and an end time; The second timestamp acquisition submodule is used to acquire the second timestamp of each data in the motion state data cache queue, and to determine whether there is data whose second timestamp covers the start time to end time. The first determination submodule is used to determine, if it exists, that the integrity of the motion state data cache queue meets the preset availability conditions. The second determination submodule is used to determine that the integrity of the motion state data cache queue does not meet the preset availability condition if it does not exist.

[0050] In one embodiment, the generation module 803 includes: The judgment submodule is used to determine whether the current reference frame is the second to last data frame in the environmental perception data cache queue and whether the number of data in the environmental perception data cache queue is greater than a preset threshold when the second motion state data cache queue does not meet the preset availability conditions. The interpolation submodule is used to perform interpolation using the second motion state data buffer queue before and after the start and end times of the current reference frame if the condition is met, and to mark the interpolated data as available; otherwise, the number of consecutive detection failures is incremented by one. The marking submodule is used to mark the data in the second motion state data cache queue as unavailable when the number of consecutive detection failures exceeds a preset threshold.

[0051] In one embodiment, the positioning processing mode includes at least one of the following: First processing mode: When the data identifiers of the environmental perception data cache queue and the first motion state data cache queue are both available, and the data identifier of the second motion state data cache queue is unavailable, state prediction is performed based on the first motion state data cache queue, and state update is performed based on the environmental perception data cache queue to obtain positioning data; Second processing mode: When the data identifiers of the environmental perception data cache queue and the first motion state data cache queue are both unavailable, and the data identifier of the second motion state data cache queue is available, the state is recursively calculated based on the second motion state data cache queue to obtain the positioning data; The third processing mode: When the data identifiers of the environmental perception data cache queue, the first motion state data cache queue, and the second motion state data cache queue are all available, state prediction is performed based on the first motion state data cache queue, and state updates are performed based on the environmental perception data cache queue and the second motion state data cache queue respectively to obtain positioning data.

[0052] In one embodiment, when in the second processing mode, the determining module 804 includes: The second motion state data cache queue sequence acquisition submodule is used to acquire the second motion state data cache queue sequence corresponding to the current reference frame; The state prediction value recursion submodule is used to recursively obtain the state prediction value at the end of the current reference frame based on the state estimate value at the start time of the current reference frame and the recursive relationship between adjacent readings in the second motion state data buffer queue sequence. The velocity prediction calculation submodule is used to calculate the velocity prediction value at the end of the current reference frame based on the translation difference and time difference between the second motion state data buffer queue of the current reference frame and the previous reference frame.

[0053] In one embodiment, when in the first processing mode, the determining module 804 further includes: The data identifier reading submodule is used to read the data identifier from the second motion state data cache queue; The motion state observation calculation submodule is used to calculate the motion state observation of the current reference frame based on the pose estimation value of the previous reference frame, the wheel speed meter interpolation result corresponding to the current reference frame in the second motion state data cache queue, and the wheel speed meter interpolation result corresponding to the previous reference frame in the second motion state data cache queue if the data identifiers of the current reference frame and the previous reference frame are both available. The state update submodule is used to perform state updates using the environmental perception data cache queue and the second motion state observation value after performing state prediction based on the first motion state data cache queue.

[0054] In one embodiment, the lawnmower further includes: The judgment module is used to continuously detect the integrity of the data buffer queue of each sensor and determine whether the duration of the unmet preset availability conditions exceeds the first preset threshold. The relocation module is used to actively enter the relocation mode to perform relocation operations if the first preset threshold is exceeded.

[0055] Please see Figure 3 As shown, in one embodiment, a positioning device for a lawnmower is provided, the device comprising: In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a positioning method for an 805 lawnmower on the server side.

[0056] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements the client-side functions or steps of a positioning method for an 805 lawnmower.

[0057] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps: Monitor the data entry and exit status of multiple sensor data cache queues; wherein, the multiple sensor data cache queues include at least one environmental perception data cache queue and one motion state data cache queue; When data enters or leaves any sensor data buffer queue, check whether the integrity of each sensor data buffer queue meets the preset availability conditions. Data identifiers are generated for each of the sensor data cache queues based on the detection results; wherein, the data identifiers include available and unavailable; When the data identifier of each of the sensor data cache queues has at least one unusable data identifier, the corresponding positioning processing mode is determined according to the data identifier of each of the sensor data cache queues. The location processing mode is used to process the data cache queues of each sensor to obtain location data.

[0058] By monitoring the data inflow and outflow of each sensor data buffer queue, an integrity check is proactively triggered when data changes occur in any queue, and a data identifier is generated for each queue. When at least one unusable identifier exists, the corresponding positioning processing mode is adaptively selected based on the identifier combination. Finally, the data is processed based on the selected mode to obtain positioning data. This avoids forcibly using incomplete data or directly interrupting positioning when data is missing, improving the robustness of positioning. Even during periods of partial sensor data interruption, continuous and usable positioning data can still be output, thus ensuring uninterrupted operation of the lawnmower robot and reducing human intervention.

[0059] In one embodiment, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when executed by a processor, performs the following steps: Monitor the data entry and exit status of multiple sensor data cache queues; wherein, the multiple sensor data cache queues include at least one environmental perception data cache queue and one motion state data cache queue; When data enters or leaves any sensor data buffer queue, check whether the integrity of each sensor data buffer queue meets the preset availability conditions. Data identifiers are generated for each of the sensor data cache queues based on the detection results; wherein, the data identifiers include available and unavailable; When the data identifier of each of the sensor data cache queues has at least one unusable data identifier, the corresponding positioning processing mode is determined according to the data identifier of each of the sensor data cache queues. The location processing mode is used to process the data cache queues of each sensor to obtain location data.

[0060] By monitoring the data inflow and outflow of each sensor data buffer queue, an integrity check is proactively triggered when data changes occur in any queue, and a data identifier is generated for each queue. When at least one unusable identifier exists, the corresponding positioning processing mode is adaptively selected based on the identifier combination. Finally, the data is processed based on the selected mode to obtain positioning data. This avoids forcibly using incomplete data or directly interrupting positioning when data is missing, improving the robustness of positioning. Even during periods of partial sensor data interruption, continuous and usable positioning data can still be output, thus ensuring uninterrupted operation of the lawnmower robot and reducing human intervention.

[0061] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0062] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0063] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0064] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A positioning method for a lawnmower, characterized in that, The method includes: Monitor the data entry and exit status of multiple sensor data cache queues; wherein, the multiple sensor data cache queues include at least one environmental perception data cache queue and one motion state data cache queue; When data enters or leaves any sensor data buffer queue, check whether the integrity of each sensor data buffer queue meets the preset availability conditions. Data identifiers are generated for each of the sensor data cache queues based on the detection results; wherein, the data identifiers include available and unavailable; When the data identifier of each of the sensor data cache queues has at least one unusable data identifier, the corresponding positioning processing mode is determined according to the data identifier of each of the sensor data cache queues. The location processing mode is used to process the data cache queues of each sensor to obtain location data.

2. The positioning method for a lawnmower according to claim 1, characterized in that, The step of detecting whether the integrity of each sensor data buffer queue meets the preset availability conditions includes: The current data frame to be processed in the environmental awareness data cache queue is used as the current reference frame; wherein, the current reference frame has a start time and an end time; Obtain the second timestamp of each data in the motion state data cache queue, and determine whether there is data whose second timestamp covers the start time to end time; If it exists, then the integrity of the motion state data cache queue is determined to meet the preset availability condition; If it does not exist, it is determined that the integrity of the motion state data cache queue does not meet the preset availability condition.

3. The positioning method for a lawnmower according to claim 2, characterized in that, The motion state data cache queue includes a first motion state data cache queue and a second motion state data cache queue; wherein, the first motion state data cache queue is used to cache angular velocity and acceleration data collected by the inertial measurement unit, and the second motion state data cache queue is used to cache displacement or velocity data collected by the wheel odometer or wheel speedometer. The step of generating data identifiers for each of the sensor data cache queues based on the detection results includes: When the second motion state data buffer queue does not meet the preset availability conditions, determine whether the current reference frame is the second to last data frame in the environment perception data buffer queue and whether the number of data in the environment perception data buffer queue is greater than the preset threshold. If so, interpolation is performed using the second motion state data buffer queue before and after the start and end times of the current reference frame, and the interpolated data is marked as available; otherwise, the number of consecutive detection failures is incremented by one. When the number of consecutive detection failures exceeds a preset threshold, the data in the second motion state data cache queue will be marked as unavailable.

4. The positioning method for a lawnmower according to claim 3, characterized in that, The first motion state data cache queue is a queue used to cache inertial measurement unit data, and the second motion state data cache queue is a queue used to cache wheel odometer or wheel speed meter data; The positioning processing mode includes at least one of the following: First processing mode: When the data identifiers of the environmental perception data cache queue and the first motion state data cache queue are both available, and the data identifier of the second motion state data cache queue is unavailable, state prediction is performed based on the first motion state data cache queue, and state update is performed based on the environmental perception data cache queue to obtain positioning data; Second processing mode: When the data identifiers of the environmental perception data cache queue and the first motion state data cache queue are both unavailable, and the data identifier of the second motion state data cache queue is available, the state is recursively calculated based on the second motion state data cache queue to obtain the positioning data; The third processing mode: When the data identifiers of the environmental perception data cache queue, the first motion state data cache queue, and the second motion state data cache queue are all available, state prediction is performed based on the first motion state data cache queue, and state updates are performed based on the environmental perception data cache queue and the second motion state data cache queue respectively to obtain positioning data.

5. The positioning method for a lawnmower according to claim 4, characterized in that, When the positioning processing mode is the second processing mode, the step of obtaining positioning data by performing state recursion based on the second motion state data cache queue includes: Obtain the second motion state data buffer queue sequence corresponding to the current reference frame; Based on the state estimate at the start of the current reference frame and the recursive relationship between adjacent readings in the second motion state data buffer queue sequence, the state prediction at the end of the current reference frame is obtained by recursion. The velocity prediction value at the end of the current reference frame is calculated based on the translation difference and time difference between the second motion state data buffer queue of the current reference frame and the previous reference frame.

6. The positioning method for a lawnmower according to claim 4, characterized in that, When in the first processing mode, the method further includes: Read the data identifier from the second motion state data cache queue; If the data identifiers of the current reference frame and the previous reference frame are both available, then the motion state observation value of the current reference frame is calculated based on the pose estimation value of the previous reference frame, the wheel speed meter interpolation result corresponding to the current reference frame in the second motion state data buffer queue, and the wheel speed meter interpolation result corresponding to the previous reference frame in the second motion state data buffer queue. After predicting the state based on the first motion state data cache queue, the state is updated using the environmental perception data cache queue and the second motion state observation value, respectively.

7. The positioning method for a lawnmower according to claim 1, characterized in that, After the step of detecting whether the integrity of each sensor data buffer queue meets the preset availability conditions when data enters or leaves any sensor data buffer queue, the method further includes: The integrity of the data buffer queue of each sensor is continuously detected, and it is determined whether the duration of the unmet preset availability condition exceeds the first preset threshold. If the threshold is exceeded, the system will automatically enter relocation mode to perform a relocation operation.

8. A lawnmower, characterized in that, The lawnmower includes: The monitoring module is used to monitor the data entry and exit of multiple sensor data cache queues; wherein, the multiple sensor data cache queues include at least one environmental perception data cache queue and one motion state data cache queue. The detection module is used to detect whether the integrity of each sensor data buffer queue meets the preset availability conditions when data enters or leaves any sensor data buffer queue. A generation module is used to generate data identifiers for each of the sensor data cache queues based on the detection results; wherein, the data identifiers include available and unavailable; The determination module is used to determine the corresponding positioning processing mode based on the data identifier of each of the sensor data cache queues when the data identifier of each of the sensor data cache queues has at least one unusable data identifier. The processing module is used to process the data cache queues of each sensor according to the positioning processing mode in order to obtain positioning data.

9. A computer device, characterized in that, The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the positioning method for a lawnmower as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the lawnmower positioning method as described in any one of claims 1 to 7.