Mowing robot operation map denoising method and mowing robot

CN123015312APending Publication Date: 2026-10-30QINGTING INTELLIGENT TECHNOLOGY (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610863660.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]基于此,有必要针对现有技术无法有效消除作业地图的边界毛刺的技术问题,提出了一种割草机器人作业地图去噪方法

Benefits of technology

[0010]本申请通过将结构元素尺寸与割草机器人最小通行宽度相关联,以机器人自身通过能力作为边界毛刺滤除的依据。腐蚀操作仅剔除宽度小于最小通行宽度的毛刺与细碎区域,膨胀操作则将被收缩的通行区域主体轮廓精确复原,而已滤除的毛刺不会再生。本方法从物理层面建立去噪标准,有助于避免传统平滑算法依赖经验参数导致的消除不足或消除过度问题,可以兼顾作业安全与草坪覆盖完整性,同时为机器人提供平滑连续的作业边界。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015312A_ABST
    Figure CN123015312A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of garden robots, and discloses a lawn mowing robot operation map denoising method and a lawn mowing robot. The method comprises the following steps: acquiring a global grid map of an operation area, performing binaryzation processing on the global grid map, and obtaining a binaryzation map characterized by a first color region representing a passable region and a second color region representing a forbidden region; and performing a sequence of an erosion operation followed by a dilation operation on the first color region by using a preset first structure element, wherein the size of the first structure element is set based on the minimum passable width of the lawn mowing robot. The method takes the through capacity of the robot itself as the basis for filtering out boundary burrs, the erosion operation only removes burrs and fine regions with a width less than the minimum passable width, and the dilation operation accurately restores the main contour of the passable region, so that the removed burrs cannot be regenerated, thereby helping to eliminate the boundary noise of the operation map, and ensuring the operation safety and the lawn coverage rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of garden robot technology, and in particular to a method for denoising the working map of a lawn mowing robot and a lawn mowing robot. Background Technology

[0002] Before performing autonomous operations, lawnmower robots need to create a map of the work area to distinguish between accessible and inaccessible restricted areas. This map serves as the basis for subsequent path planning and boundary operations.

[0003] In practical applications, due to environmental factors, sensor accuracy, and the performance of recognition algorithms, the boundaries of traversable areas in the constructed map often contain irregular noise spikes. If these boundary noises are used directly for operational navigation, they will cause the lawnmower robot to stumble and may lead to operational safety issues such as collisions or missed mowing.

[0004] A common approach to addressing these boundary burrs is to smooth the map. However, existing smoothing methods struggle to balance noise removal with boundary contour fidelity. Insufficient smoothing can lead to residual noise causing the robot to mistakenly enter restricted areas; excessive smoothing can result in the incorrect reduction of passable areas, causing missed mowing. Therefore, effectively eliminating boundary burrs in the lawnmower robot's operational map is a pressing technical challenge. Summary of the Invention

[0005] Based on this, it is necessary to address the technical problem that existing technologies cannot effectively eliminate boundary burrs on the operation map, and propose a noise reduction method for lawnmower operation maps.

[0006] Firstly, a method for denoising a lawnmower robot's operational map is provided, the method comprising: Get the global raster map of the work area; The global raster map is binarized to obtain a binarized map, wherein the binarized map includes a first color region for representing the passable area and a second color region for representing the restricted area; Using a preset first structural element, an erosion operation is performed on the first color region in the binarized map to obtain an eroded map; wherein, the size of the first structural element is set based on the minimum passage width of the lawnmower robot; Using the first structuring element, a dilation operation is performed on the first color region in the eroded map to obtain a denoised map.

[0007] Secondly, a noise reduction device for lawnmower robot operation maps is provided, the device comprising: The acquisition module is used to acquire the global raster map of the work area; The conversion module is used to perform binarization processing on the global raster map to obtain a binarized map, wherein the binarized map includes a first color region for representing the passable area and a second color region for representing the restricted area; The erosion module is used to perform an erosion operation on a first color region in the binarized map using a preset first structural element to obtain an eroded map; wherein the size of the first structural element is set based on the minimum passage width of the lawnmower robot. The dilation module is used to perform a dilation operation on the first color region in the eroded map using the first structural element to obtain a denoised map.

[0008] Thirdly, a lawnmower robot is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned lawnmower robot operation map denoising method.

[0009] Fourthly, a computer storage medium is provided, which stores a computer program that, when executed by a processor, implements the above-mentioned method for denoising the lawnmower robot's work map.

[0010] This application correlates the size of structural elements with the minimum passage width of the lawnmower robot, using the robot's own passage capability as the basis for boundary burr filtering. The erosion operation only removes burrs and small fragmented areas with a width smaller than the minimum passage width, while the dilation operation accurately restores the main outline of the contracted passage area, and filtered burrs do not regenerate. This method establishes a denoising standard at the physical level, helping to avoid the problems of insufficient or excessive denoising caused by traditional smoothing algorithms relying on empirical parameters. It can balance operational safety and lawn cover integrity, while providing the robot with a smooth and continuous working boundary. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] in: Figure 1 This is an application environment diagram of a lawnmower robot operation map denoising method in one embodiment; Figure 2 This is a flowchart illustrating a method for denoising a lawnmower robot's work map in one embodiment; Figure 3AThis is a schematic diagram of a binarized map in one embodiment; Figure 3B This is a schematic diagram of a denoised map in one embodiment; Figure 3C This is a schematic diagram of the repaired map in one embodiment; Figure 3D This is a schematic diagram of a zoomed-out map in one embodiment; Figure 4 This is a structural block diagram of a lawnmower robot operation map denoising device in one embodiment; Figure 5 This is a structural block diagram of a lawnmower robot in one embodiment. Detailed Implementation

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

[0014] Figure 1 This is a schematic diagram illustrating an application scenario of an intelligent lawnmower provided in an embodiment of this application. For example... Figure 1 As shown, this application scenario can be applied to places such as family courtyards or public green spaces where lawn mowing is required. The lawn mowing robot 1 is equipped with a lidar 11 and a vision sensor 12. The base station 2 is set at the boundary of the work area or a preset docking position. The lawn mowing robot 1 can automatically return to the base station 2 for charging or docking when it completes its work or when its battery level is lower than a preset threshold.

[0015] Before performing its work, the lawnmower 1 collects environmental data of the work area using a LiDAR 11 and a vision sensor 12, obtaining a global grid map of the work area. This global grid map is then binarized to obtain a binarized map, which includes a first color region representing traversable areas and a second color region representing restricted areas. After obtaining the binarized map, a preset first structuring element is used to perform an erosion operation on the first color region of the binarized map, resulting in an eroded map; the size of the first structuring element is set based on the minimum traversable width of the lawnmower 1. The processor then uses this first structuring element to perform a dilation operation on the first color region of the eroded map, obtaining a denoised map. The lawnmower 1 uses this denoised map as the basis for subsequent path planning and edge-fitting operations.

[0016] Please see Figure 2 As shown, Figure 2A flowchart illustrating the denoising method based on a lawnmower robot's work map provided in this application embodiment includes the following steps: S1. Obtain the global raster map of the work area.

[0017] The work area refers to the physical space range that the lawnmower robot needs to cover for its current mapping task; it is the target area where the robot performs lawn mowing. The global grid map is a discretized spatial representation model established within the work area. The global grid map is a two-dimensional grid matrix composed of numerous closely arranged square grid cells of equal size. Each grid cell corresponds to a small, fixed area of ​​the actual physical location within the work area. Each grid cell stores an identifier value to record whether the location belongs to a passable or restricted area.

[0018] S2. Perform binarization on the global raster map to obtain a binarized map.

[0019] The binarized map includes a first-color region representing accessible areas and a second-color region representing restricted areas. The global raster map generated in S1 is further binarized to eliminate intermediate grayscale values ​​that may arise due to sensor noise or differences in model confidence, generating a normalized image composed only of two solid-color regions. The process involves traversing each raster cell in the global raster map one by one and reading its stored identifier value. When the read identifier value equals a set value representing an accessible area, such as 255, the raster position is assigned the first color in the binarized map; when the read identifier value equals a set value representing a restricted area, such as 0, the raster position is assigned the second color.

[0020] For example, see Figure 3A As shown, Figure 3A This is a schematic diagram of the binarized map provided in this application embodiment. Starting from the top left corner of the matrix, row 0, column 0, the raster values ​​in the global raster map are read one by one. When the value read is 255 at row 50, column 100, this position is colored white in the binarized map, with white as the first color. When the value read is 0 at row 51, column 100, this position is colored black, with black as the second color. After traversing 200 rows and 150 columns, totaling 30,000 units, the binarized map appears as an image with only pure white and pure black. The white part completely represents the lawn work area, and the black part represents all non-work areas and the area outside the boundary.

[0021] S3. Using the preset first structural element, perform an erosion operation on the first color region in the binarized map to obtain the eroded map.

[0022] The size of the first structural element is based on the minimum passage width of the lawnmower robot. The first structural element is a geometric template with a specific size and shape, its size correlated with the minimum passage width of the lawnmower robot to ensure that subsequent processing reflects the robot's physical passage capability. The shape of the structural element is typically circular or square, with its radius or half-side length set to be no less than half the minimum passage width of the robot. This structural element is used as a sliding window, scanning row by row and column by column on the binarized map, with the center of the structural element sequentially aligned with each grid cell. For each alignment, all grid cells within the coverage area of ​​the structural element are checked. If any grid cell within the coverage area is a second-color region, the grid cell whose center is aligned is removed from the first-color region, meaning that the center position is assigned the second color in the new map; only when all grid cells within the coverage area are the first color will the center position remain the first color in the new map. After traversing the entire map in this way, the boundary between the first-color region and the second-color region will shrink uniformly inwards into the first-color region, the shrinkage being equal to the radius of the structural element. As a result, narrow protrusions, burrs, and isolated, fragmented patches of the first color that were originally smaller than the diameter of the structuring element on the boundary will be transformed into second-color areas because these locations cannot fully accommodate the entire range of the structuring element. In the eroded map output by the erosion operation, the area of ​​the first-color region is reduced, but the shape and structure of the main body are preserved.

[0023] In one example, assuming the lawnmower robot's chassis width is 0.4 meters and its minimum passage width is also 0.4 meters, the preset first structural element can be a circular area with a radius of 0.2 meters. Converted to a grid resolution of 0.1 meters per cell, the structural element is equivalent to a circular area with a radius of 2 grid units. Scanning this circular area grid by grid in a binary map, when the center of the area falls on a white protrusion formed by tiny green weed blades protruding from the lawn, the area's coverage easily extends into the surrounding black restricted area, so the white protruding grid is turned black. Conversely, when the center of the area is in the center of a wide lawn, the entire coverage area is white, so the center remains white. Through erosion, all jagged edges and burrs with a radius less than 2 grid units on the lawn boundary are eliminated, and the lawn area as a whole shrinks uniformly inward by a small circle.

[0024] It should be noted that the erosion operation on the first color region in step S2 is morphologically equivalent to the dilation operation on the second color region.

[0025] The two methods produce the same result: if the location of the first structuring element covers any area of ​​the second color, the first color at the anchor point of the structuring element is removed and replaced with the second color, thus achieving the geometric effect of the second-color area expanding outward and the first-color area contracting inward. The two methods differ only in their descriptive perspective: one contracts the passable area, and the other expands the restricted area, but the resulting eroded map is completely identical.

[0026] S4. Using the first structuring element, perform a dilation operation on the first color region in the eroded map to obtain the denoised map.

[0027] Continuing with the same first structuring element as in S3, perform a dilation operation on the first-color region in the eroded map. The operation involves using the first structuring element as a sliding window to scan the eroded map grid by grid. For each alignment, check if at least one grid of the first-color region exists within the structuring element's coverage area. If so, assign the first color to the grid corresponding to the center of the structuring element in the new map; only assign the second color to the center location if all grids within the coverage area are the second color. This process causes the boundary of the first-color region to expand outwards, with the expansion magnitude perfectly matching the contraction magnitude of the previous erosion operation, i.e., equal to the radius of the structuring element. The direct effect of the dilation operation is that the main outline of the passageway, which had previously shrunk inwards due to erosion, is accurately restored to its original size and geometry before erosion. However, boundary burrs and fragmented areas that were completely eliminated during the erosion step cannot be restored by the dilation operation because no trace of the first color remains in the eroded map. In the final denoised map, the outline of the passable area is continuous and smooth, the original pseudo-protrusions and jagged noise disappear, and the shape and area of ​​the large passable area remain unchanged compared with the original binarized map.

[0028] See Figure 3B As shown, Figure 3B This is a schematic diagram of a denoised map provided in an embodiment of this application. The eroded map is scanned using a circular area with the same radius of 2 grids. The eroded lawn area shrinks uniformly by a small circle, its boundaries become smoother, but its overall size decreases. When the center of the area is near a grid that remains white after erosion, the coverage area includes the white grid, and the center is set to white; when the center of the area is on a previously eroded boundary grid, but its coverage area touches the shrunken white area, the center is also set to white. After processing, the boundary of the lawn area expands outward back to its original position, but the raised burrs with a width of less than 4 grids that completely disappeared during erosion cannot trigger white restoration, resulting in the final image... Figure 3BAs shown in the denoised map, the lawn boundary retains the true outline of the original wide area, while the jagged noise is removed, and the boundary presents a smooth curve that highly matches the edge of the real lawn.

[0029] It should be noted that step S4 is equivalent to using a preset first structuring element to perform an erosion operation on the second color region in the eroded map, resulting in a denoised map.

[0030] The two methods yield the same result: using the first structuring element as a sliding window to traverse the eroded map, any raster in the first-color region within the structuring element's coverage area is assigned the first color. Conversely, the anchor point is only retained as the second color if all raster within the structuring element's coverage area is the second color; otherwise, it is replaced by the first color. This process causes the boundaries of the second-color regions to shrink inwards and the boundaries of the first-color regions to expand outwards. Since the first structuring element radius is the same for both expansion and erosion, the main outline of the first-color region is accurately restored to its original size before erosion. Boundary burrs and fragmented areas eliminated in step S3 are absent from the eroded map due to the absence of traces of the first color. The only difference between the two methods is the descriptive perspective: one involves the expansion and restoration of passable areas, while the other involves the contraction and erosion of restricted areas. However, the final denoised maps are completely identical.

[0031] In one possible implementation, the radius of the first structural element is greater than or equal to a preset proportion of the minimum passage width of the lawnmower robot.

[0032] The minimum passage width refers to the narrowest path that the lawnmower robot can stably pass through without collision or obstruction. This parameter is determined by the robot's physical parameters, such as chassis width, drive wheel track, or maximum overall dimensions. After obtaining this minimum passage width value, it is multiplied by a preset ratio, and the resulting product is the lower limit of the radius of the first structural element.

[0033] In one embodiment, the preset ratio is one-half. That is, the radius of the first structural element is equal to half the minimum passage width, such that the diameter of the first structural element is exactly equal to the minimum passage width. Under this condition, the erosion operation will only eliminate boundary protrusions and fragmented passage areas with a width smaller than the minimum passage width, because these areas cannot completely accommodate the structural element with a diameter equal to the minimum passage width; while the main body of the passage area with a width equal to or greater than the minimum passage width will be completely preserved, because they can completely accommodate the entire range of the structural element. This setting establishes a one-to-one correspondence between the size of the structural element and the robot's throughput capability, so that the threshold for burr removal is entirely defined by the robot's physical throughput capability, without relying on empirical smoothing parameters.

[0034] In practice, the preset ratio can be adjusted to a value greater than half according to actual needs. For example, when the accuracy of boundary recognition fluctuates due to millimeter-level measurement errors in the sensor or mechanical vibration, appropriately increasing the preset ratio can increase the tolerance margin for burr elimination. However, the preset ratio should not be less than half; otherwise, the diameter of the structural element will be smaller than the minimum passage width, causing some narrow areas that the robot cannot actually pass through to be judged as passage areas and not eliminated by erosion, resulting in incomplete boundary denoising.

[0035] In one possible embodiment, the geometry of the first structural element may be either a circle or a square.

[0036] When a circular structural element is selected, it is represented on a 2D raster map as a circular neighborhood centered on the anchor grid with a preset radius. All grids covered within this circular neighborhood participate in morphological calculations. The advantage of the circular structural element lies in its isotropy, meaning its range of action is completely consistent in all directions, and it will not produce differentiated processing effects due to changes in map boundary orientation. It is suitable for lawn operation areas with complex boundary curvature variations.

[0037] When a square structuring element is selected, it is represented on a 2D raster map as a square neighborhood centered on the anchor grid with a side length twice the preset radius. The advantage of the square structuring element is its high computational efficiency. Its coverage area is naturally aligned with the row and column directions of the raster matrix, and the coverage area can be quickly determined by addressing entire rows and columns when traversing the raster. The computational cost is lower than that of the circular structuring element.

[0038] In one possible embodiment, the minimum passage width of the lawnmower robot is determined based on the chassis width or the wheel track of the drive wheels.

[0039] The minimum passage width of a lawnmower robot refers to the width of the narrowest passage that the robot can stably pass through without collision or obstruction. Its size is determined by the physical dimensions of the lawnmower robot itself.

[0040] Specifically, the minimum passage width is determined based on either the chassis width or the track width of the drive wheels of the lawnmower robot. The chassis width refers to the maximum outer dimension of the lawnmower robot's chassis body perpendicular to the direction of travel, taken as the horizontal distance between the outermost edges of the left and right sides of the chassis. The drive wheel track width refers to the horizontal distance between the center planes of the left and right drive wheels of the lawnmower robot. Either the chassis width or the drive wheel track width can be directly used as the minimum passage width.

[0041] In practical applications, the key factor limiting the passage capability of lawnmower robots through narrow passages is the physical dimension of their widest point. The larger of the chassis width and the drive wheel track is taken as the minimum passage width. If there are auxiliary structures on both sides of the chassis extending beyond the drive wheels, the chassis width is greater than the drive wheel track, and in this case, the chassis width should be used as the standard. If the drive wheels are the widest part of the robot and their track width is greater than the width of the chassis body, then the drive wheel track should be used. In some implementations, a preset safety margin can be added to the chassis width or drive wheel track, for example, by adding a fixed offset value or multiplying by a safety factor greater than 1, to compensate for the impact of sensor measurement errors or slight shaking during robot operation on passage capability. The result is the final minimum passage width.

[0042] This embodiment establishes a physical quantitative correlation between the size of the structural elements used for burr filtering and the robot's actual mobility, ensuring that the boundary protrusions and fragmented areas eliminated during the noise reduction process are precisely the areas that the robot cannot actually enter due to its own size limitations, thereby reducing the possibility of missed or over-elimination from a physical perspective.

[0043] In one possible embodiment of this application, after obtaining the denoised map, the method further includes: S5. Using the first structuring element, perform a dilation operation on the first color region in the denoised map to obtain the dilated map.

[0044] After obtaining the denoised map through step S4, the connectivity restoration phase begins. The first step in this phase is to perform a dilation operation on the first-color region in the denoised map. The same first structural element used in the previous erosion and dilation operations is continued. The radius of this structural element is still determined by the minimum passage width of the lawnmower robot, and its shape and size remain unchanged throughout the cascaded processing from S3 to S6. During the operation, the first structural element is used as a sliding window to scan the denoised map grid by grid. For each alignment, it is checked whether the entire grid covered by the structural element contains at least one grid of the first-color region. If it does, the grid corresponding to the anchor point of the structural element is assigned the first color in the new map; the anchor grid is only assigned the second color if all grids within the coverage area are the second color. This determination logic is completely consistent with the dilation operation in S4. After traversing the entire denoised map, the boundary of the first-color region expands outward by a radius equal to the radius of the first structural element. The direct effect of this operation is to reconnect two first-color region segments that were severed in the S3 erosion step but whose distance from each other is less than the diameter of the structuring element. The original narrow channel break is reconnected as both sides of the break expand outward simultaneously. The output expanded map is the first-color region map where the connection break has been healed.

[0045] S6. Using the first structuring element, perform an erosion operation on the first color region in the expanded map to obtain the repaired map.

[0046] After the S5 dilation operation reconnects the broken narrow passage, the boundary of the first-color region expands outward, causing the outline size of the passage area to be slightly larger than its actual size in the denoised map. Therefore, an erosion operation is immediately performed on the first-color region in the dilated map to precisely shrink the boundary of the passage area back to its original position. This erosion operation still uses the exact same first structuring element as the S5 dilation operation, with no change in its radius or shape. During the operation, the first structuring element is used as a sliding window to scan the dilated map grid by grid. For each alignment, it checks whether any grids of the second-color region exist within the coverage area of ​​the structuring element. If so, the grid corresponding to the anchor point of that structuring element is assigned the second color in the new map; only when all grids within the coverage area are the first color is the anchor grid retained as the first color. This decision logic is completely consistent with the erosion operation in S3. After traversing the entire dilated map, the boundary of the first-color region shrinks inward by an amount equal to the radius of the first structuring element. Since S5 expansion and S6 erosion use the same structuring element, the outward expansion of expansion is exactly equal to the inward contraction of erosion. Therefore, the main outline size of the passable area in the map after S4 denoising is restored, and only the newly closed narrow channel connectivity areas in step S5 are retained. The output repaired map achieves the dual objectives of removing boundary burrs and restoring narrow channel connectivity.

[0047] See Figure 3C As shown, Figure 3C This is a schematic diagram of the repaired map provided in an embodiment of this application. Figure 3B The denoised map shown undergoes a closing operation, specifically a dilation operation on the white areas based on step S5, followed by an erosion operation on the black areas to obtain the final map. Figure 3C The purpose of performing a closing operation (dilation followed by erosion) on the repaired map is to reconnect the disconnected areas, while the outer contour of the white areas will not have a significant change in size.

[0048] It should be noted that, ideally, performing an opening operation (erosion followed by dilation) on the first structuring element based on the minimum passage width would only eliminate spikes with a width smaller than the minimum passage width, without affecting legitimate channels with sufficient width. However, in actual raster maps, due to limitations in raster resolution and the jagged effect of boundary regions, there may be a few protrusions with a width less than one raster cell at the entrance boundary of legitimate channels, causing the channel entrance to be unexpectedly closed after the opening operation. To address this connectivity problem introduced by discretization representation, a closing operation (dilation followed by erosion) is further employed for repair.

[0049] In one possible embodiment, after obtaining the repaired map, the method further includes: S7. Using the preset second structural element, perform an erosion operation on the first color area in the repaired map to obtain a scaled-down map.

[0050] After boundary denoising and connectivity restoration, morphological processing is performed, specifically an erosion operation targeting the first-colored region in the restored map, with a focus on safe shrinkage. The structural element used in this operation differs from the first structural element in the previous steps; a pre-defined second structural element is introduced. The size of this second structural element is no longer determined by the minimum passage width of the lawnmower robot, but rather by the robot's own dimensions, specifically based on the diameter of its inscribed circle or the maximum outer dimension of its body. The geometry of the second structural element can also be either circular or square, with its radius or half-side length directly corresponding to the horizontal distance from the center point to the farthest outer edge of the robot's body. The output shrunken map serves as the safe operating boundary map for the lawnmower robot.

[0051] See Figure 3D As shown, Figure 3D This is a schematic diagram of the zoomed-out map provided in the embodiments of this application.

[0052] Using the second structuring element as a sliding window, perform grid-by-grid alignment scanning. Figure 3C The repaired map is shown below. For each alignment, it checks if any grid cells within the coverage area of ​​the second structuring element contain black areas. If so, the grid cell corresponding to the anchor point of that structuring element is assigned a black value in the new map; the anchor point grid cell is only retained as white if all grid cells within the coverage area are white. This decision logic is exactly the same as the erosion operation rules in S3 and S6, the only difference being the source of the structuring element's size. After traversing the entire repaired map, the boundaries of the white areas shrink uniformly inward, with the shrinkage amount equal to the radius of the second structuring element. The output shrunken map is the safe operating boundary map for the lawnmower robot.

[0053] In one possible embodiment, after obtaining the shrinkage map, the method further includes: S8. Extract the outer contour of the first color region from the zoomed-out map to obtain the closed contour line.

[0054] After obtaining the scaled-down map, a contour extraction operation is performed to transform the regionalized representation of the first-color region in the scaled-down map into a closed vector boundary line usable by the robot navigation system. All grid cells of the scaled-down map are traversed, and the color attribute relationship between each grid cell and its neighboring grid cells is checked one by one. For a grid cell marked with the first color, if at least one of its four immediate neighbors (up, down, left, and right) is marked with the second color, then that grid cell is determined to be a boundary grid cell of the first-color region. The position coordinates of all boundary grid cells are recorded one by one according to their row and column indices in the grid matrix.

[0055] After identifying and locating all boundary grids, the coordinates of these discrete boundary grids are ordered and connected. Starting from any boundary grid, the search proceeds sequentially along its adjacent boundary grids, tracing their positions one by one in a clockwise or counterclockwise direction, forming a continuous sequence of grid coordinates. Each point in this coordinate sequence corresponds to a grid position at the boundary between the first and second color regions in the zoomed-out map. This grid coordinate sequence is then converted into the actual position coordinates in the physical world coordinate system used by the robot. The conversion relationship is calculated based on the grid resolution determined during mapping initialization and the correspondence between the map origin and the physical world.

[0056] After coordinate transformation, a continuous closed polyline composed of several ordered coordinate points is obtained. To further improve the smoothness of path planning, this polyline can be smoothed, for example, by using moving average or curve fitting to eliminate the stepped angles caused by grid aliasing, ultimately generating a smooth and continuous single-pixel closed contour line. This closed contour line is the final working boundary that the lawnmower robot can store and recall.

[0057] In one possible embodiment, obtaining a global raster map of the work area includes: S11. Establish a two-dimensional grid matrix based on the work area, and assign a prohibition flag value to all grid cells in the two-dimensional grid matrix.

[0058] After the lawnmower robot starts its mapping program, the first step is to determine the coverage area of ​​the work zone. This area can be determined by the length and width parameters pre-input by the user, by boundary data saved from the previous operation, or by estimating the farthest reachable distance perceived by the sensors after the robot rotates in place for one revolution. Based on the geometric dimensions of the work zone and the preset grid resolution, the number of rows and columns required for the two-dimensional grid matrix is ​​calculated. The grid resolution defines the actual physical side length represented by each grid cell, commonly set to 0.05 meters or 0.1 meters. The number of rows equals the length of the work zone divided by the grid resolution and rounded up, and the number of columns equals the width of the work zone divided by the grid resolution and rounded up. A storage space of the number of rows multiplied by the number of columns is allocated in memory, and each grid cell is uniformly assigned a prohibition flag value. The prohibition flag value is a pre-defined numerical value used to indicate that the grid cell is considered an impassable area by default when not detected, and is set to 0. After the assignment is completed, a two-dimensional grid matrix of fixed size is obtained, with all cells having prohibition flag values. This matrix serves as the empty base for subsequent mapping operations.

[0059] S12. Based on the environmental data collected by sensors, the passage area is identified through a semantic segmentation model.

[0060] The lawnmower robot moves within its work area and collects perception data about its surroundings. Its onboard sensors include at least one or more of a color camera and a LiDAR (Light Detection and Ranging) system. The color camera provides visible light images, while the LiDAR provides 3D point cloud distance information. It receives sensor data streams at a fixed frequency and inputs each frame of image or point cloud data into a pre-deployed semantic segmentation model. This model can employ deep learning-based network architectures such as U-Net (Convolutional Networks for Biomedical Image Segmentation) or DeepLab (Deep Convolutional Semantic Segmentation Network), and is pre-trained using image datasets labeled with categories such as grass and obstacles. During robot operation, the robot inputs the collected single-frame images into the model, which outputs a classification result indicating whether each pixel belongs to a passable area (e.g., grass) or a prohibited area (e.g., obstacles). This semantic segmentation model is trained offline and can classify every pixel in an image or every point in a point cloud, distinguishing between passable surfaces like grass and impassable obstacles such as trees, walls, paved roads, and the background. The output of the semantic segmentation model is a classification image or a point cloud set with category labels, with the same resolution as the original image. Based on the classification results, the physical locations corresponding to pixels or spatial points marked as grass areas are determined as passable areas, while other locations are determined as prohibited areas. Due to the limited field of view of a single-frame sensor, multiple frames of recognition results are continuously accumulated during the robot's movement, and the recognition results of each frame are stitched together into a unified coordinate system using the robot's real-time pose estimation to gradually cover the entire working area.

[0061] S13. Based on the identified passage area, update the value of the corresponding grid cell in the two-dimensional grid matrix to the passage identifier value to obtain a global grid map.

[0062] Based on the location of the passable area in the world coordinate system identified in step S12, it is mapped back to the two-dimensional grid matrix established in step S11. For each physical coordinate point identified as a passable area, the row and column index of the grid cell into which the point falls is calculated based on the grid resolution and the matrix origin offset. The previously stored prohibition flag value in the grid cell is rewritten as a passable flag value. The passable flag value is a preset value, different from the prohibition flag value, set to 255, used to explicitly mark the grid as a work area that the robot can enter. For areas not covered by sensors during the complete mapping process, or areas covered but identified as non-passable, their grid cells retain the prohibition flag value assigned in step S11. When the robot has completed traversing the entire work area, or when the area coverage of the built map meets the threshold requirement, data acquisition and mapping updates are terminated. At this point, the two-dimensional grid matrix contains a large number of grids assigned passable flag values ​​and grids that retain prohibition flag values; this matrix is ​​the final generated global grid map.

[0063] In one possible embodiment, the global raster map is binarized to obtain a binarized map, including: S21. Traverse each grid cell in the global grid map.

[0064] After constructing the global raster map, the first step in the binarization conversion process is to perform an ordered traversal of all raster cells in the map. Starting from a preset starting position in the 2D raster matrix, the 0th row and 0th column of the matrix are selected as the traversal starting point. The identifier value stored in each raster cell is read sequentially from left to right and from top to bottom, row by row. During the traversal, the target raster is located using a combination of row and column indices, ensuring that all raster cells are visited without omission. After the traversal is completed, the pass / no-go attribute marker for each spatial location in the global raster map is obtained.

[0065] S22. If the current grid cell's identifier value is the pass identifier value, then assign the current grid cell's color value to the first color value.

[0066] During the traversal, each read identifier value is evaluated in real time. When the read identifier value equals the preset access identifier value of 255, the corresponding position with the exact same row and column index as that grid cell is assigned the first color value in the newly created binary map. The first color value is visually defined as white, and its underlying data can correspond to a specific color value, such as pure white represented by a combination where all three components (red, green, and blue) are at their maximum values ​​in the RGB (Red-Green-Blue) color space. This assignment indicates that the physical area represented by the grid has been formally designated as a feasible region, within which the robot can perform lawn mowing operations.

[0067] S23. If the current grid cell's identifier value is a prohibited identifier value, then the color value of the current grid cell is assigned the second color value.

[0068] When the grid identifier value equals the preset no-entry identifier value of 0, the corresponding row and column position in the binary map is assigned a second color value. The second color value corresponds to black. This assignment operation marks obstacles, areas outside the boundaries, and unknown areas not covered by sensors in the original global grid map as no-entry areas, which cannot be used by the robot's task in subsequent processing.

[0069] S24. After assigning color values ​​to all grid cells, a binary map is obtained.

[0070] After traversing and assigning colors to all grid cells of the global raster map, the new map constructed in memory is the binarized map. This binarized map has the same size and number of grid cells as the original global raster map, but each grid cell no longer stores a numerical identifier for passage or prohibition; instead, it retains only one of two color values, thus forming a binary image composed of a first color region and a second color region. The first color region represents the continuous grass space available for the lawnmower robot to travel and operate, while the second color region represents all inaccessible spaces. The entire map has no transitional or mixed colors, and its boundaries are clearly defined.

[0071] In one possible embodiment, in order to improve the exploration efficiency of the work boundary in the global grid map, this application also provides a method for exploring the work area boundary, including the following steps: C1. Obtain the passable area of ​​the lawnmower robot, and reduce the boundary of the passable area by a preset distance to obtain the exploration outline.

[0072] The traversable area is the ground area within which the lawnmower robot can safely travel. The lawnmower robot first acquires the current traversable area, which is based on newly collected environmental data from the previous round of travel. This data is dynamically updated, incorporating newly discovered traversable areas to expand or modify the traversable area. After acquiring the traversable area, the lawnmower robot shrinks the boundary of that area inwards by a preset distance. This preset distance ensures that the entire robot remains within the traversable area when traveling along the exploration contour. The shrinkage operation is achieved through morphological erosion, and the outer closed boundary of the new area formed after shrinkage is the exploration contour. The exploration contour is a closed curve formed after shrinking the boundary of the traversable area inwards by a preset distance, used to guide the lawnmower robot to travel near the boundary.

[0073] C2. Extract a pre-defined length segment from the exploration outline and use it as the exploration route.

[0074] After acquiring the exploration outline, the lawnmower robot will extract a continuous line segment of preset length from the outline as the exploration path it will traverse. The preset length can be determined based on the effective sensing range of the sensors and / or the update frequency of the passable area. The exploration path refers to a continuous curved segment extracted from the exploration outline, which serves as the path the lawnmower robot will take this time.

[0075] In one possible implementation, the method for extracting the contour segment includes: calculating the Euclidean distance between the current position of the lawnmower robot and each point on the exploration contour, and identifying the closest point among all points as the extraction starting point. Then, using this starting point as a reference, a continuous contour segment with a length exactly equal to a preset length is measured along the extension direction of the exploration contour; this continuous contour segment is then determined as the exploration path segment.

[0076] For example, the lawnmower robot's current position is closest to point A on the exploration contour, at a distance of 0.5 meters, with a preset length of 2 meters. Starting from point A, a 2-meter-long curved segment is intercepted along the exploration contour in a counter-clockwise direction; this curved segment serves as the new exploration path. The preset length can be related to the effective sensing range of the sensors and the mapping update frequency. For instance, if the reliable ranging range of the LiDAR is 5 meters, the preset length can be set to 2 meters to ensure sufficient boundary information is acquired for each traverse.

[0077] In one possible implementation, the method for extracting the contour segment includes: first, determining the current direction of movement of the lawnmower robot on the exploration contour; then, finding the contour point on the exploration contour that extends along that direction and is closest to the robot's current position as the starting point; and extracting a contour segment of a preset length from this starting point along the contour path. This method prioritizes ensuring that the travel direction is consistent with the robot's current orientation, reducing unnecessary turning movements and making the overall exploration trajectory smoother.

[0078] In this method, the determination of the preset length needs to consider both the physical boundary of the sensor's sensing capability and the real-time requirements of the mapping algorithm. Specifically, it can be determined from a single factor or by combining the two factors.

[0079] When determined solely based on the effective sensing range of the sensors, the preset length should consider the reliable horizontal detection range of the environmental sensors on the lawnmower robot. The effective sensing range of a sensor refers to the minimum requirements within which the point cloud density, ranging accuracy, and noise level returned by the sensor can meet the criteria for accurate updating of the passable area. When setting the preset length for the lawnmower robot, 50% to 80% of this reliable detection range is used. This proportion ensures that during the robot's journey along the entire exploration section, the sensors can consistently and adequately sample new areas at the end and sides of the section, and there is sufficient data overlap between adjacent exploration sections for map stitching and loop closure correction. For example, if a lawnmower robot's LiDAR has a reliable detection range of 5 meters in an outdoor lawn environment, taking 60% of this distance, or 3 meters, as the preset length ensures that by the time the lawnmower has traversed this 3-meter section, its LiDAR has already repeatedly scanned the new area within the 5-meter range ahead, and the collected point cloud density is sufficient to support reliable map updates.

[0080] When determined solely based on the update frequency of traversable areas, the preset length is obtained by multiplying the lawnmower robot's current speed by the traversable area update cycle. The traversable area update frequency refers to the highest frequency at which the data processing unit completes a full calculation process from receiving raw sensor data to outputting an updated binary map; the reciprocal of the update cycle is the update frequency. The lawnmower robot first multiplies the preset update cycle by its current average speed to obtain a physical length value. This length value represents the maximum distance the robot can travel between two map updates. The preset length is set to this distance or slightly less to ensure that after each exploration segment is completed, the new map data is processed precisely, and the exploration outline and the next segment can be generated immediately, avoiding waiting delays. For example, if the lawnmower's map update frequency is twice per second, or the update cycle is 0.5 seconds, and the current average driving speed is 0.4 meters per second, then the robot will travel 0.2 meters in the interval between two update cycles. Multiplying this value by a scaling factor of 5 and taking 1 meter as the preset length, the map will have been fully updated about 5 times after traveling approximately 1 meter every 2.5 seconds. The new exploration outline has been generated, and the next segment will be issued immediately, with a tight workflow.

[0081] When the effective sensing range of the sensor and the update frequency of the passable area are jointly determined, the smaller value of the two is taken to ensure that both real-time performance and data acquisition sufficiency are satisfied. If the smaller value comes from the update frequency, the sensor's sensing range still has a margin of error and will not affect the data acquisition quality.

[0082] Furthermore, the preset length is not static during boundary exploration; the lawnmower can dynamically adjust it based on the complexity of the current boundary area. In straight boundary areas, where the sensors are unobstructed and the confidence level for updating the passable area is high, the preset length automatically increases to accelerate the exploration progress. In complex boundary areas with many curves or dense obstacles, the preset length automatically decreases to ensure that the data collection for each segment is sufficiently detailed, avoiding the omission of some boundary details due to excessively extended segments. For example, when the lawnmower is traveling along a straight wall, the preset length automatically adjusts to 2 meters for rapid advancement; after entering the edge of a flower bed with continuous curves, the preset length is dynamically reduced to 0.5 meters based on the local curvature of the map to achieve accurate following of complex contours.

[0083] In one possible implementation, the method for extracting contour segments includes: assessing the information gain or exploration value of the region corresponding to each contour segment on the explored contour. Specifically, the value score can be calculated based on factors such as the ratio of explored to unexplored areas near the contour segment, the degree of boundary ambiguity, or the probability of obstacle appearance. Then, the contour segment with the highest value score is selected as the extraction target, and the extraction length remains a preset length. This approach allows the robot to prioritize exploring the most uncertain boundary regions that require the most supplementary data.

[0084] For example, the lawnmower robot calculated that 60% of the area around the eastern section of the exploration outline was still unknown, while only 10% of the area around the southern section was unknown. The information gain score of the eastern section was significantly higher, so a 2-meter-long section of the outline on the eastern section was selected as the exploration route to be traveled next.

[0085] In one possible implementation, the method for extracting the contour segment includes: the preset length is not a fixed value, but is dynamically adjusted based on the complexity of the environment in which the lawnmower robot is currently located or the confidence level of the sensor data. When in a complex boundary with many curves and obstacles, the extraction length is automatically shortened to achieve fine following and dense acquisition; when in a simple boundary with open, straight surfaces and sparse features, the extraction length is automatically increased to accelerate the exploration speed.

[0086] For example, when the lawnmower is near the winding boundary of the garden, the preset length is automatically adjusted to 1 meter to collect data by closely approaching each curve; when it enters the edge of a straight wall, the preset length is automatically extended to 3 meters to quickly pass through areas with high repetition, thus balancing the precision and efficiency of the exploration.

[0087] C3. Control the lawnmower robot to move along the exploration route to re-explore the passable area, and return to perform the step of obtaining the passable area of ​​the lawnmower robot until the lawnmower robot returns to the initial exploration position.

[0088] The lawnmower robot translates the discovered exploration route into specific driving commands, controlling its locomotion mechanism to move smoothly along that route. During movement, sensors on the lawnmower robot continuously collect point cloud or image data of the surrounding environment and use this data to update the passable area in real time. When the lawnmower robot completes the exploration route or reaches a point where replanning is possible, it returns to step C1 to reacquire the updated passable area, generate a new exploration outline, and capture the next exploration route. This process iterates until the lawnmower robot returns to its initial exploration position.

[0089] C4. Determine the boundary of the last traversable area explored as the boundary of the lawnmower robot's work area.

[0090] When the cycle terminates, the lawnmower retains the last updated traversable area, which becomes the fully explored traversable area. Because the traversable area is contracted inwards during exploration, the exploration outline is actually an offset safety guide line, while the actual working boundary should be the natural boundary between the lawn and obstacles. Therefore, the lawnmower directly extracts the outer boundary of the traversable area obtained from the last update and defines it as the working area boundary, which accurately reflects the true edge of the lawn.

[0091] In one possible embodiment, when the lawnmower robot first arrives at the initial exploration location, the traversable area of ​​the lawnmower robot is acquired, including: C11. Control the lawnmower robot to rotate at a preset angle from the initial exploration position.

[0092] When the lawnmower robot first initiates its boundary exploration task, it will be at an initial exploration location specified by the user. This location can be an open and safe spot within the lawn. Without any environmental information, the robot first establishes an initial awareness of the passable area, most directly through in-situ rotation scanning. The robot sends a rotation command to its drive mechanism, causing it to rotate uniformly around its vertical central axis. The total rotation angle is a preset angle, which can be 360 ​​degrees, to ensure that the sensor's field of view completely covers all surrounding directions. During rotation, data from the odometer or inertial measurement unit is read in real time to monitor the rotation angle in a closed-loop manner. When the accumulated rotation angle reaches the preset angle, the rotation immediately stops.

[0093] C12. Acquire environmental data collected by the lawnmower robot during its rotation.

[0094] Throughout the lawnmower robot's stationary rotation, its onboard sensors remain operational, continuously collecting physical information about the surrounding environment at a fixed frequency. These sensors may include lidar and a vision camera. The lidar emits laser pulses and receives reflected signals to obtain the distance and angle information of surrounding objects relative to the robot, forming two-dimensional or three-dimensional point cloud data. The vision camera continuously captures environmental images, generating sparse or dense visual point clouds through image feature extraction and matching. Both types of point cloud data are timestamped and temporarily stored in memory for unified processing in subsequent steps. The sensor acquisition frequency is coordinated with the lawnmower robot's rotation speed to ensure that the collected point clouds are spatially uniformly distributed, preventing large-scale omissions.

[0095] C13. Identify passable areas based on environmental data.

[0096] After the rotation is complete, the lawnmower robot's data processing unit centrally processes all sensor data collected in step C12 to identify passable areas. The processing includes: transforming the LiDAR point cloud and visual point cloud to the same coordinate system with the lawnmower robot as the origin, and removing obvious outlier noise points. By analyzing the height information of the point cloud, points with a height below a preset threshold are identified as ground points, and the remaining points are identified as obstacles or boundaries. The space around the lawnmower robot is divided into uniform two-dimensional grid cells. Based on the ratio of ground points to obstacle points within each grid, the occupancy probability of that grid is calculated. Grids with a majority of ground points are marked as passable, while grids with a certain density of obstacle points are marked as impassable. Finally, all passable grids are connected to form a continuous region, which is the initial passable area.

[0097] In one possible embodiment, the boundary of the passable area is recessed by a preset distance to obtain an exploration outline, including: C14. Binarize the passable area to obtain a binarized image.

[0098] Initially, passable areas can be stored as a grid map, with each grid cell recording the probability or confidence level of whether it is passable or impassable. This continuous numerical representation is not conducive to subsequent morphological operations. Binarization addresses this by setting a specific classification threshold. The probability value of each grid cell is compared to the threshold. Grids with a probability value higher than or equal to the threshold are uniformly assigned the first pixel value representing passability, while grids with a probability value lower than the threshold are uniformly assigned the second pixel value representing impassability. After processing, the entire map becomes a binary image containing only two pixel values. Passable areas are clearly presented in the image as continuous regions of the first pixel value, and their outer contours represent the original boundaries of the passable areas.

[0099] C15. Set structural elements according to preset distances.

[0100] After obtaining the binarized image, the lawnmower robot needs to determine the structural element for the erosion operation based on a preset distance. In morphological image processing, the structural element is a template with a predefined shape and size. The template shape can be circular or square, and its size is directly calculated from the preset distance, which can be determined according to actual needs.

[0101] In one possible implementation, the preset distance is a safety parameter determined by the overall dimensions and kinematic profile of the lawnmower robot. Its value satisfies the following condition: when the lawnmower robot travels precisely on the exploration profile and its front end is aligned with the tangent direction of the exploration profile at that location, the vertical projection of the entire lawnmower robot's body on the ground falls entirely within the original passable area, with no part exceeding the boundary.

[0102] This ensures a sufficiently wide buffer zone is always maintained between the exploration outline and real obstacles. As the lawnmower moves along the exploration outline, there is always a safety gap of at least zero between the outermost edge of the robot's side and the boundary of the original passable area. This preset distance can be taken as half the width of the lawnmower's body plus an additional safety margin, or as the horizontal distance from the geometric center of the lawnmower to the farthest corner of the body. Thus, whether on straight or curved sections, when the robot moves along the edge in a tangential posture, the part with the largest outward swing will not touch impassable areas.

[0103] C16. The exploration contour is obtained by performing an erosion operation on the binarized image using structuring elements.

[0104] Compared to the original passable area boundary, the exploration outline shrinks inward by a preset distance, the amount of which is equal to the physical distance corresponding to the radius or half-side length of the structural element.

[0105] In one possible embodiment, C16 performs an erosion operation on the binarized image using structuring elements to obtain the exploration contour, including: C161 controls the sliding of structuring elements on a binarized image.

[0106] After acquiring the binarized image and the structuring element, the lawnmower robot begins the erosion operation, which involves controlling the structuring element to slide orderly across the binarized image. The sliding process involves aligning the origin of the structuring element with each pixel in the binarized image sequentially, traversing row by row from left to right and top to bottom, covering the entire effective area of ​​the image. Each time the structuring element moves to a new pixel position, it temporarily covers a local rectangular region of the image; the size of this local region is exactly the same as the size of the structuring element itself. This traversal sliding is a standard 2D image scanning method with a step size of 1 pixel, ensuring that every pixel in the image has a chance to become the origin position of the structuring element. For pixels at the image edges, the portion of the structuring element that extends beyond the image boundary is considered a non-traveling area, thus ensuring that the traveling areas at the image edges are also correctly eroded.

[0107] C162. When all pixels within the area covered by a structuring element fall into the passable area, retain the center pixel of the covered area.

[0108] As the structuring element slides to each pixel position, the lawnmower robot performs a full pixel check on the local area currently covered by the structuring element. This check examines the pixel values ​​of all pixels within that local area, verifying that each pixel's value is equal to the first pixel value representing the passable area. If all pixels in the local area have the first pixel value, it indicates that there is sufficient safe space around the center point of the area. In this case, the center pixel is retained, and its corresponding pixel value in the output image is set to the first pixel value. If any pixel in the local area has a value that is not equal to the first pixel value, it means that the area is too close to an obstacle or unknown area, failing to meet the safe distance requirement. In this case, the center pixel is discarded, and its corresponding pixel value in the output image is set to the second pixel value. This check is the core logic of the erosion operation. Its effect is that only pixels completely surrounded by the passable area are retained; any pixels near the boundary are discarded, thus causing the overall passable area to shrink inward.

[0109] C163. The boundary formed by the retained center pixel constitutes the exploration outline.

[0110] After the structuring element traverses the entire binarized image, the lawnmower robot obtains an output image composed of all retained center pixels. In this output image, the set of pixels with the first pixel value forms a new region with a reduced overall area and smoothed edges. The shape of this region is similar to the original passable region, but all boundaries are recessed inward by a distance determined by the structuring element. The lawnmower robot extracts the outer closed boundary of this new region by searching the output image for all pixels that simultaneously satisfy the condition of having the first pixel value and at least one second pixel value within their four or eight neighboring regions. The line connecting these pixels forms the boundary line of the new region, which is the exploration contour. The exploration contour is a continuous and closed curve, where each point maintains a constant safe distance from real obstacles or unknown areas. Subsequent contour segment extraction and travel along the contour revolve around this exploration contour.

[0111] In one possible embodiment, controlling the lawnmower robot to move along the explored path to re-explore the passable area includes: C31. Generate driving instructions based on the explored road segment.

[0112] After acquiring an exploration segment, the lawnmower robot first needs to convert this path, expressed as a sequence of geometric coordinates, into drive commands that the drive mechanism can directly execute. This process is called trajectory tracking control command generation. The exploration segment is essentially an ordered sequence of two-dimensional coordinate points. Each point records its horizontal and vertical coordinates in the environmental map coordinate system, and the spacing between adjacent points is determined by the mapping resolution. The lawnmower robot's control unit analyzes this coordinate point sequence segment by segment, calculating the linear and angular velocities required for each small path segment. The calculation method involves using trajectory tracking algorithms such as proportional-integral-derivative controllers or pure tracking controllers, based on the lateral and heading deviations between the current pose and the target path points, to calculate the appropriate rotational speed or differential speed values ​​for the left and right drive wheels. When the exploration segment contains curved sections, the calculated rotational speeds of the left and right wheels will differ, causing the lawnmower robot to naturally steer to conform to the curve; when the exploration segment is a straight section, the rotational speeds of the left and right wheels are equal, and the lawnmower robot moves forward in a straight line. All drive commands are generated at a fixed frequency. Each command includes a timestamp, the target speed of the left wheel, the target speed of the right wheel, and the execution duration, forming a complete command sequence, which is temporarily stored in the motion control buffer and awaits execution.

[0113] C32. The drive mechanism of the lawnmower robot is controlled by drive commands to move along the exploration section, and the passable area is updated by using environmental data collected by sensors during the movement.

[0114] After generating the drive commands, the lawnmower robot sequentially executes the command sequence in the buffer. It reads the target rotational speed values ​​of the left and right wheels one by one at a fixed frequency, and transmits the electrical signals to the drive motors via the motor driver. The drive motors then rotate the wheels at the target rotational speed, propelling the lawnmower robot along the explored path. Throughout the movement, the environmental perception sensors on the lawnmower robot remain continuously operational, collecting laser point cloud and visual point cloud data of the surrounding environment at a fixed frequency independent of motion control. Whenever a new frame of sensor data arrives, the data processing unit immediately executes a real-time localization and mapping algorithm. It registers the current frame's point cloud data with the maintained local grid map, calculates the lawnmower robot's current precise pose, and projects each laser point in the point cloud onto the corresponding grid in the grid map based on its distance and angle, updating the passability probability value of each grid. For newly detected obstacle-free areas, the passability probability value of the corresponding grid gradually increases until it exceeds the classification threshold, and the grid is included in the passable area. For grids that detect obstacles, their probability value decreases and they are marked as impassable.

[0115] In one possible embodiment, detecting that the lawnmower has returned to its initial exploration position specifically includes: A1. In the preset spatial marker map, whenever the moving distance reaches the first preset distance, record the current orientation value of the lawnmower robot.

[0116] During boundary exploration, the lawnmower maintains a spatial marker map independent of the grid map. This spatial marker map is a two-dimensional array with the same coordinate system as the grid map, where each grid cell stores a discrete orientation value. Whenever the lawnmower's accumulated movement distance from the previous marker reaches a first preset distance, an orientation recording operation is triggered. The yaw angle value output by the current inertial measurement unit is read, mapped to a discrete orientation value, and written into all grid cells covered by the lawnmower's current body outline in the spatial marker map. The first preset distance is determined based on the lawnmower's body length, for example, it can be 0.5 to 1 times the body length. This value ensures that the spatial interval between adjacent markers is comparable to the robot's own scale, avoiding both excessive storage and computational overhead due to overly dense markers and insufficient spatial resolution for loop closure detection due to overly sparse markers.

[0117] A2. In the preset time-marked map, whenever the moving distance reaches the second preset distance, record the current mapping time of the lawnmower robot.

[0118] The lawnmower robot also maintains another independent time-stamped map, which is another two-dimensional array. Each grid cell stores a timestamp value, used to record the mapping time taken when the lawnmower robot last passed that location. Whenever the lawnmower robot's accumulated movement distance from the previous time-stamped position reaches a second preset distance, a time recording operation is triggered. The total running time of the current boundary exploration task, i.e., the mapping time, is read and recorded in minutes. This time value is then written into all grid cells within a circular area centered on the lawnmower robot's current position and with an inscribed circle radius as its radius. The second preset distance is determined based on the lawnmower robot's inscribed circle radius. The inscribed circle refers to the largest circular area that can be accommodated within the lawnmower robot's body outline; its radius represents the minimum spatial scale the robot can maneuver without changing its posture. The second preset distance can be 1 to 2 times the inscribed circle radius to ensure that the time records of visits within the same circular marker area can effectively cover and overlap spatially.

[0119] A3. If the angle deviation between the orientation value recorded in the spatial marker map and the preset initial orientation value of the current position of the lawnmower is less than the preset angle threshold, and the mapping time recorded in the time marker map is not less than the preset time threshold, it is determined that the lawnmower returns to the initial exploration position.

[0120] After completing each exploration segment, the lawnmower performs a loopback detection to confirm whether it has returned to its initial exploration position. The detection process first reads the orientation values ​​recorded by all grid cells within a circular area centered on the lawnmower's current position and with the radius of its inscribed circle in the spatially marked map. Grid cells with recorded orientation values ​​are then selected, and it is checked whether any historical orientation value deviates from the initial orientation value by an angle less than a preset angle threshold. The initial orientation value is the orientation value recorded when the lawnmower first started exploring the initial position. The preset angle threshold is typically half of a discretized orientation range; for example, if the orientation value is discretized by 30 degrees, the threshold is 15 degrees. If the spatial orientation match is successful, the process continues by reading the historical mapping time recorded by all grid cells within the same circular area in the time-marked map. The maximum value is found and compared with the current mapping time. If the difference between the current mapping time and the historical mapping time is not less than a preset time threshold, the lawnmower is determined to have returned to its initial exploration position. The preset time threshold is usually set to 2 to 5 minutes. This value is sufficient to eliminate the possibility that the lawnmower robot may accidentally pass through the same area due to path intersections in a short period of time, ensuring that the loop can only be triggered after it goes around once and returns to the starting point.

[0121] For example, during its exploration, the lawnmower robot travels to a certain location where the orientation value recorded on the spatial marker map within the inscribed circle radius is 0. The deviation from the initial orientation value of 0 is 0 degrees, which is less than the preset threshold of 15 degrees, thus satisfying the spatial conditions. Subsequently, the historical mapping time for each grid within the same area is read from the time-marked map. The maximum historical mapping time is 8 minutes, and the current mapping time is 11 minutes. The difference between the two is 3 minutes, which is not less than the preset time threshold of 2 minutes. Therefore, it is determined that the lawnmower robot has returned to its initial exploration position, and the boundary exploration process is terminated.

[0122] In one possible embodiment, the method of this application further includes: B1. During the boundary exploration process, record the movement trajectory of the lawnmower robot.

[0123] During boundary exploration, the lawnmower continuously records its movement trajectory. This recording continues throughout the entire exploration task, from the moment it leaves the initial exploration position until loop closure detection determines its return to the initial exploration position. The trajectory is recorded by the lawnmower's localization module outputting a pose estimate at a fixed frequency. Each pose estimate includes four fields: timestamp, x-coordinate, y-coordinate, and heading angle. These pose nodes are sequentially added to the trajectory cache queue, forming a discretized travel path. The Euclidean distance between adjacent pose nodes reflects the actual distance traveled by the lawnmower within that sampling interval. The cumulative distance between all adjacent nodes represents the total length of the current trajectory. The trajectory cache queue is managed using a sliding window mechanism, retaining only pose data within the most recent preset time range. Historical data exceeding the time window is automatically cleared to control memory usage.

[0124] B2. When the length of the lawnmower robot's trajectory within a preset time period is less than a preset length threshold, an abnormal stop is determined and an abnormal prompt is generated.

[0125] While recording its movement trajectory, the lawnmower robot simultaneously runs an abnormal stop monitoring task. This task periodically checks the trajectory data within a recent preset time period at a fixed frequency, calculating the actual trajectory length traveled by the lawnmower robot within that time window. The calculation method involves retrieving all pose nodes whose timestamps fall within the preset time period preceding the current moment from the trajectory cache queue, calculating the Euclidean distances between adjacent nodes in chronological order, and summing them to obtain the cumulative trajectory length within that time period. This cumulative length is compared with a preset length threshold. If the cumulative length is less than the preset length threshold, the lawnmower robot is determined to have experienced an abnormal stop, and an abnormality alert is immediately generated. The abnormality alert may include the current coordinates, the duration of the stop, and the time of the last normal movement, and is pushed to the user terminal via the wireless communication module, or triggers the lawnmower robot's own audible and visual alarm device. The preset time period and preset length threshold are jointly calibrated based on the lawnmower robot's normal driving speed and minimum safe speed. Typically, the preset time period is 30 to 60 seconds, and the preset length threshold is 0.1 to 0.3 meters. These values ​​are much smaller than the distance the lawnmower robot should travel in the same time period during normal driving.

[0126] In one possible embodiment, to improve the exploration accuracy of job boundaries in a global grid map, this application also improves another method for exploring job area boundaries, including the following steps: D1. Obtain the passable area of ​​the lawnmower robot, and reduce the boundary of the passable area by a preset distance to obtain the exploration outline.

[0127] The method for obtaining the communicable area of ​​the lawnmower robot includes: controlling the onboard sensors such as LiDAR and cameras to scan the surrounding physical environment, collecting point cloud data or image data reflecting environmental characteristics, identifying lawn areas where the robot can safely navigate based on the collected data, and marking these areas as traversable zones. After identification, a morphological erosion operation is performed on the marked traversable area, i.e., shrinking it inward by a preset distance. The size of the preset distance can be determined based on the size of the lawnmower robot's body and safety margin to ensure that when the robot subsequently moves onto the shrunken contour, its entire body remains within the unshrunken traversable area, thus preventing the robot from becoming dangerous or stuck due to exceeding the boundary when exploring along the edge. After the erosion operation is completed, the contour line of the shrunken area is extracted, and this contour line is used to select the exploration location.

[0128] D2. On the exploration outline, select an unexplored location that meets the preset distance condition from the lawnmower robot as the target exploration location.

[0129] After obtaining the exploration contour, discrete sampling is performed on the contour line to obtain multiple candidate location points. The lawnmower robot maintains an exploration status list to record which candidate location points have been explored and which have not. From all unexplored location points, the target exploration location is selected based on a preset distance condition. The preset distance condition refers to the rules used to select the target exploration location from multiple candidate locations, including but not limited to the nearest distance principle, the threshold selection principle, or the optimal path cost principle.

[0130] In one possible implementation, the preset distance condition could be a distance threshold principle, prioritizing the robot's movement efficiency between exploration points during the exploration process. Specifically, this involves calculating the straight-line distance (Euclidean distance) between the robot's current position and each unexplored candidate position on the exploration contour. After obtaining all distance values, these values ​​are compared, and the candidate position with the smallest distance value is selected. In this way, each loop moves the robot to the closest available exploration point at the current moment, thus minimizing the movement path between adjacent exploration points and reducing the total travel distance and energy consumption during the exploration process.

[0131] In another possible implementation, the preset distance condition no longer considers proximity as the sole factor. Specifically, this involves first setting a distance upper limit threshold, and then including all candidate locations whose straight-line distance to this threshold is less than or equal to the upper limit into an optional set. This ensures that the selected locations are not excessively far away, thus preventing the exploration efficiency from being unnecessarily reduced. Based on this, further filtering decisions are performed within this optional set. Specifically, the exploration level of the surrounding area of ​​each candidate location in the set is calculated, prioritizing locations adjacent to large unexplored areas or areas with ambiguous known boundaries. In this way, the lawnmower robot can prioritize reaching the boundary segments with the most uncertain information, thereby completing the boundary exploration in fewer loops.

[0132] In one implementation, the preset distance condition is based on the principle of optimal path cost. The specific method includes: for each unexplored candidate location, pre-generating a potential path from the lawnmower robot's current position to that location. During the generation of this potential path, multiple cost factors are comprehensively evaluated, including: the total length of the path, the turning angle required for the robot to turn from its current orientation to the starting direction of the path, and whether there are impassable areas along the path requiring detours. The various cost factors are weighted and summed to calculate a comprehensive path cost value for each candidate location, and the candidate location with the lowest comprehensive cost value is ultimately selected as the target exploration location. In this way, the lawnmower robot avoids choosing a difficult path requiring sharp turns or containing obstacles simply to minimize the straight-line distance, thus ensuring a smoother and more efficient exploration process.

[0133] D3. Control the lawnmower robot to move to the target exploration location to re-explore the passable area, and return to execute the step of acquiring the passable area of ​​the lawnmower robot until there are no unexplored locations on the latest exploration outline.

[0134] After determining the target exploration location, a collision-free path is planned from the lawnmower robot's current position to the target exploration location, and corresponding drive commands are generated to control the robot's walking mechanism to drive it along the planned path. Upon reaching the target exploration location, or throughout the entire journey, the lawnmower robot continuously uses sensors to collect new environmental data and uses this data to correct the original passable area, usually by expanding it outwards, thus obtaining an updated passable area.

[0135] Subsequently, based on the updated passable area, step D1 is repeated, that is, the area is shrunk again, a new exploration contour is extracted, and the next unexplored location point is found on the new contour. This loop continues until, in a certain loop, it is found that all sampling points on the latest exploration contour have been marked as explored and no new target exploration location can be found, at which point the entire boundary exploration loop terminates.

[0136] D4. Determine the boundary of the last traversable area explored as the boundary of the lawnmower robot's work area.

[0137] Specifically, when the loop is determined to be terminated, the boundary of the passable area generated in the last loop process is determined as the working area boundary of the lawnmower robot.

[0138] In one possible implementation, the method for determining the preset distance includes: reading the body geometry parameters of the lawnmower robot from a memory, the body geometry parameters including the outer dimensions of the body and the installation positions of the sensors; selecting the straight-line distance from the geometric center of the body to the farthest edge of the body as a base radius, which ensures that when the robot rotates around its geometric center at any angle, the entire body will not exceed a circular area with the radius of this base radius.

[0139] After obtaining the basic radius, a preset safety margin can be introduced. This safety margin is a positive additional value used to cover the deviation between the actual and theoretical positions of the fuselage caused by factors such as positioning errors, control precision deviations, and uneven ground. Adding the basic radius and the safety margin together yields the physical value of the preset distance.

[0140] Finally, based on the actual physical size represented by each grid cell in the raster map, the physical value of the preset distance is converted into a pixel value in units of grid cells. Specifically, the physical value of the preset distance is divided by the physical side length of a single grid cell, and the result is rounded up or down. The resulting integer value is the final preset distance pixel value used in the erosion operation.

[0141] The preset distance determined by the above method can ensure that when the lawnmower robot stands on the exploration outline generated after being eroded by this distance, and the front of the robot is adjusted to point to the outside of the passable area, the entire body projection of the robot falls within the original passable area before erosion, thereby reducing the possibility of the robot body touching the real boundary during the exploration process.

[0142] In one possible implementation, D3, on the exploration contour, selects an unexplored location that meets a preset distance condition from the lawnmower robot as the target exploration location, including: D31. Sample along the exploration contour according to the preset interval to obtain multiple unexplored sampling points.

[0143] After obtaining the exploration outline, selectable specific location points need to be generated along this closed outline. First, a preset spacing is read from memory. The preset spacing is set according to the effective detection range of the sensor and the mapping accuracy requirements, and is usually between 0.3 meters and 1.0 meter. If the preset spacing is too large, the interval between adjacent exploration points will be too far, which may miss some boundary details; if the preset spacing is too small, too many redundant candidate points will be generated, increasing the burden of subsequent calculations.

[0144] Starting with any pixel on the exploration contour as the initial sampling point, position points are extracted at preset intervals along the contour's extension direction. Specifically, starting from the initial point, the cumulative arc length is calculated segment by segment along the contour's path. Whenever the cumulative arc length reaches the preset interval, the coordinates of the current position are recorded as a sampling point, and the cumulative arc length is reset to zero to begin accumulating the next arc length. This process continues along the closed contour until the starting sampling point is returned. In this way, a set of sampling points evenly distributed on the exploration contour is obtained. Next, the internally maintained exploration state list is queried, and sampling points already marked as explored are removed, retaining only those still in the unexplored state. These retained points are the candidate points used in the next step of distance calculation.

[0145] In one example, the total arc length of an exploration contour is 15 meters, with a preset spacing of 0.5 meters. Starting from a pixel on the easternmost side of the contour, a sampling point is extracted every 0.5 meters of arc length accumulated clockwise, resulting in 30 sampling points after one complete loop. Among these 30 sampling points, 3 points have already been visited and marked as explored in previous exploration loops. These 3 points are excluded, leaving 27 unexplored sampling points as candidate points for subsequent distance calculations.

[0146] D32. Calculate the distance between the lawnmower robot and each sampling point.

[0147] After obtaining the set of unexplored sampling points, the spatial distance of each sampling point relative to the current position of the lawnmower is calculated. First, the real-time position coordinates of the lawnmower are obtained, which are the horizontal and vertical coordinates of the robot in the map coordinate system. Then, the coordinates of each unexplored sampling point on the map are read one by one.

[0148] For each sampling point, calculate its Euclidean distance to the robot's current position. The calculation method is as follows: first, calculate the square of the difference between the sampling point's x-coordinate and the robot's x-coordinate; then, calculate the square of the difference between the sampling point's y-coordinate and the robot's y-coordinate. Add the two squared values, and take the square root of the sum. The result is the straight-line distance from the sampling point to the robot. Establish a temporary association between the identifier of each sampling point and its corresponding distance value, storing it in a distance list in memory for subsequent sorting and filtering.

[0149] D33. Determine the sampling point with the smallest distance as the target exploration location.

[0150] After obtaining the distance values ​​between all unexplored sampling points and the robot's current position, these distance values ​​are compared. The entire distance list is traversed, and the record with the smallest distance value is identified. The sampling point corresponding to this record is then designated as the target exploration location. If multiple sampling points have the same minimum distance value, one is selected according to a preset arbitration rule. This arbitration rule can be to select the earliest traversed point, or to further select a point located closer to the boundary of the explored area on the exploration contour from among the minimum distance points.

[0151] The advantage of using the nearest-distance principle to select the target exploration location is that in each exploration cycle, the robot goes to the nearest unexplored sampling point, which can minimize the invalid movement between adjacent exploration actions, thereby reducing the driving energy consumption and time cost of the entire boundary exploration process and improving exploration efficiency.

[0152] One possible implementation method also includes: D5. Determine the target orientation at the target exploration location.

[0153] After determining the target exploration location, a target orientation needs to be assigned to that location so that when the lawnmower arrives at that location, its onboard sensors can detect the unexplored boundary area at a better angle.

[0154] D6. Control the lawnmower robot to adjust its orientation to the target orientation when it reaches the target exploration location.

[0155] After calculating the target exploration location and target orientation, a collision-free travel path is planned from the current position of the lawnmower robot to the target exploration location. The endpoint of this path includes not only the coordinates of the target exploration location but also the direction information of the target orientation. During the path planning phase, considering the robot's posture requirements when reaching the endpoint, a stationary rotation motion or a smooth transition arc is inserted at the end of the path to adjust the orientation.

[0156] Once the lawnmower robot has traveled along the planned path to the designated coordinates of the target exploration location, its inertial measurement unit (IMU) acquires the robot's current actual orientation angle in real time. This actual orientation angle is compared with the target orientation angle to calculate the angular deviation. If the deviation exceeds a preset tolerance threshold, a rotation command is sent to the drive mechanism, controlling the left and right drive wheels to rotate at equal but opposite speeds, causing the robot to rotate around its geometric center until the deviation between the actual and target orientation angles is reduced to within the tolerance range. After the orientation adjustment is complete, the sensors can begin collecting environmental data from the boundary area directly in front of the robot.

[0157] Further optional, D5, determining the target orientation at the target exploration location, including: D51. Determine the tangent direction of the target's location on the exploration outline; take the direction perpendicular to the tangent direction and pointing outwards from the passable area as the target's orientation; or D52. Determine the previous and next sampling points adjacent to the target exploration location; calculate the direction of the line connecting the previous and next sampling points; take the direction perpendicular to the line and pointing to the outside of the passable area as the target orientation.

[0158] In step D51, the first method for determining the target orientation is based on direct calculation using the local geometric properties of the exploration contour. First, the arc segment where the target exploration location is situated is located on the exploration contour. Differential geometric analysis is then performed on this arc segment to extract the direction of the first derivative at the target exploration location; this direction is the tangent direction of the contour at that point. In a specific implementation, the tangent direction can be obtained by fitting straight lines to the contour pixels within the neighborhood of the target exploration location. The size of the neighborhood used for fitting is pre-set based on the map resolution and the smoothness of the contour.

[0159] After obtaining the tangent direction, a 90-degree rotation transformation is performed on it to obtain two normal directions that are 180 degrees apart. One of these normal directions points inwards from the passable area, and the other points outwards. The outward-pointing normal direction is determined by extending a preset detection distance forward along each normal direction and checking the attribute status of the corresponding grid cell at the end of that detection distance in the global grid map. If the grid cell is marked as an impassable or unknown area, then the normal direction is determined to point outwards from the passable area, and thus, this normal direction is identified as the target orientation of the mowing robot at that target exploration location.

[0160] In one example, the selected target exploration location is situated on a straight arc line on the north side of the exploration contour. Eleven points (five pixels to the left and five pixels to the right) within the neighborhood of this location are extracted and fitted with a straight line, resulting in a fitted straight line extending from the lower left to the upper right. This line forms a 45-degree angle with the positive horizontal axis of the map, indicating a northeast tangent. A 90-degree counter-clockwise rotation is then performed on this tangent to obtain a first normal pointing northwest and a second normal pointing southeast. Extending 0.5 meters forward along the first normal, the grid status at that location is checked. It is found that this grid is marked as an impassable area, thus determining that the northwest direction points to the outside of the passable area. Based on this, the northwest direction is determined as the robot's target orientation at this exploration location.

[0161] In step D52, the second method for determining the target orientation is to indirectly determine the tangent direction through the geometric relationship between adjacent sampling points. First, the sampling point corresponding to the target exploration location is extracted from the generated sampling point sequence, and the preceding and following adjacent sampling points in the sequence are found, i.e., the previous and next sampling points. The coordinate values ​​of the previous and next sampling points in the map coordinate system are read respectively, and then a direction vector from the previous sampling point to the next sampling point is calculated. This direction vector represents the chord direction of the exploration contour in the segment near the target exploration location. When the sampling interval is set small enough, the direction of this chord can well approximate the tangent direction at the target exploration location.

[0162] After obtaining the direction of the connecting line, a 90-degree rotation transformation is performed on this direction, resulting in two normal directions that are 180 degrees apart. Using the same discrimination mechanism as D51, a preset detection distance is extended forward along each of the two normal directions, and the grid attribute status at the extension endpoint is checked. If the grid at the endpoint of an extension along a certain normal direction is marked as an impassable or unknown area, then the normal direction is determined to point outside the passable area, i.e., the normal direction is determined as the target orientation of the lawnmower robot at the target exploration location. The advantage of this implementation over D51 is that it directly utilizes the sampling point data already generated during the exploration process, eliminating the need for additional geometric analysis calculations on the exploration contour, making the calculation process simpler.

[0163] In one example, the previous sampling point at the target exploration location was found to have coordinates of x-coordinate 146 and y-coordinate 296, and the next sampling point had coordinates of x-coordinate 154 and y-coordinate 304. The direction vector from the previous sampling point to the next sampling point was calculated, yielding a difference of 8 in both x-coordinates and y-coordinates, indicating a northeast direction (45° east of north). This line was then rotated 90 degrees counterclockwise to obtain a normal pointing northwest. Extending this normal forward 0.5 meters, the grid status was checked, revealing that the grid was marked as impassable in the global grid map. Therefore, the northwest direction was determined to point outside the passable area. Based on this, the northwest direction was identified as the robot's target orientation at the target exploration location.

[0164] In one possible implementation, the method of this application further includes: D7. Mark other unexplored locations whose distance from the target exploration location is less than a preset distance threshold as explored locations.

[0165] After exploring the target location in a single boundary exploration cycle, the exploration status list needs to be updated in batches to prevent the lawnmower robot from unnecessarily exploring neighboring areas in subsequent cycles. A preset distance threshold is read from memory. This threshold is set based on the environmental range that the sensor can effectively cover in a single detection; for example, the preset distance threshold is set to 0.6 meters. Since the robot has already collected environmental data within a certain radius of the target location using its sensors, the boundary information of other candidate locations within this radius, even if not yet actually reached, has been acquired during this exploration. Therefore, marking these locations as explored together prevents the omission of boundary information.

[0166] Using the coordinates of the target exploration location as a reference, all candidate locations currently in an unexplored state are traversed in the exploration state list. For each unexplored candidate location, the straight-line distance between it and the target exploration location is calculated. If the calculated distance value is less than a preset distance threshold, the candidate location's mark in the exploration state list is updated from unexplored to explored. If the distance value is greater than or equal to the preset distance threshold, its unexplored state remains unchanged. After processing, the exploration state list is updated, and these candidate locations marked as explored will no longer be included in the target exploration location selection range in the subsequent D2 step. In this way, within a circular area centered on the target exploration location and with a preset distance threshold as the radius, all candidate locations are considered to have been explored, which can reduce the total number of exploration cycles and reduce the robot's wasted travel distance and detection time in boundary segments where information has been fully acquired.

[0167] Furthermore, controlling the lawnmower robot to move to the target exploration location to re-explore the passable area includes: D41. Plan exploration routes based on the current location of the lawnmower robot and the target exploration location.

[0168] After determining the target exploration location, a specific path needs to be planned for the lawnmower robot to safely travel from its current location to that target exploration location. First, the current position coordinates of the lawnmower robot are obtained through the positioning module. Combined with the coordinates of the target exploration location, these two coordinate points are marked as the start and end points of the path planning, respectively.

[0169] Using a path planning algorithm, a collision-free route from the starting point to the destination is searched on the current global grid map. During the search, the algorithm prioritizes keeping the path entirely within the currently identified traversable area, avoiding the robot traversing unknown or impassable areas. The planned exploration segment consists of a series of interconnected waypoints, with the spacing between adjacent waypoints determined by the map resolution. When generating these waypoints, the minimum turning radius constraint of the lawnmower robot is also considered to ensure that the radius of curvature of the path is within the robot's kinematic capabilities, making the generated path physically feasible in actual driving.

[0170] D42. Generate driving instructions based on the explored road segment.

[0171] After obtaining the exploration segment consisting of a sequence of path points, it needs to be converted into a sequence of drive commands that can directly control the movement of the drive mechanism. By traversing each path point on the exploration segment, the linear and angular velocities required for the lawnmower robot to travel on that segment are calculated based on the geometric relationships between adjacent path points.

[0172] For each pair of adjacent path points, a direction vector from the previous path point to the next path point is calculated, and the robot's steering angle is determined based on the angle change of this direction vector. This steering angle is combined with the arc length between the path points to calculate the differential control quantities that the robot's drive wheels should execute, i.e., the target rotational speeds of the left and right drive wheels. This series of differential control quantities, arranged in chronological order, is packaged into a set of drive command sequences and stored in the command buffer for the motion control module to read and execute sequentially. In addition, an orientation adjustment command is inserted at the end of the drive command sequence. This command contains the target orientation determined in step D5, allowing the robot to automatically correct its orientation after reaching the destination coordinates.

[0173] D43. Control the drive mechanism of the lawnmower robot to move towards the target exploration position according to the drive command. During the movement or when the target exploration position is reached, collect environmental data through sensors and use the environmental data to update the passable area.

[0174] After the drive command sequence is generated, these commands are executed sequentially to control the drive mechanism of the lawnmower robot, causing the robot to move along the planned path towards the target exploration location. Drive commands are retrieved one by one from the command buffer at fixed control cycles, converted into pulse-width modulated signals, and sent to the motor drivers of the left and right drive wheels. The motor drivers then drive the motors to rotate at a specified speed according to the signals, thereby propelling the robot along the predetermined path.

[0175] Throughout the robot's movement towards the target location, environmental data is continuously collected using sensors such as LiDAR and cameras. Simultaneously, after the robot reaches the target location and adjusts its orientation, a more concentrated point-to-point environmental data collection is performed. The collected point cloud data and visual images are processed in real time to identify passable and impassable areas along the path and at the destination. These identification results are then mapped onto corresponding grid cells in the global grid map through coordinate transformation. Based on the newly collected environmental data, the passability confidence probability value of the corresponding grid cells in the global grid map is updated, thereby expanding or correcting the original passable area boundaries, completing the re-exploration and updating of passable areas.

[0176] Please see Figure 4 As shown, in one embodiment, a noise reduction device for a lawnmower robot's work map is provided, the device comprising: Module 401 is used to acquire a global raster map of the work area; The conversion module 402 is used to perform binarization processing on the global raster map to obtain a binarized map, wherein the binarized map includes a first color region for representing the passable area and a second color region for representing the restricted area. The erosion module 403 is used to perform an erosion operation on the first color area in the binarized map using a preset first structural element to obtain an eroded map; wherein the size of the first structural element is set based on the minimum passage width of the lawnmower robot. The dilation module 404 is used to perform a dilation operation on the first color region in the eroded map using the first structural element to obtain a denoised map.

[0177] For other details regarding the implementation of the above technical solution by each module in the above-mentioned lawn mowing robot operation map denoising device, please refer to the description in the lawn mowing robot operation map denoising method provided in the above-mentioned application embodiments, which will not be repeated here.

[0178] In one embodiment, a lawnmower robot is provided, the internal structure of which can be shown in the following diagram: Figure 5 As shown, the lawnmower robot 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 of the lawnmower robot is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the methods described in any of the foregoing embodiments of this application.

[0179] This application also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the methods described in any of the foregoing embodiments of this application.

[0180] This application also provides a chip for executing instructions, which is used to perform the methods described in any of the preceding embodiments as performed by the lawnmower robot in any of the preceding embodiments of this application.

[0181] This application also provides a computer program product, which includes a computer program that, when executed by a processor, can implement the methods described in any of the foregoing embodiments performed by the lawnmower robot in any of the foregoing embodiments of this application.

[0182] It should be noted that the functions or steps that the computer-readable storage medium or lawnmower robot can achieve are described in the relevant descriptions in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0183] 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, and when executed, it 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 can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various 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.

[0184] 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.

[0185] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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 this application, and should all be included within the protection scope of this application.

Claims

1. A method for denoising the working map of a lawnmower robot, characterized in that, include: Get the global raster map of the work area; The global raster map is binarized to obtain a binarized map, wherein the binarized map includes a first color region for representing the passable area and a second color region for representing the restricted area; Using a preset first structural element, an erosion operation is performed on the first color region in the binarized map to obtain an eroded map; wherein, the size of the first structural element is set based on the minimum passage width of the lawnmower robot; Using the first structuring element, a dilation operation is performed on the first color region in the eroded map to obtain a denoised map.

2. The method for denoising the working map of a lawnmower robot according to claim 1, characterized in that, The radius of the first structural element is greater than or equal to a preset ratio of the minimum passage width of the lawnmower robot.

3. The method for denoising the working map of a lawnmower robot according to claim 1, characterized in that, The first structural element is a circular structural element or a square structural element.

4. The method for denoising the working map of a lawnmower robot according to claim 1, characterized in that, The minimum passage width of the lawnmower robot is determined based on the chassis width or the wheel track of the drive wheels.

5. The method for denoising the working map of a lawnmower robot according to claim 1, characterized in that, After obtaining the denoised map, the method further includes: Using the first structuring element, a dilation operation is performed on the first color region in the denoised map to obtain the dilated map. Using the first structuring element, an erosion operation is performed on the first color region in the expanded map to obtain the repaired map.

6. The method for denoising the working map of a lawnmower robot according to claim 5, characterized in that, After obtaining the repaired map, the method further includes: Using a preset second structural element, an erosion operation is performed on the first color region in the repaired map to obtain a scaled-down map.

7. The method for denoising the working map of a lawnmower robot according to claim 6, characterized in that, The dimensions of the second structural element are set based on the inscribed circle diameter of the lawnmower robot.

8. The method for denoising the working map of a lawnmower robot according to claim 6, characterized in that, After obtaining the indented map, the following is also included: Extract the outer contour of the first color region from the indented map to obtain a closed contour line.

9. The method for denoising the working map of a lawnmower robot according to claim 1, characterized in that, The acquisition of the global raster map of the work area includes: A two-dimensional grid matrix is ​​established based on the work area, and all grid cells in the two-dimensional grid matrix are assigned a no-entry flag value; Based on environmental data collected by sensors, the passable area is identified through a semantic segmentation model. Based on the identified passage area, the values ​​of the corresponding grid cells in the two-dimensional grid matrix are updated to the passage identifier values ​​to obtain the global grid map.

10. The method for denoising the working map of a lawnmower robot according to claim 9, characterized in that, The step of binarizing the global raster map to obtain a binarized map includes: Traverse each grid cell in the global grid map; If the current grid cell's identifier value is the pass identifier value, then the color value of the current grid cell is assigned the first color value; If the current grid cell's identifier value is a forbidden identifier value, then the color value of the current grid cell is assigned the second color value; After assigning color values ​​to all raster cells, the binarized map is obtained.

11. A lawnmower robot, characterized in that, The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor performing the lawnmower operation map denoising method as described in any one of claims 1 to 10.