A method for extracting starting points along an edge and related devices

The original local map is obtained by a sweeping robot, and the edge starting points are extracted after removing outliers. This solves the impact of interference on the edge starting point extraction algorithm, improves accuracy and efficiency, and ensures the complete construction of the home environment map.

CN114529735BActive Publication Date: 2025-09-26ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111654987.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-09-26
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

In the prior art, during the edge starting point extraction process of a sweeping robot, the presence of interference affects the accuracy and efficiency of the edge starting point extraction algorithm.

Method used

The original local map is obtained by the sweeping robot, the point cloud attributes of the occupied grid are determined, and outliers are removed to obtain the preprocessed local map. Then, the edge starting point extraction operation is performed to obtain the target edge starting point.

Benefits of technology

It effectively avoids the influence of interference on the edge starting point extraction algorithm, improves the accuracy and efficiency of edge starting point extraction, and ensures the complete construction of the home environment map.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529735B_ABST
    Figure CN114529735B_ABST
Patent Text Reader

Abstract

This application discloses a method and related apparatus for extracting edge starting points. The method comprises: a sweeping robot obtains an original local map; determines the point cloud attributes of the occupied grids in the original local map, and removes the occupied grids whose point cloud attributes are outliers to obtain a preprocessed local map, wherein the point cloud attributes of the occupied grids include core points, outliers, and boundary points; and performs an edge starting point extraction operation on the preprocessed local map to obtain target edge starting points. The method provided in this application can avoid the impact of interference on the accuracy and efficiency of the edge starting point extraction algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of sweeping robots, and in particular to a method for extracting edge starting points and related devices. Background Art

[0002] With the advancement of technology, sweeping robots have gradually become popular, providing numerous conveniences for people's daily lives with their intelligent and flexible features. Cleaning is one of the main tasks of a sweeping robot, and before performing cleaning tasks, it is usually necessary to construct a map of the home environment. Edge-based mapping is currently the most commonly used mapping method. The selection of edge starting points directly affects the efficiency and performance of edge-based mapping, making it a major research hotspot in the field of sweeping robots. Summary of the Invention

[0003] The main technical problem solved by the present application is to provide a method and related device for extracting starting points along the edge, so as to avoid the influence of interference on the accuracy and efficiency of the algorithm for extracting starting points along the edge.

[0004] To solve the above technical problems, a technical solution adopted in this application is to provide a method for extracting starting points along an edge, the method comprising:

[0005] The sweeping robot obtains the original local map;

[0006] Determining point cloud attributes of occupied grids in the original local map, and removing occupied grids whose point cloud attributes are outliers, to obtain a preprocessed local map, wherein the point cloud attributes of the occupied grids include core points, the outliers, and boundary points;

[0007] An edge starting point extraction operation is performed on the preprocessed local map to obtain target edge starting points.

[0008] In order to solve the above technical problems, another technical solution adopted by the present application is: to provide a sweeping robot, the sweeping robot comprising a processor and a memory coupled to the processor; wherein,

[0009] The memory is used to store computer programs;

[0010] The processor is configured to run the computer program to perform any one of the methods described above.

[0011] To solve the above technical problems, another technical solution adopted in this application is: providing a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program that can be executed by a processor, and the computer program is used to implement any of the methods described above.

[0012] The beneficial effects of the present application are as follows: Unlike the prior art, the technical solution provided by the present application enables the robot vacuum to obtain an original local map, then determine the point cloud attributes of the occupied grids in the original local map, and eliminate the occupied grids whose point cloud attributes are outliers, thereby obtaining a preprocessed local map. The preprocessed local map then performs an edge starting point extraction operation to obtain the target edge starting points. Specifically, by eliminating the occupied grids whose point cloud attributes are outliers in the original local map, the impact of interference on the accuracy and efficiency of the edge starting point extraction algorithm can be avoided, achieving a good technical effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a flow chart of an embodiment of a method for extracting starting points along an edge according to the present application;

[0014] Figure 2 This is a schematic structural diagram of a local map in a method for extracting starting points along an edge in this application;

[0015] Figure 3 This is a flow chart of another embodiment of a method for extracting starting points along an edge according to the present application;

[0016] Figure 4 This is a flow chart of another embodiment of a method for extracting starting points along an edge according to the present application;

[0017] Figure 5 This is a flow chart of another embodiment of a method for extracting starting points along an edge according to the present application;

[0018] Figure 6 This is a flow chart of another embodiment of a method for extracting starting points along an edge according to the present application;

[0019] Figure 7 This is a flow chart of another embodiment of a method for extracting starting points along an edge according to the present application;

[0020] Figure 8 This is a flow chart of another embodiment of a method for extracting starting points along an edge according to the present application;

[0021] Figure 9 This is a flow chart of another embodiment of a method for extracting starting points along an edge according to the present application;

[0022] Figure 10 This is a structural diagram of an embodiment of a sweeping robot in the present application;

[0023] Figure 11 This is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It will be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0025] In the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically limited. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to the process, method, product, or device.

[0026] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0027] Please also see Figure 1 and Figure 2 , Figure 1 This is a flow chart of an embodiment of a method for extracting starting points along an edge in this application. Figure 2 FIG. 1 is a schematic diagram of the structure of a local map in a method for extracting starting points along an edge according to the present application. In the current embodiment, the method provided by the present application includes S110 to S130.

[0028] S110: The sweeping robot obtains an original local map.

[0029] When performing a cleaning task, the sweeping robot first obtains the original local map, and executes the following steps S120 to S130 based on the original local map to obtain the target edge starting point, and then completes the map construction of the home environment based on the determined target edge starting point.

[0030] Specifically, in the current embodiment, the local map obtained by the sweeping robot includes occupied grids and unoccupied grids. Figure 2 As shown, the original local map obtained is based on the current position of the sweeping robot as the viewpoint center ( Figure 2 A grid map of the dots O in the image. Figure 2The occupied grids in the original local map are marked in black, the unoccupied grids are marked in white, and the unexplored areas are marked in gray.

[0031] Furthermore, the cleaning robot may obtain the original local map by collecting and processing the original local map through a collection unit provided by the cleaning robot. In other embodiments, the cleaning robot may also obtain the original local map from other electronic devices specifically used to collect the original local map.

[0032] S120: Determine the point cloud attributes of the occupied grids in the original local map, and remove the occupied grids whose point cloud attributes are outliers to obtain a preprocessed local map.

[0033] After obtaining the original local map, the point cloud attributes of each occupied grid included in the original local map are further determined. The point cloud attributes of the occupied grid refer to the point cloud type corresponding to the occupied grid in the home environment. Specifically, the point cloud attributes of the occupied grid include core points, outliers, and boundary points.

[0034] After determining the point cloud attributes of each occupied grid in the original local map, the occupied grids with point cloud attributes of outliers in the original local map are further eliminated, and the local map after eliminating all occupied grids with point cloud attributes of outliers is output as a preprocessed local map for executing the following step S130.

[0035] Further, see Figure 3 , Figure 3 This is a flow chart of another embodiment of a method for extracting starting points along an edge in the present application. In the current embodiment, step S120 determines the point cloud attributes of the occupied grids in the original local map and removes the occupied grids whose point cloud attributes are outliers to obtain a preprocessed local map, further including steps S301 to S303.

[0036] S301: Counting the number of first occupied grids included in a first preset area and a second preset area corresponding to the occupied grids, and outputting the numbers as a first number and a second number, respectively.

[0037] First, for each occupied grid included in the original local map, the number of first occupied grids included in the first preset area and the second preset area corresponding to each occupied grid is counted, and the number of first occupied grids included in the first preset area corresponding to each occupied grid is output as a first number, and the number of first occupied grids included in the second preset area corresponding to each occupied grid is output as a second number. In the technical solution provided in this application, the term "first occupied grid" refers to the other occupied grids included in the first preset area and the second preset area corresponding to each occupied grid (i.e., the occupied grid excluding itself).

[0038] For example, in one embodiment, the original local map includes 10 occupied grids. Then, in step S301, the number of first occupied grids included in the first preset area corresponding to each of the 10 occupied grids will be statistically determined and output as the first number corresponding to each occupied grid. The number of first occupied grids included in the second preset area corresponding to each of the 10 occupied grids will also be determined and output as the second number corresponding to each occupied grid, for subsequent determination of the point cloud attributes of each occupied grid.

[0039] The first preset area and the second preset area are concentric circular areas with the occupied grid as the center, and the radius of the first preset area is smaller than the radius of the second preset area. It is understood that in other embodiments, the radius of the first preset area and the second preset area can be set according to actual needs.

[0040] S302: Determine whether the point cloud attribute of the occupied grid is an outlier according to the first number and the second number corresponding to the occupied grid.

[0041] After obtaining the number of first occupied grids included in the first preset area and the second preset area corresponding to the occupied grid and outputting them as the first number and the second number, respectively, it is further determined whether the point cloud attribute of the occupied grid is an outlier based on the first number and the second number corresponding to the occupied grid.

[0042] Furthermore, determining whether the point cloud attribute of the occupied grid is an outlier based on the first number and the second number corresponding to the occupied grid, respectively, includes: if the first number corresponding to the occupied grid is less than a first threshold or the second number is less than a second threshold, then determining that the point cloud attribute of the occupied grid is an outlier. Wherein, the first threshold and the second threshold are both preset empirical values, and the first threshold is less than the second threshold.

[0043] Specifically, for a certain occupied grid, if the number of first occupied grids included in the first preset area corresponding to it is less than the first threshold, or the number of first occupied grids included in the second preset area corresponding to the occupied grid is less than the second threshold, then the point cloud attribute of the occupied grid is determined to be an outlier.

[0044] Furthermore, if it is determined that the point cloud attribute of the occupied grid is not an outlier, the method provided in this application further includes: further determining whether the point cloud attribute of the occupied grid is a core point or a boundary point. Specifically, if the first number corresponding to the occupied grid is greater than the third threshold, and the second number is greater than the fourth threshold, the point cloud attribute of the occupied grid is determined to be a core point.

[0045] Then, the point cloud attributes of the remaining occupied grids in the original local map, excluding those with outlier or core point attributes, are further determined as boundary points. In other words, in another embodiment, after determining that the point cloud attributes of the occupied grid are neither outliers nor core points, the occupied grid can also be automatically classified as a boundary point. It should be noted that in the following description of some embodiments, the point cloud attributes of the occupied grid will be used to refer to the occupied grid.

[0046] In another embodiment, if after determining that the point cloud attribute occupying the grid is not an outlier, it is first determined whether the point cloud attribute occupying the grid is a boundary point, then the method provided in the present application can also directly determine the point cloud attribute occupied by the point cloud that is neither an outlier nor a boundary point as a core point.

[0047] It should be noted that, although in the above embodiment, it is first determined whether the point cloud attributes of the occupied grid are outliers, and then after it is determined that the point cloud attributes of the occupied grid are not outliers, it is further determined in sequence whether the point cloud attributes of the occupied grid are core points and boundary points, but in some embodiments, it can also be set to directly determine the point cloud attributes of the occupied grid based on the comparison results between the first number corresponding to the occupied grid and the first threshold and the third threshold, and the second number and the second threshold and the fourth threshold.

[0048] S303: If yes, then remove the occupied grids with outlier point attributes from the local map to obtain a pre-processed local map.

[0049] If the point cloud attribute of the occupied grid is determined to be an outlier, the occupied grid with the point cloud attribute as an outlier will be further removed from the local map. For the occupied grids included in the original local map, each occupied grid will be traversed to determine whether the point cloud attribute of each occupied grid is an outlier.

[0050] In the current embodiment, before determining the target edge starting point, whether the occupied grid is an outlier is determined based on the number of first occupied grids included in the first preset area and the second preset area corresponding to the occupied grid, and the occupied grids with point cloud attributes as outliers are directly eliminated. By eliminating the outliers, interference objects in the home environment such as human legs and table legs are filtered out, avoiding such interference objects from being easily selected as edge starting points when they are close to the sweeping robot, resulting in the extracted edge path being an invalid path when constructing the home map, and the task of constructing a complete map cannot be completed.

[0051] S130: Performing an edge starting point extraction operation on the pre-processed local map to obtain a target edge starting point.

[0052] After obtaining the pre-processed local map, an edge starting point extraction operation is further performed on the obtained pre-processed local map to obtain the target edge starting point. The target edge starting point is the edge starting point used to construct the complete home map.

[0053] Furthermore, the edge starting point extraction operation includes: the edge starting point extraction step based on charging piles, the edge starting point extraction step based on straight line features, and the edge starting point extraction step based on point cloud clustering. Specifically, the specific technical details of the edge starting point extraction operation can be found below. Figures 4 to 9 The corresponding embodiments will not be elaborated in detail here.

[0054] After obtaining the target edge starting point, the sweeping robot further builds a map based on the target edge starting point to construct a complete home map.

[0055] Figure 1 In the technical solution provided in the corresponding embodiment, the robot vacuum obtains an original local map, determines the point cloud attributes of the occupied cells in the original local map, and removes cells with outlier point cloud attributes to obtain a preprocessed local map. The robot vacuum then performs an edge starting point extraction operation on the preprocessed local map to obtain the target edge starting points. Specifically, by removing cells with outlier point cloud attributes from the original local map, the impact of interference on the accuracy and efficiency of the edge starting point extraction algorithm can be avoided.

[0056] See Figure 4 , Figure 4 This is a flow chart of another embodiment of a method for extracting starting points along an edge of the present application. In the current embodiment, the above step S130 performs an edge starting point extraction operation on the pre-processed local map to obtain target edge starting points, further comprising steps S401 to S406.

[0057] S401: Determine the distance between the current position of the sweeping robot and the charging station.

[0058] After obtaining the pre-processed local map, the distance between the current position of the sweeping robot and the location of the charging pile is further calculated and determined. Specifically, the distance between the sweeping robot and the charging pile can be calculated and determined based on the signal interaction time and speed between the sweeping robot and the charging pile. It is understood that in other embodiments, the sweeping robot can also be set to calculate and determine the distance between itself and the charging pile based on other methods, which are not listed here one by one.

[0059] S402: Determine whether the distance between the current position of the sweeping robot and the position of the charging pile is less than or equal to a first distance threshold.

[0060] After determining the distance between the current position of the sweeping robot and the location of the charging pile, further determine whether the distance between the current position of the sweeping robot and the location of the charging pile is less than or equal to the first distance threshold. Among them, the first distance threshold is a pre-set distance experience value used to determine whether the step of extracting the starting point along the edge based on the charging pile can be performed, and the first distance threshold can be set and adjusted according to actual needs. No specific numerical limit is made to the first distance threshold here. Furthermore, in other embodiments, the first distance threshold can be set according to the actual application conditions and can be dynamically adjusted according to the application conditions. For example, when the target starting point along the edge still cannot be extracted based on the following steps (that is, the target starting point along the edge still cannot be obtained after steps S403 to S406), the first distance threshold can be further dynamically adjusted according to the pre-set settings, and then the above step S402 can be re-executed.

[0061] If it is determined that the distance between the current position of the sweeping robot and the charging pile position is less than or equal to the first distance threshold, execute the following step S403; if it is determined that the distance between the current position of the sweeping robot and the charging pile position is greater than the first distance threshold, further execute the following step S404.

[0062] S403: Execute the charging pile-based edge starting point extraction step on the pre-processed local map to obtain the target edge starting point.

[0063] When it is determined that the distance between the current position of the sweeping robot and the position of the charging pile is less than or equal to the first distance threshold, the pre-processed local map is further subjected to the step of extracting the starting point along the edge based on the charging pile. Figure 5 The corresponding embodiment.

[0064] S404: Determine whether a straight line feature can be obtained in the pre-processed local map.

[0065] Furthermore, since straight line features are relatively common features in home scenes, and straight line segments are also more suitable as starting points along the edge of the sweeping robot, when it is determined that the distance between the current position of the sweeping robot and the charging pile position is greater than the first distance threshold, it is further determined whether the straight line features can be extracted in the pre-processed local map.

[0066] Specifically, in one embodiment, a Hough transform algorithm may be used to extract straight line features from the preprocessed local map, and a determination is made based on the execution result of the Hough transform algorithm as to whether straight line features can be extracted. If at least one straight line feature can be extracted from the preprocessed local map using the Hough transform algorithm, step S405 is executed. If no straight line feature can be extracted, step S406 is further executed.

[0067] Furthermore, in one embodiment, if the straight line features extracted from the pre-processed local map based on the Hough transform algorithm are recorded as Among them, i is the number used to identify the extracted straight line feature, and the corresponding L (the largest straight line feature number) can be used to represent the number of extracted straight line features. Represents the straight line feature l i Starting point coordinates, Represents the straight line segment l i If L=0, it is determined that the step of extracting the starting point along the edge based on the straight line feature cannot be performed on the pre-processed local map, that is, step S406 needs to be executed at this time.

[0068] S405: Execute the edge starting point extraction step based on the straight line feature on the pre-processed local map to obtain the target edge starting point.

[0069] If it is determined that at least one straight line feature can be obtained in the pre-processed local map, the step of extracting the starting point along the edge based on the straight line feature is performed on the pre-processed local map. The step of extracting the starting point along the edge based on the straight line feature can be referred to Figure 6 The corresponding embodiment.

[0070] S406: Execute the edge starting point extraction step based on point cloud clustering on the pre-processed local map to obtain the target edge starting point.

[0071] If it is determined that no straight line features can be obtained in the pre-processed local map, the edge starting point extraction step based on point cloud clustering will be performed on the pre-processed local map. The edge starting point extraction step based on point cloud clustering can be found in Figure 7 The corresponding embodiment.

[0072] It should be noted that in the current embodiment, according to the pre-setting, it is first determined whether the step of extracting the starting points along the edge based on the charging pile can be performed on the pre-processed local map. If not, it is then determined whether the step of extracting the starting points along the edge based on the straight line feature can be performed on the pre-processed local map. When it is determined that the step of extracting the starting points along the edge based on the straight line feature cannot be performed on the pre-processed local map, the step of extracting the starting points along the edge based on the point cloud clustering is finally performed on the pre-processed local map. That is, based on the above-mentioned priority order, the edge starting point extraction operation is performed on the pre-processed local map. In other embodiments, the priority order of each extraction step included in the edge starting point extraction operation can also be adjusted based on changes in the home scene or actual application requirements. (That is, the execution order of the above-mentioned steps S401 to S406 is adjusted).

[0073] See Figure 5 , Figure 5This is a flow chart of another embodiment of the method for extracting edge starting points of the present application. In the current embodiment, the above step S403 performs the step of extracting edge starting points based on charging piles on the pre-processed local map to obtain the target edge starting points, further including steps S501 to S503.

[0074] S501: Generate a first reference line with the charging pile as the center point and the direction of the charging pile as the normal direction.

[0075] The location of the charging pile is used as the center point, and the orientation of the charging pile is used as the normal direction to generate a first reference line. The first reference line is the line used in step S502 to filter the occupied grids that meet the first screening condition, and the orientation of the charging pile can refer to the orientation of the end face of the charging pile connected to the sweeping robot.

[0076] S502: For each occupied grid whose point cloud attribute is a core point included in the pre-processed local map, filter the occupied grid that meets the first filtering condition.

[0077] After generating the first baseline, the occupancy grid of each point cloud attributed as a core point in the pre-processed local map is filtered, and only those occupancy grids that meet the first filtering criteria and are core points are retained. (In some embodiments, this can also be understood as retaining only core points that meet the first filtering criteria.)

[0078] The first screening condition is that the distance between the occupied grid of the core point and the first reference line and the distance to the charging pile satisfy the following formula.

[0079]

[0080] Among them, λ in the formula d1 ,λ d2 ,λ d3 is the pre-set distance threshold for filtering the grid occupied by the point cloud attribute as the core point, p B It refers to the location of the charging pile, and a and b are constant parameters in the equation of the first baseline in the preprocessed local map.

[0081] S503: Determine an occupied grid that is closest to the charging pile among the occupied grids that meet the first screening condition as the target edge starting point.

[0082] After the occupied grids satisfying the first screening condition are obtained through screening, an occupied grid that is closest to the charging pile among the occupied grids satisfying the first screening condition is further determined as the target edge starting point.

[0083] for Figure 5In the illustrated embodiment, if a straight line is generated with the center of the charging pile as the center point and the direction of the charging pile as the normal direction, the straight line equation of the first reference line in the coordinate system of the preprocessed local map is expressed as ax+by+1=0.

[0084] For each point cloud attribute retained in the preprocessed local map, the occupancy grid p of the core point i , and record it as p i =(x i y i ). Calculate the distance from each occupied grid with the point cloud attribute as the core point to the straight line ax+by+1=0 and the distance to the charging pile, and then based on the two calculated distances, further determine whether the occupied grid with the point cloud attribute as the core point meets the above-mentioned first filtering condition, and retain the occupied grid that meets the first filtering condition and has the point cloud attribute as the core point. In other embodiments, the position coordinates of the charging pile and the point cloud attribute as the core point in the pre-processed local map can also be directly substituted into the formula of the above-mentioned first filtering condition to determine whether the core point with the point cloud attribute as the core point meets the first filtering condition. Then extract the occupied grid closest to the charging pile among the occupied grids that meet the first filtering condition as the target edge starting point.

[0085] See Figure 6 , Figure 6 This is a flow chart of another embodiment of the method for extracting edge starting points of the present application. In the current embodiment, the above step S405 performs the step of extracting edge starting points based on straight line features on the pre-processed local map to obtain the target edge starting points, further including steps S601 to S604.

[0086] S601: Extracting a plurality of first straight line features from a pre-processed local map using a first algorithm.

[0087] When performing the step of extracting the start points along the edges of the straight line features on the pre-processed local map, a first algorithm is first used to extract a plurality of first straight line features from the pre-processed local map.

[0088] Furthermore, the first algorithm includes a Hough transform algorithm. It is understandable that, in other embodiments, the first algorithm may also include other types of algorithms, which are not listed here one by one.

[0089] S602: Merge and / or filter a plurality of first straight line features to obtain at least one second straight line feature.

[0090] After extracting and obtaining a plurality of first straight line features from the pre-processed local map, the extracted plurality of first straight line features are further merged and / or filtered to obtain at least one second straight line feature.

[0091] It should be noted that, in some embodiments, if only a first straight line feature is extracted in step S601, the obtained first straight line feature can be directly output as the second reference line (ie, step S602 and step S603 are not executed).

[0092] Furthermore, a plurality of first straight line features are merged and / or screened to obtain at least one second straight line feature, including: for a plurality of first straight line features, first straight line features that meet a preset merging condition are merged, and the merged straight line features and first straight line features that do not meet the preset merging condition are output as a third straight line feature; for each third straight line feature, a straight line feature whose distance from the sweeping robot is less than or equal to a second distance threshold is screened as a second straight line feature. The second distance threshold is a pre-set distance threshold for screening and obtaining the second straight line feature, which can be set according to actual needs, and the preset merging condition is that the similarity of the first straight line features is greater than or equal to a preset similarity threshold. Furthermore, the preset merging condition can also be set such that the angle between different first straight line features is less than a pre-set angle threshold, and the distance between them is less than a pre-set third distance threshold.

[0093] Furthermore, in some embodiments, a second distance threshold may be set dynamically based on the actual extraction conditions of edge start points. If it is determined that the target edge start point cannot be obtained based on the initial first distance threshold, the second distance threshold, and the second threshold, at least one of the preset empirical values ​​is dynamically adjusted based on the preset settings.

[0094] In one embodiment, a plurality of first line features are merged first, and then a screening operation is performed on the third line features obtained after the merging operation.

[0095] In another embodiment, if none of the first straight line features meets the merging condition, the first straight line features may be directly output as third straight line features, and a screening operation may be performed on the third straight line features.

[0096] S603: Determine the second straight line feature with the longest distance as the second reference line.

[0097] After obtaining multiple second straight line features, the second straight line feature with the longest distance is further determined as a second reference line, wherein the second reference line is the reference line obtained by screening the target edge starting point when performing the edge starting point extraction step based on the straight line features.

[0098] S604: Determine the point cloud attributed as a core point, the occupied grid closest to the cleaning robot, and the occupied grid closest to the cleaning robot as the target edge starting point.

[0099] After determining the second baseline, the distance between each occupied grid of each point cloud attributed as a core point and the second baseline is further determined, and the occupied grid of the point cloud attributed as a core point closest to the second baseline is determined as the target edge starting point. The fourth distance threshold is a pre-set empirical value.

[0100] for Figure 6 In the illustrated embodiment, if the first straight line feature extracted from the pre-processed local map by the Hough transform algorithm is The first straight line features with similar features are merged. Specifically, the first straight line features that meet a preset merging condition are merged, specifically, the first straight line features whose angles between them are less than a preset angle threshold and whose distances between them are less than a preset third distance threshold are merged.

[0101] Furthermore, if the two first straight line features l i 、l j If the preset merging conditions are met, the four vertex coordinates of the two first line features are used as input, and the linear equation y=kx+b of the merged third line feature is obtained by fitting through the least squares algorithm, and the merged third line feature is expressed as The coordinates of each endpoint of the merged third line feature can be determined based on the following formula:

[0102]

[0103] After performing the merge operation, the output third straight line features are further calculated to calculate the distance from the current position of the sweeping robot to each third straight line feature, and then the ones with a distance greater than the second distance threshold λ are filtered out. scope The third straight line feature of the sweeping robot is less than or equal to the second distance threshold λ scope The third straight line feature is determined as the second straight line feature.

[0104] If multiple second straight line features are obtained, the second straight line feature with the longest length will be further extracted as the second baseline, and the occupied grid with the point cloud attribute as the core point and the distance from the second baseline is less than the fourth distance threshold will be further screened; finally, the occupied grid with the point cloud attribute as the core point closest to the current position of the sweeping robot is selected as the target edge starting point.

[0105] See Figure 7 , Figure 7This is a flow chart of another embodiment of a method for extracting edge starting points of the present application. In the current embodiment, the above step S406 performs the edge starting point extraction step based on point cloud clustering on the pre-processed local map to obtain the target edge starting points, including steps S701 to S704.

[0106] S701: performing a core point clustering operation on an occupancy grid of a point cloud attributed to a core point included in a pre-processed local map to obtain a plurality of first point cloud clusters.

[0107] First, for the occupancy grid of the point cloud attribute as the core point included in the pre-processed local map, the boundary points and the core point in the search area of ​​the preset radius are clustered into the same first point cloud cluster (it can also be understood as merging the occupancy grid of the point cloud attribute as the boundary point into the first point cloud cluster corresponding to the core point) by using Euclidean distance as the metric and the occupancy grid of the point cloud attribute as the core point as the center. Finally, after traversing the occupancy grid of each point cloud attribute as the core point in the pre-processed local map, multiple first point cloud clusters s1 to s k , and then obtain the first point cloud cluster set S = {s1s2 … s k}, where k represents the number of first point cloud clusters.

[0108] It should be noted that the same boundary point can be configured to be merged into different first point cloud clusters. In other embodiments, the same boundary point can also be configured not to appear in different first point cloud clusters. The specific first point cloud cluster to which the boundary point is clustered is determined by time. For example, for the same boundary point, the first point cloud cluster that was merged first will prevail. That is, if the same boundary point has previously been merged into the first point cloud cluster corresponding to another core point, it will not be merged into another first point cloud cluster.

[0109] Furthermore, in one embodiment, it can be configured that after a certain boundary point is merged into a certain first point cloud cluster, a mark is set for the boundary point to notify the outside world that the boundary point has been merged into a certain first point cloud cluster.

[0110] S702: Merge and / or filter a plurality of first point cloud clusters to obtain at least one second point cloud cluster.

[0111] In the current embodiment, after obtaining a plurality of first point cloud clusters, the plurality of first point cloud clusters are merged and / or screened to obtain at least one second point cloud cluster. Furthermore, whether the merging condition is met may be determined based on the similarity of different point cloud clusters. In another embodiment, whether the current first point cloud cluster and other point cloud clusters meet the preset point cloud cluster merging condition may be determined based on the polar angle value of the core point with the largest polar angle and / or the smallest polar angle in the first point cloud cluster (the point cloud attribute is the grid occupied by the core point) and the distance between the core point with the largest polar angle and / or the smallest polar angle and the current position of the sweeping robot.

[0112] It should be noted that, in one embodiment, if only one first point cloud cluster is obtained in step S701 , the first point cloud cluster may be output as the third point cloud cluster, that is, steps S702 to S703 are not performed in this embodiment.

[0113] In another embodiment, if a plurality of first point cloud clusters are obtained in step S701 , steps S702 to S703 are further executed.

[0114] Further, see Figure 8 , Figure 8 This is a flow chart of another embodiment of a method for extracting starting points along an edge of the present application. In the current embodiment, the above step S702 merges and / or filters a plurality of first point cloud clusters to obtain at least one second point cloud cluster, further comprising steps S801 to S804.

[0115] S801: For each first point cloud cluster, determine the first point cloud cluster and a preset number of first point cloud clusters whose centroid polar angles are adjacent to the centroid polar angle of the first point cloud cluster in numerical order as a first point cloud cluster subset.

[0116] After clustering to obtain several first point cloud clusters, if all the first point cloud clusters are defined as a first point cloud cluster set, then for each obtained first point cloud cluster, a first preset number of other first point cloud clusters that are adjacent to the first point cloud cluster in terms of their centroid polar angles sorted by numerical value will be determined as a first point cloud cluster subset.

[0117] For example, in one embodiment, for the first point cloud cluster set S={s1 s2 … s k}, if we sort the centroid polar angles of the first point cloud clusters from large to small, we get S = {s′1 s′2 … s′ k}, then for the first point cloud cluster s′ i-1 When the preset number is set to 2, the centroid polar angles can be sorted by numerical value and the first point cloud cluster s′ according to the preset setting. i-1 The adjacent first point cloud cluster s′ i and s′ i+1Determine the first point cloud cluster set {s′ i-1 s′ i s′ i+1}.

[0118] S802: For the first point cloud cluster included in the first point cloud cluster subset, based on the polar angle value of the core point with the maximum polar angle and / or minimum polar angle in the first point cloud cluster, and the distance between the core point with the maximum polar angle and / or minimum polar angle and the sweeping robot, determine whether the first point cloud cluster with the largest and smallest centroid polar angles in the first point cloud cluster subset meets the preset point cloud cluster merging conditions.

[0119] First of all, it should be noted that the above polar angle is a polar angle in a polar coordinate system with the center of the sweeping robot as the pole and the direction of travel as the polar axis.

[0120] When determining whether at least part of the first point cloud clusters in the first point cloud cluster set meets the preset point cloud cluster merging condition, for the first point cloud cluster subset {s′ i-1 s′ i s′ i+1}, first calculate the current first point cloud cluster s′ i-1 The polar angle value corresponding to the core point with the maximum polar angle And the distance from the core point to the current position of the sweeping robot And calculate the first point cloud cluster s′ i+1 The polar angle value corresponding to the core point with the minimum polar angle And the distance from the core point to the current position of the sweeping robot At the same time, the first point cloud cluster s′ is also calculated i The polar angle values ​​corresponding to the core points with the maximum and minimum polar angles and And the first point cloud cluster s′ i The distance d from the center of mass to the current position of the sweeping robot i With the first point cloud cluster s′ i The number of point clouds n included in i The number of point clouds included in the first point cloud cluster refers to the number of core points and boundary points included in the first point cloud cluster.

[0121] After respectively determining the polar angle value of the core point of the maximum polar angle and / or minimum polar angle of the first point cloud cluster included in the first point cloud cluster, and the distance between the core point of the maximum polar angle and / or minimum polar angle and the sweeping robot, the first point cloud cluster s′ is further determined based on the following formula i-1 and s′ i+1 Is it the same point cloud cluster? If so, the first point cloud cluster s′ i-1 and s′ i+1 Merge. The formula is as follows:

[0122]

[0123] Among them, λ n and λ θ It is the preset point cloud quantity threshold and angle threshold.

[0124] S803: If yes, merge the first point cloud clusters with the largest and smallest centroid polar angles in the point cloud cluster subsets, and output the merged point cloud cluster and the first point cloud clusters that do not meet the point cloud cluster merging condition as a fourth point cloud cluster.

[0125] If it is determined whether the first point cloud cluster with the largest and smallest centroid polar angles in the first point cloud cluster subset meets the preset point cloud cluster merging condition, a merge operation will be performed on the two first point cloud clusters, and the merged point cloud cluster and the first point cloud cluster that does not meet the point cloud cluster merging condition will be output as a fourth point cloud cluster.

[0126] If it is determined that the preset point cloud cluster merging conditions are not met, each first point cloud cluster will be traversed in sequence according to the polar angle arrangement order of the first point cloud cluster set. If the same first point cloud cluster is determined to meet the preset point cloud cluster merging conditions with multiple different first point cloud clusters, the first point cloud cluster can be merged with the multiple different first point cloud clusters that meet the preset point cloud cluster merging conditions.

[0127] Furthermore, if it is determined that one or more first point cloud clusters and any first point cloud cluster do not meet the preset point cloud cluster merging condition, the first point cloud cluster can be directly output as the fourth point cloud cluster.

[0128] After traversing each first point cloud cluster included in the first point cloud cluster set, if multiple fourth point cloud clusters are obtained, step S804 is further executed. In another embodiment, if only one fourth point cloud cluster is obtained after steps S801 to S803, it can also be set to directly output this fourth point cloud cluster as the second point cloud cluster and directly execute step S703 or the content described in step S704 is directly executed.

[0129] S804: Determine the distance between the centroid of each fourth point cloud cluster and the cleaning robot, and select fourth point cloud clusters whose distance is less than or equal to a fifth distance threshold as second point cloud clusters.

[0130] If multiple fourth point cloud clusters are obtained, the second point cloud cluster is obtained by further filtering the clusters based on the distance between the centroid of each fourth point cloud cluster and the robot vacuum cleaner. Specifically, the distance between the centroid of each fourth point cloud cluster and the robot vacuum cleaner is determined, and the fourth point cloud clusters whose distance is less than or equal to a fifth distance threshold are filtered as the second point cloud cluster. The fifth distance threshold is a pre-set empirical distance value used to filter the fourth point cloud clusters, which can be adjusted based on actual needs.

[0131] S703: Determine the flatness and flatness core points of the second point cloud cluster, and determine the second point cloud cluster with the highest flatness as the third point cloud cluster.

[0132] After obtaining several second point cloud clusters, the flatness of the second point cloud clusters is further used to further screen and obtain the third point cloud cluster. The process of determining the flatness of the second point cloud cluster and the flatness core point can be found below. Figure 9 The corresponding embodiment.

[0133] S704: Determine the flat core point closest to the sweeping robot in the third point cloud cluster as the target edge starting point.

[0134] After the third point cloud cluster is determined, a target edge starting point is further determined from the core leveling points included in the third point cloud cluster. Specifically, the leveling core point closest to the sweeping robot in the third point cloud cluster is determined as the target edge starting point.

[0135] For further information, see Figure 9 , Figure 9 This is a flow chart of another embodiment of a method for extracting starting points along an edge of the present application. In the current embodiment, the determination of the flatness and flatness core points of the second point cloud cluster in step S703 further includes steps S901 to S904.

[0136] S901: Taking each core point included in the second point cloud cluster as a circle center, determine a point cloud within a third preset area for each core point.

[0137] The third preset area is defined by a predetermined radius. Specifically, each core point included in the second point cloud cluster is used as the center of a circle, and a point cloud within the third preset area is determined for each core point. The point cloud within the third preset area includes the core points and boundary points within the third preset area.

[0138] S902: Using the second algorithm, perform straight line fitting on the point cloud within the third preset area to obtain a third reference line.

[0139] The second algorithm includes a least squares algorithm.

[0140] Specifically, the third reference line may be obtained by performing straight line fitting on the retained point cloud using a least squares algorithm, wherein the third reference line is a reference line used to calculate the flatness of the second point cloud cluster.

[0141] S903: Determine the average distance between the point cloud included in the third preset area and the third reference line as the flatness of the core point corresponding to the third preset area, and determine the core point whose flatness is less than the flatness threshold as the flat core point of the second point cloud cluster.

[0142] For each core point (the point cloud attribute is the occupied grid of the core point), the distance from each point cloud included in the third preset area corresponding to each core point to the third baseline is determined respectively, and the average distance from each point cloud included in the third preset area to the third baseline is determined, and the average distance is used as the flatness of the core point.

[0143] After determining the flatness of each core point included in the low-hotspot cloud cluster, it is further determined whether the flatness of the core point is less than the flatness threshold. If so, the core point with a flatness less than the flatness threshold is classified as a flat core point.

[0144] S904: Determine the number of flattened core points included in the second point cloud cluster as the flatness of the second point cloud cluster.

[0145] After determining the flatness of each core point included in the second point cloud cluster, and determining whether each core point is a flat core point based on the flatness of each core point, the number of flat core points included in the second point cloud cluster is further counted, and then the number of flat core points included in the second point cloud cluster is determined as the flatness of the second point cloud cluster, thereby completing the determination of the flatness and flat core points of the second point cloud cluster.

[0146] Furthermore, if the above Figures 5 to 7 If multiple different edge starting point extraction steps still fail to identify the target edge starting point, the second and / or fifth distance thresholds can be dynamically adjusted based on the settings to adjust the distance conditions for screening the second line features and / or the fourth point cloud clusters to identify the target edge starting point. It should be noted that in some embodiments, the second and fifth distance thresholds can be equal.

[0147] See Figure 10 , Figure 10 The present invention provides a schematic structural diagram of a cleaning robot in one embodiment. In the current embodiment, the cleaning robot 1000 provided by the present invention includes a processor 1001 and a memory 1002 coupled to the processor 1001. The cleaning robot 1000 can execute Figures 1 to 9 and the method described in any corresponding embodiment.

[0148] The memory 1002 includes a local storage (not shown) and is used to store a computer program. When the computer program is executed, Figures 1 to 9 and the method described in any corresponding embodiment.

[0149] The processor 1001 is coupled to the memory 1002, and the processor 1001 is used to run the computer program to perform the above Figures 1 to 9 and the method described in any one of the corresponding embodiments. Further, in some embodiments, the present application Figure 10 The provided sweeping robot can also be extended to include any one of the devices that can interact with the sweeping robot, such as a mobile terminal, a computer terminal, a computer, an image acquisition device with computing and storage capabilities, a server, etc.

[0150] See also Figure 11 , Figure 11 This is a schematic diagram of a computer readable storage medium according to an embodiment of the present invention. The computer readable storage medium 1100 stores a computer program 1101 that can be executed by a processor. The computer program 1101 is used to implement the above Figures 1 to 9 Specifically, the computer-readable storage medium 1100 may be a memory, a personal computer, a server, a network device, or a USB flash drive, and the like, and no limitation is made here.

[0151] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for extracting starting points along an edge, characterized in that: The method comprises: The sweeping robot obtains the original local map; Counting the number of first occupied grids included in a first preset area and a second preset area corresponding to the occupied grid in the original local map, and outputting the numbers as a first number and a second number, respectively, wherein the first preset area and the second preset area are concentric circular areas with the occupied grid as the center, and the radius of the first preset area is smaller than the radius of the second preset area; Determining whether the point cloud attribute corresponding to the occupied grid is an outlier; In response to the point cloud attribute corresponding to the occupied grid not being the outlier, and the first number corresponding to the occupied grid being greater than a third threshold, and the second number being greater than a fourth threshold, determining the point cloud attribute of the occupied grid as a core point; Determining the point cloud attributes of the remaining occupied grids in the original local map, excluding the point cloud attributes of the outlier points or the core points, as boundary points; Eliminate the grids occupied by outliers in the point cloud to obtain a preprocessed local map; An edge starting point extraction operation is performed on the preprocessed local map to obtain target edge starting points.

2. The method according to claim 1, characterized in that Determining whether the point cloud attribute corresponding to the occupied grid is an outlier includes: Determine whether a point cloud attribute of the occupied grid is an outlier according to the first number and the second number corresponding to the occupied grid.

3. The method according to claim 2, characterized in that The determining whether the point cloud attribute of the occupied grid is an outlier based on the first number and the second number corresponding to the occupied grid, further includes: If the first number corresponding to the occupied grid is less than a first threshold or the second number is less than a second threshold, determining the point cloud attribute of the occupied grid as the outlier point, wherein the first threshold is less than the second threshold.

4. The method according to claim 1, wherein The performing of the edge starting point extraction operation on the pre-processed local map to obtain the target edge starting point further includes: Determine the distance between the current position of the robot vacuum and the charging station; If the distance is less than or equal to a first distance threshold, a charging pile-based edge starting point extraction step is performed on the pre-processed local map to obtain the target edge starting point.

5. The method according to claim 4, characterized in that The step of extracting the edge starting point based on the charging pile on the pre-processed local map to obtain the target edge starting point further includes: Generate a first reference line with the charging pile as the center point and the direction of the charging pile as the normal direction; For each point cloud attribute included in the pre-processed local map and having an occupied grid of the core point, screening the occupied grid that meets a first screening condition; Among the occupied grids that meet the first screening condition, an occupied grid that is closest to the charging pile is determined as the target edge starting point.

6. The method according to claim 4, characterized in that If the distance is greater than the first distance threshold, further determining whether a straight line feature can be obtained in the preprocessed local map; If so, the edge starting point extraction step based on straight line features is performed on the preprocessed local map to obtain the target edge starting point; if not, the edge starting point extraction step based on point cloud clustering is performed on the preprocessed local map to obtain the target edge starting point.

7. The method according to claim 6, characterized in that The step of extracting the edge starting point based on the straight line feature on the pre-processed local map to obtain the target edge starting point further includes: extracting a plurality of first straight line features from the preprocessed local map using a first algorithm; Merging and / or screening the plurality of first straight line features to obtain at least one second straight line feature; Determine the second straight line feature with the longest distance as the second reference line; The point cloud attribute is the core point, the distance from the second reference line is less than a fourth distance threshold, and the occupied grid closest to the cleaning robot is determined as the target edge starting point.

8. The method according to claim 7, characterized in that The merging and / or screening of the plurality of first straight line features to obtain at least one second straight line feature includes: For the plurality of first straight line features, merging the first straight line features that meet a preset merging condition, and outputting the merged straight line feature and the first straight line features that do not meet the preset merging condition as a third straight line feature; For each of the third straight line features, a straight line feature whose distance from the cleaning robot is less than or equal to a second distance threshold is selected as a second straight line feature.

9. The method according to claim 6, characterized in that The step of performing edge starting point extraction based on point cloud clustering on the pre-processed local map to obtain the target edge starting point includes: For the point cloud attributes included in the pre-processed local map and the occupancy grid of the core point, a core point clustering operation is performed to obtain a plurality of first point cloud clusters; Merging and / or screening the plurality of first point cloud clusters to obtain at least one second point cloud cluster; determining the flattened core points and the flatness included in the second point cloud cluster, and determining the second point cloud cluster with the highest flatness as the third point cloud cluster; The leveling core point included in the third point cloud cluster and closest to the cleaning robot is determined as the target edge starting point.

10. The method according to claim 9, characterized in that Determining the flatness and the flatness core point of the second point cloud cluster includes: Taking each core point included in the second point cloud cluster as a circle center, determining a point cloud within a third preset area for each core point; Using the second algorithm, performing straight line fitting on the point cloud within the third preset area to obtain a third reference line; Determining an average distance from the point cloud included in the third preset area to the third reference line as the flatness of the core point corresponding to the third preset area, and determining a core point whose flatness is less than a flatness threshold as a flat core point of the second point cloud cluster; The number of the flattened core points included in the second point cloud cluster is determined as the flatness of the second point cloud cluster.

11. The method according to claim 9, characterized in that The merging and / or screening the plurality of first point cloud clusters to obtain at least one second point cloud cluster further includes: For each of the first point cloud clusters, determining the first point cloud cluster and a preset number of first point cloud clusters whose centroid polar angles are adjacent to the centroid polar angles of the first point cloud cluster in numerical order as a first point cloud cluster subset; For the first point cloud clusters included in the first point cloud cluster subset, based on the polar angle values ​​of the core points with the maximum polar angle and / or the minimum polar angle in the first point cloud clusters, and the distances between the core points with the maximum polar angle and / or the minimum polar angle and the sweeping robot, determining whether the first point cloud clusters with the largest and smallest centroid polar angles in the first point cloud cluster subset meet a preset point cloud cluster merging condition; If yes, merging the first point cloud clusters with the largest and smallest centroid polar angles in the point cloud cluster subset, and outputting the merged point cloud cluster and the first point cloud clusters that do not meet the point cloud cluster merging condition as a fourth point cloud cluster; and / or The distance between the centroid of each of the fourth point cloud clusters and the cleaning robot is determined, and fourth point cloud clusters with a distance less than or equal to a fifth distance threshold are selected as the second point cloud clusters.

12. A sweeping robot, characterized in that: The cleaning robot includes a processor and a memory coupled to the processor; wherein, The memory is used to store computer programs; The processor is configured to run the computer program to perform the method according to any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program that can be executed by a processor, and the computer program is used to implement the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Preparation method of indoor occupation grid map based on RGB-D information

    CN111598916A

  • Robot map construction method and device and storage medium

    CN111813882A