A sub-region segmentation method for a cleaning robot

Through Hoff's linear detection and the nearest distance to the line to the line, the sub -area is divided according to the straight line in the actual environment, and the problem of unreasonable division of the existing technology of the existing technology and improved the cleaning path efficiency of cleaning robots.

CN114764808BActive Publication Date: 2025-01-28NINGBO FOTILE KITCHEN WARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110029631.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-11
Publication Date
2025-01-28
Estimated Expiration
2041-01-11

AI Technical Summary

Technical Problem

Existing cleaning robots fail to fully consider actual environmental information when segmenting sub-regions, resulting in too many sub-regions and low cleaning path efficiency.

Method used

The nearest distance algorithm through the Hoff straight line detection and point to the line to the straight line will be divided into sub -regions based on the straight lines in the actual environment, reducing the number of divisions, and reasonable planning to clean the sub -area of ​​the robot.

Benefits of technology

A realized division of molecular areas based on the actual environmental information is achieved, and the efficiency of cleaning the cleaning path of cleaning robots is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114764808B_ABST
    Figure CN114764808B_ABST
Patent Text Reader

Abstract

The present invention relates to a sub-region segmentation method of a cleaning robot, which is used to divide an area to be cleaned into several sub-regions, and is characterized in that it includes the following steps: Step 1, the cleaning robot sweeps a circle along the edge of the area to be cleaned to obtain a complete information matrix of a two-dimensional grid map; Step 2, obtains the straight line segment closest to the current position of the cleaning robot, and calculates the angle θ between the line segment and the two-dimensional grid map; Step 3, determines the first sub-region; Step 4, draws several longitudinal parallel lines and transverse parallel lines parallel to the length and width of the first sub-region, and the two-dimensional grid map information matrix can be segmented into sub-regions by using the intersection of the longitudinal parallel lines and the transverse parallel lines. Compared with the prior art, the present invention can make the sub-regions parallel to the straight lines according to the straight lines existing in the actual environment, reduce the number of segmentations, and can more reasonably plan the sub-regions of the cleaning robot, which is convenient for the subsequent planning of the cleaning path of the cleaning robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a sub-region segmentation method for a cleaning robot. Background Art

[0002] When cleaning a large area, a cleaning robot often needs to divide the area into sub-areas and then clean each sub-area in turn. Therefore, the quality of sub-area segmentation determines whether the cleaning path is reasonable and efficient.

[0003] At present, the common practice of existing cleaning robots to divide sub-areas is to set the length and width of the sub-areas with fixed lengths, take the current location of the cleaning robot as the origin, take the current direction of travel of the cleaning robot as the length direction of the sub-area, and then divide the sub-areas. This method of dividing sub-areas is too simple and does not take into account the information in the actual environment. Due to the randomness of the initial direction, there may be too many sub-areas divided under equal area, and the cleaning path efficiency is not high. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a sub-region segmentation method of a cleaning robot, which can divide the self-region according to the straight lines existing in the actual environment, so as to make the self-region division more reasonable, with respect to the above-mentioned prior art.

[0005] The technical solution adopted by the present invention to solve the above technical problems is: a sub-area segmentation method of a cleaning robot, which is used to divide the area to be cleaned into several sub-areas, and is characterized by comprising the following steps:

[0006] Step 1: The cleaning robot sweeps along the edge of the area to be cleaned to obtain the information matrix M (x i ,y j ), i=1,2,…,p,j=1,2,…,q,M is 0 or 255, M=0 means the grid is empty, M=255 means the grid is occupied by an obstacle;

[0007] Step 2: Obtain the straight line that meets the length threshold in the two-dimensional grid map information matrix through Hough line detection. According to the algorithm of the shortest distance from a point to a straight line, obtain the straight line segment closest to the current position of the cleaning robot. Let the coordinates of the current position of the cleaning robot be (x1, y1), and the coordinates of the starting point of the line segment closest to the current position of the cleaning robot be (x 11 ,y 11 ,x 12 ,y 12 ), and calculate the angle θ between the line segment and the 2D grid map:

[0008]

[0009] Step 3, according to the current position of the cleaning robot P1 = (x1, y1) as a sub-area vertex, extend the distance of L in the direction of θ to obtain the second vertex P2, let the coordinates of the second vertex be P2 = (x2, y2), and extend the distance of W in the direction of θ+π / 2 from the second vertex P2 as the starting point to obtain the third vertex, let the coordinates of the third vertex be P3 = (x3, y3), and extend the distance of L in the direction of θ+π from the third vertex as the starting point to obtain the fourth vertex, let the coordinates of the fourth vertex be P4 = (x4, y4), and the rectangle formed by the four vertices P1, P2, P3, and P4 is the first sub-area;

[0010] Step 4: After obtaining the first sub-area, draw two straight lines in the area to be cleaned, the first straight line passes through the vertices P1 and P2 of the first sub-area, and the second straight line passes through P2 and P3;

[0011] Step 5. Draw n longitudinal parallel straight lines parallel to the first straight line L1 in the area to be cleaned, and the distance between adjacent longitudinal parallel straight lines is W; draw m transverse parallel straight lines parallel to the second straight line L2 in the area to be cleaned, and the distance between adjacent transverse parallel straight lines is L; two adjacent longitudinal parallel lines intersect with two adjacent transverse parallel lines to obtain four vertices of a sub-area, and the two-dimensional grid map information matrix can be divided into sub-areas by using the intersection of longitudinal parallel lines and transverse parallel lines.

[0012] In step 2, if no line segment meeting the requirements is detected, the angle θ of the current position of the cleaning robot is returned.

[0013] A gyroscope is provided inside the cleaning robot, and the angle θ of the current position of the cleaning robot is provided by the gyroscope.

[0014] n and m are preset fixed values, or m is obtained by dividing the length of the entire two-dimensional grid map by the length of the sub-region, and n is obtained by dividing the width of the entire two-dimensional grid map by the width of the sub-region.

[0015] The length L and width W of the first sub-region are obtained as follows:

[0016] The maximum length of the θ direction in the entire two-dimensional grid map is obtained as L_max, and the maximum length of the θ+π / 2 direction in the entire two-dimensional grid map is obtained as W_max. The upper and lower limits of the length and width of the first sub-area are set, that is, L∈[L min ,L max ],W∈[W min ,W max ], then the number of intervals in the length direction is Take the first positive integer in the length direction interval number and record it as n L , calculate the length of the first sub-region as The number of intervals in the width direction is Take the first positive integer in the width direction interval number and record it as w L , calculate the width of the first sub-region as Among them, L_max, W_max, L min , L max , W min , W max All are preset constants.

[0017] if There is no positive integer in, then L=L min ;if There is no positive integer in, then W=W min .

[0018] In step 5, if the coordinates of all vertices in a sub-region are within the two-dimensional grid map, the sub-region is retained; if the coordinates of at least one vertex in a sub-region are not within the two-dimensional grid map, it is determined whether the area of ​​the sub-region is greater than or equal to 50% of the area of ​​the first sub-region. If so, the sub-region is retained; if not, the sub-region is explored in four directions, such as up, down, left, and right, and the sub-region is merged with the sub-region with the smallest area in the four directions; if the areas of the sub-regions in the four directions are the same, a direction is selected arbitrarily and the sub-region is merged with the sub-region in that direction.

[0019] Compared with the prior art, the advantages of the present invention are that the sub-areas can be parallel to the straight lines existing in the actual environment, the number of divisions can be reduced, the sub-areas of the cleaning robot can be planned more reasonably, and the subsequent cleaning path planning of the cleaning robot is convenient. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 4 is a flow chart of a sub-region segmentation method of a cleaning robot in an embodiment of the present invention.

[0021] Figure 2 Schematic diagram of self-region segmentation of the area to be cleaned in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The present invention is further described in detail below with reference to the accompanying drawings.

[0023] like Figure 1 The sub-region segmentation method of the cleaning robot shown is used to divide the area to be cleaned into a plurality of sub-regions, and is characterized by comprising the following steps:

[0024] Step 1: The cleaning robot sweeps along the edge of the area to be cleaned to obtain the information matrix M (x i ,yj ), i=1,2,…,p,j=1,2,…,q,M is 0 or 255, M=0 means the grid is empty, M=255 means the grid is occupied by an obstacle;

[0025] Step 2: Obtain the straight lines that meet the length threshold in the information matrix of the two-dimensional grid map through Hough line detection. Hough line detection is a basic open source algorithm in image processing. According to the point set in the input map matrix, the voting algorithm is used to detect the line segments that meet the requirements in the map and return a series of starting coordinate points (x i1 ,y i1 ,x i2 ,y i2 ), i ranges from 1 to o, o is the total number of detected line segments, and then according to the algorithm of the shortest distance from a point to a line segment, the line segment closest to the current position of the cleaning robot is obtained. Let the coordinates of the current position P1 of the cleaning robot be (x1, y1), and the coordinates of the starting point of the line segment closest to the current position of the cleaning robot be (x 11 ,y 11 ,x 12 ,y 12 ), and calculate the angle θ between the line segment and the 2D grid map:

[0026]

[0027] If no line segment meeting the requirements is detected, the angle θ of the current position of the cleaning robot is returned. A gyroscope is provided in the cleaning robot, and the angle θ of the current position of the cleaning robot is provided by the gyroscope.

[0028] Step 3: Based on the current position of the cleaning robot P1=(x1, y1) as a vertex of the sub-area, extend the distance L in the direction of θ to obtain the second vertex P2, let the coordinates of the second vertex be P2=(x2, y2), and extend the distance W in the direction of θ+π / 2 from the second vertex P2 as the starting point to obtain the third vertex. Let the coordinates of the third vertex be P3=(x3, y3), and extend the distance L in the direction of θ+π from the third vertex as the starting point to obtain the fourth vertex. Let the coordinates of the fourth vertex be P4=(x4, y4). The rectangle formed by the four vertices P1, P2, P3, and P4 is the first sub-area, see Figure 2 As shown;

[0029] Step 4: After obtaining the first sub-area, draw two straight lines in the area to be cleaned. The first straight line L1 passes through the vertices P1 and P2 of the first sub-area, and the second straight line L2 passes through P2 and P3. Figure 2 As shown;

[0030] Step 5. Draw n longitudinal parallel straight lines in the area to be cleaned, all parallel to the first straight line L1, and the distance between adjacent longitudinal parallel straight lines is W; draw m transverse parallel straight lines in the area to be cleaned, all parallel to the second straight line L2, and the distance between adjacent transverse parallel straight lines is L; two adjacent longitudinal parallel lines intersect with two adjacent transverse parallel lines to obtain four vertices of a sub-area, see also Figure 2 As shown, the two-dimensional grid map information matrix can be divided into sub-areas by using the intersection of longitudinal parallel lines and transverse parallel lines.

[0031] In this embodiment, n and m may be preset fixed values, m may be obtained by dividing the length of the entire two-dimensional grid map by the length of the sub-region, and n may be obtained by dividing the width of the entire two-dimensional grid map by the width of the sub-region.

[0032] The length L and width W of the first sub-region are obtained as follows:

[0033] The maximum length of the θ direction in the entire two-dimensional grid map is obtained as L_max, and the maximum length of the θ+π / 2 direction in the entire two-dimensional grid map is obtained as W_max. The upper and lower limits of the length and width of the first sub-area are set, that is, L∈[L min ,L max ],W∈[W min ,W max ], then the number of intervals in the length direction is Take the first positive integer in the length direction interval number and record it as n L , calculate the length of the first sub-region as The number of intervals in the width direction is Take the first positive integer in the width direction interval number and record it as w L , calculate the width of the first sub-region as Among them, L_max, W_max, L min , L max , W min , W max are all preset constants; if There is no positive integer in, then L=L min ;if There is no positive integer in, then W=W min .

[0034] In this embodiment, in step 5, if the coordinates of all vertices in a sub-region are within the two-dimensional grid map, the sub-region is retained; if the coordinates of at least one vertex in a sub-region are not within the two-dimensional grid map, it is determined whether the area of ​​the sub-region is greater than or equal to 50% of the area of ​​the first sub-region. If so, the sub-region is retained; if not, the sub-region is explored in the four directions of up, down, left, and right, and the sub-region is merged with the sub-region with the smallest area in the four directions; if the areas of the sub-regions in the four directions are the same, arbitrarily select one direction and merge the sub-region with the sub-region in that direction.

Claims

1. A sub-region segmentation method for a cleaning robot, for dividing a to-be-cleaned area into a plurality of sub-regions, characterized in that The steps include: Step 1: The cleaning robot sweeps along the edge of the area to be cleaned to obtain the information matrix M (x i ,y j ), i=1,2,…,p,j=1,2,…,q,M is 0 or 255, M=0 means the grid is empty, M=255 means the grid is occupied by an obstacle; Step 2: Obtain the straight line that meets the length threshold in the two-dimensional grid map information matrix through Hough line detection. According to the algorithm of the shortest distance from a point to a straight line, obtain the straight line segment closest to the current position of the cleaning robot. Let the coordinates of the current position of the cleaning robot be (x1, y1), and the coordinates of the starting point of the line segment closest to the current position of the cleaning robot be (x 11 ,y 11 )、(x 12 ,y 12 ), and calculate the angle θ between the line segment and the 2D grid map: Step 3, according to the current position of the cleaning robot P1 = (x1, y1) as a sub-area vertex, extend the distance of L in the direction of θ to obtain the second vertex P2, let the coordinates of the second vertex be P2 = (x2, y2), and extend the distance of W in the direction of θ+π / 2 from the second vertex P2 as the starting point to obtain the third vertex, let the coordinates of the third vertex be P3 = (x3, y3), and extend the distance of L in the direction of θ+π from the third vertex as the starting point to obtain the fourth vertex, let the coordinates of the fourth vertex be P4 = (x4, y4), and the rectangle formed by the four vertices P1, P2, P3, and P4 is the first sub-area; Step 4: After obtaining the first sub-area, draw two straight lines in the area to be cleaned, the first straight line passes through the vertices P1 and P2 of the first sub-area, and the second straight line passes through P2 and P3; Step 5, draw n longitudinal parallel straight lines in the area to be cleaned, all parallel to the first straight line L1, and the distance between adjacent longitudinal parallel straight lines is W; draw m transverse parallel straight lines in the area to be cleaned, all parallel to the second straight line L2, and the distance between adjacent transverse parallel straight lines is L; two adjacent longitudinal parallel lines intersect with two adjacent transverse parallel lines to obtain four vertices of a sub-area, and the two-dimensional grid map information matrix can be divided into sub-areas by using the intersection of longitudinal parallel lines and transverse parallel lines; The length L and width W of the first sub-region are obtained as follows: The maximum length of the θ direction in the entire two-dimensional grid map is obtained as L_max, and the maximum length of the θ+π / 2 direction in the entire two-dimensional grid map is obtained as W_max. The upper and lower limits of the length and width of the first sub-area are set, that is, L∈[L min ,L max ],W∈[W min ,W max ], then the number of intervals in the length direction is Take the first positive integer in the length direction interval number and record it as n L , calculate the length of the first sub-region as The number of intervals in the width direction is W L ∈ Take the first positive integer in the width direction interval number and record it as w L , calculate the width of the first sub-region as Among them, L_max, W_max, L min , L max , W min , W max All are preset constants; if There is no positive integer in, then L=L min ;if There is no positive integer in, then W=W min .

2. The sub-region segmentation method of the cleaning robot according to claim 1, characterized in that: In step 2, if no line segment meeting the requirements is detected, the angle θ of the current position of the cleaning robot is returned.

3. The sub-region segmentation method of the cleaning robot according to claim 1, characterized in that: A gyroscope is provided inside the cleaning robot, and the angle θ of the current position of the cleaning robot is provided by the gyroscope.

4. The sub-region segmentation method of the cleaning robot according to claim 1, characterized in that: n and m are preset fixed values, or m is obtained by dividing the length of the entire two-dimensional grid map by the length of the sub-region, and n is obtained by dividing the width of the entire two-dimensional grid map by the width of the sub-region.

5. The sub-region segmentation method of the cleaning robot according to claim 1, characterized in that: In step 5, if the coordinates of all vertices in a sub-region are within the two-dimensional grid map, the sub-region is retained; if the coordinates of at least one vertex in a sub-region are not within the two-dimensional grid map, it is determined whether the area of ​​the sub-region is greater than or equal to 50% of the area of ​​the first sub-region. If so, the sub-region is retained; if not, the sub-region is explored in four directions, such as up, down, left, and right, and the sub-region is merged with the sub-region with the smallest area in the four directions; if the areas of the sub-regions in the four directions are the same, a direction is selected arbitrarily and the sub-region is merged with the sub-region in that direction.

Citation Information

Patent Citations

  • Area segmentation method based on cleaning robot

    CN105302136A

  • Block adjusting method and device for cleaning robot and robot

    CN107898393A