A real-time path planning method for full coverage of cleaning robots
By dividing the work scene of the cleaning robot into sub-map areas, adopting edge-side and polyline cleaning strategies, combining DWA algorithm and real-time update of pixel cleaning status, the full coverage real-time path planning of the cleaning robot is achieved, and the path planning in the dynamic working environment is solved The problem of improving cleaning efficiency and environmental adaptability.
Patent Information
- Application Number
- CN202210744448.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-06-27
AI Technical Summary
Existing cleaning robot path planning algorithms are difficult to achieve full coverage and efficient cleaning in dynamic operating environments, especially when encountering obstacles, which requires re-planning of routes, affecting environmental adaptability.
By dividing the work scene into multiple submap areas, using edge-side and polyline cleaning strategies, combining DWA algorithm and real-time updated pixel cleaning status, real-time path planning for the cleaning robot is achieved.
It improves the adaptability and cleaning efficiency of the cleaning robot in a dynamic working environment, ensures full coverage and efficient cleaning of the entire work scenario, reduces route repetition and turn, and improves the overall cleaning effect.
Smart Images

Figure CN114995458B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of cleaning robots, and in particular to a full-coverage real-time path planning method for a cleaning robot. Background Art
[0002] At present, cleaning robots, such as household sweeping robots, commercial sweeping robots, commercial washing and mopping robots, commercial floor polishing robots and commercial carpet cleaning robots, have been widely used in cleaning work in scenes such as homes, hotels, conference centers, supermarkets and exhibition centers. For cleaning operations in robot working scenes, the most important thing is to enable the robot to plan the cleaning route of the area to be cleaned, bypass obstacles during the cleaning process, and be able to get out of trouble in time for abnormal situations. The traditional path planning algorithm is to find the shortest or least costly collision-free path from the starting point to the end point, while the goal of full coverage path planning is to find a path that can cover the entire map area with as few repetitions as possible. This planning algorithm is mainly used in cleaning robots or other robots for special operations. In order to achieve the highest efficiency in covering the entire map, the path should not only be repeated as little as possible, but also require as few turns as possible. This requires that constraints be considered in the process of planning the path. In addition, the actual working environment is dynamic, and the robot often cannot strictly follow the path planned at the beginning to work. When encountering obstacles, the route needs to be replanned to improve the environmental adaptability to dynamic scene operations. Therefore, a full coverage real-time path planning algorithm came into being. Summary of the invention
[0003] In order to solve at least one of the above technical problems, the present disclosure provides a full-coverage real-time path planning method for a cleaning robot.
[0004] According to one aspect of the present disclosure, a cleaning robot full coverage real-time path planning method is provided, comprising:
[0005] Divide the cleaning robot's working scene into multiple sub-map areas, and initialize each sub-map area;
[0006] Select one of the sub-map areas as the starting sub-map area;
[0007] Cleaning the starting sub-map area along the edges, and completing closed-loop detection of the outline of the starting sub-map area by cleaning along the edges;
[0008] Performing polyline cleaning inside the starting sub-map area, and updating the cleaning status of the pixels in the starting sub-map area in real time;
[0009] Each sub-map area outside the starting sub-map area is cleaned along the edges and along the fold lines.
[0010] According to the full coverage real-time path planning method for a cleaning robot of at least one embodiment of the present disclosure, each sub-map area is initialized, including:
[0011] Different label values are marked for the pixels in each sub-map area, and the label values are used to mark the cleaning order of each sub-map area by the cleaning robot;
[0012] Marking the cleaning status of the pixels in each sub-map area, wherein the cleaning status includes cleaned or uncleaned;
[0013] Calculate the area of the area to be cleaned and the area of the cleaned area in each sub-map area.
[0014] According to the full coverage real-time path planning method for a cleaning robot according to at least one embodiment of the present disclosure, cleaning along the edge of the starting sub-map area includes:
[0015] Find a point set with a sudden change in label value from the starting submap area and use the point set as the boundary of the starting submap area, and use the nearest uncleaned point in the point set as the starting point along the edge;
[0016] The cleaning robot moves along the planned path to the edge starting point;
[0017] Starting from the edge starting point, moving along the boundary, following by the DWA algorithm, and performing closed-loop detection at the same time;
[0018] The closed-loop detection is used to determine whether the robot has returned to a boundary that the cleaning robot has passed. If so, the edge cleaning is terminated.
[0019] According to the full coverage real-time path planning method for a cleaning robot according to at least one embodiment of the present disclosure, broken line cleaning is performed inside the starting sub-map area, and the cleaning status of each pixel point in the area is updated in real time, including:
[0020] Calculating the corner points of the starting sub-map area;
[0021] The cleaning robot reaches the corner point;
[0022] Calculate the lengths of paths that can be planned in the four directions of up, down, left and right of the corner point, select a direction with the largest path length as the cleaning direction and perform cleaning;
[0023] During the cleaning process, the cleaning status of the cleaned pixels in the starting sub-map area is updated.
[0024] According to at least one embodiment of the present disclosure, the full coverage real-time path planning method for a cleaning robot further includes, during the broken line cleaning process:
[0025] If an obstacle is encountered on the way, it is determined whether the obstacle has been passed along the edge. If it has been passed along the edge, the line is returned. If it has not been passed along the edge, it is circled around the obstacle and continues along the edge until it is closed or moved to the cleaned area.
[0026] If no obstacles are encountered along the way, the plan is to go to the boundary of the current sub-map area and then return.
[0027] The full coverage real-time path planning method for a cleaning robot according to at least one embodiment of the present disclosure further includes:
[0028] When the robot plans to a corner point, it determines whether there are any uncleaned pixels in the area;
[0029] If there are uncleaned pixels, plan to clean the pixel closest to the corner point;
[0030] If there are no unclean pixels, the adjacent sub-map area of the current sub-area is planned to restart the edge cleaning.
[0031] The full coverage real-time path planning method for a cleaning robot according to at least one embodiment of the present disclosure further includes getting out of trouble, first error handling, second error handling, or third error handling;
[0032] Among them, the escape refers to that the driving unit of the cleaning robot performs a motion action based on the sensor input signal to enable the cleaning robot to escape from the current predicament and continue to perform the current cleaning task; the first error handling does not affect the cleaning robot's execution of the current task, and the cleaning robot continues to perform the current task; the second error handling affects the execution of the current task, and the cleaning robot returns to the starting point; the third error handling affects the execution of the current task, and the cleaning robot does not return to the starting point.
[0033] According to one aspect of the present disclosure, a cleaning robot full coverage real-time path planning device is provided, comprising:
[0034] The map management module divides the cleaning robot's working scene into multiple sub-map areas and initializes each sub-map area;
[0035] A cleaning area planning module selects one of the sub-map areas as the starting sub-map, and determines the cleaning order of each sub-map area outside the starting sub-map area one by one;
[0036] An edge module is used to clean the sub-map area along the edge, and complete the closed-loop detection of the outline of the sub-map area by edge cleaning;
[0037] The broken line cleaning module performs broken line cleaning inside the sub-region area and updates the cleaning status of the pixels in the sub-map area in real time.
[0038] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0039] A memory storing execution instructions;
[0040] A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes any one of the methods described above.
[0041] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and the execution instructions are used to implement any of the above-mentioned methods when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0043] Figure 1 It is a flowchart of a method for full-coverage real-time path planning of a cleaning robot according to an embodiment of the present disclosure.
[0044] Figure 2 It is a flow chart of a map management method of a cleaning robot according to an embodiment of the present disclosure.
[0045] Figure 3 It is a flow chart of an edge cleaning method of a cleaning robot according to one embodiment of the present disclosure.
[0046] Figure 4 It is a flow chart of a broken line cleaning method of a cleaning robot according to one embodiment of the present disclosure.
[0047] Figure 5 It is a flowchart of a method for escaping from trouble and handling errors according to one embodiment of the present disclosure.
[0048] Figure 6 It is a structural schematic diagram of a full-coverage real-time path planning device for a cleaning robot according to an embodiment of the present disclosure.
[0049] Description of Reference Numerals
[0050] 1000 Cleaning Robot Full Coverage Real-time Path Planning Device
[0051] 1002 Map Management Module
[0052] 1004 Clean Area Planning Module
[0053] 1006 Edge Module
[0054] 1008 Folding line cleaning module
[0055] 1010 Error handling module
[0056] 1100 Bus
[0057] 1200 processor
[0058] 1300 Memory
[0059] 1400 Other circuits. DETAILED DESCRIPTION
[0060] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0061] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0062] Unless otherwise specified, the exemplary embodiments / embodiments shown will be understood as providing exemplary features of various details of some ways in which the technical concept of the present disclosure can be implemented in practice. Therefore, unless otherwise specified, the features of the various embodiments / embodiments can be combined, separated, interchanged and / or rearranged without departing from the technical concept of the present disclosure.
[0063] The use of cross-hatching and / or shading in the accompanying drawings is generally used to make the boundaries between adjacent components clear. As such, unless otherwise specified, the presence or absence of cross-hatching or shading does not convey or indicate any preference or requirement for the specific materials, material properties, dimensions, proportions, commonalities between the components shown, and / or any other characteristics, attributes, properties, etc. of the components. In addition, in the accompanying drawings, the sizes and relative sizes of the components may be exaggerated for clarity and / or descriptive purposes. When the exemplary embodiments can be implemented differently, the specific process sequence can be performed in a different order than described. For example, two successively described processes can be performed substantially simultaneously or in an order opposite to the described order. In addition, the same figure numbers represent the same components.
[0064] When a component is referred to as being "on" or "over," "connected to," or "coupled to" another component, the component may be directly on, directly connected to, or directly coupled to the other component, or intervening components may be present. However, when a component is referred to as being "directly on," "directly connected to," or "directly coupled to" another component, there are no intervening components. For this purpose, the term "connected" may refer to a physical connection, an electrical connection, etc., with or without intervening components.
[0065] The terms used herein are for the purpose of describing specific embodiments, and are not intended to be restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, assemblies and / or their groups, but it is not excluded that there are or add one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values and / or the values provided that will be recognized by those of ordinary skill in the art.
[0066] Figure 1 It is a flowchart of a method for full-coverage real-time path planning of a cleaning robot according to an embodiment of the present disclosure.
[0067] like Figure 1 As shown, the cleaning robot full coverage real-time path planning method S100 includes:
[0068] S102, dividing the cleaning robot working scene into multiple sub-map areas, and initializing each sub-map area;
[0069] S104, selecting one of the sub-map areas as the starting sub-map area;
[0070] S106, cleaning the starting sub-map area along the edge, and completing the closed-loop detection of the outline of the starting sub-map area by cleaning along the edge;
[0071] S108, performing line cleaning inside the starting sub-map area, and updating the cleaning status of the pixels in the starting sub-map area in real time;
[0072] S110 , cleaning each sub-map area except the initial sub-map area along the edge and the fold line.
[0073] In the above step S102, each sub-map area is initialized, including:
[0074] Different label values are marked for the pixels in each sub-map area, and the label values are used to mark the cleaning order of the cleaning robot for each sub-map area;
[0075] Mark the cleanliness status of the pixels in each sub-map area, where the cleanliness status includes cleaned or uncleaned;
[0076] Calculate the area of the area to be cleaned and the area of the cleaned area in each sub-map area.
[0077] In the above step S106, the initial sub-map area is cleaned along the edges, and the closed-loop detection of the sub-map area contour is completed by cleaning along the edges. The specific implementation method is as follows.
[0078] Find a point set with a sudden change in label value from the starting submap area and use the point set as the boundary of the starting submap area, and use the nearest uncleaned point in the point set as the starting point along the edge;
[0079] The cleaning robot moves along the planned path to the edge starting point;
[0080] Starting from the edge starting point, moving along the border, following by the DWA algorithm, and performing closed loop detection at the same time; and
[0081] The closed loop detection is used to determine whether the vehicle has returned to the boundary that has been traveled. If so, the vehicle ends its journey along the boundary.
[0082] When the robot has finished following the edge, a closed area is generated, and the robot performs line cleaning in this area. The above step S108 performs line cleaning inside the starting sub-map area and updates the cleaning status of each pixel in the area in real time, including:
[0083] Calculate the corner points of the starting sub-map area;
[0084] The cleaning robot reaches corner points;
[0085] Calculate the path lengths that can be planned in the four directions of up, down, left and right of the corner point, select the direction with the largest path length as the cleaning direction and clean it;
[0086] During the cleaning process, the cleaning status of the cleaned pixels in the starting sub-map area is updated.
[0087] The above step S108, during the fold line cleaning process, further includes:
[0088] If an obstacle is encountered on the way, it is determined whether the obstacle has been passed along the edge. If it has been passed along the edge, the line is returned. If it has not been passed along the edge, it is circled around the obstacle and continues along the edge until it is closed or moved to the cleaned area.
[0089] If no obstacles are encountered along the way, the route will be planned to the boundary of the current sub-map area and then return.
[0090] In the above-mentioned S108 fold line cleaning process, it also includes:
[0091] When the robot plans to a corner point, it determines whether there are any uncleaned pixels in the area;
[0092] If there are uncleaned pixels, plan to clean the pixel closest to the corner point;
[0093] If there are no unclean pixels, the adjacent sub-map area of the current sub-area is planned to restart the edge cleaning.
[0094] Optionally, the cleaning robot full coverage real-time path planning method of this embodiment also includes escape, first error handling, second error handling or third error handling. Among them, escape means that the driving unit of the cleaning robot performs a motion action based on the sensor input signal to make the cleaning robot escape from the current predicament and continue to perform the current cleaning task; the first error handling does not affect the cleaning robot's execution of the current task, and the cleaning robot continues to perform the current task; the second error handling affects the execution of the current task, and the cleaning robot returns to the starting point; the third error handling affects the execution of the current task, and the cleaning robot does not return to the starting point.
[0095] Taking into account the logic of the cleaning robot performing cleaning tasks, for the work scene, it is generally performed along the edge first, that is, the cleaning task is performed along the outer contour of the area to be cleaned. At this time, the cleaning robot executes the edge cleaning module. Considering that the position of the cleaning robot in the scene is random, when cleaning along the edge, the robot must first find the nearest boundary point, and then go to this boundary point to start cleaning along the boundary, and clean along the outer contour of the obstacle on the boundary. At the same time, the robot continuously executes the closed-loop detection algorithm to determine whether it has completed a complete circle along the edge, that is, the edge cleaning task is completed. For the above step S106, along the edge of the starting sub-map area, the closed-loop detection of the sub-map area contour is completed by following the edge.
[0096] Figure 2 It is a flow chart of a map management module of a cleaning robot according to one embodiment of the present disclosure.
[0097] First, each sub-map of the working scene is initialized before cleaning, as follows.
[0098] The cleaning robot uses a laser sensor to scan the two-dimensional distance information of a certain height of the working scene, and continuously obtains laser data in each time frame to build a global two-dimensional grid map of the working scene. , which is characterized by , Represents the pixel points in the two-dimensional map of the working scene The label value of is the horizontal and vertical coordinate set of the two-dimensional map pixel points. The global two-dimensional map of the work scene can represent the work scene as a certain number of square small grids horizontally and vertically, that is, map pixels. The physical size corresponding to the square small grid is set to .
[0099] The global two-dimensional map constructed by the cleaning robot, each of whose two-dimensional map pixels corresponds to a physical square grid of a certain size in the actual work scene. Based on whether the cleaning robot can pass or clean this small grid area, it can be divided into cleanable areas and uncleanable areas. The cleanable area is the area where the robot can travel, also known as the obstacle-free area, and the label value of the corresponding pixel is represented by the number 1; the uncleanable area is the area that the robot cannot reach, such as walls, pillars, etc., also known as the obstacle area, and the label value of the corresponding pixel is represented by the number 0; in addition, some restricted areas and forbidden lines can be artificially set in the global map to prevent the cleaning robot from passing through this area, turning the obstacle-free area into an obstacle area, and the robot will no longer clean this part of the area. Considering that the scanning perception range of the laser sensor is limited and has a certain perception angle, the label value of the work scene area that cannot be scanned is represented by -1, that is, the undetermined area, and its expression is:
[0100]
[0101] The cleaning robot has built a global two-dimensional grid map of the working scene It can be seen as a black and white two-dimensional image composed of small grids. Considering the size of the image display, the grids are very small and can be seen as pixels.
[0102] After constructing the global two-dimensional grid map of the work scene, in order to improve the cleaning efficiency, it is necessary to divide the global two-dimensional map of the work scene into local sub-areas of a certain size and then perform orderly cleaning tasks on each local sub-area. The main purpose of doing this is to subdivide work scenes with large areas to ensure the orderliness and efficiency of cleaning. Considering the different complexities of each work scene, such as size, shape, and layout. First, a general global map segmentation module algorithm is used to effectively divide the area to be cleaned into local sub-map areas and mark the corresponding label values in sequence. The cleaning robot can then clean each sub-map area in sequence according to the order of the label values, which can not only improve the cleaning efficiency, but also ensure the consistency of the visual effect of each cleaning trajectory. Mark each sub-map area as , characterized by: ,in, 1 to The numerical value of The number of sub-map areas after the global map is split. The label value of the cleanable pixel in :
[0103]
[0104] S404: Calculate the area that needs to be cleaned.
[0105] When a cleaning robot performs cleaning tasks in a work scene, it needs to calculate the layout and size of the cleaning area based on the global two-dimensional grid map of the work scene that has been constructed. The pixel point is the drivable area of the cleaning robot. Considering that the cleaning robot itself has a certain physical width, if it is too close to the obstacle grid area, the cleaning robot cannot actually clean. Therefore, for the originally constructed working global two-dimensional grid map, it is necessary to remove this part of the area that the cleaning robot cannot clean and set it to a pixel point with a value of 0. The present disclosure uses a breadth-first search algorithm. Starting from the current location of the robot, combined with map data, forbidden lines and forbidden areas, all robot-reachable areas are expanded, set to an uncleaned state, and the size of the area that needs to be cleaned is calculated; the image expansion method is applied to perform pixel expansion processing on the original global two-dimensional grid map of the working scene, and the original obstacle grid area is expanded according to the physical width of the cleaning robot body, so that the obstacle-free grid area close to the obstacle grid area is also transformed into an obstacle grid area, indicating that the cleaning robot cannot clean.
[0106] The image after dilation is characterized as :
[0107]
[0108] Structural elements is the number of rows and columns The square matrix, Add a safety margin for the physical width of the cleaning robot. On the global 2D map The image pixel domain moves, at each pixel position, when the structural element The center point is translated to A point on the image If the pixel of the structural element intersects with at least one pixel of the obstacle point, keep Pixel points, to achieve the effect of expanding the boundary outward. That is, traversing the target image In the target area, only the label values of the target pixel and its adjacent upper, lower, left, and right pixels are considered to confirm whether they have intersections with the dilated structural element, that is, there is at least one corresponding label value that is equal. If there is an intersection, the pixel is processed, otherwise the pixel is deleted.
[0109] By traversing the label value The pixel points are calculated to determine the area that needs to be cleaned:
[0110]
[0111] Represents a two-dimensional map of the work scene Medium pixel The label value of is the horizontal and vertical coordinate set of the pixel points in the two-dimensional map, Represents the number of small grid areas that need to be cleaned, and the corresponding area that needs to be cleaned is: .
[0112] S406: Mark the traversed path.
[0113] The cleaning robot can calculate in real time through the real-time global positioning algorithm Absolute position in the global 2D grid map of the work scene at all times , then the horizontal coordinate of the pixel in the corresponding two-dimensional grid map is and the vertical coordinate They are:
[0114]
[0115] in The operator that represents rounding down is used to continuously record these horizontal and vertical coordinates. To the corresponding coordinate set , you can mark the path that the cleaning robot has traveled.
[0116] S408: Update the area that needs to be cleaned.
[0117] According to the paths that the cleaning robot has walked, the pixels cleaned when walking through these paths are calculated. The above marks the paths that the cleaning robot has walked. Considering the coverage width of the cleaning robot's roller brush and side brush, it is set to . Based on the path coordinate set that the cleaning robot has walked and the coverage width of the roller brush and side brush , that is, calculate the pixels that have been cleaned and then calculate the areas that need to be cleaned. When solving the pixels that have been cleaned, it is mainly through judging whether the current pixel is in the coverage width centered on the current path point. If the following conditions are met, the current pixel is recorded:
[0118]
[0119]
[0120] and Represents the horizontal and vertical coordinates of the pixel point. Indicates the serial number, satisfying ( ). Therefore, for every pixel that the cleaning robot passes through, there will be The pixel areas are cleaned at the same time, and the cleaned pixel set is recorded as , then the corresponding area that needs to be cleaned is: .
[0121] Next, update the area that needs to be cleaned. According to the total area that needs to be cleaned, remove the pixels that have been cleaned above, which is the area that needs to be cleaned. , we can perform a simple pixel point set difference operation:
[0122]
[0123] The corresponding area that needs to be cleaned is: During the robot's cleaning process, the path it has traveled will be marked as cleaned, and the real-time data from the sensor will be used to update the area that needs to be cleaned. Each coordinate point in the map has a label value, which is specified by the area segmentation module. The coordinate points in each area have the same label value. Only when the coordinate points corresponding to the current coordinate value are marked as cleaned, can the robot go to the next area to clean.
[0124] Optionally, before step S404, the process further includes S402, loading the cleaned area of the last task.
[0125] If the last task is not completed and you want to continue the task, you need to load the area that was cleaned last time and mark it as cleaned. Considering that when the cleaning robot performs a task, the task will be interrupted due to factors such as the robot's endurance, changes in the environment, and dynamic obstacles. At this time, when re-executing, you need to load the cleaned area of the last task, that is, the pixel set that has been cleaned is , recalculate the area that needs to be cleaned .
[0126] Figure 3 It is a flow chart of an edge cleaning method of a cleaning robot according to yet another embodiment of the present disclosure.
[0127] like Figure 3 As shown, the edge cleaning method S200 includes the following processing steps.
[0128] S202, find the nearest boundary point. Based on the current absolute position of the cleaning robot , and calculate the pixel point set of the area that needs to be cleaned ,Based on the global two-dimensional grid map of the current scene, the nearest boundary point is found as the starting point for the cleaning robot to perform the edge cleaning task.
[0129] First, traverse the pixel set , find the nearest uncleaned boundary. The boundary is defined as the set of points where the label value mutates. First, find all the points where the label value mutates, then filter out the uncleaned points, find the nearest points among these points that can successfully plan the path, and get the coordinates of the four vertices with the smallest and largest horizontal and vertical coordinates. ,in represents the vertex number, which is 1, 2, 3 and 4 respectively; then the global path planning algorithm with the shortest distance is calculated to calculate the path length that the robot needs to travel from the current position of the robot to the four vertices, and the vertex corresponding to the shortest path is used as the nearest boundary point, that is, the starting point of the cleaning robot cleaning along the edge, recorded as , Indicates the starting point index. The robot moves to the starting point along the planned path. If an obstacle is encountered or the point becomes unreachable, the path needs to be recalculated.
[0130] S204, follow the boundary. The cleaning robot starts from the starting point and starts to follow the boundary of the area to be cleaned based on the grid map. Considering the coverage width of the cleaning robot's roller brush and side brush, firstly, a global path planning is performed along the contour boundary of the area to be cleaned for a certain distance, such as about 20-30mm, to search for the path for the robot to perform the cleaning task, and then the robot follows this path to clean.
[0131] S206, move along obstacles. Move along the boundary and follow through the DWA algorithm. If there is an obstacle on the boundary, switch to the obstacle following mode. By using TOF, sonar, laser and other sensors, calculate the shortest distance to the obstacle in real time, and then use PID to adjust the angular speed until the cleaning robot returns to the boundary and switches back to the following mode.
[0132] S208, closed loop detection. After starting the second step, the robot will perform a closed loop detection. If it detects that it has returned to the boundary it has already passed, it will end the edge walking process. Preferably, the "small closed loop" situation needs to be eliminated during the edge walking process. For example, when encountering an obstacle at the boundary, the robot will walk along the obstacle. At this time, it is possible to go around the starting point where it started to go around the obstacle, forming a closed loop. At this time, it is necessary to return to the first step and return to the nearest boundary.
[0133] S210, determine whether the closed-loop detection is completed, if completed, end the edge cleaning, otherwise, go to step S204.
[0134] When the robot has finished following the edge, a closed area is created, and the robot performs zigzag cleaning in this area. First, the corner point of the area is calculated, and the robot starts cleaning when it reaches the point. When the robot reaches the corner point, it calculates the length of the path that can be planned in the four directions of up, down, left, and right, and selects the direction with the largest path length as the cleaning direction. Once the direction is selected, it will not be easily changed unless the path length in another direction is much greater than the path length in the current direction. The robot plans according to the selected direction. If it encounters an obstacle in the middle, it determines whether the obstacle has been along the edge. If it has been along the edge, it will return in a zigzag line. If it has not been along the edge, it will go around the obstacle and follow the edge until it is closed or reaches the cleaned area; if it does not encounter an obstacle in the middle, it will plan to the boundary of the area and turn back. When the robot plans to the corner, it calculates whether there are any uncleaned points in the area. If there are, it will plan to the nearest point for zigzag cleaning. If not, it will plan to the next area and start following the edge again.
[0135] Figure 4 It is a flow chart of a broken line cleaning module of a cleaning robot according to one embodiment of the present disclosure.
[0136] like Figure 4 As shown, the fold line cleaning method S300 includes the following steps.
[0137] S302, find the nearest corner point, the specific implementation method is as follows. When the robot has completed the cleaning of the surrounding borders through closed-loop detection, only the internal closed area is left in the current area to be cleaned, and the pixel point set in the area ,The robot will first calculate the corner point of the internal closed area, and then the robot will reach the corner point first, taking it as the starting point and start the broken line path planning and cleaning.
[0138] The robot calculates the corner points of the internal closed area, similar to finding the nearest boundary point in edge cleaning. Based on the current absolute position of the cleaning robot , and the pixel set of the internal closed area that needs to be cleaned ,Based on the global two-dimensional grid map of the current scene, the nearest corner point is found as the starting point for the cleaning robot to perform the broken line cleaning task.
[0139] First, traverse the pixel set , find the nearest uncleaned boundary. The boundary is defined as the set of points where the label value mutates. First, find all the points where the label value mutates, then filter out the uncleaned points, find the nearest points among these points that can successfully plan the path, and get the coordinates of the four vertices with the smallest and largest horizontal and vertical coordinates. ,in ;
[0140] Then, the global path planning algorithm with the shortest distance is used to calculate the path length that the robot needs to travel from the current position of the cleaning robot to the four vertices. The vertex corresponding to the shortest path is used as the nearest boundary point, which is the starting point of the cleaning robot's broken line cleaning, and is recorded as The robot walks along the planned path to the starting point. If it encounters an obstacle or the point becomes unreachable, it needs to recalculate the path.
[0141] S304, select the optimal direction. The specific implementation method is as follows. After the cleaning robot reaches the corner point, since this point is a corner point, it will inevitably be close to the boundary area that has been cleaned, and there are still areas to be cleaned in the surrounding (up, down, left, right, etc., or no more than 3 directions). At this time, based on the global two-dimensional grid map, the length of the plannable path in the four directions of up, down, left, and right is calculated, and the direction with the largest path length is selected as the starting direction of the broken line cleaning. Once a direction is selected, it will not be easily changed unless the path length in the other direction is much longer than the path length in the current direction.
[0142] S306: Path planning. The specific implementation method is as follows: Pixel coordinates based on the global two-dimensional grid map and starting direction , the pixel point set of the area to be cleaned , and the coverage width of the robot's roller brush and side brush , execute the full coverage path planning algorithm to plan the cleaning route of the cleaning robot. The robot cleans the area to be cleaned by following this full coverage path.
[0143] S308, moving along obstacles. The robot follows the planned full coverage path for cleaning through the DWA algorithm. If it encounters a dynamic obstacle on the path, it switches to the obstacle following mode. By using TOF, sonar, laser and other sensors, it calculates the shortest distance to the obstacle in real time, and then uses PID to adjust the angular speed until the robot returns to the planned path and switches back to the following mode.
[0144] S310, turn back. After the robot plans the full coverage path, considering the cleaning efficiency, preferably, the robot adopts the method of cleaning along the long side first. When the robot follows the planned path to clean, it will plan to turn back to the boundary of the area. The robot's turn back also tries to follow the planned full coverage path.
[0145] S312, determine whether the fold line cleaning is completed, if completed, end the fold line cleaning, otherwise, go to step S314.
[0146] S314, find the nearest point that needs to be cleaned. When the robot plans to a corner, calculate whether there are any uncleaned points in the area. If there are, plan to the nearest point for line cleaning. If not, plan to the next area and start again along the edge. When all the segmented areas are cleaned, it is determined that the cleaning robot's working scene cleaning task is completed and the cleaning ends.
[0147] Figure 5 It is a flowchart of a method for escaping from trouble and handling errors according to one embodiment of the present disclosure.
[0148] like Figure 5 As shown, the specific implementation methods of the cleaning robot's escape and error handling are as follows.
[0149] If the robot is unable to move in a certain place for a long time, it will enter the escape mode. For example, when the cleaning robot is working, it may be stuck by scene objects, such as ground protrusions or thin cables. The robot will make judgments based on the downward view, side TOF, ultrasound, and laser data. If the conditions are met, it will automatically jump to perform the escape operation. In the escape mode, the robot mainly uses sensor input signals, such as the robot's downward view, side TOF, ultrasound, and laser data, to make the left and right drive units perform corresponding movements, so that the robot can escape from the current predicament and continue to perform normal cleaning tasks.
[0150] Error handling is mainly aimed at the cleaning robot. When performing cleaning tasks, due to the complexity and dynamics of the scene, the robot malfunctions and interrupts the current task. For example, the robot is stuck or trapped by a dynamic obstacle. Preferably, when the robot fails three times in a row, it will jump out of the escape mode and enter the error handling mode. The robot will automatically detect the working status and perform error handling. The specific processing types are as follows.
[0151] The first error handling does not affect the cleaning robot's execution of the current task, and the cleaning robot continues to execute the current task. The first error handling includes warnings, which generally do not affect the execution of the current task. For example, the dust box is full, some parts need to be replaced, etc., all belong to the first error handling.
[0152] The second error handling affects the execution of the current task, and the cleaning robot returns to the starting point. The second type of error is a general error, which affects the execution of the current task but does not affect the robot's return to the starting point. For example, if the roller brush or side brush fails to work, the robot will immediately stop the current task and return to the starting point, and then send an error message to the message center.
[0153] The third error handling affects the execution of the current task, and the cleaning robot does not return to the starting point. The third type of error is a fatal error, which affects the execution of the current task and cannot return to the starting point. For example, the robot is stuck, the drive unit has an error, etc. At this time, the robot stops the task and sends a fatal error message to the message center.
[0154] Figure 6 A cleaning robot full-coverage real-time path planning device according to one embodiment of the present disclosure.
[0155] like Figure 6 As shown, the cleaning robot full coverage real-time path planning device 1000 includes:
[0156] The map management module 1002 divides the cleaning robot working scene into multiple sub-map areas and initializes each sub-map area;
[0157] The cleaning area planning module 1004 selects one of the sub-map areas as the starting cleaning area, and determines the cleaning order of each sub-map area outside the starting cleaning area one by one;
[0158] The edge module 1006 is used to edge the sub-map area to complete the closed loop detection of the sub-map area contour;
[0159] The polyline cleaning module 1008 performs polyline cleaning inside the sub-region area and updates the cleaning status of the pixels in the sub-map area in real time.
[0160] It should be noted that the implementation details of each module of the cleaning robot full-coverage real-time path planning device 1000 are consistent with the cleaning robot full-coverage real-time path planning method provided in the present disclosure, and will not be repeated here.
[0161] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0162] A memory, the memory stores execution instructions;
[0163] The processor executes the execution instructions stored in the memory, so that the processor executes any of the above methods.
[0164] According to another aspect of the present disclosure, a readable storage medium is provided, in which execution instructions are stored. When the execution instructions are executed by a processor, they are used to implement any of the above methods.
[0165] The cleaning robot's full-coverage real-time path planning method proposed in the present invention can meet the cleaning robot's requirements for real-time planning of full-coverage cleaning routes for work scenes, can adapt to dynamic and complex working scenes, improve the cleaning efficiency and effect of the cleaning robot, and sweep everything that should be swept without omission.
[0166] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
[0167] Figure 6 An example diagram of an apparatus using a hardware implementation of a processing system is shown. The apparatus may include a corresponding module that performs each or several steps in the above flowchart. Therefore, each step or several steps in the above flowchart may be performed by a corresponding module, and the apparatus may include one or more of these modules. The module may be one or more hardware modules specifically configured to perform the corresponding steps, or implemented by a processor configured to perform the corresponding steps, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination.
[0168] The hardware structure can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0169] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0170] Any process or method description in the flowchart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes other implementations, in which the functions may not be performed in the order shown or discussed, including performing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by a person skilled in the art of the present disclosure. The processor performs the various methods and processes described above. For example, the method implementation in the present disclosure can be implemented as a software program, which is tangibly contained in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via a memory and / or a communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform one of the above methods in any other appropriate manner (e.g., by means of firmware).
[0171] The logic and / or steps represented in the flowchart or otherwise described herein may be embodied in any readable storage medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions on an instruction execution system, apparatus, or device), or in combination with such instruction execution systems, apparatuses, or devices.
[0172] For the purposes of this specification, a "readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use with or in conjunction with an instruction execution system, device or apparatus. More specific examples of readable storage media (a non-exhaustive list) include the following: an electrical connection with one or more wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), a fiber optic device, and a portable read-only memory (CDROM). In addition, the readable storage medium may even be paper or other suitable medium on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a memory.
[0173] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0174] A person skilled in the art may understand that all or part of the steps of implementing the above-mentioned implementation method may be completed by instructing related hardware through a program, and the program may be stored in a readable storage medium, which, when executed, includes one or a combination of the steps of the implementation method.
[0175] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a readable storage medium. The storage medium may be a read-only memory, a disk or an optical disk, etc.
[0176] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present application. In this specification, the schematic representations of the above terms are not necessarily the same embodiment / method or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments / methods or examples described in this specification and the features of the different embodiments / methods or examples, unless they are contradictory.
[0177] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0178] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A cleaning robot full coverage real-time path planning method, characterized in that: include: Divide the cleaning robot's working scene into multiple sub-map areas, and initialize each sub-map area; Select one of the sub-map areas as the starting sub-map area; Cleaning the starting sub-map area along the edges, and completing closed-loop detection of the outline of the sub-map area by cleaning along the edges; Performing polyline cleaning inside the starting sub-map area, and updating the cleaning status of the pixels in the starting sub-map area in real time; and Clean the sub-map areas outside the starting sub-map area along the edges and along the lines respectively; The cleaning robot's working scene is divided into multiple sub-map areas, including: the cleaning robot uses a laser sensor to scan the two-dimensional distance information of a certain height of the working scene, continuously obtains laser data in each time frame, and constructs a global two-dimensional grid map of the working scene. , which is characterized by , Represents the pixel points in the two-dimensional map of the working scene The label value of is the horizontal and vertical coordinate set of the two-dimensional map pixel points; the global two-dimensional map of the work scene represents the work scene as a certain number of square small grids horizontally and vertically, and the square small grid is the map pixel point, and the physical size corresponding to the square small grid is set to ; The global two-dimensional map constructed by the cleaning robot, each of which corresponds to a physical square grid of a certain size in the actual work scene. Depending on whether the small grid area can be passed or cleaned by the cleaning robot, it can be divided into cleanable areas and uncleanable areas; the label value of the pixel corresponding to the cleanable area is represented by the number 1; the label value of the pixel corresponding to the uncleanable area is represented by the number 0; the label value of the work scene area that cannot be scanned is represented by -1; The cleaning robot has built a global two-dimensional grid map of the working scene It is a black and white two-dimensional image composed of small grids, and the grids are regarded as pixels. After constructing the global two-dimensional grid map of the working scene, the general global map segmentation module algorithm is used to effectively divide the area to be cleaned into local sub-map areas and mark the corresponding label values in sequence. The cleaning robot can clean each sub-map area in sequence according to the label value order and mark each sub-map area as , characterized by: ,in, 1 to The numerical value of The number of sub-map areas after the global map is split; sub-map area The label value of the cleanable pixel in : ; Starting from the current location of the robot, combined with map data, forbidden lines and forbidden areas, all robot-reachable areas are expanded, set to uncleaned state, and the size of the area that needs to be cleaned is calculated; the image expansion method is applied to perform pixel expansion processing on the original global two-dimensional grid map of the working scene, and the original obstacle grid area is expanded according to the physical width of the cleaning robot, so that the obstacle-free grid area close to the obstacle grid area is also transformed into an obstacle grid area, indicating that the cleaning robot cannot clean; The image after dilation is characterized as : Structural elements is the number of rows and columns The square matrix, Add a safety margin to the physical width of the cleaning robot; drag the structural element On the global 2D map The image pixel domain moves, at each pixel position, when the structural element The center point is translated to A point on the image If the pixel of the structural element intersects with at least one pixel of the obstacle point, keep Pixel points, to achieve the effect of expanding the boundary outward; that is, traversing the target image In the target area in the image, only the label values of the target pixel and its adjacent upper, lower, left, and right pixels are considered to confirm whether they have intersections with the expanded structural element, that is, there is at least one corresponding label value that is equal; if there is an intersection, the pixel is processed, otherwise the pixel is deleted; By traversing the label value The pixel points are calculated to determine the area that needs to be cleaned: Represents a two-dimensional map of the work scene Medium pixel The label value of is the horizontal and vertical coordinate set of the pixel points in the two-dimensional map, represents the number of small grid areas that need to be cleaned, and the corresponding area that needs to be cleaned is: ; The cleaning robot can calculate in real time through the real-time global positioning algorithm Absolute position in the global 2D grid map of the work scene at all times , then the horizontal coordinate of the pixel in the corresponding two-dimensional grid map is and the vertical coordinate They are: in The operator that represents rounding down is used to continuously record these horizontal and vertical coordinates. To the corresponding coordinate set , you can mark the path that the cleaning robot has walked; According to the paths that the cleaning robot has walked, the pixels cleaned when walking these paths are calculated; according to the coordinate set of the paths that the cleaning robot has walked and the coverage width of the roller brush and side brush , calculate the pixels that have been cleaned and thus calculate the areas that need to be cleaned; solve the pixels that have been cleaned, and record the current pixel if the following conditions are met: and Represents the horizontal and vertical coordinates of the pixel point. Indicates the serial number, satisfying A natural number, where ; Every time the cleaning robot passes through a pixel, there will be The pixel areas are cleaned at the same time, and the cleaned pixel set is recorded as , then the corresponding area that needs to be cleaned is: ; Update the area that needs to be cleaned. According to the total area that needs to be cleaned, remove the pixels that have been cleaned above, and the area that needs to be cleaned is , we can perform a simple pixel point set difference operation: The corresponding area that needs to be cleaned is: ; During the robot's cleaning process, the path it has traveled will be marked as cleaned, and the area that needs to be cleaned will be updated using the real-time data from the sensor; Each coordinate point in the map has a label value, which is specified by the area segmentation module. The coordinate points in each area have the same label value. Only when the coordinate points corresponding to the current coordinate value are marked as cleaned can the robot go to the next area to clean.
2. The cleaning robot full coverage real-time path planning method according to claim 1, characterized in that: Initialize each sub-map area, including: Different label values are marked for the pixels in each sub-map area, and the label values are used to mark the cleaning order of each sub-map area by the cleaning robot; Marking a cleaning status for pixels in each sub-map area, where the cleaning status includes cleaned or uncleaned; and Calculate the area of the to-be-cleaned area and the area of the cleaned area in each sub-map area.
3. The cleaning robot full coverage real-time path planning method according to claim 1, characterized in that: Cleaning the starting sub-map area along the edge, including: Find a point set with a sudden change in label value from the starting submap area and use the point set as the boundary of the starting submap area, and use the nearest uncleaned point in the point set as the starting point along the edge; The cleaning robot moves along the planned path to the edge starting point; Starting from the edge starting point, moving along the boundary, following by the DWA algorithm, and performing closed loop detection at the same time; The closed-loop detection is used to determine whether the robot has returned to a boundary that the cleaning robot has already passed. If so, the edge cleaning is terminated.
4. The cleaning robot full coverage real-time path planning method according to claim 1, characterized in that: Performing polyline cleaning inside the starting sub-map area and updating the cleaning status of each pixel in the area in real time includes: Calculating the corner points of the starting sub-map area; The cleaning robot reaches the corner point; Calculating the lengths of paths that can be planned in the four directions of up, down, left and right of the corner point, selecting a direction with the largest path length as a cleaning direction and performing cleaning; and During the cleaning process, the cleaning status of the cleaned pixels in the starting sub-map area is updated.
5. The cleaning robot full coverage real-time path planning method according to claim 4, characterized in that: The fold line cleaning process also includes: If an obstacle is encountered on the way, it is determined whether the obstacle has been passed along the edge. If it has been passed along the edge, the line is returned; if it has not been passed along the edge, it is circled around the obstacle and continued along the edge until it is closed or moved to the cleaned area; and If no obstacles are encountered along the way, the route will be planned to the boundary of the current sub-map area and then return.
6. The cleaning robot full coverage real-time path planning method according to claim 4, characterized in that: Also includes: When the robot plans to a corner point, it determines whether there are any uncleaned pixels in the area; If there are uncleaned pixels, plan to clean the pixel closest to the corner point; as well as If there are no unclean pixels, the adjacent sub-map area of the current sub-area is planned to restart the edge cleaning.
7. The cleaning robot full coverage real-time path planning method according to claim 1, characterized in that: It also includes escape, first error handling, second error handling or third error handling; Among them, the escape refers to that the driving unit of the cleaning robot performs a motion action based on the sensor input signal to enable the cleaning robot to escape from the current predicament and continue to perform the current cleaning task; the first error handling does not affect the cleaning robot's execution of the current task, and the cleaning robot continues to perform the current task; the second error handling affects the execution of the current task, and the cleaning robot returns to the starting point; the third error handling affects the execution of the current task, and the cleaning robot does not return to the starting point.
Citation Information
Patent Citations
Cleaning robot and multi-region cleaning method thereof
CN110833361A
Sweeping control method and device of sweeping robot
CN111766852A