Edge cleaning method and device, cleaning robot and storage medium
By allowing the cleaning robot to perform full-coverage cleaning and re-determine its starting position in the event of a loop caused by an obstacle, the problem of low cleaning efficiency of the cleaning robot caused by obstacle obstruction is solved, and efficient edge cleaning is achieved.
Patent Information
- Application Number
- CN202510703884.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-12
AI Technical Summary
In a highly dynamic environment, the cleaning robot may encounter obstacles, causing the cleaning trajectory to loop along the edge, resulting in low cleaning efficiency.
When the cleaning robot detects the loop state of the blocked trajectory, it determines the loop trajectory, performs full coverage cleaning and stores it as the cleaned area, re-determines the starting position for cleaning along the edge, and continues cleaning along the edge until the boundary is completed.
It improves cleaning efficiency, avoids repeated cleaning of cleaned areas, reduces waiting time, and enhances the cleaning ability of the cleaning robot.
Smart Images

Figure CN120630983A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a side cleaning method, device, cleaning robot, and storage medium. Background Art
[0002] When a cleaning robot performs cleaning tasks within a designated cleaning area, it needs to perform both edge cleaning and full-coverage cleaning. Generally speaking, the cleaning robot first performs edge cleaning along the boundaries of the designated cleaning area to determine the cleaning contour of the designated area, and then performs full-coverage cleaning within the area enclosed by the cleaning contour.
[0003] Because cleaning robots typically operate in highly dynamic environments, such as those with people moving around, dynamic obstacles can block the robot's edge-cleaning path, which is the predetermined cleaning path generated based on a static map. Therefore, in related technologies, cleaning robots use the predetermined cleaning path as a reference, the agreed cleaning area as a constraint, and the actual perceived boundaries as the basis for edge cleaning.
[0004] Because the robot's operating environment is highly dynamic, it can be blocked by dynamic obstacles while cleaning along the edges based on its perceived boundaries, causing the robot's cleaning trajectory to loop. In this case, the robot will repeatedly pass over previously cleaned boundaries, resulting in lower cleaning efficiency. Summary of the Invention
[0005] The purpose of the embodiments of the present application is to provide a method, device, cleaning robot, and storage medium for edge cleaning to improve cleaning efficiency. The specific technical solutions are as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for edge cleaning, which is applied to a cleaning robot, and the method includes:
[0007] During the process of the cleaning robot performing edge cleaning on a cleaning area, in response to the cleaning robot being in a blocked trajectory loop state, determining a loop trajectory of the cleaning robot, wherein the blocked trajectory loop state indicates that the cleaning robot is blocked by an obstacle, resulting in a loop along the edge trajectory that does not circumvent the obstacle;
[0008] Performing full coverage cleaning on the area enclosed by the loop trajectory, and upon completion of cleaning, storing the area enclosed by the loop trajectory as a cleaned area;
[0009] Determining a starting position for edge cleaning based on the currently cleaned area and the position of the cleaning robot before entering the blocked trajectory loop state;
[0010] Continue to clean the edges according to the edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0011] Optionally, before the step of determining the loop trajectory of the cleaning robot in response to the cleaning robot being in the blocked trajectory loop state, the method further includes:
[0012] In the case where a loop trajectory is detected in the edge trajectory of the cleaning robot, determining whether the current moving direction of the cleaning robot is the same as the edge movement direction of the cleaning robot before the trajectory loop occurs;
[0013] In a case where the current moving direction of the cleaning robot is opposite to the sideways moving direction of the cleaning robot before the trajectory loop occurs, it is determined that the cleaning robot is in a blocked trajectory loop state.
[0014] Optionally, the method further includes:
[0015] When the current moving direction of the cleaning robot is the same as the sideways moving direction of the cleaning robot before the trajectory loop occurs, the area enclosed by the loop trajectory is stored as the cleaned area;
[0016] Continue to clean along the edges of the cleaning area.
[0017] Optionally, the step of determining the starting position for edge cleaning based on the currently cleaned area and the position of the cleaning robot before entering the blocking trajectory loop state includes:
[0018] generating a reference path for the cleaning robot along the uncleaned boundary according to the cleaned area and the uncleaned boundary of the cleaned area;
[0019] A path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state is determined from the reference path as the starting position for edge cleaning.
[0020] Optionally, after the step of determining, from the reference path, a path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state as the starting position for edge cleaning, the method further comprises:
[0021] In the case that the cleaning robot cannot reach the edge cleaning starting position, traverse each track point on the pre-loop trajectory, and each time a track point is traversed, determine the path point on the reference path closest to the currently traversed track point as a new edge cleaning starting position, wherein the pre-loop trajectory is the edge trajectory of the cleaning robot before entering the blocking trajectory loop state of the first preset length;
[0022] In the case that the cleaning robot cannot reach the new edge cleaning starting position, continue to traverse the previous track point of the currently traversed track point, and return to execute each traversal of a track point to determine the path point on the reference path closest to the currently traversed track point as the new edge cleaning starting position;
[0023] When the cleaning robot can reach the new edge cleaning starting position, the cleaning robot continues to clean the edge according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0024] Optionally, after the step of determining, from the reference path, a path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state as the starting position for edge cleaning, the method further comprises:
[0025] In the case that the cleaning robot cannot reach the edge cleaning starting position, traverse each track point on the pre-loop trajectory, and each time a track point is traversed, determine the currently traversed track point as a new edge cleaning starting position, wherein the pre-loop trajectory is the edge trajectory of the cleaning robot before entering the blocking trajectory loop state with a first preset length;
[0026] In the case that the cleaning robot cannot reach the new edge cleaning starting position, continue to traverse the previous track point of the currently traversed track point, and return to execute each traversal of a track point to determine the currently traversed track point as the new edge cleaning starting position;
[0027] When the cleaning robot can reach the new edge cleaning starting position, the cleaning robot continues to clean the edge according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0028] Optionally, the method further includes:
[0029] In the event that the cleaning robot cannot reach any of the determined new edge cleaning starting positions, determining any path point that the cleaning robot can reach on the reference path as a new edge cleaning starting position;
[0030] Continue edge cleaning according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0031] Optionally, the method further includes:
[0032] When the length of the generated reference path is less than the second preset length, it is determined that the boundary cleaning of the cleaning area is completed.
[0033] Optionally, when the boundary cleaning of the cleaning area is completed, the method further includes:
[0034] According to the cleaning boundary formed by cleaning the boundary of the cleaning area, full coverage cleaning is performed until the cleaning area is completely cleaned.
[0035] In a second aspect, an embodiment of the present application provides a side cleaning device for use with a cleaning robot, the device comprising:
[0036] a state response module, configured to determine a loop trajectory of the cleaning robot in response to the cleaning robot being in a blocked trajectory loop state during the process of the cleaning robot performing edge cleaning of the cleaning area, wherein the blocked trajectory loop state indicates that the cleaning robot is blocked by an obstacle, resulting in a loop along the edge trajectory that does not circumvent the obstacle;
[0037] A full coverage cleaning module, configured to perform full coverage cleaning on the area enclosed by the loop trajectory, and upon completion of cleaning, store the area enclosed by the loop trajectory as a cleaned area;
[0038] a position determination module, configured to determine a starting position for edge cleaning based on a currently cleaned area and the position of the cleaning robot before it enters a blocking trajectory loop state;
[0039] The edge cleaning module is used to continue edge cleaning according to the edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0040] Optionally, the device further includes:
[0041] a direction relationship determination module, configured to, before the step of determining the loop trajectory of the cleaning robot in response to the cleaning robot being in the blocked trajectory loop state, determine, when a loop trajectory is detected in the edge trajectory of the cleaning robot, whether the current moving direction of the cleaning robot is the same as the edge motion direction of the cleaning robot before the trajectory loop occurs;
[0042] The state determination module is used to determine that the cleaning robot is in a blocked trajectory loop state when the current moving direction of the cleaning robot is opposite to the sideways movement direction of the cleaning robot before the trajectory loop occurs.
[0043] Optionally, the device further comprises: an area storage module, which stores the area enclosed by the loop trajectory as a cleaned area when the current moving direction of the cleaning robot is the same as the sideways moving direction of the cleaning robot before the trajectory loop occurs;
[0044] The edge cleaning module is further used to continue cleaning the edges of the cleaning area.
[0045] Optionally, the location determination module includes:
[0046] a path generation submodule, configured to generate a reference path for the cleaning robot along the uncleaned boundary according to the cleaned area and the uncleaned boundary of the cleaned area;
[0047] The first position determination submodule is used to determine, from the reference path, a path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state, as a starting position for edge cleaning.
[0048] Optionally, the device further includes:
[0049] A second position determination submodule is configured to, after the step of determining from the reference path the path point closest to the position of the cleaning robot before it enters the blocked trajectory loop state as the starting position for edge cleaning, traverse each trajectory point on the trajectory before the loop if the cleaning robot cannot reach the starting position for edge cleaning, and determine the path point on the reference path closest to the currently traversed trajectory point each time a trajectory point is traversed as the new starting position for edge cleaning, wherein the trajectory before the loop is the edge trajectory of the cleaning robot before it enters the blocked trajectory loop state of a first preset length; and if the cleaning robot cannot reach the new starting position for edge cleaning, continue to traverse the previous trajectory point of the currently traversed trajectory point, and return to execute the step of traversing each trajectory point to determine the path point on the reference path closest to the currently traversed trajectory point as the new starting position for edge cleaning;
[0050] The edge cleaning module is also used to continue edge cleaning according to the new edge cleaning starting position when the cleaning robot can reach the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0051] Optionally, the device further includes:
[0052] A third position determination submodule is configured to, after the step of determining from the reference path the path point closest to the position of the cleaning robot before it enters the blocked trajectory loop state as the starting position for edge cleaning, traverse each trajectory point on the trajectory before the loop if the cleaning robot cannot reach the starting position for edge cleaning, and determine the currently traversed trajectory point as the new starting position for edge cleaning each time a trajectory point is traversed, wherein the trajectory before the loop is the edge trajectory of the cleaning robot before it enters the blocked trajectory loop state of a first preset length; and if the cleaning robot cannot reach the new starting position for edge cleaning, continue to traverse the previous trajectory point of the currently traversed trajectory point, and return to execute the step of traversing each trajectory point to determine the currently traversed trajectory point as the new starting position for edge cleaning;
[0053] The edge cleaning module is also used to continue edge cleaning according to the new edge cleaning starting position when the cleaning robot can reach the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0054] Optionally, the device further includes:
[0055] a fourth position determination submodule, configured to, when the cleaning robot cannot reach any of the determined new edge cleaning starting positions, determine any path point on the reference path that the cleaning robot can reach as a new edge cleaning starting position;
[0056] The edge cleaning module is further configured to continue edge cleaning according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0057] Optionally, the device further includes:
[0058] The cleaning result determination module is used to determine whether the boundary cleaning of the cleaning area is completed when the length of the generated reference path is less than a second preset length.
[0059] Optionally, the full coverage cleaning module is further used to:
[0060] When the boundary cleaning of the cleaning area is completed, full coverage cleaning is performed according to the cleaning boundary formed by the boundary cleaning of the cleaning area until the cleaning of the cleaning area is completed.
[0061] In a third aspect, an embodiment of the present application provides a cleaning robot, comprising:
[0062] Memory for storing computer programs;
[0063] The processor is configured to implement any of the methods described in the first aspect above when executing a program stored in the memory.
[0064] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any of the methods described in the first aspect above.
[0065] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect above.
[0066] Beneficial effects of the embodiments of the present application:
[0067] In the technical solution provided in the embodiments of the present application, when the cleaning robot is blocked by an obstacle and the edge trajectory loops, the cleaning robot responds to itself being in a blocking trajectory loop state and determines its own loop trajectory; then the cleaning robot performs full-coverage cleaning on the area enclosed by the loop trajectory, and when the cleaning is completed, the area within the area enclosed by the loop trajectory is stored as a cleaned area; then the cleaning robot determines the starting position for edge cleaning based on the cleaned area and the position of the cleaning robot before entering the blocking trajectory loop state; and continues to perform edge cleaning according to the starting position until the boundary cleaning of the cleaning area is completed.
[0068] It can be seen that when an obstacle blocks the edge of the cleaning robot, causing it to loop, the cleaning robot first performs a full-coverage cleaning of the area enclosed by the looped trajectory. After completing the full-coverage cleaning of the area enclosed by the looped trajectory, the obstacle that blocked the cleaning robot and caused the edge of the cleaning robot to loop may have already left. The cleaning robot can continue to clean along the edge based on the currently cleaned area and the position before entering the blocking trajectory loop state. When an obstacle blocks the edge of the cleaning robot, causing it to loop, the cleaning robot neither repeats the edge cleaning nor stops to wait. Instead, it cleans the area enclosed by the looped trajectory, thereby improving cleaning efficiency.
[0069] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0071] Figure 1 A flow chart of the edge cleaning method provided in an embodiment of the present application;
[0072] Figure 2a This is a schematic diagram of the scene at time t1 when the cleaning robot is cleaning the living room along the edge;
[0073] Figure 2b This is a schematic diagram of the scene at time t2 when the cleaning robot is cleaning the living room along the edge;
[0074] Figure 2c This is a schematic diagram of the scene at time t3 when the cleaning robot is cleaning the living room along the edge;
[0075] Figure 2d This is a schematic diagram of the scene when the cleaning robot completes cleaning the edges of the living room;
[0076] Figure 3 This is a schematic diagram of a cleaning robot cleaning the edges of a study room.
[0077] Figure 4 for Figure 1 A specific flow chart of step S103 in the embodiment shown;
[0078] Figure 5 A schematic diagram of a reference path generated by the cleaning robot provided in an embodiment of the present application after fully cleaning the area enclosed by the loop trajectory in the living room;
[0079] Figure 6 A flowchart of a first method for determining a new edge cleaning starting position provided in an embodiment of the present application;
[0080] Figure 7 A flowchart of a second method for determining a new edge cleaning starting position provided in an embodiment of the present application;
[0081] Figure 8 A structural diagram of the edge cleaning device provided in an embodiment of the present application;
[0082] Figure 9 A structural diagram of the cleaning robot provided in an embodiment of the present application. DETAILED DESCRIPTION
[0083] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.
[0084] In order to improve the cleaning efficiency of a cleaning robot, embodiments of the present application provide a method, apparatus, cleaning robot, computer-readable storage medium, and computer program product for edge cleaning. Below, an edge cleaning method provided by an embodiment of the present application is first introduced.
[0085] The edge cleaning method provided in the embodiment of the present application can be applied to any cleaning robot that needs to perform a cleaning task.
[0086] like Figure 1 As shown, a method for cleaning along an edge includes the following steps S101-S104.
[0087] S101 , in a process where the cleaning robot is performing edge cleaning on a cleaning area, in response to the cleaning robot being in a blocked trajectory loop state, determining a loop trajectory of the cleaning robot.
[0088] The blocked trajectory loop state indicates that the cleaning robot is blocked by an obstacle, resulting in a loop along the edge trajectory that does not go around the obstacle.
[0089] S102: Perform full coverage cleaning on the area enclosed by the loop trajectory, and when the cleaning is completed, store the area enclosed by the loop trajectory as a cleaned area.
[0090] S103: Determine a starting position for edge cleaning based on the currently cleaned area and the position of the cleaning robot before entering the blocking trajectory loop state.
[0091] S104, continue cleaning along the edge according to the starting position of cleaning along the edge until the boundary cleaning of the cleaning area is completed.
[0092] It can be seen that in the embodiment of the present application, when the cleaning robot is blocked by an obstacle and the edge trajectory loops, the cleaning robot responds to itself being in a blocking trajectory loop state and determines its own loop trajectory; then the cleaning robot performs full coverage cleaning on the area enclosed by the loop trajectory, and when the cleaning is completed, the area within the area enclosed by the loop trajectory is stored as a cleaned area; then the cleaning robot determines the starting position for edge cleaning based on the cleaned area and the position of the cleaning robot before entering the blocking trajectory loop state; and continues to perform edge cleaning according to the starting position until the boundary cleaning of the cleaning area is completed.
[0093] It can be seen that when an obstacle blocks the edge of the cleaning robot, causing it to loop, the cleaning robot first performs a full-coverage cleaning of the area enclosed by the looped trajectory. After completing the full-coverage cleaning of the area enclosed by the looped trajectory, the obstacle that blocked the cleaning robot and caused the edge of the cleaning robot to loop may have already left. The cleaning robot can continue to clean along the edge based on the currently cleaned area and the position before entering the blocking trajectory loop state. When an obstacle blocks the edge of the cleaning robot, causing it to loop, the cleaning robot neither repeats the edge cleaning nor stops to wait. Instead, it cleans the area enclosed by the looped trajectory, thereby improving cleaning efficiency.
[0094] Scenarios where the cleaning robot's edge trajectory may loop include: non-obstacle-circumvention loops caused by being blocked by an obstacle, and non-obstacle-circumvention loops caused by cleaning isolated obstacles. Obstacle-circumvention loops are defined as non-obstacle-circumvention loops caused by the movement of an obstacle, which hinders the robot's edge cleaning behavior.
[0095] In an example, a loop is caused by an obstacle. Figures 2a-2c shown.
[0096] Figures 2a-2c In the example, the cleaning area is the living room 200, where fixed furniture can be placed, such as Figures 2a-2c The object marked with a left-hand slash in the middle can also be a dynamic obstacle. For example, a person 201 is moving around in the living room, and a cleaning robot 202 is performing edge cleaning in the living room 200. Cleaning robot 202 is performing edge cleaning from point A to point B. At time t1, it passes point B and is blocked by person 201. Cleaning robot 202 then attempts to bypass person 201 to continue edge cleaning.
[0097] At time t2, the cleaning robot 202 moves to point C. Figure 2b As shown, the person 201 moves to the left of point C, and the cleaning robot 202 is still blocked by the person 201. The cleaning robot continues to try to bypass the person 201 to continue cleaning along the edge.
[0098] Until time t3, the cleaning robot 202 is blocked by the person 201 and returns to point D. Figure 2c As shown in the figure, cleaning robot 202 recognizes that it cannot pass to the left of point D and performs edge cleaning along the identified boundary of segment AD, that is, it continues to clean along the boundary of segment AD in the direction from point D to point A. It can be seen that the movement of person 201 hinders the edge cleaning behavior of cleaning robot 202, resulting in a trajectory loop. This trajectory loop is not caused by circumventing the obstacle, but by being blocked by the obstacle.
[0099] Island obstacle cleaning loops occur when cleaning around island obstacles within the cleaning area. Island obstacles are obstacles that are not recorded in the static map of the cleaning area and are close to the edge of the cleaning area. For example, island obstacles can be temporary trash cans, delivery boxes, etc.
[0100] In one example, cleaning around an island obstacle in the cleaning area causes a loop. Figure 3 shown. Figure 3 In the figure, the cleaning area is the study 300, in which a trash can 301 is temporarily placed. The cleaning robot 302 is cleaning along the edge of the study 300. The cleaning robot 302 is cleaning along the edge in the direction from point F to point E. At time t4, it passes point E and is blocked by the trash can 301. The cleaning robot 302 detours along the identified outline of the trash can 301. At time t5, the cleaning robot 302 detours the trash can 301 and returns to the vicinity of point E. The subsequent cleaning robot can identify the uncleaned boundary on the left side of point E and continue to clean along the edge to the left. It can be seen that the cleaning robot 302's cleaning around the isolated obstacle, namely the trash can 301, causes the trajectory to loop.
[0101] In step S101, the cleaning robot can generate a predetermined cleaning path in real time based on a pre-stored static map of the cleaning area. The cleaning robot performs edge cleaning based on the generated predetermined cleaning path and performs edge cleaning within the agreed cleaning area. Figure 2a The path Ref1 from point A to point G is shown in the figure. The path Ref1 is a predetermined cleaning path generated by the cleaning robot 202 according to the pre-stored static map of the cleaning area before cleaning the boundary of the AG segment.
[0102] During edge cleaning, the cleaning robot can adjust its trajectory according to the actual perceived boundary and clean along the actually perceived boundary. Figure 2a As shown in FIG, according to the predetermined cleaning path, i.e., path Ref1, the cleaning robot should continue to clean the boundary of the BG segment from point B to point G. However, since the moving direction is blocked by person 201, the actual trajectory of the cleaning robot for cleaning along the edge is from point B to point C and then to point D, as shown in FIG. Figure 2c This track is the track adjusted by the cleaning robot 202 according to the actual sensed person 201.
[0103] The above trajectory from point B to point C and then to point D and the edge trajectory of the cleaning robot 202 cleaning the boundary of the DB segment constitute Figure 2cThe cleaning robot 202 can also record the entire edge cleaning trajectory H in real time, including the loop trajectory Hc and the trajectory Hs of the cleaning robot cleaning the boundary of the AD segment along the direction from point A to point D before the loop occurs.
[0104] When the cleaning robot is performing edge cleaning on the cleaning area, it can detect in real time whether it is in a blocked trajectory loop state. The blocked trajectory loop state indicates that the cleaning robot is blocked by an obstacle, causing a loop along the edge trajectory that does not go around the obstacle. How to detect whether it is in a blocked trajectory loop state will be described in detail later and will not be explained here. When the cleaning robot detects that it is in a blocked trajectory loop state, it can intercept the loop trajectory from the real-time recorded edge trajectory and can also cache the edge trajectory before the loop trajectory.
[0105] When the cleaning robot is in the blocked track loop state, the cleaning robot will repeat the cleaning of the boundary it has already cleaned. Figure 2c As shown, the cleaning robot 202 returns to the DA section after making a circle, and continues to clean the cleaned boundary in the direction from point D to point A, which greatly reduces the cleaning efficiency. In order to avoid repeatedly cleaning the cleaned boundary, the cleaning robot can determine the loop trajectory when it detects that it is in a blocking trajectory loop state, and perform full coverage cleaning on the area enclosed by the loop trajectory. When the cleaning is completed, the cleaning robot stores the area enclosed by the loop trajectory as the cleaned area. The cleaning robot can also add the cleaned area to the static map of the cleaning area, and can continue to clean along the edge according to the updated static map.
[0106] After completing the full coverage cleaning of the area enclosed by the loop trajectory, the obstacle that originally blocked the cleaning robot from cleaning along the edge may have been removed, and the cleaning robot can continue to clean along the edge.
[0107] In step S103, the cleaning robot determines the edge cleaning starting position, also known as the navigation target point, based on the currently cleaned area and the position of the cleaning robot before entering the blocked trajectory loop state. In one embodiment, the cleaning robot may directly determine the position of the cleaning robot before entering the blocked trajectory loop state as the edge cleaning starting position. In another embodiment, the cleaning robot may also determine the position before this position as the edge cleaning starting position.
[0108] The cleaning robot then moves to the determined edge cleaning starting position and continues cleaning along the edge from that starting position until the boundary of the cleaning area is cleaned. During subsequent edge cleaning, the cleaning robot can treat the looped track as an obstacle boundary and will no longer enter the area enclosed by the looped track. The cleaning robot can continue to record the edge track in real time based on the cached edge track before the looped track.
[0109] In the subsequent process of cleaning along the edge of the cleaning area, in response to the cleaning robot being in the blocked trajectory loop state, the cleaning robot determines a new loop trajectory and re-executes steps S102-S104.
[0110] In one embodiment, when the boundary cleaning of the cleaning area is completed, the cleaning robot may continue to perform full coverage cleaning according to the cleaning boundary formed by the boundary cleaning of the cleaning area until the cleaning area is completely completed.
[0111] The cleaning boundary formed by the edge cleaning includes: the boundary formed by the cleaned area stored in the above-mentioned edge cleaning process, and the cleaned boundary in the boundary of the cleaning area. Figure 2d As shown, the cleaning boundary formed by boundary cleaning includes: the cleaned area surrounded by the loop trajectory Hc, and the cleaned boundary of the living room 200, that is, Figure 2d The cleaning robot continues to follow the cleaned area enclosed by the loop trajectory Hc and the cleaned boundary of the living room 200. Figure 2d The right-slashed area in the image is fully cleaned until the right-slashed area is also cleaned. In this way, the cleaning robot can complete the cleaning task of the entire cleaning area.
[0112] It can be seen that in the embodiment of the present application, for the cleaned area stored during the edge cleaning process, the cleaning robot does not need to clean it again during the full coverage cleaning process, which can avoid repeated cleaning affecting the cleaning efficiency of the cleaning robot.
[0113] As an implementation method of the embodiment of this application, based on Figure 1 In the embodiment shown, before the step of determining the loop trajectory of the cleaning robot in response to the cleaning robot being in a blocked trajectory loop state, the embodiment of the present application also provides a method for determining whether the cleaning robot is in a blocked trajectory loop state, including the following steps: when a loop trajectory is detected in the edge trajectory of the cleaning robot, determining whether the current moving direction of the cleaning robot is the same as the edge movement direction of the cleaning robot before the trajectory loop occurs; when the current moving direction of the cleaning robot is opposite to the edge movement direction of the cleaning robot before the trajectory loop occurs, determining that the cleaning robot is in a blocked trajectory loop state.
[0114] The cleaning robot can detect whether there is a loop in the recorded trajectory using a loop detection algorithm. For example, the loop detection algorithm can be: CALC (Cyclic Consistency Algorithm), bag-of-words model method, or random ferns method, which are not specifically limited here.
[0115] In the case where the cleaning robot detects that a loop trajectory exists in the recorded trajectory, the cleaning robot may further determine whether the current moving direction is the same as the sideways motion direction before the trajectory loop occurs.
[0116] If the cleaning robot's current movement direction is the same as the direction of its edge movement before the trajectory loop occurred, the cleaning robot will continue to clean along the edge in the direction of its movement before the trajectory loop occurred, and will not repeat the previously cleaned boundary. In other words, the cleaning robot's edge trajectory did not loop around the obstacle due to being blocked by the obstacle, but instead bypassed the island obstacle to perform edge cleaning. This does not affect cleaning efficiency, and the cleaning robot only needs to set the area enclosed by the boundary of the island obstacle as the cleaned area.
[0117] For example, Figure 3 As shown, before the trajectory loop occurs, cleaning robot 302 cleans along the edge from point F to point E. Afterward, the trajectory loops back, with cleaning robot 302 circling trash can 301. After the loop, cleaning robot 302 continues cleaning along the edge from point E to point I. Cleaning robot 302 sets the area enclosed by the boundary of trash can 301 as the cleaned area.
[0118] If the cleaning robot's current movement direction is opposite to the direction of its movement along the edge before the trajectory loop occurred, it means that the robot will subsequently re-clean the previously cleaned edge. In other words, the cleaning robot's trajectory along the edge is blocked by an obstacle and loops, causing repeated cleaning of the previously cleaned edge, which affects cleaning efficiency.
[0119] For example, Figure 2a As shown in FIG, before the trajectory loop occurs, the cleaning robot 202 cleans the boundary of the AD segment along the direction from point A to point D. Afterwards, the trajectory loop occurs, as shown in FIG. Figure 2c As shown, the cleaning robot 202 moves from point D to point B, then from point B to point C, and then back to point D, forming a loop trajectory. After the loop is completed, the cleaning robot 202 continues from point D to point A, and then repeats the cleaning of the boundary of the AD segment from point D. This repeated cleaning of the boundary of the AD segment that has already been cleaned will affect the cleaning efficiency.
[0120] When the current moving direction of the cleaning robot is opposite to the side motion direction before the trajectory loop occurs, the cleaning robot is blocked along the side trajectory due to the movement of the obstacle and a loop occurs. The cleaning robot can determine that the cleaning robot is in a blocked trajectory loop state.
[0121] As can be seen, in the embodiment of the present application, the cleaning robot accurately determines whether it is in a blocked trajectory loop state by utilizing the relationship between its current moving direction and the direction of movement along the edge before the trajectory loop occurs. In response to the blocked trajectory loop state, the robot promptly performs subsequent processing, avoiding the situation where the blocked trajectory loop state causes repeated cleaning of the cleaned edge, thereby improving the cleaning efficiency of the cleaning robot.
[0122] As an implementation method of an embodiment of the present application, when the current moving direction of the cleaning robot is the same as the edge movement direction of the cleaning robot before the trajectory loop occurs, the cleaning robot can store the area enclosed by the loop trajectory as the cleaned area; and then continue to clean the edge of the cleaning area.
[0123] The cleaning robot's current movement direction is the same as its edge-to-edge movement direction before the trajectory loop occurred, indicating that the cleaning robot has circumvented the island obstacle and performed edge-to-edge cleaning. The cleaning robot can store the area enclosed by the looped trajectory as a cleaned area and skip cleaning it during subsequent cleaning operations. The cleaning robot then continues edge-to-edge cleaning within the uncleaned boundaries of the cleaning area.
[0124] As can be seen, in the embodiment of the present application, when a loop occurs while cleaning an island obstacle, the cleaning robot can store the area where the island obstacle is located, which is surrounded by the loop trajectory, as the cleaned area. Therefore, during the subsequent cleaning process of the cleaning area, the area where the island obstacle is located will not be repeatedly cleaned, further improving the cleaning efficiency of the cleaning robot.
[0125] As an implementation method of the present application, Figure 4 As shown, the above step S103, i.e., the step of determining the starting position of edge cleaning based on the currently cleaned area and the position of the cleaning robot before entering the blocking trajectory loop state, may include the following steps S401-402.
[0126] S401 , generating a reference path for the cleaning robot along the uncleaned boundary according to the cleaned area and the uncleaned boundary of the cleaned area.
[0127] After completing the full coverage cleaning of the area enclosed by the loop trajectory, the cleaning robot can generate a reference path for the cleaning robot to continue cleaning along the uncleaned boundary based on the stored cleaned area and the uncleaned boundary of the cleaned area. Specifically, the cleaning robot can determine the boundary indicated by the static map of the cleaning area, which is not passed by the cleaning robot's edge trajectory, as the uncleaned boundary of the cleaning area. Based on the uncleaned boundary and the cleaned area, the cleaning robot generates a reference path that belongs to the uncleaned boundary and does not pass through the cleaned area.
[0128] In one embodiment, if the length of the generated reference path is less than a second preset length, the cleaning robot can determine that the boundary of the cleaning area has been cleaned. The second preset length can be set based on the size of the cleaning robot to ensure that the cleaning robot does not need to clean the same boundary repeatedly. For example, if the cleaning robot has a diameter of 20 cm, the second preset length can be set to 10 cm, 15 cm, 20 cm, etc.
[0129] If the length of the reference path generated by the cleaning robot based on the cleaned area and the uncleaved boundary of the cleaned area is less than the second preset length, it indicates that the length of the uncleaved boundary of the cleaned area is relatively short. Given the cleaning robot's inherent width, it no longer needs to clean the boundary indicated by the reference path. The cleaning robot can directly determine that it has completed cleaning along the edge of the cleaned area. This avoids repeated cleaning of the same boundary, further improving the cleaning efficiency of the cleaning robot.
[0130] S402: Determine, from the reference path, a path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state, as a starting position for edge cleaning.
[0131] In order for the cleaning robot to continue cleaning along the edge according to the reference path, the cleaning robot needs to determine the edge cleaning starting position. The cleaning robot can determine the path point closest to the position before the cleaning robot entered the blocked trajectory loop state from the reference path, and use this path point as the edge cleaning starting position.
[0132] For example, Figure 5 As shown, the path Ref2 from point B to point J is: Figure 2c The reference path generated after fully cleaning the area enclosed by the loop trajectory Hc shown. The position of the cleaning robot 202 before entering the blocked trajectory loop state is point D. The closest point on path Ref2 to point D is point B, which the cleaning robot can determine as the starting position for edge cleaning.
[0133] As can be seen, in the embodiment of the present application, the cleaning robot uses the path point on the reference path closest to the position before the cleaning robot entered the blocking trajectory loop state as the starting position for edge cleaning, so that the subsequent edge cleaning trajectory can be as close as possible to the edge trajectory before entering the blocking trajectory loop state. In this way, the edge cleaning of the boundary of the cleaning area can be more completely performed, improving the cleaning quality of the cleaning robot.
[0134] As an implementation method of the embodiment of the present application, after determining the starting position for edge cleaning, the cleaning robot can also determine whether it can reach the determined starting position for edge cleaning, and determine a new starting position for edge cleaning if it cannot reach the determined starting position for edge cleaning. Based on this, the following is provided Figure 6 and Figure 7 Two ways to determine the new starting position for edge cleaning.
[0135] like Figure 6 As shown, after the above step S402, the above edge cleaning method may further include the following steps S601-S605.
[0136] S601: When the cleaning robot cannot reach the starting position for edge cleaning, it starts from the previous track point of the end point of the track before looping and determines the untraversed track point as the currently traversed track point.
[0137] S602: Determine the path point on the reference path that is closest to the currently traversed trajectory point as a new starting position for edge cleaning.
[0138] S603, determine whether the cleaning robot can reach the new edge cleaning starting position, if not, execute step S604, if yes, execute step S605.
[0139] S604: Determine the previous track point of the currently traversed track point as the new currently traversed track point, and return to step S602.
[0140] S605: Continue cleaning along the edge according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0141] As can be seen, in the embodiments of the present application, if the edge cleaning starting position cannot be reached, the cleaning robot can determine a new edge cleaning starting position, allowing subsequent cleaning robots to continue edge cleaning. Furthermore, the edge cleaning starting position determined by the cleaning robot is close to the position of the trajectory point on the pre-loop trajectory, which can ensure that the subsequent edge cleaning trajectory is as close as possible to the pre-loop trajectory. In this way, the edge cleaning of the boundary of the cleaning area can be more completely performed, improving the cleaning quality of the cleaning robot.
[0142] In step S601, if the cleaning robot is unable to reach the edge cleaning starting position, the robot must determine a new edge cleaning starting position in order to continue edge cleaning. The robot can traverse each point on the pre-loop trajectory to determine the new edge cleaning starting position. The pre-loop trajectory is a preset length of the edge cleaning trajectory before the robot enters the blocking trajectory loop state. The preset length can be adjusted based on the actual size of the cleaning area.
[0143] Initially, the cleaning robot starts from the previous trajectory point of the end point before the loop, and determines the previous trajectory point of the end point as the currently traversed trajectory point.
[0144] In the above step S602, the cleaning robot may determine the path point on the reference path that is closest to the currently traversed trajectory point as a new starting position for edge cleaning.
[0145] Furthermore, the cleaning robot can determine whether it can reach a new edge cleaning starting position, i.e., step S603 described above. If it can reach the new edge cleaning starting position, the cleaning robot can proceed to step S605, i.e., continue edge cleaning according to the new edge cleaning starting position until the boundary of the cleaning area is cleaned. If it cannot reach the new edge cleaning starting position, the cleaning robot continues to traverse the previous track point of the currently traversed track point to determine a new edge cleaning starting position, i.e., step S604 described above.
[0146] like Figure 7 As shown, after the above step S402, the above edge cleaning method may further include the following steps S701-S704.
[0147] S701, when the cleaning robot cannot reach the starting position for edge cleaning, it starts from the previous track point of the end point of the track before looping, determines the untraversed track point as the currently traversed track point, and uses the currently traversed track point as the new starting position for edge cleaning.
[0148] S702, determine whether the cleaning robot can reach the new edge cleaning starting position, if not, execute step S703, if yes, execute step S704.
[0149] S703: Determine the previous track point of the currently traversed track point as the new currently traversed track point, use the new currently traversed track point as the new edge cleaning starting position, and return to step S702.
[0150] S704: Continue cleaning along the edge according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0151] As can be seen, in the embodiments of the present application, if the cleaning robot cannot reach the edge cleaning starting position, it can determine a new edge cleaning starting position, allowing subsequent cleaning robots to continue edge cleaning. Furthermore, the edge cleaning starting position determined by the cleaning robot is on the pre-loop trajectory, allowing the subsequent edge cleaning trajectory to continue with the pre-loop trajectory. This allows for more complete edge cleaning of the boundaries of the cleaning area, improving the cleaning quality of the cleaning robot.
[0152] In step S701, if the cleaning robot is unable to reach the edge cleaning starting position, it must determine a new edge cleaning starting position to continue edge cleaning. The cleaning robot can traverse each track point on the pre-loop trajectory and use the currently traversed track point as the new edge cleaning starting position. Initially, the cleaning robot starts at the track point immediately preceding the end point of the pre-loop trajectory and determines the track point immediately preceding the end point as the currently traversed track point.
[0153] After determining the new edge cleaning starting position, the cleaning robot can determine whether it can reach the new edge cleaning starting position, which is step S702 described above. If it can reach the new edge cleaning starting position, the cleaning robot can execute step S704, i.e., continue edge cleaning according to the new edge cleaning starting position until the boundary of the cleaning area is cleaned. If it cannot reach the new edge cleaning starting position, the cleaning robot continues to traverse the previous track point of the currently traversed track point to determine a new edge cleaning starting position, which is step S703 described above.
[0154] As an implementation method of an embodiment of the present application, when the cleaning robot cannot reach any of the new edge cleaning starting positions determined above, the cleaning robot can further determine a new edge cleaning starting position in the following manner: determine any path point that the cleaning robot can reach on the reference path as a new edge cleaning starting position; continue edge cleaning according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0155] The cleaning robot can traverse each path point on the generated reference path. Each time it traverses a path point, the cleaning robot determines whether it can reach the path point. If the path point is reachable, the cleaning robot can use the path point as a new edge cleaning starting position and continue edge cleaning according to the new edge cleaning starting position until the boundary of the cleaning area is cleaned. While continuing edge cleaning according to the new edge cleaning starting position, the cleaning robot can delete the previously stored pre-loop trajectory and record a new edge trajectory in real time starting from the new edge cleaning starting position.
[0156] It can be seen that in the embodiment of the present application, Figure 6 and Figure 7 If the two methods shown above are unable to determine the edge cleaning starting position that the cleaning robot can reach, the cleaning robot can further determine the edge cleaning starting position on the reference path. This allows the cleaning robot to continue cleaning the edge, reduces the risk of obstacles preventing the cleaning robot from continuing, and improves the cleaning efficiency of the cleaning robot.
[0157] If the edge cleaning starting position that the cleaning robot can reach is still not determined by the above method, the cleaning robot can determine to end the edge cleaning task of the cleaning area and generate a prompt message indicating that the edge cleaning has failed. The cleaning robot can then continue to perform the full coverage cleaning task of the cleaning area or proceed to the cleaning task of the next cleaning area.
[0158] The technical solution provided by the embodiments of this application can solve the problem of a cleaning robot encountering a non-obstacle loop, that is, when the trajectory is blocked, by making a task decision to fully clean the area enclosed by the looped trajectory, rather than repeatedly cleaning along the edge or waiting. In this way, the cleaning robot can respond to unpredictable dynamic obstacle behavior based on the above strategy without affecting cleaning efficiency.
[0159] In addition, when the entire cleaning area is separated into multiple small areas by obstacles, the edge cleaning method in the related art will cause repeated edge cleaning due to obstacles, and it is impossible to complete edge cleaning in one go. However, by adopting the edge cleaning method provided in the embodiment of the present application, the cleaning area can be decomposed into cleaning units, that is, the area surrounded by the above-mentioned loop trajectory. The cleaning robot can first perform full coverage cleaning on the area surrounded by the loop trajectory and store it as a cleaned area. Avoiding repeated cleaning of the area surrounded by the loop trajectory during subsequent full coverage cleaning further improves the cleaning efficiency of the cleaning robot.
[0160] Corresponding to the above-mentioned edge cleaning method, the embodiment of the present application also provides an edge cleaning device. Figure 8 As shown, a side cleaning device is applied to a cleaning robot, and the device includes:
[0161] A state response module 801 is configured to determine a loop trajectory of the cleaning robot in response to the cleaning robot being in a blocked trajectory loop state during the process of the cleaning robot performing edge cleaning of the cleaning area, wherein the blocked trajectory loop state indicates that the cleaning robot is blocked by an obstacle, resulting in a loop along the edge trajectory that does not circumvent the obstacle;
[0162] A full coverage cleaning module 802 is used to perform full coverage cleaning on the area enclosed by the loop trajectory, and when the cleaning is completed, store the area enclosed by the loop trajectory as a cleaned area;
[0163] A position determination module 803 is configured to determine a starting position for edge cleaning based on the currently cleaned area and the position of the cleaning robot before it enters the blocked trajectory loop state;
[0164] The edge cleaning module 804 is used to continue edge cleaning according to the edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0165] It can be seen that in the embodiment of the present application, when the cleaning robot is blocked by an obstacle and the edge trajectory loops, the cleaning robot responds to itself being in a blocking trajectory loop state and determines its own loop trajectory; then the cleaning robot performs full coverage cleaning on the area enclosed by the loop trajectory, and when the cleaning is completed, the area within the area enclosed by the loop trajectory is stored as a cleaned area; then the cleaning robot determines the starting position for edge cleaning based on the cleaned area and the position of the cleaning robot before entering the blocking trajectory loop state; and continues to perform edge cleaning according to the starting position until the boundary cleaning of the cleaning area is completed.
[0166] It can be seen that when an obstacle blocks the edge of the cleaning robot, causing it to loop, the cleaning robot first performs a full-coverage cleaning of the area enclosed by the looped trajectory. After completing the full-coverage cleaning of the area enclosed by the looped trajectory, the obstacle that blocked the cleaning robot and caused the edge of the cleaning robot to loop may have already left. The cleaning robot can continue to clean along the edge based on the currently cleaned area and the position before entering the blocking trajectory loop state. When an obstacle blocks the edge of the cleaning robot, causing it to loop, the cleaning robot neither repeats the edge cleaning nor stops to wait. Instead, it cleans the area enclosed by the looped trajectory, thereby improving cleaning efficiency.
[0167] As an implementation of the embodiment of the present application, the above-mentioned edge cleaning device may further include:
[0168] a direction relationship determination module, configured to, before determining the loop trajectory of the cleaning robot in response to the cleaning robot being in a blocked trajectory loop state, determine whether the current moving direction of the cleaning robot is the same as the edgewise movement direction of the cleaning robot before the trajectory loop occurs, if a loop trajectory is detected in the edgewise trajectory of the cleaning robot;
[0169] The state determination module is used to determine that the cleaning robot is in a blocked trajectory loop state when the current moving direction of the cleaning robot is opposite to the sideways motion direction of the cleaning robot before the trajectory loop occurs.
[0170] As an implementation of the embodiment of the present application, the above-mentioned edge cleaning device may further include:
[0171] an area storage module, which stores the area enclosed by the loop trajectory as a cleaned area when the current moving direction of the cleaning robot is the same as the sideways moving direction of the cleaning robot before the trajectory loop occurs;
[0172] The edge cleaning module is also used to continue cleaning along the edges of the cleaning area.
[0173] As an implementation of an embodiment of the present application, the location determination module 803 may include:
[0174] a path generation submodule, for generating a reference path for the cleaning robot along the uncleaned boundary based on the cleaned area and the uncleaned boundary of the cleaned area;
[0175] The first position determination submodule is used to determine, from the reference path, a path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state, as a starting position for edge cleaning.
[0176] As an implementation of the embodiment of the present application, the above-mentioned edge cleaning device may further include:
[0177] The second position determination submodule is used for determining the path point closest to the position of the cleaning robot before entering the blocked trajectory loop state from the reference path as the starting position for edge cleaning. If the cleaning robot cannot reach the starting position for edge cleaning, traverse each trajectory point on the trajectory before the loop, and for each traversal of a trajectory point, determine the path point on the reference path closest to the currently traversed trajectory point as the new starting position for edge cleaning, wherein the trajectory before the loop is the edge trajectory of the cleaning robot before entering the blocked trajectory loop state of a first preset length; if the cleaning robot cannot reach the new starting position for edge cleaning, continue to traverse the previous trajectory point of the currently traversed trajectory point, and return to execute each traversal of a trajectory point, and determine the path point on the reference path closest to the currently traversed trajectory point as the new starting position for edge cleaning;
[0178] The edge cleaning module is also used to continue edge cleaning according to the new edge cleaning starting position when the cleaning robot can reach the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0179] As an implementation of the embodiment of the present application, the above-mentioned edge cleaning device may further include:
[0180] The third position determination submodule is used for determining, from the reference path, the path point closest to the position of the cleaning robot before it enters the blocked trajectory loop state as the starting position for edge cleaning. If the cleaning robot cannot reach the starting position for edge cleaning, traverse each trajectory point on the trajectory before the loop, and determine the currently traversed trajectory point as the new starting position for edge cleaning each time a trajectory point is traversed, wherein the trajectory before the loop is the edge trajectory of the cleaning robot before it enters the blocked trajectory loop state of a first preset length; if the cleaning robot cannot reach the new starting position for edge cleaning, continue to traverse the previous trajectory point of the currently traversed trajectory point, and return to execute each traversal of a trajectory point to determine the currently traversed trajectory point as the new starting position for edge cleaning;
[0181] The edge cleaning module is also used to continue edge cleaning according to the new edge cleaning starting position when the cleaning robot can reach the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0182] As an implementation of the embodiment of the present application, the above-mentioned edge cleaning device may further include:
[0183] a fourth position determination submodule, configured to determine, when the cleaning robot cannot reach any of the determined new edge cleaning starting positions, any path point that the cleaning robot can reach on the reference path as a new edge cleaning starting position;
[0184] The edge cleaning module is also used to continue edge cleaning according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
[0185] As an implementation of the embodiment of the present application, the above-mentioned edge cleaning device may further include:
[0186] The cleaning result determination module is used to determine whether the boundary cleaning of the cleaning area is completed when the length of the generated reference path is less than a second preset length.
[0187] As an implementation of the embodiment of the present application, the above-mentioned full coverage cleaning module 802 can also be used for:
[0188] When the boundary cleaning of the cleaning area is completed, full coverage cleaning is performed according to the cleaning boundary formed by the boundary cleaning of the cleaning area until the cleaning area is completely completed.
[0189] The present application also provides a cleaning robot. Figure 9 As shown, including:
[0190] Memory 901, used for storing computer programs;
[0191] The processor 902 is configured to implement any of the above-mentioned edge cleaning methods when executing the program stored in the memory 901 .
[0192] In addition, the cleaning robot may further include a communication bus and / or a communication interface, and the processor 902, the communication interface, and the memory 901 communicate with each other via the communication bus.
[0193] The communication bus mentioned above for the cleaning robot can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the figure shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0194] The communication interface is used for communication between the cleaning robot and other devices.
[0195] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk memory. Alternatively, the memory may be at least one storage device located away from the processor.
[0196] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0197] In another embodiment provided in the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of any of the above-mentioned edge cleaning methods are implemented.
[0198] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of any one of the edge cleaning methods in the above embodiments.
[0199] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state drive (SSD).
[0200] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0201] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device, cleaning robot, computer-readable storage medium, and computer program product embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.
[0202] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.
Claims
1. A method for cleaning along the edge, characterized in that: Applied to a cleaning robot, the method comprises: During the process of the cleaning robot performing edge cleaning on a cleaning area, in response to the cleaning robot being in a blocked trajectory loop state, determining a loop trajectory of the cleaning robot, wherein the blocked trajectory loop state indicates that the cleaning robot is blocked by an obstacle, resulting in a loop along the edge trajectory that does not circumvent the obstacle; Performing full coverage cleaning on the area enclosed by the loop trajectory, and upon completion of cleaning, storing the area enclosed by the loop trajectory as a cleaned area; Determining a starting position for edge cleaning based on the currently cleaned area and the position of the cleaning robot before entering the blocked trajectory loop state; Continue to clean the edges according to the edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
2. The method according to claim 1, characterized in that Before the step of determining the loop trajectory of the cleaning robot in response to the cleaning robot being in the blocked trajectory loop state, the method further includes: In the case where a loop trajectory is detected in the edge trajectory of the cleaning robot, determining whether the current moving direction of the cleaning robot is the same as the edge movement direction of the cleaning robot before the trajectory loop occurs; In a case where the current moving direction of the cleaning robot is opposite to the sideways moving direction of the cleaning robot before the trajectory loop occurs, it is determined that the cleaning robot is in a blocked trajectory loop state.
3. The method according to claim 2, characterized in that The method further comprises: When the current moving direction of the cleaning robot is the same as the sideways moving direction of the cleaning robot before the trajectory loop occurs, the area enclosed by the loop trajectory is stored as the cleaned area; Continue to clean along the edges of the cleaning area.
4. The method according to any one of claims 1 to 3, characterized in that The step of determining the starting position for edge cleaning based on the currently cleaned area and the position of the cleaning robot before entering the blocking trajectory loop state includes: generating a reference path for the cleaning robot along the uncleaned boundary according to the cleaned area and the uncleaned boundary of the cleaned area; A path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state is determined from the reference path as the starting position for edge cleaning.
5. The method according to claim 4, characterized in that After the step of determining, from the reference path, a path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state as a starting position for edge cleaning, the method further includes: In the case that the cleaning robot cannot reach the edge cleaning starting position, traverse each track point on the pre-loop trajectory, and each time a track point is traversed, determine the path point on the reference path closest to the currently traversed track point as a new edge cleaning starting position, wherein the pre-loop trajectory is the edge trajectory of the cleaning robot before entering the blocking trajectory loop state of the first preset length; In the case that the cleaning robot cannot reach the new edge cleaning starting position, continue to traverse the previous track point of the currently traversed track point, and return to execute each traversal of a track point to determine the path point on the reference path closest to the currently traversed track point as the new edge cleaning starting position; When the cleaning robot can reach the new edge cleaning starting position, the cleaning robot continues to clean the edge according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
6. The method according to claim 4, characterized in that After the step of determining, from the reference path, a path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state as a starting position for edge cleaning, the method further includes: In the case that the cleaning robot cannot reach the edge cleaning starting position, traverse each track point on the pre-loop trajectory, and each time a track point is traversed, determine the currently traversed track point as a new edge cleaning starting position, wherein the pre-loop trajectory is the edge trajectory of the cleaning robot before entering the blocking trajectory loop state with a first preset length; In the case that the cleaning robot cannot reach the new edge cleaning starting position, continue to traverse the previous track point of the currently traversed track point, and return to execute each traversal of a track point to determine the currently traversed track point as the new edge cleaning starting position; When the cleaning robot can reach the new edge cleaning starting position, the cleaning robot continues to clean the edge according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
7. The method according to claim 6, characterized in that The method further comprises: In the event that the cleaning robot cannot reach any of the determined new edge cleaning starting positions, determining any path point that the cleaning robot can reach on the reference path as a new edge cleaning starting position; Continue edge cleaning according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
8. The method according to claim 4, characterized in that The method further comprises: When the length of the generated reference path is less than the second preset length, it is determined that the boundary cleaning of the cleaning area is completed.
9. The method according to any one of claims 1 to 3, characterized in that When the boundary cleaning of the cleaning area is completed, the method further includes: According to the cleaning boundary formed by cleaning the boundary of the cleaning area, full coverage cleaning is performed until the cleaning area is completely cleaned.
10. A device for cleaning the edge, characterized in that: Applied to a cleaning robot, the device comprises: a state response module, configured to determine a loop trajectory of the cleaning robot in response to the cleaning robot being in a blocked trajectory loop state during the process of the cleaning robot performing edge cleaning of the cleaning area, wherein the blocked trajectory loop state indicates that the cleaning robot is blocked by an obstacle, resulting in a loop along the edge trajectory that does not circumvent the obstacle; A full coverage cleaning module, configured to perform full coverage cleaning on the area enclosed by the loop trajectory, and upon completion of cleaning, store the area enclosed by the loop trajectory as a cleaned area; a position determination module, configured to determine a starting position for edge cleaning based on a currently cleaned area and the position of the cleaning robot before it enters a blocking trajectory loop state; The edge cleaning module is used to continue edge cleaning according to the edge cleaning starting position until the boundary cleaning of the cleaning area is completed.
11. The device according to claim 10, characterized in that The device further comprises: a direction relationship determination module, configured to, before the step of determining the loop trajectory of the cleaning robot in response to the cleaning robot being in the blocked trajectory loop state, determine, when a loop trajectory is detected in the edge trajectory of the cleaning robot, whether the current moving direction of the cleaning robot is the same as the edge motion direction of the cleaning robot before the trajectory loop occurs; a state determination module, configured to determine that the cleaning robot is in a blocked trajectory loop state when the current moving direction of the cleaning robot is opposite to the sideways motion direction of the cleaning robot before the trajectory loop occurs; and / or, The device further includes: an area storage module, which stores the area enclosed by the loop trajectory as a cleaned area when the current moving direction of the cleaning robot is the same as the sideways moving direction of the cleaning robot before the trajectory loop occurs; The edge cleaning module is further configured to continue edge cleaning of the cleaning area; and / or, The position determination module includes: a path generation submodule, configured to generate a reference path for the cleaning robot along the uncleaned boundary according to the cleaned area and the uncleaned boundary of the cleaned area; A first position determination submodule is configured to determine, from the reference path, a path point closest to the position of the cleaning robot before it enters the blocking trajectory loop state, as a starting position for edge cleaning; and / or, The device further comprises: A second position determination submodule is configured to, after the step of determining from the reference path the path point closest to the position of the cleaning robot before it enters the blocked trajectory loop state as the starting position for edge cleaning, traverse each trajectory point on the trajectory before the loop if the cleaning robot cannot reach the starting position for edge cleaning, and determine the path point on the reference path closest to the currently traversed trajectory point each time a trajectory point is traversed as the new starting position for edge cleaning, wherein the trajectory before the loop is the edge trajectory of the cleaning robot before it enters the blocked trajectory loop state of a first preset length; and if the cleaning robot cannot reach the new starting position for edge cleaning, continue to traverse the previous trajectory point of the currently traversed trajectory point, and return to execute the step of traversing each trajectory point to determine the path point on the reference path closest to the currently traversed trajectory point as the new starting position for edge cleaning; The edge cleaning module is further configured to, when the cleaning robot can reach the new edge cleaning starting position, continue edge cleaning according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed; and / or, The device further comprises: A third position determination submodule is configured to, after the step of determining from the reference path the path point closest to the position of the cleaning robot before it enters the blocked trajectory loop state as the starting position for edge cleaning, traverse each trajectory point on the trajectory before the loop if the cleaning robot cannot reach the starting position for edge cleaning, and determine the currently traversed trajectory point as the new starting position for edge cleaning each time a trajectory point is traversed, wherein the trajectory before the loop is the edge trajectory of the cleaning robot before it enters the blocked trajectory loop state of a first preset length; and if the cleaning robot cannot reach the new starting position for edge cleaning, continue to traverse the previous trajectory point of the currently traversed trajectory point, and return to execute the step of traversing each trajectory point to determine the currently traversed trajectory point as the new starting position for edge cleaning; The edge cleaning module is further configured to, when the cleaning robot can reach the new edge cleaning starting position, continue edge cleaning according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed; and / or, The device further comprises: a fourth position determination submodule, configured to, when the cleaning robot cannot reach any of the determined new edge cleaning starting positions, determine any path point on the reference path that the cleaning robot can reach as a new edge cleaning starting position; The edge cleaning module is further configured to continue edge cleaning according to the new edge cleaning starting position until the boundary cleaning of the cleaning area is completed; and / or, The device further comprises: a cleaning result determination module, configured to determine that the boundary cleaning of the cleaning area is completed when the length of the generated reference path is less than a second preset length; and / or The full coverage cleaning module is also used for: When the boundary cleaning of the cleaning area is completed, full coverage cleaning is performed according to the cleaning boundary formed by the boundary cleaning of the cleaning area until the cleaning of the cleaning area is completed.
12. A cleaning robot, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 9 when executing a program stored in a memory.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Sweeping robot control method, device and system and storage medium
CN112022011A
Method for detecting sweeping area of sweeping robot, device, equipment and storage medium
CN112137512A
Robot edge path planning method and device, robot and storage medium
CN116069005A
Sweeping control method and device of sweeper, storage medium and intelligent robot
CN117694791A
Sweeping method, device and equipment of sweeping robot and computer program product
CN119405209A