Positioning error optimization method, self-moving device and storage medium
By setting multiple preset thresholds and dynamic matching positioning optimization strategies in the self-moving device, the problem of positioning error accumulation in the self-moving device is solved, progressive error correction is achieved, and navigation accuracy and operation efficiency are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN MAMMOTION INNOVATION CO LTD
- Filing Date
- 2026-02-24
- Publication Date
- 2026-05-12
AI Technical Summary
Self-moving devices suffer from the problem of accumulated positioning errors in visual navigation systems, resulting in low operational accuracy and completion. Existing technologies lack progressive error optimization methods, leading to inefficiency of single optimization approaches and an inability to process errors in a timely manner.
By setting multiple preset thresholds in the self-moving device, different positioning optimization strategies are dynamically matched, including local keyframe search, in-situ rotation and exploratory motion. The most suitable optimization strategy is selected according to the error magnitude to achieve progressive and hierarchical error correction.
It improves navigation accuracy and operational coverage quality, avoids the accumulation of positioning errors, ensures the continuity and efficiency of operations, and adapts to the accuracy requirements of different task scenarios.
Smart Images

Figure CN122015913A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of positioning and navigation technology, specifically to a positioning error optimization method, a self-moving device, and a storage medium. Background Technology
[0002] In visual navigation systems for self-moving devices, the accumulation of positioning errors is a common problem. Even when positioning is not completely lost, the cumulative error of visual odometry gradually increases with the extension of operation time and running distance. This leads to a deviation between the estimated position and the actual position of the self-moving device, resulting in problems such as repeated coverage of tasks, low completion rate, and low accuracy. Related technologies employ relatively simple optimization methods for positioning errors, using the same optimization approach regardless of the error magnitude, lacking progressive error optimization methods. Summary of the Invention
[0003] This invention provides a positioning error optimization method, a self-moving device, and a storage medium to solve the problems of low task completion and low accuracy of self-moving devices caused by the lack of a single error optimization method and the absence of a progressive error optimization method.
[0004] In a first aspect, the present invention provides a positioning error optimization method, the method comprising: determining the current positioning error during the process of a self-moving device moving toward a target location; determining a target positioning optimization strategy from multiple positioning optimization strategies based on the comparison results of the current positioning error with multiple preset thresholds; and controlling the self-moving device to execute the target positioning optimization strategy to correct the positioning error.
[0005] This invention, during the movement of a self-moving device towards a target location, first determines the current positioning error, compares the positioning error with multiple preset thresholds, selects a target positioning optimization strategy from among the positioning optimization strategies based on the comparison results, and then controls the self-moving device to execute the determined target positioning optimization strategy to correct the positioning error. This achieves dynamic matching of different optimization strategies according to the magnitude of the positioning error, realizing progressive and hierarchical error correction, avoiding the limitations of a single strategy. Thus, it can take the most appropriate positioning error optimization measures at different error stages, promptly handle positioning errors generated during movement, prevent the continuous accumulation of positioning errors, and improve navigation accuracy and operational coverage quality.
[0006] In one optional implementation, the multiple preset thresholds include a first preset threshold, a second preset threshold, and a third preset threshold. Determining a target positioning optimization strategy from multiple positioning optimization strategies based on a comparison between the current positioning error and the multiple preset thresholds includes: when the current positioning error is greater than the first preset threshold, determining the first positioning optimization strategy among the multiple positioning optimization strategies as the target positioning optimization strategy; when the current positioning error is greater than the second preset threshold but does not exceed the first preset threshold, determining the second positioning optimization strategy among the multiple positioning optimization strategies as the target positioning optimization strategy; and when the current positioning error is greater than the third preset threshold, determining the third positioning optimization strategy among the multiple positioning optimization strategies as the target positioning optimization strategy, wherein the first preset threshold is greater than the second preset threshold, and the third preset threshold is greater than the first preset threshold.
[0007] This invention sets a first preset threshold, a second preset threshold, and a third preset threshold, wherein the first preset threshold is greater than the second preset threshold, and the third preset threshold is greater than the first preset threshold. Based on the comparison results of the current positioning error with multiple preset thresholds, a first positioning optimization strategy is determined when the current positioning error is greater than the first preset threshold, a second positioning optimization strategy is determined when the current positioning error is greater than the second preset threshold but not exceeding the first preset threshold, and a third positioning optimization strategy is determined when the current positioning error is greater than the third preset threshold. By matching differentiated positioning optimization strategies to positioning errors in different ranges, targeted correction of errors of varying degrees from small to large is achieved. When the error is small, excessive intervention is avoided, and when the error is large, corresponding and efficient optimization methods are adopted in a timely manner. Thus, while ensuring operational efficiency, positioning errors are effectively optimized, and excessive error accumulation is avoided, improving the timeliness and effectiveness of positioning optimization.
[0008] In one optional implementation, the first positioning optimization strategy includes: searching for keyframe positions within a first preset range of the current position; when a keyframe position is found, selecting a target keyframe position from the keyframe positions; and controlling the self-moving device to move towards the target keyframe position to correct the positioning error.
[0009] The first positioning optimization strategy of this invention is to search for key frame positions within a first preset range of the current position. When a key frame position is found, a target key frame position is selected from the key frame positions, and the self-moving device is controlled to move towards the target key frame position to correct the positioning error. This achieves lightweight, low-cost, and rapid correction when the current positioning error is relatively small.
[0010] In one optional implementation, searching for keyframe locations within a first preset range of the current location includes: continuously acquiring the current location frame while the mobile device is moving; matching the current location frame with the map in a pre-built map keyframe database; and determining the keyframe location when a match is successful.
[0011] This invention continuously acquires the current location frame and matches it with the map in real time during the movement of the self-moving device, ensuring that it actively discovers the location of nearby key frames while running, without interrupting the operation or additional exploration, thus improving the timeliness and efficiency of positioning correction.
[0012] In one optional implementation, selecting a target keyframe position from the keyframe positions includes: determining the current navigation direction of the self-moving device; and selecting a target keyframe position from the keyframe positions based on the consistency between the keyframe position and the current navigation direction.
[0013] This invention selects a keyframe position that is consistent with the direction of travel based on the current navigation direction of the self-moving device as the target, enabling the self-moving device to achieve target-oriented keyframe search. While correcting positioning errors, it maintains the continuity of the movement direction, reduces additional movement losses, and improves correction efficiency.
[0014] In one optional implementation, determining the target keyframe location from the keyframe locations based on the consistency between the keyframe location and the current navigation direction includes: calculating the matching confidence between the current environmental observation data and the historical environmental features stored at each keyframe location; determining the consistency between each keyframe location and the current navigation direction; and determining the target keyframe location from the keyframe locations based on the matching confidence and consistency.
[0015] This invention comprehensively calculates the matching confidence of the current environment observation and the historical features of each key frame, as well as the consistency between the key frame position and the current navigation direction. It selects the target key frame position based on two dimensions: feature matching reliability and travel direction adaptability. This allows for the priority selection of key frames that can both accurately locate and ensure smooth travel as correction targets, thereby improving the accuracy of target selection and the smoothness of the execution process.
[0016] In one optional implementation, the second positioning optimization strategy includes: controlling the self-moving device to rotate in place at its current position, and updating the current pose based on environmental perception data acquired during the rotation, so as to reduce positioning error.
[0017] This invention controls the self-moving device to rotate in place and updates the current pose based on environmental perception data. When the positioning error exceeds a first preset threshold but does not exceed the first preset threshold, the current pose can be corrected based on environmental perception data during the rotation process without relying on historical keyframes. This ensures that large-scale movement is reduced when the error is small, thus balancing optimization effect and execution efficiency.
[0018] In one optional implementation, searching for keyframe locations within a first preset range of the current location includes: when the positioning optimization strategy is determined to be a first positioning optimization strategy, or when the positioning error is still greater than a second preset threshold after executing a second positioning optimization strategy, searching for keyframe locations within a first preset region centered on the current location.
[0019] This invention achieves a progressive connection and hierarchical triggering between the first and second positioning optimization strategies by searching for key frame positions within a first preset area centered on the current position when the first positioning optimization strategy is triggered or when the positioning error has not dropped below the second preset threshold after the second positioning optimization strategy is executed. This ensures that lightweight correction methods are used first when the error is small, while also ensuring the success rate of the positioning optimization strategy and improving the synergy of multi-strategy progressive optimization.
[0020] In one optional implementation, the third positioning optimization strategy includes: retrieving historical keyframe locations within a second preset region centered on the current location, wherein the retrieval radius of the second preset region is greater than the retrieval radius of the first preset region; when the positioning optimization strategy is determined to be the third positioning optimization strategy, or when no keyframe location is found within the first preset region, or when the current positioning error is still greater than a preset acceptable threshold after positioning correction based on the target keyframe location within the first preset region.
[0021] The third positioning optimization strategy of this invention is to retrieve the location of historical keyframes within a second preset area centered on the current location. This third positioning optimization strategy is executed when the positioning error exceeds a third preset threshold, no keyframes are retrieved within the first preset area, or the positioning error is still greater than a preset acceptable threshold after positioning error correction based on the target keyframe location within the first preset area. This achieves progressive positioning optimization, providing a wider coverage and stronger correction capability when the first two positioning optimization strategies are not thorough enough. Together with the first and second positioning optimization strategies, it forms a progressive correction from local to global and from lightweight to powerful, ensuring that each level of positioning error has an optimization strategy that matches its error magnitude.
[0022] In one optional implementation, determining the consistency between each keyframe position and the current navigation direction includes: when retrieving keyframe positions based on a first preset region, calculating the directional deviation between the orientation associated with each keyframe position and the current navigation direction, and determining keyframe positions with directional deviations less than a first preset angle threshold as satisfying directional consistency; when retrieving keyframe positions based on a second preset region, calculating a consistency score based on the directional deviation between the orientation associated with each keyframe position and the current navigation direction, and the distance from the keyframe position to the current position.
[0023] This invention employs different evaluation criteria based on different search ranges. When searching within a first preset area, it determines whether directional consistency is satisfied by comparing the directional deviation with a first preset angle threshold, focusing on rapid matching within the current navigation direction. When searching within a second preset area, it calculates a consistency score by combining directional deviation and distance, comprehensively balancing directional matching degree and movement cost over a larger range. This makes the directional consistency determination adaptable to the search range. In local searches, directional consistency is used as the standard, while in global searches, distance factors are taken into account, improving the rationality of target keyframe selection and the efficiency of positioning error correction under different search ranges.
[0024] In an optional implementation, the method further includes: when no historical keyframe location is found, controlling the self-moving device to perform exploratory movement within a third preset range centered on the current location and with a radius not exceeding a preset exploration radius, until a keyframe location is found within the third preset range, wherein the exploration radius of the third preset range is greater than the search radius of the first preset range and less than the exploration radius of the second preset region.
[0025] This invention expands the search coverage to increase the success rate of keyframe retrieval by performing active exploration within a third preset range when no historical keyframes are found, thereby improving the environmental adaptability of the progressive optimization strategy.
[0026] In one optional implementation, the exploratory movement includes: traveling a first distance in the current orientation, rotating by an angle around its own vertical axis, and then traveling a second distance in the rotated orientation; wherein the absolute value of the rotation angle does not exceed a preset upper limit angle of rotation, and the angle between the displacement direction of the position at the end of the exploration relative to the current position and the current navigation direction does not exceed a preset direction tolerance angle.
[0027] This invention actively searches for keyframes over a wider range by controlling the self-moving device to move straight along the current direction, rotate around its own vertical axis, and then move straight along the rotated direction. During operation, the rotation amplitude and navigation direction are constrained to keep the exploration path within a reasonable range of the current navigation direction. This effectively increases the probability of keyframe discovery while maintaining the continuity between the navigation direction and the operation path, thereby improving the motion efficiency of the exploration process and the smoothness of the corrected operation connection.
[0028] In one optional implementation, the method further includes: obtaining the job stage and / or job environment of the self-moving device in the current task; and determining a first preset threshold, a second preset threshold, and / or a third preset threshold based on the job stage and / or job environment.
[0029] This invention dynamically adjusts the first, second, and third preset thresholds of positioning error based on the current operating stage and / or operating environment of the self-moving device. This adapts the positioning error judgment standard to the specific task scenario. In operating stages with high accuracy requirements or complex environments, a stricter positioning error judgment standard is adopted, while in operating stages with low accuracy requirements or relatively simple environments, the positioning error judgment standard is appropriately relaxed. This optimizes the positioning error while ensuring the quality of the operation, and improves the scene adaptability of the progressive optimization strategy and the overall operating efficiency of the self-moving device.
[0030] In one optional implementation, after controlling the self-moving device to move towards the target keyframe position or to rotate in place at the current position, the method further includes: continuously acquiring the current positioning error; when the current positioning error is less than a second preset threshold, stopping the movement towards the target keyframe position or the rotation in place at the current position, and resuming the task of moving towards the target position.
[0031] This invention continuously monitors the current positioning error during the movement to the target keyframe position or rotation in place, and promptly terminates the correction action and resumes the task of moving to the target position when the positioning error drops below a second preset threshold. This avoids overcorrection that could cause invalid movement or job interruption, and improves the accuracy of correction duration control and the continuity of task execution.
[0032] In one optional implementation, after controlling the self-moving device to move towards the target keyframe position, the method further includes: starting a timer; when the timer reaches a preset time threshold and the current positioning error is still greater than a preset acceptable threshold, stopping the movement towards the target keyframe position and resuming the task of moving towards the target position; or, after rotating in place at the current position, the method further includes: starting a timer; when the timer reaches a preset time threshold and the current positioning error is still greater than a preset acceptable threshold, stopping the rotation in place at the current position and resuming the task of moving towards the target position.
[0033] This invention starts a timer when moving towards the target keyframe position or rotating in place, and promptly stops the correction action and resumes the task of moving towards the target position when the positioning error has not dropped to an acceptable range after reaching a preset time threshold. This avoids the problem of positioning error continuously increasing due to excessive time consumption or correction failure in a single correction, which affects work efficiency and improves the timeliness of the progressive optimization strategy.
[0034] Secondly, the present invention provides a self-moving device, the self-moving device comprising: a controller, the controller comprising:
[0035] The memory and the processor are interconnected and communicate with each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the method described in the first aspect or any of its corresponding embodiments.
[0036] In one alternative implementation, the self-moving device is a lawnmower.
[0037] Thirdly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0038] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0039] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the first step of the positioning error optimization method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the second process of the positioning error optimization method according to an embodiment of the present invention; Figure 4 This is a flowchart illustrating the derivation of the positioning error optimization method according to an embodiment of the present invention; Figure 5 This is a system architecture diagram of the positioning error optimization method according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of the controller of the self-moving device according to an embodiment of the present invention; Detailed Implementation To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 embodiments of the present invention, not all embodiments. 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.
[0040] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0041] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0042] As an optional application scenario of this invention, such as Figure 1 As shown, the positioning error optimization method can be applied to self-moving devices. The self-moving device includes a controller 101, which is used to execute the positioning error optimization method. The overall process of the controller 101 executing the positioning error optimization method is detailed in the relevant description of the method embodiment below, and will not be repeated here.
[0043] Self-moving devices can autonomously execute predetermined tasks within a certain environment without direct human control, using built-in sensors, algorithms, and drive systems.
[0044] The self-moving device in this embodiment can be a semi-self-moving device or a fully autonomous device, such as any of the devices with self-moving functions, such as a robot vacuum cleaner or a lawnmower.
[0045] The application scenarios of the self-moving device in this embodiment include, but are not limited to, the following: Intelligent lawnmower systems: maintain positioning accuracy during long-term lawn operations; agricultural operation robots: maintain positional accuracy during precision farmland operations; warehousing and logistics robots: ensure shelf positioning accuracy during warehouse handling; indoor service robots: maintain navigation and positioning stability in home environments; inspection and monitoring robots: ensure inspection path accuracy during park patrols.
[0046] In mobile robot visual navigation systems, the accumulation of positioning errors is a common technical problem. Even if the positioning is not completely lost, as the operation time and movement distance increase, the accumulated error of the visual odometry will gradually increase, causing the estimated position of the self-moving device to deviate from the actual position. Although this positioning error will not immediately lead to complete loss of positioning, it will seriously affect the accuracy and quality of the operation.
[0047] In applications of outdoor robots such as smart lawnmowers, excessive positioning errors can lead to the following problems: Insufficient accuracy in critical tasks: such as inaccurate docking of recharge and navigation, and missed or over-cutting of edge mowing; decreased job quality: path planning based on error location leads to repeated or missed coverage; impaired user experience: users observe uneven mowing boundaries and frequent recharge failures.
[0048] In related technologies, when a positioning error is detected to be too large, the following methods are typically used: In-situ local optimization: Performs local map re-optimization in place, with limited effect. Restart positioning initialization: Reinitializes the positioning system, interrupting the current task. Ignore error and continue: Tolerates error and continues operation, accepting a loss of accuracy.
[0049] However, the positioning error optimization methods in related technologies have the following limitations: The optimization methods are singular and inefficient: Only in-situ rotation optimization is used, lacking an effective error reduction mechanism; the optimization scope is unreasonable: the optimization scope is not dynamically adjusted according to the error magnitude, leading to over-optimization or under-optimization due to the absence of specific optimization methods for different error levels. Frequent task interruptions: the optimization process often requires interrupting the current task, impacting work efficiency. Inappropriate optimization timing causes user waiting: errors occurring during critical task phases require users to wait for optimization to complete, such as during the recharge phase. Lack of a tiered optimization strategy: using the same optimization method regardless of error magnitude results in low resource utilization.
[0050] Therefore, the lack of a progressive, directionally coordinated error optimization mechanism makes it impossible to effectively reduce positioning errors without interrupting the task.
[0051] This invention aims to solve the core problem that when self-moving devices perform tasks requiring high-precision positioning, the accumulated errors lead to insufficient task accuracy or even failure, and there is a lack of effective optimization methods. This invention proposes a hierarchical progressive optimization method based on local keyframes and orientation coordination.
[0052] This invention ensures the accuracy of critical tasks by keeping positioning errors within acceptable ranges when performing tasks requiring high-precision positioning. It optimizes the matching of the optimization range and error magnitude, dynamically adjusting the optimization range and strategy based on the error size, gradually trying different approaches from low to high cost. It ensures that the optimized movement is coordinated with the current task direction to maintain consistency between the optimization direction and the task direction, preserving path continuity and task progress. The main task is not interrupted during optimization, allowing for seamless resumption of task execution after optimization. A layered, progressive strategy is adopted, first trying low-cost methods and then using high-cost methods only when these fail.
[0053] According to an embodiment of the present invention, a method for optimizing positioning errors is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0054] This embodiment provides a positioning error optimization method, which can be used in the aforementioned self-moving devices, such as intelligent lawnmower systems, sweeping robots, warehouse logistics robots, outdoor inspection robots, shopping mall guidance robots, etc. Figure 2 This is a schematic diagram of the first step in the positioning error optimization method according to an embodiment of the present invention, as shown below. Figure 2 As shown, the process includes the following steps: Step S201: During the process of the self-moving device moving towards the target location, determine the current positioning error.
[0055] Specifically, the current target task of the self-moving device is determined. The target task is to move along the planned movement path in the current environment and run the corresponding operation program to complete a high-precision task. This operation program is related to the function of the self-moving device; for example, in a lawnmower, the operation program is the lawn-mowing program; in a warehouse robot, the operation program is the handling program, sorting program, etc.; and in a sweeping robot, the operation program is the sweeping program. The target task stores the target location, and the process of the self-moving device moving towards the target location is the process of the self-moving device moving along the planned movement path in the current environment and running the corresponding operation program.
[0056] It should be noted that the target location of the self-moving device is determined based on the planned path in the objective task. For example, in a lawnmower, the target location is determined according to the set mowing path, which includes the various locations along the mowing path. As the self-moving device moves towards the target location, its estimated positioning is monitored in real time, and the current positioning error is determined based on the deviation between the estimated positioning and the target position.
[0057] Taking visual positioning of a self-moving device as an example, the deviation between the estimated localization and the target location is determined by visual odometry. Visual odometry is a technique that estimates the self-moving device's own position and orientation by analyzing image sequences.
[0058] Specifically, as the mobile device moves toward the target location, the visual camera continuously captures environmental images, identifies feature points that can characterize the current location from the images, and estimates its current location and pose by the positions of the feature points between consecutive frames.
[0059] In some implementations, the target position of the self-moving device can also be determined by the final position of the path planned in the target task. For example, in a lawnmower, the target position is determined according to the end point of the set mowing path, and the current positioning error is determined by comparing the end point position and attitude set in the operation program with the currently estimated self position and attitude.
[0060] Taking a smart lawnmower as an example, the positioning system of a smart lawnmower works continuously during lawn operation, but there is an accumulation of error. When the error exceeds the preset threshold, such as more than 0.3 meters, although the positioning is not completely lost, the operation accuracy is affected. At this time, it is necessary to optimize the positioning error.
[0061] Step S202: Based on the comparison results between the current positioning error and multiple preset thresholds, determine the target positioning optimization strategy from multiple positioning optimization strategies.
[0062] Specifically, the current positioning error is compared with multiple preset thresholds to determine the error level corresponding to the current positioning error, i.e., the error magnitude. The target positioning optimization strategy is then determined from multiple positioning optimization strategies based on the error magnitude.
[0063] It should be noted that there is a certain correspondence between positioning error and positioning optimization strategy. This allows for positioning optimization to be completed through high-cost optimization strategies when the positioning error is large, and through low-cost optimization strategies when the positioning error is small. This enables dynamic adjustment of the position and attitude of the self-moving device based on the magnitude of the error, gradually trying from low cost to high cost.
[0064] Step S203: Control the self-moving device to execute the target positioning optimization strategy to correct the positioning error.
[0065] It should be noted that the self-moving device executes a target localization optimization strategy to ensure that the estimated position is consistent with the target position, thereby avoiding the continued accumulation of errors.
[0066] The positioning error optimization method provided in this embodiment first determines the current positioning error during the movement of the self-moving device towards the target location, compares the positioning error with multiple preset thresholds, selects a target positioning optimization strategy from the positioning optimization strategies based on the comparison results, and then controls the self-moving device to execute the determined target positioning optimization strategy to correct the positioning error. This achieves dynamic matching of different optimization strategies according to the magnitude of the positioning error, realizes progressive and hierarchical error correction, avoids the limitations of a single strategy, and thus can take the most appropriate positioning error optimization measures at different error stages, promptly handle the positioning error generated during the movement, avoid the continuous accumulation of positioning error, and improve navigation accuracy and operational coverage quality.
[0067] This embodiment provides a positioning error optimization method, which can be used in the aforementioned self-moving devices, such as intelligent lawnmower systems, sweeping robots, warehouse logistics robots, outdoor inspection robots, shopping mall guidance robots, etc. Figure 3 This is a schematic diagram of the second process of the positioning error optimization method according to an embodiment of the present invention, as shown below. Figure 3 As shown, the process includes the following steps: Step S301: During the movement of the self-moving device towards the target location, determine the current positioning error. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0068] Step S302: Based on the comparison results between the current positioning error and multiple preset thresholds, determine the target positioning optimization strategy from multiple positioning optimization strategies.
[0069] Multiple preset thresholds include a first preset threshold, a second preset threshold, and a third preset threshold.
[0070] It should be noted that the first preset threshold, the second preset threshold, and the third preset threshold are engineering parameters determined by comprehensively weighing factors such as the physical characteristics of the self-moving equipment, the accuracy requirements of the task, the current environmental characteristics, and the environmental risk level.
[0071] For example, the first preset threshold is 0.2 meters, the second preset threshold is 0.1 meters, and the third preset threshold is 0.4 meters. The third preset threshold is the maximum tolerable error range that the positioning result is allowed to deviate from the actual position during the execution of the task by the mobile device. In practical applications, the first, second, and third preset thresholds are not limited to the thresholds shown above. They can be appropriately adjusted according to factors such as the accuracy of the task and environmental characteristics, so as to optimize the positioning error in a targeted manner according to the magnitude of the error corresponding to the current monitoring positioning error.
[0072] For example, in this embodiment, positioning errors greater than a first preset threshold but less than a third preset threshold are defined as medium errors, requiring optimization of the positioning error by the self-moving device. Positioning errors greater than a second preset threshold but not exceeding the first preset threshold are defined as small errors, requiring optimization based on the task type. Positioning errors greater than a third preset threshold are defined as large errors, requiring immediate and precise optimization.
[0073] For example, a positioning error of 0.1 meters or more but less than 0.2 meters is considered a small error, a positioning error of 0.2 meters or more but less than 0.4 meters is considered a medium error, and a positioning error of 0.4 meters or more is considered a large error.
[0074] Specifically, step S302 includes: Step S3021: When the current positioning error is greater than the first preset threshold, the first positioning optimization strategy among multiple positioning optimization strategies is determined as the target positioning optimization strategy.
[0075] If the current positioning error is greater than the first preset threshold, it means that there has been a certain error between the estimated position and the actual position of the self-moving device, and the positioning error needs to be optimized immediately to avoid the current positioning error accumulating too much.
[0076] The first positioning optimization strategy is a local keyframe optimization strategy, which requires keyframe search, filtering target keyframes from the searched keyframes according to directional consistency, and then selecting the keyframe with the highest confidence and the most consistent with the current navigation direction from the searched keyframes as the optimization target through confidence evaluation.
[0077] Specifically, step S3021 includes: Step a1: Search for keyframe positions within a first preset range of the current location; Specifically, the first preset range is a small area around the current estimated location of the self-moving device, for example, searching for available keyframes within a radius of 2 meters with the current estimated location as the origin.
[0078] Specifically, step a1 above includes: Step a101: During the movement of the mobile device, continuously acquire the current location frame; It should be noted that the current location frame is an available keyframe searched by the mobile device within a first preset range. There can be multiple current location frames searched within the first preset range. The current location frame includes both an image and a location.
[0079] Step a102: Match the current positioning frame with the map based on the map in the pre-built map keyframe database; It should be noted that matching the current location frame with the map refers to matching the image in the current location frame with the preset map in the map keyframe database.
[0080] Step a103: If a match is successful, the location of the keyframe is determined.
[0081] It should be noted that if a match is successful, it means that the current location frame image has a high similarity with the map in the map database. In this case, the location in the keyframe corresponding to the matched map will be used as the searched keyframe location.
[0082] The positioning error optimization method provided in this embodiment continuously acquires the current positioning frame and matches it with the map in real time during the movement of the mobile device. This ensures that the device actively discovers the location of nearby key frames while running, without interrupting the operation or conducting additional exploration, thus improving the timeliness and efficiency of positioning correction.
[0083] Step a104: When the positioning optimization strategy is determined to be the first positioning optimization strategy, or when the positioning error is still greater than the second preset threshold after executing the second positioning optimization strategy, the key frame position is searched within the first preset area centered on the current position.
[0084] It should be noted that these are the triggering conditions for the first positioning optimization strategy. According to the preset threshold ranges for positioning error magnitude described above, a positioning error greater than the first preset threshold but less than the third preset threshold is defined as a medium error, and the determined positioning optimization strategy is the first positioning optimization strategy. A positioning error greater than the second preset threshold but not exceeding the first preset threshold is defined as a small error, and the determined positioning error optimization strategy is the second positioning error optimization strategy. A positioning error greater than the third preset threshold is defined as a large error, and the determined positioning optimization strategy is the third positioning optimization strategy, requiring immediate and precise optimization.
[0085] Based on the aforementioned classification of positioning error magnitudes and corresponding error levels, the first positioning error optimization strategy is identified as a second-level optimization strategy. The second positioning error optimization strategy is a first-level optimization strategy, and the third positioning error optimization strategy is a third-level optimization strategy. In the practical application of this embodiment, the first-level, second-level, and third-level optimization strategies are progressive optimization strategies.
[0086] When the current positioning error is detected to be greater than the first preset threshold, or when the positioning error is still greater than the second preset threshold after the second positioning optimization strategy is executed (when the first-level optimization strategy fails), the second-level optimization strategy is triggered, that is, the above-mentioned steps of searching for keyframe positions within the first preset range of the current position are started.
[0087] The positioning error optimization method provided in this embodiment searches for key frame positions within a first preset area centered on the current position when the first positioning optimization strategy is triggered or when the positioning error has not dropped below the second preset threshold after the second positioning optimization strategy is executed. This achieves a progressive connection and layered condition triggering between the first and second positioning optimization strategies. In other words, it ensures that lightweight correction methods are used first when the error is small, while also ensuring the success rate of the positioning optimization strategy and improving the synergy of multi-strategy progressive optimization.
[0088] Step a2: When a keyframe location is found, select the target keyframe location from the keyframe locations. It should be noted that when a keyframe location is found within the first preset range, the keyframes that are consistent with the current navigation direction are selected as the target keyframe locations.
[0089] Specifically, step a2 above includes: Step a201: Determine the current navigation direction of the self-moving device; The current navigation direction is the direction that is consistent with the direction of the task. For example, the navigation direction is the target orientation and movement direction of the self-moving device relative to the world coordinate system during its movement.
[0090] Step a202: Select the target keyframe position from the keyframe positions based on the consistency between the keyframe position and the current navigation direction.
[0091] Specifically, the keyframe direction of each keyframe is determined and compared with the current navigation direction by angle to determine the consistency between the keyframe position and the current navigation direction. The keyframe position with an angle less than a preset angle threshold is determined as the target keyframe position; for example, the preset angle threshold is 30°.
[0092] The positioning error optimization method provided in this embodiment selects a key frame position consistent with the direction of travel based on the current navigation direction of the self-moving device as the target, enabling the self-moving device to achieve target-oriented key frame search. While correcting the positioning error, it maintains the continuity of the movement direction, reduces additional movement loss, and improves the correction efficiency.
[0093] Specifically, step a202 above includes: Step a2021: Calculate the matching confidence between the current environmental observation data and the historical environmental features stored at each keyframe location; It should be noted that the current environmental observation data includes images and location data. The historical environmental features stored at each keyframe location include the images and locations of each keyframe, that is, the keyframe maps and keyframe locations stored in the map keyframe database.
[0094] The purpose of matching confidence is to select the keyframe with the highest confidence and the most consistent direction as the optimization target.
[0095] Step a2022: Determine the consistency between the position of each keyframe and the current navigation direction; Specifically, this is based on the consistency between the keyframe orientation and the current navigation orientation at the position of each keyframe.
[0096] Specifically, step a2022 above includes: Step a20221: When retrieving key frame positions based on the first preset region, calculate the directional deviation between the orientation associated with each key frame position and the current navigation direction, and determine key frame positions with directional deviations less than the first preset angle threshold as satisfying directional consistency. It should be noted that the first preset area is the region centered on the current location with a radius not exceeding the first preset radius, i.e., the area covered within a radius of 2 meters. The first preset angle threshold is 30°. Prioritization is performed for directional consistency by calculating the angle between the direction of each candidate keyframe and the current navigation direction. This angle is then compared with the preset angle threshold to determine the directional consistency priority for different positioning optimization strategies.
[0097] In the second-level optimization, local keyframe optimization is used. Ensuring the consistency between the target keyframe and the current navigation direction is a high priority, that is, ensuring that the keyframe direction is highly consistent with the current navigation direction.
[0098] Specifically, keyframes whose direction is less than 30° from the current navigation direction are high priority, meaning they are highly consistent with the navigation direction and the smaller the directional deviation, the better; keyframes whose direction is greater than or equal to 30° but less than 60° from the current navigation direction are medium priority, meaning their direction is basically coordinated; and keyframes whose direction is greater than or equal to 60° from the current navigation direction are low priority, meaning their directional deviation is large.
[0099] Step a20222: When retrieving key frame locations based on the second preset area, calculate a consistency score based on the directional deviation between the orientation associated with each key frame location and the current navigation direction, as well as the distance from the key frame location to the current location.
[0100] It should be noted that, in this embodiment, searching for keyframe locations in the second preset area refers to the area with the current location as the center and a radius not exceeding the second preset radius, i.e., the area covered within a radius of 5 meters. Since the search range is expanded, it is necessary to ensure that the self-moving device does not move too far. Therefore, a comprehensive evaluation is needed, taking into account the distance between the keyframe location and the current location, to calculate the consistency score.
[0101] Specifically, a score is assigned to the angle difference between each calculated keyframe direction and the current navigation direction. For example, 10 degrees is worth 90 points, 20 degrees is worth 80 points, 30 degrees is worth 70 points, 40 degrees is worth 60 points, and so on, up to 180 degrees is worth 10 points. Based on the distance of the keyframe from the robot, the smaller the distance, the closer it is to the robot. In this case, it is possible to reduce the positioning error without moving too far and without disrupting the navigation continuity with the task. Similarly, a score is assigned based on the distance, for example, 0.5m is worth 90 points, 1m is worth 70 points, 1.5m is worth 50 points, and 2m is worth 30 points. Angle difference scores are determined based on angle differences, and distance scores are determined based on distance. Angle difference weights are assigned to the angle difference scores, and distance weights are assigned to the distance scores. The direction consistency score is obtained by multiplying the angle difference score and the angle difference weight, and the distance score is obtained by multiplying the distance score and the distance score weight. The direction consistency score and the distance score are added together to obtain the consistency score, and the keyframe with the highest score is selected as the target keyframe. The angle difference weight is 60%, and the distance weight is 40%.
[0102] The positioning error optimization method provided in this embodiment adopts different evaluation criteria according to different search ranges. When searching in the first preset area, it determines whether the direction consistency is met by comparing the direction deviation with the first preset angle threshold, focusing on fast matching in the current navigation direction. When searching in the second preset area, it calculates the consistency score by combining the direction deviation and distance, and comprehensively weighs the direction matching degree and movement cost in a larger range, so that the direction consistency judgment is adapted to the search range. In local search, the direction consistency is used as the standard, and in global search, the distance factor is taken into account, which improves the rationality of target key frame selection and positioning error correction efficiency under different search ranges.
[0103] Step a2023: Determine the target keyframe location from the keyframe locations based on matching confidence and consistency.
[0104] Specifically, the target keyframe position is determined based on the keyframe position with the highest confidence and the most consistent orientation. When the requirements for confidence and orientation consistency cannot be met simultaneously due to environmental complexity—for example, if the orientation consistency corresponding to the keyframe with the highest confidence is not the highest—navigation is prioritized to the keyframe position with the highest confidence. Conversely, if the orientation consistency is the highest but its confidence is not the highest, navigation is prioritized to the keyframe position with the highest orientation consistency. In other words, if the keyframe position corresponding to the highest confidence and the most consistent orientation is not the same, the target keyframe position is determined based on the keyframe position with the highest score between the confidence score and the orientation consistency score.
[0105] The positioning error optimization method provided in this embodiment comprehensively calculates the matching confidence of the current environmental observation and the historical features of each key frame, as well as the consistency between the key frame position and the current navigation direction. It selects the target key frame position based on two dimensions: feature matching reliability and travel direction adaptability. This method can prioritize the selection of key frames that can both accurately position and ensure smooth travel as correction targets, thereby improving the accuracy of target selection and the smoothness of the execution process.
[0106] Step a3: Control the self-moving device to move towards the target keyframe position to correct the positioning error.
[0107] It should be noted that the current positioning error is continuously updated during the movement of the self-moving device towards the target keyframe position. When the current positioning error is determined to be within an acceptable error range, it is determined that the error has been corrected. The acceptable error range is defined as a positioning error less than a second preset threshold, i.e., less than 0.1, providing a small tolerance interval to ensure the efficiency of task completion.
[0108] The positioning error optimization method provided in this embodiment has a first positioning optimization strategy of searching for key frame positions within a first preset range of the current position. When a key frame position is found, a target key frame position is selected from the key frame positions, and the self-moving device is controlled to move towards the target key frame position to correct the positioning error. This achieves lightweight, low-cost, and rapid correction when the current positioning error is relatively small.
[0109] Step S3022: When the current positioning error is greater than the second preset threshold but does not exceed the first preset threshold, determine the second positioning optimization strategy among multiple positioning optimization strategies as the target positioning optimization strategy; For example, the second preset threshold is 0.1 meters. According to the example in this embodiment, the current positioning error being greater than the second preset threshold but not exceeding the first preset threshold means that the positioning error is within the range of greater than 0.1 meters and less than or equal to 0.2 meters. The second positioning optimization strategy is the first-level optimization strategy described above.
[0110] Specifically, step S3022 includes: Step b1: Control the self-moving device to rotate in place at the current position, and update the current pose based on the environmental perception data acquired during the rotation to reduce positioning error.
[0111] Specifically, the self-moving device is controlled to rotate in place at its current position, including rotating 360° at a relatively small speed.
[0112] It should be noted that if the current positioning error is greater than the second preset threshold but does not exceed the first preset threshold, it means that the error slightly exceeds the threshold or the error growth trend is slow.
[0113] Among them, controlling the self-moving device to rotate in place at the current position includes controlling the self-moving device to perform a slow 360° rotation at the current position, collecting multi-angle environmental observation data during the rotation, and using multi-view observation to rematch environmental features and optimize the current pose.
[0114] Among them, the second positioning optimization strategy is an optimization strategy that does not leave the current position and controls the rotation speed within an appropriate range, so as to complete the positioning optimization without interrupting the operation.
[0115] The positioning error optimization method provided in this embodiment controls the self-moving device to rotate in place and updates the current pose based on environmental perception data. When the positioning error exceeds the first preset threshold but does not exceed the first preset threshold, the current pose can be corrected based on environmental perception data during the rotation process without relying on historical keyframes. This ensures that large-scale movement is reduced when the error is small, thus balancing optimization effect and execution efficiency.
[0116] Step S3023: When the current positioning error is greater than the third preset threshold, the third positioning optimization strategy among multiple positioning optimization strategies is determined as the target positioning optimization strategy, wherein the first preset threshold is greater than the second preset threshold, and the third preset threshold is greater than the first preset threshold.
[0117] It should be noted that the third positioning optimization strategy is triggered when the current positioning error is greater than the third preset threshold, or when the current positioning error still has not been reduced to an acceptable error range after positioning optimization according to the first positioning optimization strategy.
[0118] Specifically, step S3023 includes: Step c1: Search for historical keyframe locations within a second preset region centered on the current location, wherein the search radius of the second preset region is greater than that of the first preset region; It should be noted that the purpose of searching for historical keyframe locations within the second preset area centered on the current location is to expand the keyframe search range when the error is large, so as to find the target keyframe that reduces the positioning error to an acceptable range.
[0119] For example, the search radius in the first preset area is 2 meters, and the search radius in the second preset area is 5 meters.
[0120] Step c2: When the positioning optimization strategy is determined to be the third positioning optimization strategy, or when no key frame position is found in the first preset area, or when the current positioning error is still greater than the preset acceptable threshold after positioning correction is completed based on the target key frame position in the first preset area, the third optimization strategy is executed.
[0121] The positioning error optimization method provided in this embodiment includes a third positioning optimization strategy, which involves retrieving historical keyframe locations within a second preset region centered on the current location. This third positioning optimization strategy is implemented when the positioning error exceeds a third preset threshold, no keyframe is retrieved within the first preset region, or the positioning error still exceeds a preset acceptable threshold after positioning error correction based on the target keyframe location within the first preset region. This achieves progressive positioning optimization, providing a wider coverage and stronger correction capability when the first two positioning optimization strategies are not thorough enough. Together with the first and second positioning optimization strategies, it forms a progressive correction from local to global and from lightweight to powerful, ensuring that each level of positioning error has an optimization strategy that matches its error magnitude.
[0122] The positioning error optimization method provided in this embodiment sets a first preset threshold, a second preset threshold, and a third preset threshold, wherein the first preset threshold is greater than the second preset threshold, and the third preset threshold is greater than the first preset threshold. Based on the comparison results of the current positioning error with multiple preset thresholds, a first positioning optimization strategy is determined when the current positioning error is greater than the first preset threshold, a second positioning optimization strategy is determined when the current positioning error is greater than the second preset threshold but does not exceed the first preset threshold, and a third positioning optimization strategy is determined when the current positioning error is greater than the third preset threshold. By matching differentiated positioning optimization strategies to positioning errors in different ranges, targeted correction of errors of varying degrees from small to large is achieved. When the error is small, excessive intervention is avoided, and when the error is large, corresponding and efficient optimization methods are adopted in a timely manner. Thus, while ensuring operational efficiency, positioning errors are effectively optimized, and excessive error accumulation is avoided, improving the timeliness and effectiveness of positioning optimization.
[0123] Step S303: Control the self-moving device to execute a target positioning optimization strategy to correct positioning errors. For details, please refer to [link to relevant documentation]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.
[0124] The positioning error optimization method provided in this embodiment first determines the current positioning error during the movement of the self-moving device towards the target location, compares the positioning error with multiple preset thresholds, selects a target positioning optimization strategy from the positioning optimization strategies based on the comparison results, and then controls the self-moving device to execute the determined target positioning optimization strategy to correct the positioning error. This achieves dynamic matching of different optimization strategies according to the magnitude of the positioning error, realizes progressive and hierarchical error correction, avoids the limitations of a single strategy, and thus can take the most appropriate positioning error optimization measures at different error stages, promptly handle the positioning error generated during the movement, avoid the continuous accumulation of positioning error, and improve navigation accuracy and operational coverage quality.
[0125] Step S304: When no historical keyframe location is found, control the self-moving device to perform exploratory movement within a third preset range centered on the current location and with a radius not exceeding the preset exploration radius, until a keyframe location is searched within the third preset range. The exploration radius of the third preset range is greater than the search radius of the first preset range and less than the exploration radius of the second preset region.
[0126] It should be noted that the exploration radius of the third preset range is 3 meters. The overall movement direction remains roughly consistent with the navigation direction. During exploratory movement, once a usable keyframe is discovered, the system immediately switches to the step of determining an optimization strategy based on the magnitude of the positioning error, and optimizes the positioning error according to the current positioning error.
[0127] The positioning error optimization method provided in this embodiment expands the search coverage to increase the success rate of key frame retrieval by performing active exploration within a third preset range when no historical key frames are retrieved, thereby improving the environmental adaptability of the progressive optimization strategy.
[0128] Specifically, step S304 includes: Step d1: Travel a first distance straight along the current orientation, rotate around its own vertical axis by an angle, and then travel a second distance straight along the rotated orientation; wherein, the absolute value of the rotation angle does not exceed the preset upper limit angle of rotation, and the angle between the displacement direction of the position at the end of the exploration relative to the current position and the current navigation direction does not exceed the preset direction tolerance angle.
[0129] The positioning error optimization method provided in this embodiment actively searches for keyframes over a larger range by controlling the self-moving device to move straight along the current direction, rotate around its own vertical axis, and then move straight along the direction after rotation. During operation, the rotation amplitude and navigation direction are constrained to keep the exploration path within a reasonable range of the current navigation direction. This effectively increases the probability of keyframe discovery while maintaining the continuity between the navigation direction and the operation path, thereby improving the motion efficiency of the exploration process and the smoothness of the operation connection after correction.
[0130] Step S305: Obtain the job stage and / or job environment of the mobile device in the current task; For example, using a lawnmower as an example, the operation stages include a fine mowing stage and a rapid covering stage; the operation environment includes lawns or other complex terrain environments.
[0131] Step S306: Determine the first preset threshold, the second preset threshold, and / or the third preset threshold based on the work stage and / or the work environment.
[0132] For example, taking a lawnmower as an example, a lower error threshold is used in the fine mowing stage to meet the requirements of high-precision operation; in the rapid covering stage, a moderate error threshold is used to balance operation efficiency and positioning accuracy.
[0133] Under good lighting conditions, a lower error threshold is used to fully utilize high positioning accuracy; under poor lighting conditions, the error threshold is appropriately increased to avoid frequent invalid optimizations caused by environmental interference; in complex terrain environments, the threshold is dynamically adjusted according to the complexity of the terrain to optimize positioning accuracy while ensuring safety.
[0134] The positioning error optimization method provided in this embodiment dynamically adjusts the first, second, and third preset thresholds of positioning error based on the current operation stage and / or operation environment of the self-moving device. This adapts the positioning error judgment standard to the specific task scenario. In operation stages with high accuracy requirements or complex environments, a stricter positioning error judgment standard is adopted, while in operation stages with low accuracy requirements or relatively simple environments, the positioning error judgment standard is appropriately relaxed. This optimizes the positioning error while ensuring the quality of the operation, and improves the scene adaptability of the progressive optimization strategy and the overall operating efficiency of the self-moving device.
[0135] Step S307: Continuously acquire the current positioning error; It should be noted that in this embodiment, the current positioning error is continuously acquired during the execution of the task or during the execution of the target positioning optimization strategy.
[0136] Step S308: When the current positioning error is less than the second preset threshold, stop moving to the target keyframe position or rotate in place at the current position, and resume the task of moving to the target position.
[0137] It should be noted that if the current positioning error is less than the second preset threshold, it means that the positioning error has been reduced to an acceptable error range, and at this point, the target optimization strategy will be stopped.
[0138] The positioning error optimization method provided in this embodiment continuously monitors the current positioning error during the movement to the target key frame position or rotation in place, and terminates the correction action and resumes the task of moving to the target position in a timely manner when the positioning error drops below the second preset threshold. This avoids over-correction causing invalid movement or operation interruption, and improves the accuracy of correction duration control and the continuity of task execution.
[0139] Step S309: Start the timer; The timer is used to optimize the timing for control errors.
[0140] Step S3010: When the timer reaches the preset time threshold and the current positioning error is still greater than the preset acceptable threshold, stop moving to the target key frame position and resume the task of moving to the target position. For example, the preset time threshold is 30 seconds.
[0141] Alternatively, in step S3011, when the timer reaches the preset time threshold and the current positioning error is still greater than the preset acceptable threshold, stop rotating in place at the current position and resume the task of moving to the target position.
[0142] The positioning error optimization method provided in this embodiment starts a timer when moving towards the target key frame position or rotating in place, and stops the correction action in time and resumes the task of moving towards the target position when the positioning error has not dropped to an acceptable range after reaching a preset time threshold. This avoids the positioning error from continuously increasing due to excessive time consumption or correction failure, which affects the efficiency of operation and improves the timeliness of the progressive optimization strategy.
[0143] Combination Figure 4 and Figure 5 The above-described positioning error optimization method illustrates an application embodiment of this example. For instance, Figure 4 This is a flowchart illustrating the derivation of the positioning error optimization method in this embodiment; Figure 5 The system architecture diagram of the positioning error optimization method in this embodiment includes an input module, a positioning error monitoring and evaluation module, a local keyframe management module, a path planning and motion control module, and an output module.
[0144] The input module is used to input environmental data and task data, such as lawn mowing tasks.
[0145] The positioning error monitoring and evaluation module includes: The real-time error calculation unit calculates the current positioning error through multi-sensor fusion. The task accuracy matching unit determines the error threshold based on the current task type. The error hierarchical classification unit divides errors into multiple levels, corresponding to different optimization strategies; The local keyframe management module includes: The local search unit searches for available keyframes within a small area near the current location. The orientation consistency sorting unit sorts keyframes according to their consistency with the task orientation; The confidence assessment unit combines directional consistency and matching confidence scores. The path planning and motion control module includes: Optimize the motion planning unit, plan an optimized path that coordinates with the task direction, and generate specific motion instructions; The safety constraint management unit ensures that optimized movements are within a safe range. The Timeout and Recovery Management Unit allows you to set optimized time limits and safely recover tasks after a timeout.
[0146] The output module is used to output motion control commands to drive the self-moving device to move.
[0147] For details on the positioning error optimization method, please refer to the above method embodiments.
[0148] Figure 6 This is a schematic diagram of the structure of a controller for a self-moving device provided in an embodiment of the present invention.
[0149] The following is a detailed reference. Figure 6 The diagram illustrates a structural schematic suitable for implementing a controller in an embodiment of the present invention. The controller may include a processor (e.g., a central processing unit, graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from memory 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for controller operation. The processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0150] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows the controller to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 A controller with various devices is shown, but it should be understood that it is not required to implement or have all of the devices shown, and may alternatively implement or have more or fewer devices.
[0151] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a memory 608, or installed from a ROM 602. When the computer program is executed by the processor 601, it performs the functions defined in the positioning error optimization method of the embodiments of the present invention.
[0152] Figure 6 The controller shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0153] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded via a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the positioning error optimization method shown in the above embodiments is implemented.
[0154] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0155] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A positioning error optimization method, characterized in that, The method includes: During the process of the self-moving device moving towards the target location, the current positioning error is determined; Based on the comparison results between the current positioning error and multiple preset thresholds, a target positioning optimization strategy is determined from multiple positioning optimization strategies; The self-moving device is controlled to execute the target positioning optimization strategy to correct positioning errors.
2. The method according to claim 1, characterized in that, The plurality of preset thresholds includes a first preset threshold, a second preset threshold, and a third preset threshold. The step of determining the target positioning optimization strategy from multiple positioning optimization strategies based on the comparison result between the current positioning error and the plurality of preset thresholds includes: When the current positioning error is greater than the first preset threshold, the first positioning optimization strategy among multiple positioning optimization strategies is determined as the target positioning optimization strategy; When the current positioning error is greater than the second preset threshold but not more than the first preset threshold, the second positioning optimization strategy among the multiple positioning optimization strategies is determined as the target positioning optimization strategy. When the current positioning error is greater than a third preset threshold, the third positioning optimization strategy among multiple positioning optimization strategies is determined as the target positioning optimization strategy, wherein the first preset threshold is greater than the second preset threshold, and the third preset threshold is greater than the first preset threshold.
3. The method according to claim 2, characterized in that, The first positioning optimization strategy includes: Search for keyframe locations within a first preset range of the current location; When the keyframe location is found, select the target keyframe location from the keyframe locations; The self-moving device is controlled to move towards the target keyframe position to correct the positioning error.
4. The method according to claim 3, characterized in that, The step of searching for keyframe locations within a first preset range at the current location includes: Continuously acquire the current location frame as the mobile device moves; The current positioning frame is matched with the map based on the map in the pre-built map keyframe database; If a match is found, the location of the keyframe is determined.
5. The method according to claim 4, characterized in that, Selecting the target keyframe location from the keyframe locations includes: Determine the current navigation direction of the self-moving device; Based on the consistency between the keyframe position and the current navigation direction, a target keyframe position is selected from the keyframe positions.
6. The method according to claim 5, characterized in that, Determining the target keyframe position based on the consistency between the keyframe position and the current navigation direction includes: Calculate the matching confidence between the current environmental observation data and the historical environmental features stored at each keyframe location; Determine the consistency between the position of each keyframe and the current navigation direction; Based on the matching confidence and the consistency, the target keyframe position is determined from the keyframe positions.
7. The method according to claim 2, characterized in that, The second positioning optimization strategy includes: The self-moving device is controlled to rotate in place at the current position, and the current pose is updated based on the environmental perception data acquired during the rotation, so as to reduce the positioning error.
8. The method according to claim 3, characterized in that, The search for keyframe locations within a first preset range at the current location includes: When the positioning optimization strategy is determined to be the first positioning optimization strategy, or when the positioning error is still greater than the second preset threshold after executing the second positioning optimization strategy, the key frame position is searched within the first preset area centered on the current position.
9. The method according to claim 2, characterized in that, The third positioning optimization strategy includes: Search for historical keyframe locations within a second preset region centered on the current location, wherein the search radius of the second preset region is greater than the search radius of the first preset region; When the positioning optimization strategy is determined to be the third positioning optimization strategy, or when the key frame position is not found in the first preset area, or when the current positioning error is still greater than the preset acceptable threshold after positioning correction is completed based on the target key frame position in the first preset area, the third positioning optimization strategy is executed.
10. The method according to claim 5, characterized in that, Determining the consistency between the position of each keyframe and the current navigation direction includes: When retrieving key frame locations based on the first preset region, the orientation deviation between the orientation associated with each key frame location and the current navigation direction is calculated, and key frame locations with orientation deviations less than the first preset angle threshold are determined to satisfy orientation consistency. When retrieving keyframe locations based on the second preset region, a consistency score is calculated based on the directional deviation between the orientation associated with each keyframe location and the current navigation direction, as well as the distance from the keyframe location to the current location.
11. The method according to claim 1, characterized in that, The method further includes: When no historical keyframe location is found, the self-moving device is controlled to perform exploratory movement within a third preset range centered on the current location and with a radius not exceeding a preset exploration radius, until the keyframe location is searched within the third preset range. The exploration radius of the third preset range is greater than the search radius of the first preset range and less than the exploration radius of the second preset region.
12. The method according to claim 11, characterized in that, The exploratory sports include: Travel a first distance straight along the current direction, rotate around its own vertical axis by an angle, and then travel a second distance straight along the rotated direction; wherein the absolute value of the rotation angle does not exceed a preset upper limit angle, and the angle between the displacement direction of the position at the end of the exploration relative to the current position and the current navigation direction does not exceed a preset direction tolerance angle.
13. The method according to claim 5, characterized in that, The method further includes: Obtain the job stage and / or job environment of the self-moving device in the current task; The first preset threshold, the second preset threshold, and / or the third preset threshold are determined based on the work stage and / or work environment.
14. The method according to claim 4, characterized in that, After controlling the self-moving device to move towards the target keyframe position, or to rotate in place at the current position, the method further includes: Continuously acquire the current positioning error; When the current positioning error is less than the second preset threshold, stop moving towards the target keyframe position or rotate in place at the current position, and resume the task of moving towards the target position.
15. The method according to claim 4, characterized in that, After controlling the self-moving device to move towards the target keyframe position, the method further includes: Start the timer; When the timer reaches a preset time threshold and the current positioning error is still greater than a preset acceptable threshold, the movement to the target keyframe position is stopped, and the task of moving to the target position is resumed. Alternatively, after rotating in place from the current position, the method may also include: Start the timer; When the timer reaches a preset time threshold and the current positioning error is still greater than a preset acceptable threshold, the rotation at the current position is stopped, and the task of moving to the target position is resumed.
16. A self-moving device, characterized in that, The self-moving device includes: a controller, the controller comprising: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 15.
17. The self-moving device according to claim 16, characterized in that, The self-moving device is a lawnmower.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the method of any one of claims 1 to 15.