Bow-shaped cleaning path planning method, device and equipment and storage medium

By classifying and fitting the map outlines of indoor and outdoor public areas of buildings using the Douglas-Puk algorithm and the Manhattan distance algorithm, the problem of missed scans caused by unevenness is solved, and the accurate planning and full coverage of the bow-shaped path are achieved.

CN121761883APending Publication Date: 2026-03-31广东美房智高机器人有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively avoid missed cleaning issues caused by unevenness in indoor and outdoor public areas when planning bow-shaped cleaning paths. This is especially true in apartment or office buildings, where the uneven contours cause deviations in the main direction, resulting in tilted cleaning paths and wedge-shaped missed cleaning areas.

Method used

The Douglas-Puk algorithm and the Manhattan distance algorithm are used to classify and fit the map outline of the area to be cleaned. Unnecessary outline points are removed by polygon dilation, the main direction is accurately extracted, and a bow-shaped path with full coverage is planned.

Benefits of technology

It significantly reduces the impact of uneven parts of the map outline of the area to be cleaned, accurately extracts the main direction, avoids missed areas, and ensures full coverage of the cleaning path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121761883A_ABST
    Figure CN121761883A_ABST
Patent Text Reader

Abstract

The invention provides a bow-shaped cleaning path planning method not prone to missing sweeping. The bow-shaped cleaning path planning method comprises the steps that a map of a to-be-cleaned area is obtained; fitting a first polygon similar to the outer contour of the map according to a preset classification algorithm, and classifying contour points of the map according to the number of edges of the first polygon; fitting the contour points on the same side of the first polygon according to a preset measurement algorithm to obtain a second polygon approximate to the map contour; removing contour points outside the expanded second polygon, and fitting the rest map contour points to obtain a third polygon; further removing the contour points in the expanded third polygon, and fitting the last remaining map contour points to obtain a fourth polygon; and finding out the main direction of the map based on the vertexes of the fourth polygon, and planning a bow-shaped cleaning path of the to-be-cleaned area based on the main direction of the map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of cleaning, and specifically relates to a bow-shaped cleaning path planning method, apparatus, equipment, and storage medium. Background Technology

[0002] The bow-shaped path is a common cleaning method, particularly suitable for cleaning indoor areas. It typically involves first using principal component analysis and the minimum bounding rectangle method to determine the principal direction of the area to be cleaned, and then planning the bow-shaped cleaning path based on this principal direction. The principal direction is the length of the cleaning path.

[0003] However, for outdoor public areas within buildings, especially in apartment or office buildings, where dozens of households reside on each floor along long corridors, the presence of thresholds creates multiple recesses on either side. To meet residents' shared needs, fire extinguishers, shoe racks, trash cans, and water dispensers are installed along the corridors, creating multiple protrusions in the door frames located in the middle. This unevenness in the contours of the long corridor-style cleaning area causes deviations in the main cleaning direction, resulting in a tilted, bow-shaped cleaning path and wedge-shaped missed areas. Summary of the Invention

[0004] In view of the above-mentioned deficiencies or defects in the prior art, the present invention provides a method, apparatus, device and storage medium for planning a bow-shaped path that is less prone to missed scans.

[0005] The bow-shaped cleaning path planning method provided by the present invention includes the following steps: obtaining a map of the area to be cleaned;

[0006] A first polygon that approximates the map outline is fitted according to a preset classification algorithm, and the outline points on the map are classified according to the number of sides of the first polygon.

[0007] According to a preset measurement algorithm, the contour points located on the same side of the first polygon are fitted to obtain a second polygon that is similar to the map contour.

[0008] The edges of the second polygon are expanded by a first preset distance, and the first contour point on the map outline is removed. The first contour point is located outside the expanded second polygon.

[0009] The map contour with the first contour point removed is fitted according to the preset measurement algorithm to obtain a third polygon that is similar to the map contour.

[0010] The edges of the third polygon are expanded by a second preset distance, and the second contour point on the map outline is removed. The second contour point is located inside the expanded third polygon.

[0011] The map contour, after removing the first and second contour points, is fitted according to a preset measurement algorithm to obtain a fourth polygon that approximates the map contour.

[0012] Based on the vertices of the fourth polygon, the main direction of the map outline is found, and a bow-shaped cleaning path for the map is planned based on the main direction of the map.

[0013] Optionally, the preset classification algorithm is the Douglas-Puk algorithm, and the preset metric algorithm is the Manhattan distance algorithm.

[0014] Optionally, the preset distance is set according to the depth of the threshold, which is located on the outline of the map of the area to be cleaned, and the second preset distance is greater than the first preset distance.

[0015] Optionally, before fitting a first polygon that approximates the outer contour of the map according to a preset classification algorithm, the map of the area to be cleaned is binarized to extract the contour points of the map.

[0016] Optionally, the map may be partitioned before fitting a first polygon that approximates the outer contour of the map according to a preset classification algorithm.

[0017] The present invention provides a bow-shaped cleaning path planning device, comprising: an acquisition module for acquiring a map of the area to be cleaned; a classification module for fitting a first polygon that approximates the outer contour of the map according to a preset classification algorithm, and classifying contour points on the map according to the number of sides of the first polygon; a first fitting module for performing straight-line fitting on contour points located on the same side of the first polygon according to a preset measurement algorithm to obtain a second polygon that approximates the outer contour of the map; a first expansion module for expanding the sides of the second polygon by a first preset distance, removing the first contour points on the map contour, wherein the first contour points are located outside the expanded second polygon; and a second fitting module. The system comprises: a first polygon module, which fits the map contour (with the first contour point removed) according to a preset metric algorithm to obtain a third polygon that approximates the map contour; a second dilation module, which dilates the edges of the third polygon by a second preset distance and removes the second contour point on the map contour, the second contour point being located inside the dilated third polygon; a third fitting module, which fits the map contour (with the first and second contour points removed) according to a preset metric algorithm to obtain a fourth polygon that approximates the map contour; and a path planning module, which finds the main direction of the map contour based on the vertices of the fourth polygon and plans a bow-shaped cleaning path for the map based on the main direction of the map.

[0018] Optionally, the preset classification algorithm is the Douglas-Puk algorithm, and the preset metric algorithm is the Manhattan distance algorithm.

[0019] Optionally, the preset distance is determined based on the depth value of the threshold, the threshold being located on the outline of the map of the area to be cleaned, and the second preset distance is greater than the first preset distance.

[0020] Optionally, it also includes a contour point extraction module to perform binarization processing on the map of the area to be cleaned and extract the contour points of the map.

[0021] Optionally, a partitioning module is also included to partition the map outline.

[0022] The electronic device provided by the present invention includes: a processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the above-described bow-shaped path cleaning planning method.

[0023] The present invention provides a computer-readable storage medium, wherein a computer program is stored therein, and when the computer program is executed, it implements the above-described bow-shaped cleaning path planning method.

[0024] The bow-shaped path planning method provided by this invention can significantly reduce the influence of the concave and convex parts of the map outline of the area to be cleaned, accurately extract the main direction of the area to be cleaned, and thus plan a bow-shaped path that fully covers the area to be cleaned, avoiding missed areas. Attached Figure Description

[0025] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without any inventive effort. In the drawings:

[0026] Figure 1 The initial map of the area to be cleaned;

[0027] Figure 2 The map is processed by a preset classification algorithm;

[0028] Figure 3 This is the map after the first fitting using a preset metric algorithm;

[0029] Figure 4 The map outline after removing the first outline point;

[0030] Figure 5 This is the map after a second fitting using a preset metric algorithm;

[0031] Figure 6 The map outline after removing the second outline point;

[0032] Figure 7 This is the map after the third fitting using a preset metric algorithm;

[0033] Figure 8 A map showing the final planned bow-shaped cleaning path;

[0034] Figure 9 A flowchart for planning a bow-shaped cleaning path. Detailed Implementation

[0035] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0036] This embodiment provides a bow-shaped cleaning path planning method, which includes the following steps:

[0037] S1 retrieves a map of the area to be cleaned;

[0038] Before planning the cleaning path for the area to be cleaned, a robot is remotely controlled by a human to first circle the area. The robot constructs a preliminary map based on point cloud data acquired by its onboard LiDAR and depth camera. This map is then processed with noise reduction, virtual walls added, and no-go zones established to obtain the map of the area to be cleaned as described in this embodiment. This map is a raster map. The obtained map of the area to be cleaned is shown below. Figure 1 As shown. After obtaining the map of the area to be cleaned, the map is first binarized to extract the map's outline points, so that the map can be classified according to the preset classification algorithm in the next step.

[0039] S2 fits a first polygon that approximates the outer contour of the map according to a preset classification algorithm, and classifies the contour points on the map according to the number of sides of the first polygon.

[0040] The default classification algorithm is the Douglas-Peucker algorithm. The basic process of the algorithm is as follows: The initial curve is a set of ordered points, including p1, p2, ..., pn, with an error threshold d. All points are set as points to be processed, and the first point p1 and the last point p7 are marked as points to be retained. For the line segment formed by p1 and p7, find the point p6 that is farthest from this segment, calculate its distance to the line segment. If it is less than d, then all unprocessed points in the middle of the line segment (including p6) are considered to be replaced by the line segment. If it is greater than d, then we consider that it cannot be ignored. If the distance of p6 is greater than d, then p6 needs to be retained, and p6 is used as a new endpoint to form the line segments p1-p6 and p6-p7. At this point, the algorithm has completed one loop. Subsequently, the same processing is performed on the line segments p1-p6 and p6-p7 in a recursive manner. The points between p6 and p7 have been processed, so the algorithm ends directly. The point farthest from the line segment p1-p6 is p5. If the distance of p5 to the line segment is greater than d, then p5 is also a point to be retained.

[0041] The bow-shaped cleaning path planning method provided in this embodiment first fits a first polygon approximating the map contour using a preset classification algorithm before performing straight-line fitting on the map contour using a preset metric algorithm. Contour points on the map are then preliminarily classified according to the edges of the first polygon. This avoids the influence of contour points located on adjacent edges of the map contour on the fitting result during the fitting of the second polygon using the preset metric algorithm. If the map contour is directly fitted using the preset metric algorithm, firstly, it is unclear how many edges the map contour can be fitted into, and secondly, it is unclear which contour points belong to the same edge. This would lead to the misclassification of contour points on adjacent edges as contour points on the current edge, thus causing deviations in the fitting result for the current edge. The first polygon approximating the map contour using the preset classification algorithm is shown below. Figure 2As shown.

[0042] S3 fits the contour points located on the same side of the first polygon according to the preset measurement algorithm to obtain a second polygon that is similar to the outer contour of the map.

[0043] Whether a contour point lies on the same side of the first polygon is determined by a preset distance between the contour point and this side, such as 40cm to 60cm. The preset metric algorithm is the Manhattan distance algorithm, which is mainly used to calculate the sum of the distances between two points along the coordinate axes, i.e., the sum of the distances in the horizontal and vertical directions. The bow-shaped cleaning path planning method provided in this example uses the Manhattan distance algorithm with linear error. Compared with the Euler distance (residual) squared algorithm using the least squares method, the edge of the fitted polygon is closer to the wall side, rather than located in the middle of the threshold. This allows for more accurate removal of the map contour points representing the door after the polygon's edge is expanded in the next step. After fitting a straight line to the map contour points located on the same side of the first polygon according to the preset metric algorithm, a second polygon that approximates the outer contour of the map is obtained, such as... Figure 3 As shown.

[0044] S4 expands the edges of the second polygon by a first preset distance and removes the first contour point on the map outline, which is located outside the expanded second polygon.

[0045] The expansion is performed on the edges of the second polygon, expanding in both inward and outward directions. The first preset distance is set based on the depth of the threshold; for example, the first preset distance is 3 pixels, calculated at 5cm per pixel, so the first preset distance is 15cm. Furthermore, the bow-shaped cleaning path planning method provided in this example, after expanding the edges of the second polygon, first removes the first contour points located outside the second polygon, i.e., removes the contour points representing the door. The remaining contour points are mostly those representing the wall, a small number representing items such as fire extinguishers, and a small number representing the threshold. The door contour points are parallel to the wall contour points, and the threshold contour points are perpendicular to the wall. Because there are more contour points representing the wall, and these better represent the length direction of the map contour, a third polygon that more closely approximates the map contour can be fitted using these remaining contour points in the next step. The map after removing the contour points located outside the expanded second polygon is as follows: Figure 4 As shown.

[0046] S5 fits the map contour after removing the first contour point according to the preset measurement algorithm to obtain a third polygon that is similar to the map contour.

[0047] The fitted third polygon is as follows Figure 5 As shown.

[0048] S6 expands the edges of the third polygon according to the second preset distance, removes the second contour point on the map outline, and the second contour point is located inside the expanded third polygon.

[0049] After expanding the third polygon, the map outline points located within it are removed. This leaves outline points representing walls, a few irremovable outline points representing thresholds, and some outline points of small fire extinguishers close to the walls. This allows for a more accurate fit to a fourth polygon that approximates the map outline. The longer side of the fourth polygon is used as the main direction of the map outline, and a bow-shaped path for cleaning the area to be cleaned is planned based on this main direction. The map outline after removing the outline points inside the third polygon is as follows: Figure 6 As shown.

[0050] The second preset distance is also set based on the threshold depth, but it is greater than the first preset distance. For example, the second preset distance is 5 pixels, and with one pixel being 5cm, the first preset distance is 25cm. When fitting the contour points on the same edge of the first polygon according to the preset measurement algorithm, if the number of thresholds on a certain section of the wall is too high, it will cause the edge of the second polygon to be close to the center line of the threshold. If the first preset distance is too large, it will cause the contour lines representing the door to be removed along with the contour lines representing the wall. The larger second preset distance is mainly used to remove the contour lines of large objects inside the wall, such as shoe racks and thresholds in long corridor areas, to ensure the accuracy of the fourth polygon fitting.

[0051] S7 fits the map contour after removing the first and second contour points according to the preset measurement algorithm to obtain a fourth polygon that is similar to the map contour.

[0052] The fitted fourth polygon is as follows Figure 7 As shown.

[0053] S8 finds the main direction of the map outline based on the vertices of the fourth polygon, and plans the bow-shaped cleaning path of the map based on the main direction of the map.

[0054] Once the coordinates of the polygon's vertices are known, the distance between two adjacent vertices can be calculated. Based on this distance, the direction of the polygon's longer side can be determined. The main direction of the map of the area to be cleaned can then be determined based on the direction of the area to be cleaned. Finally, a bow-shaped path can be planned based on the main direction of the area to be cleaned.

[0055] The bow-shaped cleaning path planning method provided in this embodiment can perform polygon fitting on any map contour. However, for complex polygons, the bow-shaped path planned based on the longest fitted side is not the most efficient. Therefore, after obtaining the map of the area to be cleaned, this embodiment first performs partitioning processing on the map contour, that is, divides the map contour into multiple regions, and then performs subsequent processing on each region. After going through the processes of partitioning, fitting, and extracting the principal direction, the final planned bow-shaped path is as follows: Figure 8 As shown in the figure. The map outline is T-shaped, and there are 4 sections, each with a main direction.

[0056] The bow-shaped path planning method provided in this embodiment can significantly reduce the influence of the concave and convex parts of the map outline of the area to be cleaned, accurately extract the main direction of the area to be cleaned, and thus plan a bow-shaped path that fully covers the area to be cleaned, avoiding missed areas.

[0057] This embodiment also provides a bow-shaped cleaning path planning device, including: an acquisition module for acquiring a map of the area to be cleaned; a classification module for fitting a first polygon that approximates the outer contour of the map according to a preset classification algorithm, and classifying the contour points on the map according to the edges of the first polygon; a first fitting module for performing linear fitting on the contour points located on the same edge according to a preset measurement algorithm to obtain a second polygon that approximates the outer contour of the map; a first expansion module for expanding the edges of the second polygon by a preset distance and removing the contour points of the map located outside the expanded second polygon; a second fitting module for performing linear fitting on the remaining contour points of the map according to a preset measurement algorithm to obtain a third polygon that approximates the outer contour of the map; a second expansion module for expanding the edges of the third polygon by a preset distance and removing the contour points of the map located inside the expanded third polygon; a third fitting module for performing linear fitting on the remaining contour points of the map according to a preset measurement algorithm to obtain a fourth polygon that approximates the outer contour of the map; and a path planning module for finding the length direction of the map based on the vertices of the fourth polygon and planning a bow-shaped cleaning path of the map based on the length direction of the map.

[0058] In the bow-shaped cleaning path planning device provided in this embodiment, the preset classification algorithm is the Douglas-Puk algorithm, and the preset measurement algorithm is the Manhattan distance algorithm. The preset distance is determined based on the depth value of the threshold, which is located on the outline of the map of the area to be cleaned, and the second preset distance is greater than the first preset distance.

[0059] The bow-shaped cleaning path planning device provided in this embodiment also includes a contour point extraction module, which performs binarization processing on the map of the area to be cleaned in order to extract the contour points of the map; and a partitioning module, which performs partitioning processing on the map contour.

[0060] This embodiment also provides an electronic device, including a processor and a memory. The memory stores instructions, which are loaded and executed by the processor to implement the aforementioned bow-shaped cleaning path planning method. The electronic device also includes a communication interface for communicating with external devices and exchanging data. If the memory, processor, and communication interface are implemented independently, they can be interconnected via a bus to communicate with each other. The bus can be categorized as an address bus, data bus, control bus, etc. If the memory, processor, and communication interface are integrated on a single chip, they can communicate with each other through an internal interface.

[0061] This embodiment provides a computer-readable storage medium storing a computer program, which, when executed, implements the above-described bow-shaped cleaning path planning method.

[0062] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. It is worth noting that the processor can be a processor supporting the Advanced Reduced Instruction Set Computing (RISC) machine (ARM) architecture.

[0063] The memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0064] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention. Furthermore, the information disclosed in the various embodiments in the specific implementation details can be used for mutual reference.

Claims

1. A bow-tie cleaning path planning method, characterized by, The method comprises: obtaining a map of a region to be cleaned; fitting a first polygon approximating the contour of the map according to a preset classification algorithm, and classifying contour points on the map according to the number of edges of the first polygon; fitting contour points located on the same edge of the first polygon according to a preset metric algorithm to obtain a second polygon approximating the contour of the map; inflating the edges of the second polygon by a first preset distance to remove first contour points on the contour of the map, the first contour points being located outside the second polygon after inflation; fitting the contour of the map after removing the first contour points according to a preset metric algorithm to obtain a third polygon approximating the contour of the map; inflating the edges of the third polygon by a second preset distance to remove second contour points on the contour of the map, the second contour points being located inside the third polygon after inflation; fitting the contour of the map after removing the first contour points and the second contour points according to a preset metric algorithm to obtain a fourth polygon approximating the contour of the map; finding a main direction of the contour of the map based on the vertices of the fourth polygon, and planning a zigzag cleaning path of the map based on the main direction of the map.

2. The bow-shaped cleaning path planning method of claim 1, wherein, The preset classification algorithm is the Douglas-Peucker algorithm, and the preset metric algorithm is the Manhattan distance algorithm.

3. The bow-shaped cleaning path planning method of claim 1, wherein, Before fitting the first polygon approximating the contour of the map according to the preset classification algorithm, the contour of the map is partitioned.

4. The bow-shaped cleaning path planning method of claim 1, wherein, Before fitting the first polygon approximating the contour of the map according to the preset classification algorithm, the map of the region to be cleaned is binarized to extract contour points of the map.

5. The bow-shaped cleaning path planning method of claim 1, wherein, The first preset distance and the second preset distance are determined according to the depth value of the threshold, the threshold is located on the contour of the map of the region to be cleaned, and the second preset distance is greater than the first preset distance.

6. A W-shaped cleaning path planning device, characterized by The method comprises: an obtaining module, which obtains a map of a region to be cleaned; a classification module, which fits a first polygon approximating the contour of the map according to a preset classification algorithm, and classifies contour points on the map according to the number of edges of the first polygon; a first fitting module, which fits contour points located on the same edge of the first polygon according to a preset metric algorithm to obtain a second polygon approximating the contour of the map; a first inflation module, which inflates the edges of the second polygon by a first preset distance to remove first contour points on the contour of the map, the first contour points being located outside the second polygon after inflation; a second fitting module, which fits the contour of the map after removing the first contour points according to a preset metric algorithm to obtain a third polygon approximating the contour of the map; a second inflation module, which inflates the edges of the third polygon by a second preset distance to remove second contour points on the contour of the map, the second contour points being located inside the third polygon after inflation; a third fitting module, which fits the contour of the map after removing the first contour points and the second contour points according to a preset metric algorithm to obtain a fourth polygon approximating the contour of the map; and a fourth fitting module, which finds a main direction of the contour of the map based on the vertices of the fourth polygon, and plans a zigzag cleaning path of the map based on the main direction of the map. The path planning module finds a main direction of the map contour based on vertices of the fourth polygon, and plans a zigzag cleaning path of the map based on the main direction of the map.

7. The bow-shaped cleaning path planning apparatus according to claim 6, wherein The preset classification algorithm is a Douglas-Puke algorithm, and the preset metric algorithm is a Manhattan distance algorithm.

8. The bow-shaped cleaning path planning apparatus according to claim 6, wherein The first preset distance and the second preset distance are determined according to a depth value of the threshold, the threshold is located on a contour of the map of the to-be-cleaned area, and the second preset distance is greater than the first preset distance.

9. An electronic device, comprising: Comprise: A processor and a memory, the memory stores instructions, the instructions are loaded and executed by the processor to implement the method of any one of claims 1 to 5. 10.A computer readable storage medium, the computer readable storage medium stores a computer program, the computer program is executed to implement the method of any one of claims 1-5.