Cleaning method and device, cleaning robot, storage medium and program product
By introducing a cruise cleaning mode into the cleaning robot, using ground image data to determine the area to be cleaned and formulating a cleaning path, the problem of low cleaning efficiency of traditional cleaning robots is solved and a more efficient cleaning process is achieved.
Patent Information
- Application Number
- CN202510302529.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-05-09
AI Technical Summary
Traditional cleaning robots have low cleaning efficiency under full coverage cleaning paths.
In cruise cleaning mode, based on the cruise path operation, ground image data is collected, the area to be cleaned is determined, and the area to be cleaned is cleaned according to the cleaning path. The cleaning equipment is turned on only during the cleaning process of cleaning the area to be cleaned.
The duration of cleaning the target area is shortened and the cleaning efficiency of the cleaning robot is improved.
Smart Images

Figure CN119949705A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a cleaning method, device, cleaning robot, storage medium and program product. Background Art
[0002] With the development of artificial intelligence technology, cleaning robots are widely used in life. Cleaning robots clean the target areas that need cleaning by using cleaning equipment such as roller brushes, disc brushes, squeegees, dust pushers, vacuum rakes and fans.
[0003] In traditional technology, the cleaning robot uses a full coverage cleaning path to clean the target area, resulting in low cleaning efficiency of the cleaning robot. Summary of the invention
[0004] Based on this, it is necessary to provide a cleaning method, device, cleaning robot, computer-readable storage medium and program product that can improve cleaning efficiency in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a cleaning method. The method comprises:
[0006] In the cruise cleaning mode, the robot operates based on a cruise path corresponding to the cruise cleaning mode and collects ground image data;
[0007] Determining an area to be cleaned based on the ground image data;
[0008] In the case where the area to be cleaned exists, determining a cleaning path for the area to be cleaned based on the area to be cleaned;
[0009] The cleaning process is based on the cleaning path, and the cleaning process is performed on the area to be cleaned;
[0010] After the cleaning of the area to be cleaned is completed, the operation continues based on the cruising path and ground image data is collected.
[0011] In a second aspect, the present application also provides a cleaning device. The device comprises:
[0012] A first operation module is used to operate in a cruise cleaning mode based on a cruise path corresponding to the cruise cleaning mode and collect ground image data;
[0013] An area determination module, used for determining an area to be cleaned based on the ground image data;
[0014] A path determination module, configured to determine a cleaning path of the area to be cleaned based on the area to be cleaned when the area to be cleaned exists;
[0015] A cleaning module, used for cleaning the area to be cleaned based on the cleaning path;
[0016] The second operation module is used to continue to operate based on the cruising path and collect ground image data after completing the cleaning of the area to be cleaned.
[0017] In a third aspect, the present application further provides a cleaning robot, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0018] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0019] In a fifth aspect, the present application further provides a program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0020] The above-mentioned cleaning method, device, cleaning robot, storage medium and program product, the cleaning robot runs in the cruise cleaning mode based on the cruise path corresponding to the cruise cleaning mode, collects ground image data during the operation, uses the ground image data to determine whether there is an area to be cleaned near the operation of the cleaning robot, and if there is an area to be cleaned, determines the cleaning path of the area to be cleaned, cleans the area to be cleaned based on the cleaning path, and continues to run based on the cruise path after cleaning the area to be cleaned. Compared with the cleaning robot turning on the cleaning equipment throughout the process of cleaning the target area based on the regional cleaning path, in order to ensure the cleaning effect of the target area, the cleaning robot needs to maintain a slower speed. This method uses a cruise path to clean the target area, and only turns on the cleaning equipment during the cleaning of the area to be cleaned, and maintains a slower speed, thereby shortening the time for cleaning the target area and improving the cleaning efficiency of the cleaning robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a schematic flow chart of a cleaning method in one embodiment;
[0022] Figure 2 A schematic diagram of a bow-shaped path in one embodiment;
[0023] Figure 3 is a schematic diagram of an area to be cleaned in one embodiment;
[0024] Figure 4 is a schematic diagram of multiple clusters corresponding to a set of points to be cleaned in one embodiment;
[0025] Figure 5A is a schematic diagram of a topology diagram in an embodiment;
[0026] Figure 5B is a schematic diagram of a topological diagram in another embodiment;
[0027] Fig. 6A is a schematic diagram of a reference cleaning path in one embodiment;
[0028] Figure 6B A schematic diagram of a reference cleaning path in another embodiment;
[0029] Figure 7 A schematic diagram of a reference cleaning path in another embodiment;
[0030] Figure 8 is a schematic diagram of an obstacle distance map in one embodiment;
[0031] Fig.9A A schematic diagram of a change from a topological node path to an initial path in one embodiment;
[0032] Fig. 9B A schematic diagram of the change from the initial path to the cleaning path in one embodiment;
[0033] Fig.10 is a schematic diagram of an obstacle distance map in another embodiment;
[0034] Fig.11 A schematic diagram of preprocessing image data in one embodiment;
[0035] Fig.12 A schematic diagram of a process for determining an area to be cleaned in one embodiment;
[0036] Fig.13 is a schematic flow chart of a cleaning method in one embodiment;
[0037] Fig.14 A schematic diagram of a cleaning path in an embodiment. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] The cleaning method provided in the embodiment of the present application can be applied to a system having a terminal and a cleaning robot, and the terminal and the cleaning robot can be connected via a network in an environment. The terminal communicates with the cleaning robot via a network. The terminal and the cleaning robot can be used together to execute the cleaning method provided in the embodiment of the present application, and the cleaning robot can also be used alone to execute the cleaning method provided in the embodiment of the present application. The cleaning robot can be a variety of self-moving devices that can perform cleaning tasks, such as: a sweeping and washing robot, a floor washing robot, a sweeping robot, a mopping robot, etc. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and can also be various robots; the Internet of Things device can be a smart TV and a smart car-mounted device, etc., and the portable wearable device can be a smart watch, etc.; the robot can be a variety of cleaning robots, delivery robots, guide robots and inspection robots, etc.
[0040] In one embodiment, Figure 1 As shown, a cleaning method is provided, which can be applied to a cleaning robot. This embodiment is described by taking the application of the method to a cleaning robot as an example, and includes steps 102 to 110.
[0041] Step 102 : In the cruise cleaning mode, the system operates based on a cruise path corresponding to the cruise cleaning mode and collects ground image data.
[0042] Among them, the cruise cleaning mode refers to a mode of cleaning while cruising. During the operation of the cleaning robot based on the cruise path corresponding to the cruise cleaning mode, if the area to be cleaned is determined, the cleaning area to be cleaned will be cleaned. After completing the cleaning of the area to be cleaned, the robot returns to the cruise path to continue cruising. If the area to be cleaned is not determined, the robot cruises based on the cruise path. That is, the cleaning robot will perform cruising and active cleaning in the cruise cleaning mode. The cruising path refers to the path taken by the cleaning robot in the cruising cleaning mode. The cruising path may be a bow-shaped path, which includes multiple first-direction paths and second-direction paths. The first-direction path is parallel to the long side of the target area, and the second-direction path is parallel to the short side of the target area. The second-direction path connects two adjacent first-direction paths. The length of the second-direction path may be equal to half of the detection width of the sensor installed on the cleaning robot, wherein the sensor may be various visual sensors for collecting image data, such as RGB (Red Green Blue) cameras, AI (Artificial Intelligence) cameras, RGBD (Red Green Blue Depth) cameras, cameras, video recorders, etc.; the detection width may be understood as the perception range of the sensor. This application uses the sensor as a camera for illustration. For a camera, it may refer to the field of view of the camera; the bow-shaped path may be Figure 2 As shown, 202, 206 and 210 are first direction paths, 204 and 208 are second direction paths, the interval between 202 and 206 is equal to the length of 204, and the length of 204 is equal to half of the detection width of the sensor installed on the cleaning robot. In this way, the cleaning robot is based on Figure 2 When the bow-shaped path shown is running, the area where the bow-shaped path is located can be fully detected, that is, whether there is an area to be cleaned in the above area can be quickly detected.
[0043] The target area refers to the cleaning area where the cleaning robot operates, that is, the area where the cleaning robot cruises or cleans. The length of the cruising path in the target area is less than the length of the regional cleaning path in the target area. The regional cleaning path refers to the path that the cleaning robot runs in the target area in the cleaning mode, that is, the full coverage cleaning path in the cleaning mode. If the cruising path is a bow-shaped path, the regional cleaning path is a bow-shaped path, and the length of the second direction path in the regional cleaning path is equal to or less than half of the cleaning width of the cleaning robot. The cleaning width refers to the cleaning range that the cleaning robot can cover. The cleaning width is less than the detection width. The length of the second direction path in the cruising path is greater than the length of the second direction path in the regional cleaning path. Compared with the cleaning robot cleaning the target area based on the regional cleaning path of the target area, in order to ensure the cleaning effect of the target area, the interval distance between adjacent first direction paths of the regional cleaning path must be equal to or less than half of the cleaning width of the cleaning robot, while the interval distance between adjacent first direction paths of the cruising path only needs to be equal to or less than half of the detection width of the camera installed on the cleaning robot. The detection width is greater than the cleaning width. Therefore, the length of the regional cleaning path must be greater than the length of the cruising path. The time for the cleaning robot to clean the target area based on the cruising path is less than the time spent cleaning the target area based on the regional cleaning path, thereby improving the cleaning efficiency of the cleaning robot. The ground image data refers to the image data collected by the sensors on the cleaning robot.
[0044] In one embodiment, the cruising path may also be a U-shaped path, and the cleaning robot cleans while cruising based on the U-shaped path.
[0045] Exemplarily, the cleaning robot enters a cruise cleaning mode, obtains a cruise path corresponding to the cruise cleaning mode, operates based on the cruise path, and collects ground image data through installed sensors during the operation.
[0046] In one embodiment, in the cruise cleaning mode, the cleaning robot obtains a cruise area; when the area of the cruise area is greater than the area threshold, the cruise area is divided to obtain multiple target areas; for each target area, a cruise path corresponding to the target area is generated, wherein the end point of the cruise path corresponding to the target area is the starting point of the cruise path corresponding to another target area adjacent to the target area; the cruise path corresponding to the cruise cleaning mode is operated, and ground image data is collected. That is, when the cruise area is large, the cruise area is divided into multiple target areas with smaller areas, and the cruise area is cruise cleaned in units of target areas. In this way, the small target area can be cleaned first, and then the cleaning of the entire large cruise area can be realized, thereby improving the visualization of the cleaning efficiency and avoiding the need for a long time to detect the area to be cleaned, which causes the user to visually feel that the cleaning efficiency of the cleaning robot is low.
[0047] Step 104: determine the area to be cleaned based on the ground image data.
[0048] The area to be cleaned refers to an area that needs to be cleaned, and the area to be cleaned refers to an area in the target area where there is garbage that can be cleaned.
[0049] Exemplarily, the cleaning robot determines whether there is cleanable garbage based on the ground image data. If there is cleanable garbage, it determines the area to be cleaned where the cleanable garbage is located and executes step 106. If there is no cleanable garbage, the cleaning robot continues to operate based on the cruising path, collects ground image data, and repeats step 104.
[0050] In one embodiment, if there is uncleanable garbage, the uncleanable garbage is determined as an obstacle.
[0051] In one embodiment, if there is uncleanable garbage and it is determined that the uncleanable garbage is not an obstacle, it means that the cleaning robot does not have the ability to clean the uncleanable garbage. Then the location information and attribute information of the uncleanable garbage are sent to a cleaning robot that can clean the uncleanable garbage.
[0052] Step 106 : if there is an area to be cleaned, determine a cleaning path of the area to be cleaned based on the area to be cleaned.
[0053] The cleaning path refers to a path for cleaning the area to be cleaned.
[0054] Exemplarily, when there is an area to be cleaned, the cleaning robot connects the set of points to be cleaned in the area to be cleaned according to preset rules to determine a cleaning path for the area to be cleaned. The set of points to be cleaned refers to a collection of points to be cleaned that fill the area to be cleaned.
[0055] In one embodiment, when there is an area to be cleaned, the cleaning robot determines that the current mode is the active cleaning mode, and the cleaning robot determines a cleaning path of the area to be cleaned based on the area to be cleaned.
[0056] Step 108 : Clean the area to be cleaned based on the cleaning path.
[0057] Exemplarily, the cleaning robot turns on and controls the cleaning equipment to clean the area to be cleaned based on the cleaning path. The cleaning equipment includes but is not limited to a roller brush, a disc brush, a squeegee, a dust pusher rake, a vacuum rake, a fan, and the like.
[0058] Step 110 , after the cleaning of the area to be cleaned is completed, the operation continues based on the cruising path and ground image data is collected.
[0059] For example, after the cleaning robot reaches the end of the cleaning path, it returns to the interruption position of the cruising path, continues to run based on the cruising path, collects ground image data, and repeats steps 104 to 108 until it reaches the end of the cruising path. The interruption position is the position where the cleaning robot stops running in the cruising path, and the interruption position may be the starting point of the cleaning path.
[0060] In one embodiment, after completing cleaning of the area to be cleaned, the cleaning robot returns to the interruption position of the cruising path and determines that the current mode is the cruising cleaning mode. The cleaning robot continues to operate based on the cruising path and collects ground image data.
[0061] In the above cleaning method, the cleaning robot operates in the cruise cleaning mode based on the cruise path corresponding to the cruise cleaning mode, collects ground image data during operation, uses the ground image data to determine whether there is an area to be cleaned near the operation of the cleaning robot, and if there is an area to be cleaned, determines the cleaning path of the area to be cleaned, cleans the area to be cleaned based on the cleaning path, and continues to operate based on the cruise path after cleaning the area to be cleaned. Compared with the cleaning robot turning on the cleaning device throughout the process of cleaning the target area based on the regional cleaning path, in order to ensure the cleaning effect of the target area, the cleaning robot needs to maintain a slower speed. This embodiment uses a cruise path to clean the target area, and only turns on the cleaning device during the process of cleaning the area to be cleaned, and maintains a slower speed, thereby shortening the time for cleaning the target area and improving the cleaning efficiency of the cleaning robot.
[0062] In one embodiment, based on the area to be cleaned, determining a cleaning path of the area to be cleaned includes:
[0063] Determine the clusters corresponding to the set of points to be cleaned in the area to be cleaned; determine the cleaning object types of the clusters; and determine the cleaning path of the area to be cleaned based on the points to be cleaned and the cleaning object types in each cluster.
[0064] The set of points to be cleaned refers to a set of points to be cleaned that fill the area to be cleaned, and the points to be cleaned refer to the points that make up the area to be cleaned. For example, the schematic diagram of the area to be cleaned is as follows: Figure 3 As shown in the figure, the area to be cleaned is filled, each circle is a point to be cleaned, and the set of points to be cleaned is the point set to be cleaned. A cluster refers to a set obtained by clustering the points to be cleaned in the point set to be cleaned. A cluster is a subset of the point set to be cleaned, and the number of clusters is at least one. For example, a schematic diagram of multiple clusters corresponding to the point set to be cleaned is shown in Figure 4As shown, there are 5 clusters, namely cluster 1, cluster 2, cluster 3, cluster 4 and cluster 5, and each square image in the cluster is a point to be cleaned. The cleaning object type refers to the type of cleaning object represented by the cluster, and the cleaning object type can be a point object or a surface object. The point object refers to the cleaning object that can be covered by the cleaning robot, that is, the radius of the minimum circumscribed circle surrounding the point to be cleaned in the cluster is less than or equal to half the cleaning width of the cleaning robot, and the cleaning robot can clean the point to be cleaned in the cluster at one time, and the cluster is equivalent to a point garbage; the surface object refers to the cleaning object that cannot be covered by the cleaning robot, that is, the radius of the minimum circumscribed circle surrounding the point to be cleaned in the cluster is greater than half the cleaning width of the cleaning robot, and the cleaning robot needs to clean the point to be cleaned in the cluster by running, and the cluster is equivalent to a surface garbage.
[0065] Exemplarily, the cleaning robot fills the area to be cleaned to obtain a set of points to be cleaned consisting of the points to be cleaned that fill the area to be cleaned, clusters the set of points to be cleaned based on the straight-line distances between the points to be cleaned to obtain clusters corresponding to the set of points to be cleaned, and for each cluster, determines the type of cleaning object of the cluster based on the points to be cleaned in the cluster, and determines the cleaning path of the area to be cleaned based on the points to be cleaned and the type of cleaning objects in each cluster. The method for clustering the set of points to be cleaned can be a DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm.
[0066] In one embodiment, a set of points to be cleaned is clustered to obtain a cluster cluster corresponding to the set of points to be cleaned, including: setting a cluster set M; opening a cleaning point set L and a queue Q; adding the point to be cleaned that is closest to the cleaning robot to the queue Q and marking it as extended; taking out an extended point to be cleaned from the queue Q, adding the point to be cleaned whose straight-line distance to the extended point to be cleaned is less than half the cleaning width of the cleaning robot to the queue Q and marking it as extended; deleting the above-mentioned extended point to be cleaned from the queue Q and adding it to the cleaning point set L; repeatedly executing the steps of taking out an extended point to be cleaned from the queue Q, adding the point to be cleaned whose straight-line distance to the extended point to be cleaned is less than half the cleaning width of the cleaning robot to the queue Q and marking it as extended until the queue Q is empty; saving all points to be cleaned in the cleaning point set L to the cluster set M, that is, a cluster cluster is saved in the cluster set M; repeatedly executing the steps of opening a cleaning point set L and a queue Q until all points to be cleaned are marked as extended.
[0067] In this embodiment, the cluster corresponding to the set of points to be cleaned in the area to be cleaned is determined, and the cleaning object type of the cluster is determined, that is, the area to be cleaned is divided into multiple cleaning objects, and then the cleaning path of the area to be cleaned is determined according to the points to be cleaned and the cleaning object type in each cluster, so as to provide accurate basic data for the subsequent cleaning robot to clean the area to be cleaned.
[0068] In one embodiment, determining the cleaning object type of the cluster includes:
[0069] Determine the minimum circumscribed circle that contains the points to be cleaned in the cluster; compare the radius of the minimum circumscribed circle with the cleaning width threshold; when the radius is less than or equal to the cleaning width threshold, determine that the cleaning object type of the cluster is a point object; when the radius is greater than the cleaning width threshold, determine that the cleaning object type of the cluster is a surface object.
[0070] The minimum circumscribed circle refers to the smallest circle that surrounds all the points to be cleaned in the cluster. The cleaning width threshold refers to the threshold used to determine the type of cleaning object. The cleaning width threshold can be determined according to the cleaning width of the cleaning robot. The cleaning width threshold can be equal to or less than half of the cleaning width of the cleaning robot. For example, if the cleaning width of the cleaning robot is 0.5 meters, the cleaning width threshold can be set to 0.25 meters or 0.21 meters.
[0071] Exemplarily, the cleaning robot determines the minimum circumscribed circle of the points to be cleaned in the cluster, determines the radius of the minimum circumscribed circle, compares the radius with the cleaning width threshold, and if the radius is less than or equal to the cleaning width threshold, determines that the cleaning object type of the cluster is a point object; if the radius is greater than the cleaning width threshold, determines that the cleaning object type of the cluster is a surface object.
[0072] In this embodiment, the radius of the minimum circumscribed circle surrounding the points to be cleaned in the cluster is less than or equal to the cleaning width threshold, and the cleaning robot can clean the points to be cleaned in the cluster at one time. The cleaning objects represented by all the points to be cleaned in the cluster are equivalent to a point garbage, that is, the cleaning object type of the cleaning object is a point object, and the cleaning object type of the cluster is determined to be a point object; the radius of the minimum circumscribed circle surrounding the points to be cleaned in the cluster is greater than the cleaning width threshold, and the cleaning robot needs to clean the points to be cleaned in the cluster by running, and the cluster is equivalent to a surface garbage, and the cleaning object type of the cluster is determined to be a surface object, that is, the cleaning object type is determined by comparing the radius with the cleaning width threshold, thereby improving the accuracy of the cleaning object type.
[0073] In one embodiment, based on the points to be cleaned and the types of cleaning objects in each cluster, determining a cleaning path of the area to be cleaned includes:
[0074] For each cluster, based on the points to be cleaned and the types of cleaning objects in the cluster, the topological nodes corresponding to the cluster are determined; the topological nodes corresponding to multiple clusters are connected to obtain a topological map; based on the topological map, the cleaning sequence of the area to be cleaned is determined; based on the cleaning sequence, the cleaning path of the area to be cleaned is determined.
[0075] Among them, a topological node refers to a node that represents a cluster. A cluster can be represented by one or more topological nodes. A topological graph refers to a graph obtained by connecting multiple topological nodes. A topological graph consists of multiple topological nodes and edges connecting topological nodes. A clean sequence refers to a sequence used to generate a clean path and topological nodes.
[0076] Exemplarily, for each cluster, the cleaning robot determines the topological node corresponding to the cluster based on the point to be cleaned and the type of cleaning object in the cluster, and then connects the topological nodes corresponding to multiple clusters to obtain a topological map, determines the topological node with the shortest straight-line distance to the cleaning robot as the starting topological node, determines the starting topological node as the starting point of the traversal, and uses a depth-first search method (Depth-First Search) to traverse the topological map to obtain multiple candidate sequences, determines the cleaning sequence from the multiple candidate sequences, and determines the cleaning path of the area to be cleaned based on the cleaning sequence. Among them, the method for connecting the topological nodes corresponding to multiple clusters can be a Delaunay (Delaunay Triangulation) triangulation algorithm or a fully connected algorithm, etc. If the topological nodes corresponding to multiple clusters are collinear or the total number of topological nodes is limited to 3, the fully connected algorithm is used, otherwise the Delaunay triangulation algorithm or the fully connected algorithm can be used.
[0077] In one embodiment, based on the points to be cleaned in the cluster and the type of cleaning objects, the topological nodes corresponding to the cluster are determined, including: if the type of cleaning objects corresponding to the cluster is a point object, then a topological node is determined based on the points to be cleaned in the cluster; if the type of cleaning objects corresponding to the cluster is a surface object, then the minimum circumscribed rectangle surrounding the points to be cleaned in the cluster is determined, and a reference cleaning path of the minimum circumscribed rectangle is determined, and if the reference cleaning path includes a first direction path, then two topological nodes are determined based on the points to be cleaned in the cluster; if the reference cleaning path includes at least two first direction paths, then four topological nodes are determined based on the points to be cleaned in the cluster.
[0078] In one embodiment, the topological nodes corresponding to the multiple clusters are connected to obtain a topological map, including: determining the cleaning robot as the starting topological node, determining the topological node with the shortest straight-line distance to the starting topological node, connecting the starting topological point and the topological node with the shortest straight-line distance to the starting topological node, and connecting the topological nodes corresponding to the clusters using the Delaunay triangulation algorithm or the full connection algorithm to obtain a topological map. For example, the topological nodes corresponding to the four clusters whose cleaning object types are point objects are A, B, C, and F, respectively, the topological nodes corresponding to the one cluster whose cleaning object type is surface objects are D and E, the cleaning robot is the topological node R, and there is an obstacle in the area surrounded by A, B, C, F, D, and E. The topological nodes are connected using the Delaunay triangulation algorithm, and the schematic diagram of the obtained topological map is as follows: Figure 5A As shown, the topological nodes are connected using the full connection algorithm, and the schematic diagram of the obtained topological graph is as follows Figure 5B Use the depth-first search method to find Figure 5A By traversing the topological graph shown in , we get 6 candidate sequences, namely RCBAFED, RCBAFDE, RCBDEFA, RCDBAFE, RCDEFAB, and RCDEFBA. Similarly, we can get the full connection algorithm for Figure 5B The topological graph shown is traversed to obtain candidate sequences, which will not be described in detail here. In practical applications, the line that passes through the obstacle is a collision path, which will be excluded, that is, the candidate sequence containing the collision path will be excluded.
[0079] In this embodiment, the topological nodes corresponding to the clustering cluster are determined by the points to be cleaned and the types of cleaning objects in the clustering cluster, the topological nodes corresponding to multiple clustering clusters are connected to obtain a topological graph, and the topological graph is traversed to obtain a cleaning sequence of the area to be cleaned. The cleaning sequence represents the order in which the cleaning robot cleans the topological nodes. The cleaning sequence includes all the topological nodes. The cleaning path of the area to be cleaned is determined based on the cleaning sequence, and the cleaning path passes through all the topological nodes to ensure that the area to be cleaned is completely cleaned.
[0080] In one embodiment, based on the points to be cleaned and the types of cleaning objects in the clusters, determining the topological nodes corresponding to the clusters includes:
[0081] When the cleaning object type of the cluster is a point object, the center of the minimum circumscribed circle of the cluster is determined as the topological node corresponding to the cluster;
[0082] When the cleaning object type of the cluster is a surface object, the minimum enclosing rectangle of the cluster is determined; based on the minimum enclosing rectangle and the cleaning width of the cleaning robot, a reference cleaning path of the minimum enclosing rectangle is determined; the reference cleaning path includes a first direction path, and the first direction path is parallel to the long side of the minimum enclosing rectangle; based on the number of first direction paths and the two endpoints of the first direction paths, a topological node corresponding to the cluster is determined.
[0083] Among them, the minimum enclosing rectangle refers to the minimum rectangle that surrounds all the points to be cleaned in the cluster. The reference cleaning path refers to the path for cleaning the points to be cleaned in the minimum enclosing rectangle. The reference cleaning path is a bow-shaped path. The reference cleaning path can be composed of a first direction path, or a plurality of first direction paths and second direction paths. The first direction path is parallel to the long side of the minimum enclosing rectangle, and the second direction path is parallel to the short side of the minimum enclosing rectangle. The reference cleaning path of a minimum enclosing rectangle is an arch path. The number of first direction paths in the arch path is determined by the width of the minimum enclosing rectangle and the cleaning width of the cleaning robot. The width can be divided by half of the cleaning width to get the number of first direction paths. The starting point of the first direction path is determined by the point to be cleaned that is closest to one of the short sides of the minimum enclosing rectangle, and the end point of the first direction path is determined by the point to be cleaned that is closest to the other short side of the minimum enclosing rectangle. If the width of the minimum circumscribed rectangle is less than or equal to the cleaning width of the cleaning robot, the reference cleaning path of the minimum circumscribed rectangle only includes one first direction path. For example, the schematic diagram of the reference cleaning path of the minimum circumscribed rectangle is as follows: Fig. 6A , the reference cleaning path in 6A consists of one first direction path (the line between node 1 and node 2); if the width of the minimum circumscribed rectangle is greater than the cleaning width of the cleaning robot, the reference cleaning path of the minimum circumscribed rectangle includes multiple first direction paths. For example, the schematic diagram of the reference cleaning path of the minimum circumscribed rectangle is as follows Figure 6B As shown, the reference cleaning path in 6B consists of 3 first direction paths and 2 second direction paths. The two endpoints of the first direction path refer to the starting point and the end point of the first direction path.
[0084] Exemplarily, when the cleaning object type of the cluster is a point object, the cleaning robot determines the center of the minimum circumscribed circle of the cluster, and determines the center as the topological node corresponding to the cluster. When the cleaning object type of the cluster is a surface object, the cleaning robot determines the minimum circumscribed rectangle of the cluster, determines the reference cleaning path of the minimum circumscribed rectangle based on the minimum circumscribed rectangle and the cleaning width of the cleaning robot, counts the first direction paths in the reference cleaning path that are parallel to the long side of the minimum circumscribed rectangle, and obtains the number of first direction paths. If the number of first direction paths is one, the two endpoints of the first direction path are determined as the topological nodes corresponding to the cluster. If the number of first direction paths is at least two, the two endpoints of the first direction path of the first segment and the two endpoints of the first direction path of the last segment are determined as the topological nodes corresponding to the cluster. For example, the reference cleaning path corresponding to the cluster is as follows: Fig. 6A The topological nodes of the cluster are node 1 and node 2, and the reference cleaning path corresponding to the cluster is as follows: Figure 6B , the topological nodes of the cluster are node 1, node 2, node 3 and node 4.
[0085] In this embodiment, when the cleaning object type of the cluster cluster is a point object, the cleaning robot runs to the center of the minimum circumscribed circle of the cluster cluster, and cleans all the points to be cleaned in the cluster cluster, thereby determining the center of the minimum circumscribed circle of the cluster cluster as the topological node corresponding to the cluster cluster; when the cleaning object type of the cluster cluster is a surface object, the reference cleaning path of the minimum circumscribed rectangle is determined by the minimum circumscribed rectangle of the cluster cluster and the cleaning width of the cleaning robot, and then the topological node corresponding to the cluster cluster is determined based on the number of first direction paths and the two endpoints of the first direction paths. For different cleaning object types, different methods are used to determine the topological nodes corresponding to the cluster cluster, thereby improving the accuracy of the topological nodes.
[0086] In one embodiment, based on the topological map, determining a cleaning sequence of the area to be cleaned includes:
[0087] The topological graph is traversed to obtain a plurality of candidate sequences; based on the arrangement order of the topological nodes in the candidate sequences, a clean sequence is determined from the plurality of candidate sequences.
[0088] The candidate sequence refers to a traversal sequence obtained by traversing the topological graph.
[0089] Exemplarily, the cleaning robot determines the topological node that is closest to the cleaning robot in a straight line as the starting topological node, takes the starting topological node as the starting point of traversal, uses the depth-first search method to traverse the topological graph, obtains multiple cleaning sequences, determines a reference sequence from multiple candidate sequences, and determines the cleaning sequence from multiple reference sequences.
[0090] In this embodiment, multiple candidate sequences are obtained by traversing the topological graph, and the candidate sequences represent the possible order in which the cleaning robot cleans the topological nodes. According to the arrangement order of the topological nodes in the candidate sequence, a cleaning sequence is determined from the multiple candidate sequences, that is, the optimal cleaning sequence is determined from the multiple candidate sequences to improve the efficiency of the cleaning robot in cleaning the area to be cleaned.
[0091] In one embodiment, determining a cleaning sequence from a plurality of candidate sequences based on the arrangement order of topological nodes in the candidate sequence includes:
[0092] For clusters whose cleaning object types are face objects, a set of topological node sequences corresponding to the clusters is determined based on the topological nodes corresponding to the clusters; a candidate sequence including a topological node sequence in each topological node sequence set is determined as a reference sequence; for each reference sequence, a cleaning cost corresponding to the reference sequence is determined based on the arrangement order of the topological nodes in the reference sequence; and a cleaning sequence is determined from multiple reference sequences based on the cleaning costs corresponding to each reference sequence.
[0093] Among them, the topological node sequence set refers to the set composed of topological node sequences. The topological node sequence refers to the sequence composed of all topological nodes corresponding to the clustering cluster. The topological node sequence represents that all topological nodes corresponding to the clustering cluster are adjacent to each other. It can be understood that after cleaning all the points to be cleaned in one clustering cluster, the points to be cleaned in another clustering cluster can be cleaned. The cleaning cost refers to the cost of cleaning the area to be cleaned based on the arrangement order of the topological nodes in the reference sequence. The cleaning cost can be composed of at least one of the collision cost, the running cost and the steering cost. The collision cost represents the cost of the cleaning robot colliding with obstacles when cleaning the area to be cleaned based on the arrangement order of the topological nodes in the reference sequence. The collision cost is proportional to the number of collisions between the cleaning robot and the obstacles. The more times the cleaning robot collides with the obstacles, the greater the collision cost. The running cost represents the cost of the cleaning robot cleaning the area to be cleaned based on the arrangement order of the topological nodes in the reference sequence. The running cost is proportional to the running distance. The longer the running distance, the greater the running cost. The turning cost represents the cost value of the turning angle when the cleaning robot cleans the area to be cleaned based on the arrangement order of the topological nodes in the reference sequence. The turning cost is proportional to the turning angle. The longer the turning angle, the greater the turning cost.
[0094] Exemplarily, for a cluster whose cleaning object type is a face object, the cleaning robot determines a set of topological node sequences corresponding to the cluster based on the topological nodes corresponding to the cluster; for each candidate sequence, determines whether the candidate sequence includes a topological node sequence in each topological node sequence set, and if the candidate sequence includes a topological node sequence in each topological node sequence set, determines the candidate sequence as a reference sequence; for each reference sequence, determines a cleaning cost corresponding to the reference sequence based on the arrangement order of the topological nodes in the reference sequence, compares the cleaning costs corresponding to multiple reference sequences, obtains the minimum cleaning cost, and determines the reference sequence corresponding to the minimum cleaning cost as the cleaning sequence. For example, Figure 5A The cleaning object type shown in is the clustering clusters {D, E} of face objects, the topological node sequence set is {DE, ED}, RCBAFED includes ED, RCBAFDE includes DE, RCBDEFA includes DE, RCDBAFE does not include ED and DE, RCDEFAB includes DE, and RCDEFBA includes DE. Therefore, RCBAFED, RCBAFDE, RCBDEFA, RCDEFAB and RCDEFBA are reference sequences.
[0095] In this embodiment, by determining the set of topological node sequences corresponding to the clustering clusters, a candidate sequence including a topological node sequence in each topological node sequence set is determined as a reference sequence. It can be understood that the clustering cluster is taken as a cleaning object. After cleaning one cleaning object, the candidate sequence for cleaning another cleaning object is determined as the reference sequence. Then, the cleaning cost corresponding to the reference sequence is determined based on the arrangement order of the topological nodes in the reference sequence, and the reference sequence corresponding to the minimum cleaning cost is determined as the cleaning sequence, that is, the optimal reference sequence is determined as the cleaning sequence, providing accurate basic data for the subsequent generation of the cleaning path.
[0096] In one embodiment, determining the cleaning cost corresponding to the reference sequence based on the connection order of the topological nodes in the reference sequence includes:
[0097] Based on the relationship between the connection path between two adjacent topological nodes in the reference sequence and the obstacle, the collision cost of the reference sequence is determined.
[0098] Among them, obstacles refer to obstacles in the target area. Obstacles can be walls, objects, and garbage that cannot be cleaned by the cleaning robot in the target area. Obstacles can be represented by obstacle point sets. A connection path refers to a straight path connecting two adjacent topological nodes. The relationship between a connection path and an obstacle can be one of: the connection path passes through the obstacle, and the connection path does not pass through the obstacle.
[0099] Exemplarily, the cleaning robot determines the number of collisions corresponding to the reference sequence based on the relationship between the connection path between two adjacent topological nodes in the reference sequence and the obstacle, and multiplies the number of collisions by the collision coefficient to obtain the collision cost. The collision coefficient is greater than the operation coefficient and the steering coefficient. The collision coefficient refers to the coefficient used to determine the collision cost, the operation coefficient refers to the coefficient used to determine the operation cost, and the steering coefficient refers to the coefficient used to determine the steering cost. For example, the collision coefficient is two orders of magnitude greater than the operation coefficient and the steering coefficient, the collision coefficient is 100, the operation coefficient is 8, and the steering coefficient is 2, or the collision coefficient is 2, the operation coefficient is 0.02, and the steering coefficient is 0.05. In this way, a collision-free cleaning path can be preferentially selected.
[0100] In one embodiment, based on the relationship between the connection path between two adjacent topological nodes in the reference sequence and the obstacle, determining the collision cost of the reference sequence includes: for two adjacent topological nodes in the reference sequence, connecting the two topological nodes to obtain a connection path; if the connection path passes through an obstacle, determining the connection path as a collision path; and determining the collision cost of the reference sequence based on the number of collision paths. The collision path refers to a connection path that passes through an obstacle, for example, Figure 5A The path BD shown in is the collision path, or Figure 5B The paths BE, BD and FC shown in are all collision paths.
[0101] In one embodiment, based on the relationship between the connection path between two adjacent topological nodes in the reference sequence and the obstacle, the collision cost of the reference sequence is determined, including: for two adjacent topological nodes in the reference sequence, the cleaning robot determines the connection path between the two topological nodes, collects the connection path, and obtains multiple connection sampling points; determines whether there is an obstacle point identical to the connection sampling point in the obstacle point set corresponding to the obstacle, if so, determines that the connection path passes through the obstacle, and determines that the connection path is a collision path; otherwise, determines that the connection path does not pass through the obstacle, and determines that the connection path is a non-collision path. The collision paths are counted to obtain the number of collision paths, and the number of collision paths is multiplied by the collision coefficient to obtain the collision cost of the reference sequence. Based on the path distance of the connection path between two adjacent topological nodes in the reference sequence, the running cost of the reference sequence is determined.
[0102] The path distance refers to the length of the connection path, and the path distance can be the straight-line distance between two adjacent topological nodes.
[0103] Exemplarily, for every two adjacent topological nodes in the reference sequence, the straight-line distance between the two adjacent topological nodes is calculated to obtain the path distance of the connection path between the two adjacent topological nodes; all path distances are added to obtain the total distance corresponding to the reference sequence, and the total distance is multiplied by the operating coefficient to obtain the operating cost of the reference sequence.
[0104] Based on the turning angles between three adjacent topological nodes in the reference sequence, the turning cost of the reference sequence is determined.
[0105] The steering angle refers to the angle between two connection paths of three adjacent topological nodes. For example, the three adjacent topological nodes are A, B and C, and the steering angle is ∠ABC.
[0106] Exemplarily, for every three adjacent topological nodes in the reference sequence, the steering angles of the three adjacent topological nodes are calculated; all steering angles are added to obtain the total angle corresponding to the reference sequence, and the total angle is multiplied by the steering coefficient to obtain the steering cost of the reference sequence.
[0107] Based on the collision cost, running cost and turning cost, the cleaning cost corresponding to the reference sequence is determined.
[0108] Exemplarily, the cleaning robot sums the collision cost, the running cost, and the turning cost to obtain the cleaning cost corresponding to the reference sequence. For example, the number of collisions is cost_0, the collision coefficient is weight_0, the total distance is cost_1, the running coefficient is weight_1, the total angle is cost_2, the turning coefficient is weight_2, and the cleaning cost cost_total = weight_0×cost_0+weight_1×cost_1+weight_2×cost_2.
[0109] In this embodiment, the cleaning cost represents the cleaning robot's cleaning of the area to be cleaned based on the arrangement order of the topological nodes in the reference sequence, the number of collisions with obstacles, the total running distance and the total turning angle, providing accurate basic data for determining the cleaning sequence.
[0110] In one embodiment, based on the topological nodes corresponding to the clusters, determining a set of topological node sequences of the clusters includes:
[0111] When the reference cleaning path corresponding to the clustering cluster includes at least two first direction paths, the first direction paths are counted to obtain statistical values; based on the statistical values, the head node and the tail node are determined from the topological nodes corresponding to the clustering cluster; based on the head node and the tail node, a topological node sequence is determined; based on multiple topological node sequences, a topological node sequence set of the clustering cluster is determined.
[0112] The statistical value refers to the total number of first direction paths included in the reference cleaning path. The first node refers to the first topological node in the topological node sequence, and the tail node refers to the last topological node in the topological node sequence.
[0113] Exemplarily, when the reference cleaning path corresponding to the clustering cluster includes at least two segments of first direction paths, the cleaning robot performs statistics on the first direction paths to obtain statistical values, and based on the statistical values, determines multiple groups of head nodes and tail nodes from the topological nodes corresponding to the clustering cluster; for each group of head nodes and tail nodes, the head node is used as the first topological node in the topological node sequence, and the tail node is used as the first topological node in the topological node sequence, and the other topological nodes except the head node and the tail node are arranged between the head node and the tail node to obtain multiple topological node sequences corresponding to the group of head nodes and tail nodes; and the multiple topological node sequences corresponding to the multiple groups of head nodes and tail nodes are combined into a topological node sequence set of the clustering cluster.
[0114] In one embodiment, when the reference cleaning path corresponding to the cluster includes a first direction path, two topological nodes corresponding to the cluster are arranged to obtain two topological node sequences, and the two topological node sequences are combined into a topological node sequence set of the cluster.
[0115] In this embodiment, when the reference cleaning path corresponding to the clustering cluster includes at least two first-direction paths, statistics are performed on the first-direction paths to obtain statistical values, and the head node and the tail node are determined based on the statistical values. The topological node sequence is determined based on the head node and the tail node, and the topological node sequence represents the order in which the points to be cleaned in the clustering cluster are cleaned. The topological node sequence set includes possible orders for cleaning the points to be cleaned in the clustering cluster, providing basic data for subsequently determining the reference sequence from the candidate sequence.
[0116] In one embodiment, based on the statistical value, determining the head node and the tail node from the topological nodes corresponding to the cluster includes:
[0117] When the statistical value is an odd number, the topological nodes corresponding to the two heterodox endpoints of the first segment first direction path and the last segment first direction path of the reference cleaning path are determined as the head node and the tail node; when the statistical value is an even number, the topological nodes corresponding to the two same-end endpoints of the first segment first direction path and the last segment first direction path are determined as the head node and the tail node.
[0118] The statistical value of the first direction path is an odd number, which represents the starting point and the end point of the reference cleaning path, which are located at the two ends of the first section of the first direction path and the last section of the first direction path, respectively. For example, the schematic diagram of the reference cleaning path is as follows: Figure 7As shown, the statistical value of the first direction path is equal to 3, the statistical value is an odd number, the two endpoints of the first direction path of the first section are AB, the two endpoints of the last section of the first direction path are CD, A and C are two endpoints at the same end, B and D are two endpoints at the same end, A and D are two endpoints at different ends, and B and C are two endpoints at different ends. The statistical value of the first direction path is an even number, which indicates the starting point and end point of the reference cleaning path, which are located at the two endpoints at the same end of the first section of the first direction path and the last section of the first direction path, respectively.
[0119] For example, when the statistical value is an odd number, one of the topological nodes corresponding to the two different-end endpoints of the first-direction path of the first segment and the first-direction path of the last segment of the reference cleaning path is determined as the head node, and the other is determined as the tail node; when the statistical value is an even number, one of the topological nodes corresponding to the two same-end endpoints of the first-direction path of the first segment and the first-direction path of the last segment is determined as the head node, and the other is determined as the tail node. For example, the schematic diagram of the reference cleaning path is as follows Figure 7 As shown, A and D are the topological nodes corresponding to the two heretical endpoints of the first direction path of the first segment and the last segment of the reference cleaning path. When A is determined as the first node, D is determined as the tail node, and the determined topological node sequence is ABCD and ACBD, and when D is determined as the first node, A is determined as the tail node, and the determined topological node sequence is DBCA and DCBA; B and C are the topological nodes corresponding to the two heretical endpoints of the first direction path of the first segment and the last segment of the reference cleaning path. When B is determined as the first node, C is determined as the tail node, and the determined topological node sequence is BADC and BDAC, and when C is determined as the first node, B is determined as the tail node, and the determined topological node sequence is CADB and CDAB. The topological node sequence set of the cluster is {ABCD, ACBD, DBCA, DCBA, BADC, BDAC, CADB, CDAB}.
[0120] In this embodiment, when the statistical value is an odd number, the topological nodes corresponding to the two heterodox endpoints of the first segment first direction path and the last segment first direction path of the reference cleaning path are determined as the first node and the tail node, and when the statistical value is an even number, the topological nodes corresponding to the two same-end endpoints of the first segment first direction path and the last segment first direction path are determined as the first node and the tail node, representing that the first topological node in the topological node sequence is the possible starting point of the reference cleaning path of the minimum circumscribed rectangle corresponding to the cluster cluster, and the last topological node in the topological node sequence is the possible starting and ending point of the reference cleaning path of the minimum circumscribed rectangle corresponding to the cluster cluster, providing accurate basic data for subsequent determination of the reference sequence from the candidate sequence.
[0121] In one embodiment, based on the cleaning sequence, determining a cleaning path of the area to be cleaned includes:
[0122] Based on the arrangement order of the topological nodes in the cleaning sequence, the topological nodes in the cleaning sequence are connected to obtain the topological node path; the topological node path is sampled to obtain the initial path; the obstacle distance map is obtained, and the initial path is adjusted based on the obstacle distance map to obtain the cleaning path of the area to be cleaned.
[0123] The topological node path refers to the path obtained by connecting the topological nodes in the cleaning sequence in the order of arrangement. The initial path refers to the path obtained by collecting the topological node paths. The obstacle distance map refers to a grid map representing obstacle information. The obstacle distance map includes multiple grids, each grid corresponds to an obstacle distance, and the obstacle distance represents the shortest distance between the grid and the obstacle. For example, the schematic diagram of the obstacle distance map is as follows: Figure 8 As shown, the numbers in the grid are obstacle distances, and an obstacle distance of zero indicates that the obstacle is located within the grid.
[0124] Exemplarily, the cleaning robot connects the topological nodes in the cleaning sequence based on the arrangement order of the topological nodes in the cleaning sequence to obtain a topological node path, performs uniform interval sampling on the topological node path to obtain an initial path, obtains an obstacle distance map corresponding to the target area, and adjusts the initial path based on the obstacle distance map to obtain a cleaning path for the area to be cleaned. For example, a schematic diagram of the change from the topological node path to the initial path is shown in FIG. Fig.9A As shown, the rectangular nodes represent topological nodes. The topological nodes are connected to obtain a topological node path 902. The circular nodes represent initial path nodes obtained by uniformly sampling the topological node path. The initial path nodes are connected to obtain an initial path 904. The schematic diagram of the change from the initial path to the clean path is shown in Fig. 9B As shown, some of the initial path nodes blocked by obstacles in the initial path 904 are adjusted to obtain adjusted cleaning path nodes 906, and the cleaning path nodes are connected to obtain a cleaning path.
[0125] In this embodiment, the initial path is adjusted through the obstacle distance map to obtain a cleaning path for the area to be cleaned. The cleaning robot cleans the area to be cleaned based on the cleaning path to avoid collision between the cleaning robot and obstacles, thereby improving the cleaning efficiency of the area to be cleaned.
[0126] In one embodiment, the initial path is adjusted based on the obstacle distance map to obtain a cleaning path for the area to be cleaned, including:
[0127] For each initial path point in the initial path, an initial position of a target grid where the initial path point is located in the obstacle distance map is determined.
[0128] The target grid refers to the grid where the initial path point is mapped to the obstacle map. The initial position refers to the position of the target grid in the obstacle map.
[0129] Exemplarily, for each initial path point in the initial path, the cleaning robot obtains the first global coordinate of the origin in the obstacle distance map in the global coordinate system, the grid width of the grid in the obstacle distance map, and the second global coordinate of the initial path point in the global coordinate system, and determines the initial position of the target grid where the initial path point is located in the obstacle distance map based on the first global coordinate, the grid width, and the second global coordinate.
[0130] In one embodiment, the first global coordinates of the origin in the obstacle distance map in the global coordinate system are (ORIGIN_X, ORIGIN_Y), the grid width of the grid in the obstacle distance map is MAP_SCALE, the second global coordinates of the initial path point in the global coordinate system are (w_point_x, w_point_y), and the initial position of the target grid is (m_point_x, m_point_y). The following formula is used to determine (m_point_x, m_point_y):
[0131] m_point_x = (w_point_x - ORIGIN_X) / MAP_SCALE Formula (1)
[0132] m_point_y = (w_point_y - ORIGIN_Y) / MAP_SCALE formula (2)
[0133] Based on the obstacle distance corresponding to the target grid, the interval distance between the initial path point and the obstacle is determined.
[0134] Exemplarily, the cleaning robot determines the interval distance between the initial path point and the obstacle based on the obstacle distance corresponding to the target grid and the grid width.
[0135] In one embodiment, the obstacle distance corresponding to the target grid is multiplied by the grid width to obtain the interval distance between the initial path point and the obstacle. For example, if the obstacle distance corresponding to the target grid is grid_value, the interval distance obs_dist between the initial path point and the obstacle can be determined by the following formula:
[0136] obs_dist= grid_value * MAP_SCALE formula (3)
[0137] When the interval distance is less than the safety distance threshold, based on the position of the grid in the obstacle distance map and the obstacle distance, the position of the grid whose interval distance corresponding to the obstacle distance is greater than the safety distance threshold and whose distance to the target grid is closest is determined as the adjustment position.
[0138] The safety distance threshold is a threshold that is compared with the interval distance to determine whether the initial path point needs to be adjusted. The safety distance threshold can be equal to half the width of the cleaning robot or less than half the width of the cleaning robot. The adjustment position refers to the position of the grid after the initial path point is mapped to the mapping point in the obstacle map and adjusted.
[0139] Exemplarily, the cleaning robot compares the interval distance with the safety distance threshold. If the interval distance is equal to or greater than the safety distance threshold, the initial path point is determined as the adjustment path point; if the interval distance is less than the safety distance threshold, the interval distance corresponding to the obstacle distance is determined to be greater than the safety distance threshold, and the grid closest to the target grid, and the position of the grid is determined as the adjustment position.
[0140] In one embodiment, if the interval distance is less than the safety distance threshold, the safety distance threshold is divided by the grid width to obtain the obstacle distance threshold, and the BFS algorithm is used to determine the grid whose obstacle distance is greater than the obstacle distance threshold, and then the grid closest to the target grid is determined from the grids whose obstacle distance is greater than the obstacle threshold, and the position of the grid is determined as the adjustment position.
[0141] Based on the adjusted position, an adjusted path point corresponding to the initial path point is determined.
[0142] Exemplarily, the cleaning robot determines an adjustment path point corresponding to the initial path point based on the adjustment position, the grid width and the first global coordinate.
[0143] In one embodiment, the adjusted position is (t_point_x, t_point_y), the first global coordinates of the origin in the obstacle distance map in the global coordinate system are (ORIGIN_X, ORIGIN_Y), the grid width of the grid in the obstacle distance map is MAP_SCALE, and the adjusted path point is (g_point_x, g_point_y) which can be determined by the following formula:
[0144] g_point_x = t_point_x* MAP_SCALE+ ORIGIN_X formula (4)
[0145] g_point_y = t_point_y * MAP_SCALE+ ORIGIN_Y Formula (5)
[0146] For example, a diagram of an obstacle distance map is shown below: Fig.10 As shown, the lower left corner of the obstacle distance map is set as the origin, the first global coordinate of the origin in the obstacle distance map in the global coordinate system is (ORIGIN_X, ORIGIN_Y) (0, 0), the grid width is equal to 0.1, the safety distance threshold is equal to half the width of the cleaning robot, the safety distance threshold is equal to 0.2, and the coordinates of one of the initial path points in the global coordinate system are (0.1, 0.1); first determine the initial position of the target grid (m_point_x, m_point_y), m_point_x = (0.1-0) / 0.1 = 1, m_point_y = (0.1-0) / 0.1 = 1 , that is, the initial position of the target grid (m_point_x, m_point_y) is (1,1); secondly, the obstacle distance threshold is calculated = 0.2 / 0.1 = 2, and then the BFS algorithm is used to search the grid closest to the target grid (1,1) in the obstacle distance map and whose obstacle distance is greater than 2, and the position of the grid is obtained as (2,1); finally, the adjusted path point (g_point_x, g_point_y) is calculated, g_point_x = 2*0.1+0 = 0.2, g_point_y = 1*0.1+0 = 0.1, and the position of the adjusted path point in the global coordinate system is obtained as (0.2, 0.1).
[0147] The initial path points in the initial path are updated based on the adjusted path points to obtain a cleaning path for the area to be cleaned.
[0148] Exemplarily, the cleaning robot replaces the initial path points in the initial path with the adjustment path points corresponding to the initial path points to obtain a cleaning path for the area to be cleaned.
[0149] In this embodiment, the initial path is adjusted through the obstacle distance map to obtain a cleaning path for the area to be cleaned. The cleaning robot cleans the area to be cleaned based on the cleaning path to avoid collision between the cleaning robot and obstacles, thereby improving the cleaning efficiency of the area to be cleaned.
[0150] In one embodiment, the initial path points in the initial path are updated based on the adjusted path points to obtain a cleaning path for the area to be cleaned, including:
[0151] Based on the adjustment path points, the initial path points in the initial path are updated to obtain the adjustment path; for every three adjacent adjustment path points in the adjustment path, the middle adjustment path points among the three adjacent adjustment path points are smoothed based on the three adjacent adjustment path points to obtain the smoothed path points corresponding to the middle adjustment path points; based on the smoothed path points, the middle adjustment path points in the adjustment path are updated to obtain the cleaning path of the area to be cleaned.
[0152] The middle adjustment path point refers to the adjustment path point located in the middle of three adjacent adjustment path points. For example, the three adjacent adjustment path points are p i-1 (x i-1, y i-1 ), p i (x i, y i ) and p i+1 (x i+1, y i+1 ), p i (x i, y i ) and p i-1 (x i-1, y i-1 ) and p i+1 (x i+1, y i+1 ) are adjacent, that is, p i (x i, y i ) is located at p i-1 (x i-1, y i-1 ) and p i+1 (x i+1, y i+1 ), then p i (x i, y i ) is the middle adjustment path point among three adjacent adjustment path points.
[0153] Exemplarily, the cleaning robot replaces the initial path points in the initial path with the adjustment path points corresponding to the initial path points to obtain the adjustment path; for every three adjacent adjustment path points in the adjustment path, the middle adjustment path points among the three adjacent adjustment path points are smoothed based on the three adjacent adjustment path points to obtain the smoothed path points corresponding to the middle adjustment path points; the middle adjustment path points in the adjustment path are replaced with the smoothed path points corresponding to the middle adjustment path to obtain the cleaning path for the area to be cleaned.
[0154] In one embodiment, path smoothing is performed on the middle adjustment path point among three adjacent adjustment path points based on three adjacent adjustment path points to obtain a smoothed path point corresponding to the middle adjustment path point, including: obtaining a smooth curve, importing the global coordinates corresponding to the three adjacent adjustment path points in the global coordinate system into the smooth curve, and obtaining the global coordinates of the smoothed path point corresponding to the middle adjustment path point.
[0155] In one embodiment, the process of determining the smooth curve includes: three adjacent adjustment path points are P i-1 , P i and P i+1, then the coordinate difference between any two adjacent adjustment path points is:
[0156] Δx i =P i -P i-1 Formula (6)
[0157] Δx i+1 =P i+1 -P i Formula (7)
[0158] The error is determined by:
[0159]
[0160] Determine the gradient as:
[0161]
[0162] Through continuous iteration of the gradient descent method, a smooth path curve can be obtained:
[0163]
[0164] Among them, h>0, h is used to control the iteration step size. When h is large, the adjustment amplitude is large and the convergence speed is fast, but it is easy to cause oscillation or even non-convergence; when h is small, the adjustment amplitude is small, the convergence is slow, but it is more stable, and the final curve may be smoother; the smoothness can be controlled by setting the number of iterations. The more iterations, the smoother the cleaning path.
[0165] In this embodiment, the initial path points in the initial path are updated by adjusting the path points to obtain the adjusted path, and the cleaning path of the area to be cleaned is obtained by smoothing the adjusted path, thereby improving the smoothness of the cleaning path.
[0166] In one embodiment, based on the ground image data, determining the area to be cleaned includes:
[0167] The ground image data is preprocessed to obtain preprocessed image data; the preprocessed image data is instance segmented to obtain an initial region; the initial region is converted into a world coordinate system to obtain an area to be cleaned.
[0168] Preprocessing refers to the denoising, enhancement, and distortion removal of ground image data. Instance segmentation refers to the process of determining the contours of garbage. A neural network model can be used for instance segmentation. For example, the schematic diagram of preprocessing image data is shown in the figure. Fig.11As shown, the YOLOv8-seg (YOLOv8 Instance Segmentation) model is used for instance segmentation to obtain the cleanable garbage in 1102 and the uncleanable garbage in 1104, and the outline of the cleanable garbage is determined as the initial area. The initial area refers to the point set representing the outline of the garbage in the image coordinate system. The area to be cleaned is the point set representing the outline of the garbage in the world coordinate system.
[0169] Exemplarily, the cleaning robot preprocesses the ground image data to obtain preprocessed image data, performs instance segmentation on the preprocessed image data to obtain an initial region, and converts the initial region into a world coordinate system to obtain an area to be cleaned. For example, a schematic diagram of the process of determining the area to be cleaned is shown in FIG. Fig.12 As shown, ground image data is collected by a camera installed on the cleaning robot; the ground image data is preprocessed to obtain preprocessed image data; the preprocessed image data is instance segmented to obtain an initial area; the initial area is coordinate transformed to output the area to be cleaned.
[0170] In one embodiment, the coordinates of the initial point in the initial area in the image coordinate system are (u, v), the intrinsic parameter matrix k and the extrinsic parameter matrix (R / t) of the camera are used to determine the coordinates of the initial point in the world coordinate system (Xw, Yw, Zw), including:
[0171] (1) Calibrate to obtain the internal parameter matrix K and external parameter matrix [R / t]
[0172]
[0173] Among them, f x is the focal length in the X direction in the image coordinate system; f y is the focal length in the Y direction in the image coordinate system; (c x ,c y ) is the coordinate of the center point of the image; is the rotation matrix; is the translation vector;
[0174] (2) Convert the coordinates (u, v) to normalized image coordinates (x n ,y n )
[0175]
[0176] (3) Normalize the image coordinates (x n ,y n ) is converted to camera coordinates (Xc, Yc, Zc)
[0177]
[0178] Among them, Zc is the depth.
[0179] (4) Convert the camera coordinates (Xc, Yc, Zc) to world coordinates (Xw, Yw, Zw)
[0180]
[0181] In this embodiment, preprocessing is performed on the ground image data to obtain preprocessed image data, thereby improving the accuracy of the preprocessed image data; instance segmentation is performed on the preprocessed image data to obtain an initial area, and the initial area is converted into a world coordinate system to obtain an area to be cleaned, thereby laying a foundation for subsequently determining a cleaning path for the area to be cleaned.
[0182] In an exemplary embodiment, the flow chart of the cleaning method is as follows Fig.13 As shown, including:
[0183] The cleaning robot obtains the target area in response to the setting operation of the target area, and generates a cruising path corresponding to the target area.
[0184] The cleaning robot responds to the trigger operation of the cruise mode and enters the cruise mode. The cleaning robot determines whether it has reached the end of the cruise path. If it has not reached the end of the cruise path, it runs based on the cruise path. During the operation, the camera installed on the cleaning robot collects ground image data.
[0185] The cleaning robot determines whether there is cleanable garbage (i.e., whether there is an area to be cleaned) based on the ground image data. If there is no cleanable garbage, the cleaning robot continues to operate based on the cruising path and collects ground image data. Based on the ground image data, it determines whether there is cleanable garbage.
[0186] If there is cleanable garbage, the cleaning robot determines that the current mode is the active cleaning mode, fills the area to be cleaned, obtains a set of points to be cleaned consisting of the points to be cleaned that fill the area to be cleaned, and uses the DBSCAN algorithm to cluster the set of points to be cleaned to obtain the cluster clusters corresponding to the set of points to be cleaned. For each cluster, the cleaning robot determines the minimum circumscribed circle that contains the points to be cleaned in the cluster, determines the radius of the minimum circumscribed circle, and compares the radius with the cleaning width threshold. If the radius is less than or equal to the cleaning width threshold, the cleaning object type of the cluster is determined to be a point object; if the radius is greater than the cleaning width threshold, the cleaning object type of the cluster is determined to be a surface object.
[0187] For each cluster, if the cleaning object type of the cluster is a point object, the cleaning robot determines the center of the minimum circumscribed circle of the cluster, and determines the center as the topological node corresponding to the cluster; if the cleaning object type of the cluster is a surface object, the cleaning robot determines the minimum circumscribed rectangle of the cluster, determines the reference cleaning path of the minimum circumscribed rectangle based on the minimum circumscribed rectangle and the cleaning width of the cleaning robot, and counts the first direction paths in the reference cleaning path that are parallel to the long side of the minimum circumscribed rectangle to obtain the number of first direction paths. If the number of first direction paths is one, the two endpoints of the first direction path are determined as the topological nodes corresponding to the cluster; if the number of first direction paths is at least two, the two endpoints of the first direction path of the first segment and the two endpoints of the first direction path of the last segment are determined as the topological nodes corresponding to the cluster.
[0188] The cleaning robot is determined as the starting topological node, the topological node with the shortest straight-line distance to the starting topological node is determined, the starting topological point and the topological node with the shortest straight-line distance to the starting topological node are connected, and the topological nodes corresponding to the clusters are connected using the Delaunay triangulation algorithm or the full connection algorithm to obtain a topological graph.
[0189] The starting topological node is determined as the starting point of the traversal, and the topological graph is traversed using a depth-first search method (Depth-First Search) to obtain multiple candidate sequences.
[0190] For a cluster whose cleaning object type is a surface object, if the reference cleaning path corresponding to the cluster includes a first direction path, the two topological nodes corresponding to the cluster are arranged to obtain two topological node sequences, and the two topological node sequences are combined into a topological node sequence set of the cluster. If the reference cleaning path corresponding to the clustering cluster includes at least two sections of the first direction path, the cleaning robot performs statistics on the first direction path to obtain a statistical value. When the statistical value is an odd number, one of the topological nodes corresponding to the two heterodox endpoints of the first section of the first direction path and the last section of the first direction path of the reference cleaning path is determined as the head node, and the other is determined as the tail node; when the statistical value is an even number, one of the topological nodes corresponding to the two same-end endpoints of the first section of the first direction path and the last section of the first direction path is determined as the head node, and the other is determined as the tail node; for each group of head nodes and tail nodes, the head node is used as the first topological node in the topological node sequence, and the tail node is used as the first topological node in the topological node sequence, and the other topological nodes except the head node and the tail node are arranged between the head node and the tail node to obtain multiple topological node sequences corresponding to the head node and the tail node of the group; and the multiple topological node sequences corresponding to the multiple groups of head nodes and the tail nodes are combined into a topological node sequence set of the clustering cluster.
[0191] For each candidate sequence, it is determined whether the candidate sequence includes a topological node sequence in each topological node sequence set. If the candidate sequence includes a topological node sequence in each topological node sequence set, the candidate sequence is determined as a reference sequence.
[0192] For each reference sequence, for two adjacent topological nodes in the reference sequence, the cleaning robot determines the connection path between the two topological nodes, collects the connection path, and obtains multiple connection sampling points; determines whether there is an obstacle point in the obstacle point set corresponding to the obstacle that is the same as the connection sampling point. If so, it is determined that the connection path passes through the obstacle and the connection path is determined to be a collision path; otherwise, it is determined that the connection path does not pass through the obstacle and the connection path is determined to be a non-collision path. The collision paths are counted to obtain the number of collision paths, and the number of collision paths is multiplied by the collision coefficient to obtain the collision cost of the reference sequence. For each two adjacent topological nodes in the reference sequence, the straight-line distance between the two adjacent topological nodes is calculated to obtain the path distance of the connection path between the two adjacent topological nodes; all path distances are added to obtain the total distance corresponding to the reference sequence, and the total distance is multiplied by the running coefficient to obtain the running cost of the reference sequence. For each three adjacent topological nodes in the reference sequence, the steering angles of the three adjacent topological nodes are calculated; all steering angles are added to obtain the total angle corresponding to the reference sequence, and the total angle is multiplied by the steering coefficient to obtain the steering cost of the reference sequence. The cleaning robot sums the collision cost, the running cost and the turning cost to obtain the cleaning cost corresponding to the reference sequence. The cleaning costs corresponding to multiple reference sequences are compared to obtain the minimum cleaning cost, and the reference sequence corresponding to the minimum cleaning cost is determined as the cleaning sequence.
[0193] The cleaning robot connects the topological nodes in the cleaning sequence based on the arrangement order of the topological nodes in the cleaning sequence to obtain the topological node path, and uniformly samples the topological node path to obtain the initial path. Obtain the obstacle distance map corresponding to the target area. For each initial path point in the initial path, the cleaning robot obtains the first global coordinate of the origin in the obstacle distance map in the global coordinate system, the grid width of the grid in the obstacle distance map, and the second global coordinate of the initial path point in the global coordinate system. Based on the first global coordinate, the grid width and the second global coordinate, the cleaning robot uses formula (1) and formula (2) to determine the initial position of the target grid where the initial path point is located in the obstacle distance map. Based on the obstacle distance and grid width corresponding to the target grid, the cleaning robot uses formula (3) to determine the interval distance between the initial path point and the obstacle. The cleaning robot compares the interval distance with the safety distance threshold. If the interval distance is equal to or greater than the safety distance threshold, the initial path point is determined as an adjustment path point. If the interval distance is less than the safety distance threshold, the safety distance threshold is divided by the grid width to obtain the obstacle distance threshold, and the BFS algorithm is used to determine the grid whose obstacle distance is greater than the obstacle distance threshold. Then, the grid closest to the target grid is determined from the grids whose obstacle distance is greater than the obstacle threshold, and the position of the grid is determined as the adjustment position. Based on the adjustment position, grid width and first global coordinate, the cleaning robot uses formula (4) and formula (5) to determine the adjustment path point corresponding to the initial path point. The cleaning robot replaces the initial path point in the initial path with the adjustment path point corresponding to the initial path point to obtain the adjustment path.
[0194] For every three adjacent adjustment path points in the adjustment path, based on the three adjacent adjustment path points, the middle adjustment path point among the three adjacent adjustment path points is smoothed using formula (10) to obtain the smoothed path point corresponding to the middle adjustment path point; the middle adjustment path point in the adjustment path is replaced with the smoothed path point corresponding to the middle adjustment path to obtain the cleaning path of the area to be cleaned. For example, the cleaning path schematic diagram is as follows: Fig.14 As shown, the cleaning path of the area to be cleaned generated in the full coverage cleaning mode and the cleaning path of the area to be cleaned generated in the cruise cleaning mode are included. It can be seen that the length of the cleaning path generated in the cruise cleaning mode is shorter than that generated in the full coverage cleaning mode.
[0195] After determining the cleaning path of the area to be cleaned, the cleaning robot cleans the area to be cleaned based on the area to be cleaned.
[0196] After completing cleaning of the area to be cleaned, the cleaning robot returns to the interruption position of the cruising path, determines that the current mode is the cruising cleaning mode, continues to operate based on the cruising path, and collects ground image data.
[0197] The above process is repeated until the cleaning robot reaches the end of the cruising path.
[0198] In the above cleaning method, the cleaning robot operates in the cruise cleaning mode based on the cruise path corresponding to the cruise cleaning mode, collects ground image data during the operation, uses the ground image data to determine whether there is an area to be cleaned near the operation of the cleaning robot, and if there is an area to be cleaned, determines the cleaning path of the area to be cleaned, cleans the area to be cleaned based on the cleaning path, and continues to operate based on the cruise path after cleaning the area to be cleaned. The cleaning robot keeps the cleaning equipment on throughout the process of cleaning the target area based on the area cleaning path. In order to ensure the cleaning effect of the target area, the cleaning robot needs to run at a slower speed, use the cruise path to clean the target area, and turn on the cleaning equipment only during the process of cleaning the area to be cleaned, and keep running at a slower speed, thereby shortening the time for cleaning the target area and improving the cleaning efficiency of the cleaning robot.
[0199] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0200] Based on the same inventive concept, the embodiment of the present application also provides a cleaning device for implementing the cleaning method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more cleaning device embodiments provided below can refer to the limitations on the cleaning method above, and will not be repeated here.
[0201] In one embodiment, a cleaning device is provided, which is located on a cleaning robot and includes: a first operation module, an area determination module, a path determination module, a cleaning module, and a second operation module, wherein:
[0202] A first operation module is used to operate in a cruise cleaning mode based on a cruise path corresponding to the cruise cleaning mode and collect ground image data;
[0203] An area determination module is used to determine the area to be cleaned based on the ground image data;
[0204] A path determination module, for determining a cleaning path of the area to be cleaned based on the area to be cleaned when there is an area to be cleaned;
[0205] A cleaning module, used for cleaning the area to be cleaned based on the cleaning path;
[0206] The second operation module is used to continue to operate based on the cruise path and collect ground image data after completing the cleaning of the area to be cleaned.
[0207] In one embodiment, the path determination module is further used to: determine the clusters corresponding to the set of points to be cleaned in the area to be cleaned; determine the cleaning object types of the clusters; and determine the cleaning path of the area to be cleaned based on the points to be cleaned and the cleaning object types in each cluster.
[0208] In one embodiment, the path determination module is also used to: determine the minimum circumscribed circle that includes the points to be cleaned in the cluster; compare the radius of the minimum circumscribed circle with the cleaning width threshold; when the radius is less than or equal to the cleaning width threshold, determine that the cleaning object type of the cluster is a point object; when the radius is greater than the cleaning width threshold, determine that the cleaning object type of the cluster is a surface object.
[0209] In one embodiment, the path determination module is also used to: for each cluster, determine the topological node corresponding to the cluster based on the points to be cleaned and the types of cleaning objects in the cluster; connect the topological nodes corresponding to multiple clusters to obtain a topological map; determine the cleaning sequence of the area to be cleaned based on the topological map; and determine the cleaning path of the area to be cleaned based on the cleaning sequence.
[0210] In one embodiment, the path determination module is also used to: when the cleaning object type of the cluster is a point object, determine the center of the minimum circumscribed circle of the cluster as the topological node corresponding to the cluster; when the cleaning object type of the cluster is a surface object, determine the minimum circumscribed rectangle of the cluster; determine the reference cleaning path of the minimum circumscribed rectangle based on the minimum circumscribed rectangle and the cleaning width of the cleaning robot; the reference cleaning path includes a first direction path, and the first direction path is parallel to the long side of the minimum circumscribed rectangle; determine the topological node corresponding to the cluster based on the number of first direction paths and the two endpoints of the first direction path. In one embodiment, the path determination module is also used to: traverse the topological graph to obtain multiple candidate sequences; determine the cleaning sequence from the multiple candidate sequences based on the arrangement order of the topological nodes in the candidate sequence.
[0211] In one embodiment, the path determination module is also used to: for cluster clusters whose cleaning object type is surface object, determine the set of topological node sequences corresponding to the cluster cluster based on the topological nodes corresponding to the cluster cluster; determine a candidate sequence including a topological node sequence in each topological node sequence set as a reference sequence; for each reference sequence, determine the cleaning cost corresponding to the reference sequence based on the arrangement order of the topological nodes in the reference sequence; and determine a cleaning sequence from multiple reference sequences based on the cleaning costs corresponding to each reference sequence.
[0212] In one embodiment, the path determination module is also used to: determine the collision cost of the reference sequence based on the relationship between the connection path between two adjacent topological nodes in the reference sequence and the obstacle; determine the running cost of the reference sequence based on the path distance of the connection path between two adjacent topological nodes in the reference sequence; determine the turning cost of the reference sequence based on the turning angles between three adjacent topological nodes in the reference sequence; determine the cleaning cost corresponding to the reference sequence based on the collision cost, running cost and turning cost.
[0213] In one embodiment, the path determination module is also used to: when the reference cleaning path corresponding to the cluster cluster includes at least two segments of the first direction path, perform statistics on the first direction path to obtain statistical values; based on the statistical values, determine the head node and the tail node from the topological nodes corresponding to the cluster cluster; based on the head node and the tail node, determine the topological node sequence; based on multiple topological node sequences, determine the topological node sequence set of the cluster cluster.
[0214] In one embodiment, the path determination module is also used to: when the statistical value is an odd number, determine the topological nodes corresponding to the two different-end endpoints of the first-direction path of the first segment and the first-direction path of the last segment of the reference cleaning path as the head node and the tail node; when the statistical value is an even number, determine the topological nodes corresponding to the two same-end endpoints of the first-direction path of the first segment and the first-direction path of the last segment as the head node and the tail node.
[0215] In one embodiment, the path determination module is also used to: connect the topological nodes in the cleaning sequence based on the arrangement order of the topological nodes in the cleaning sequence to obtain a topological node path; sample the topological node path to obtain an initial path; obtain an obstacle distance map, and adjust the initial path based on the obstacle distance map to obtain a cleaning path for the area to be cleaned.
[0216] In one embodiment, the path determination module is also used to: determine, for each initial path point in the initial path, the initial position of the target grid where the initial path point is located in the obstacle distance map; determine the interval distance between the initial path point and the obstacle based on the obstacle distance corresponding to the target grid; when the interval distance is less than a safety distance threshold, based on the position of the grid in the obstacle distance map and the obstacle distance, determine the position of the grid whose interval distance corresponding to the obstacle distance is greater than the safety distance threshold and is closest to the target grid as the adjustment position; determine the adjustment path point corresponding to the initial path point based on the adjustment position; and update the initial path point in the initial path based on the adjustment path point to obtain a cleaning path for the area to be cleaned.
[0217] In one embodiment, the path determination module is also used to: update the initial path points in the initial path based on the adjustment path points to obtain the adjustment path; for every three adjacent adjustment path points in the adjustment path, smooth the middle adjustment path points among the three adjacent adjustment path points based on the three adjacent adjustment path points to obtain the smoothed path points corresponding to the middle path points; based on the smoothed path points, update the middle path points in the adjustment path to obtain the cleaning path of the area to be cleaned.
[0218] Each module in the above cleaning device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the cleaning robot in hardware form, or can be stored in the memory of the cleaning robot in software form, so that the processor can call and execute the operations corresponding to each module.
[0219] In one embodiment, a cleaning robot is provided, which can be a terminal. The cleaning robot includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the cleaning robot is used to provide computing and control capabilities. The memory of the cleaning robot includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the cleaning robot is used to exchange information between the processor and an external device. The communication interface of the cleaning robot is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented by WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a cleaning method is implemented. The display unit of the cleaning robot is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the cleaning robot can be a touch layer covering the display screen, or a button, trackball or touchpad set on the cleaning robot shell, or an external keyboard, touchpad or mouse.
[0220] Those skilled in the art will understand that the structure of the above-mentioned cleaning robot is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the cleaning robot to which the scheme of the present application is applied. The specific cleaning robot may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0221] In one embodiment, a cleaning robot is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0222] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0223] In one embodiment, a program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0224] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0225] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0226] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A cleaning method, characterized in that: The method is used for a cleaning robot, comprising: In the cruise cleaning mode, the robot operates based on a cruise path corresponding to the cruise cleaning mode and collects ground image data; Based on the ground image data, determining an area to be cleaned; In the case where the area to be cleaned exists, determining a cleaning path for the area to be cleaned based on the area to be cleaned; Based on the cleaning path, cleaning the area to be cleaned; After the cleaning of the area to be cleaned is completed, the operation continues based on the cruising path and ground image data is collected.
2. The method according to claim 1, characterized in that The step of determining a cleaning path of the area to be cleaned based on the area to be cleaned includes: Determine a cluster corresponding to the set of points to be cleaned in the area to be cleaned; Determining the cleaning object type of the cluster; Based on the to-be-cleaned points and the types of cleaning objects in each of the clusters, a cleaning path for the to-be-cleaned area is determined.
3. The method according to claim 2, characterized in that The determining the cleaning object type of the cluster comprises: Determine the minimum circumscribed circle containing the points to be cleaned in the cluster; comparing the radius of the minimum circumscribed circle with a cleaning width threshold; When the radius is less than or equal to the cleaning width threshold, determining the cleaning object type of the cluster as a point object; When the radius is greater than the cleaning width threshold, it is determined that the cleaning object type of the cluster is a surface object.
4. The method according to claim 2, characterized in that: The step of determining a cleaning path of the area to be cleaned based on the points to be cleaned and the types of cleaning objects in each of the clusters comprises: For each of the clusters, based on the points to be cleaned and the types of cleaning objects in the cluster, determine a topological node corresponding to the cluster; Connecting the topological nodes corresponding to the plurality of clusters to obtain a topological graph; Based on the topological map, determining a cleaning sequence for the area to be cleaned; Based on the cleaning sequence, a cleaning path of the area to be cleaned is determined.
5. The method according to claim 4, characterized in that The determining of the topological nodes corresponding to the cluster based on the points to be cleaned and the types of cleaning objects in the cluster includes: In the case where the cleaning object type of the cluster is a point object, determining the center of the minimum circumscribed circle of the cluster as the topological node corresponding to the cluster; In the case where the cleaning object type of the cluster is a surface object, determining a minimum circumscribed rectangle of the cluster; Based on the minimum circumscribed rectangle and the cleaning width of the cleaning robot, determining a reference cleaning path of the minimum circumscribed rectangle; the reference cleaning path comprises a first direction path, and the first direction path is parallel to the long side of the minimum circumscribed rectangle; Based on the number of the first directional paths and the two endpoints of the first directional paths, a topological node corresponding to the cluster is determined.
6. The method according to claim 4, characterized in that The step of determining a cleaning sequence of the area to be cleaned based on the topological map includes: Traversing the topological graph to obtain multiple candidate sequences; Based on the arrangement order of the topological nodes in the candidate sequence, a cleaning sequence is determined from the plurality of candidate sequences.
7. The method according to claim 6, characterized in that The step of determining a cleaning sequence from a plurality of candidate sequences based on the arrangement order of the topological nodes in the candidate sequence comprises: For a cluster whose cleaning object type is a surface object, based on the topological nodes corresponding to the cluster, determine a set of topological node sequences corresponding to the cluster; Determine a candidate sequence including one topological node sequence in each of the topological node sequence sets as a reference sequence; For each of the reference sequences, based on the arrangement order of the topological nodes in the reference sequence, determining the cleaning cost corresponding to the reference sequence; A cleaning sequence is determined from the plurality of reference sequences based on the cleaning costs corresponding to the reference sequences.
8. The method according to claim 7, characterized in that The determining the cleaning cost corresponding to the reference sequence based on the connection order of the topological nodes in the reference sequence includes: Determining a collision cost of the reference sequence based on a relationship between a connection path between two adjacent topological nodes in the reference sequence and an obstacle; Determining the operation cost of the reference sequence based on the path distance of the connection path between two adjacent topological nodes in the reference sequence; Determining a steering cost of the reference sequence based on a steering angle between three adjacent topological nodes in the reference sequence; A cleaning cost corresponding to the reference sequence is determined based on the collision cost, the running cost and the turning cost.
9. The method according to claim 7, characterized in that: The determining of a topological node sequence set of the cluster based on the topological nodes corresponding to the cluster includes: In a case where the reference cleaning path corresponding to the cluster includes at least two first direction paths, performing statistics on the first direction paths to obtain a statistical value; Based on the statistical value, determining a head node and a tail node from the topological nodes corresponding to the cluster; Determine a topological node sequence based on the head node and the tail node; Based on the multiple topological node sequences, a set of topological node sequences of the cluster is determined.
10. The method according to claim 9, characterized in that The step of determining the head node and the tail node from the topological nodes corresponding to the cluster based on the statistical value includes: When the statistical value is an odd number, the topological nodes corresponding to the endpoints of the first segment first direction path and the last segment first direction path of the reference cleaning path are determined as the head node and the tail node; When the statistical value is an even number, the topological nodes corresponding to the two same-end endpoints of the first segment first direction path and the last segment first direction path are determined as the head node and the tail node.
11. The method according to any one of claims 4 to 10, characterized in that: The step of determining a cleaning path of the area to be cleaned based on the cleaning sequence includes: Based on the arrangement order of the topological nodes in the cleaning sequence, the topological nodes in the cleaning sequence are connected to obtain a topological node path; Sampling the topological node path to obtain an initial path; Obtain an obstacle distance map, and adjust the initial path based on the obstacle distance map to obtain a cleaning path for the area to be cleaned.
12. The method according to claim 11, characterized in that The adjusting the initial path based on the obstacle distance map to obtain the cleaning path of the area to be cleaned includes: For each initial path point in the initial path, determining an initial position of a target grid where the initial path point is located in the obstacle distance map; Determine the interval distance between the initial path point and the obstacle based on the obstacle distance corresponding to the target grid; In the case where the interval distance is less than the safety distance threshold, based on the position of the grid in the obstacle distance map and the obstacle distance, the position of the grid whose interval distance corresponding to the obstacle distance is greater than the safety distance threshold and whose distance to the target grid is closest is determined as the adjustment position; Based on the adjusted position, determining an adjusted path point corresponding to the initial path point; The initial path points in the initial path are updated based on the adjustment path points to obtain a cleaning path for the area to be cleaned.
13. The method according to claim 12, characterized in that The updating of the initial path points in the initial path based on the adjustment path points to obtain the cleaning path of the area to be cleaned includes: Based on the adjusted path points, the initial path points in the initial path are updated to obtain an adjusted path; For every three adjacent adjustment path points in the adjustment path, path smoothing is performed on a middle adjustment path point among the three adjacent adjustment path points based on the three adjacent adjustment path points to obtain a smoothed path point corresponding to the middle path point; Based on the smooth path points, the intermediate path points in the adjustment path are updated to obtain a cleaning path for the area to be cleaned.
14. A cleaning robot, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.
Citation Information
Cited By
Underwater servo drive control method and system
CN120986615A