Cleaning method and device, cleaning robot, storage medium and program product
By dynamically determining the target path points and screening areas, the cleaning robot can efficiently screen and clean the objects to be cleaned, solving the problem of low efficiency of traditional cleaning robots and achieving more efficient cleaning effects.
Patent Information
- Application Number
- CN202510623275.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-09-09
AI Technical Summary
Traditional cleaning robots are inefficient in patrol cleaning tasks and are unable to efficiently divide and clean the cleaning area.
By obtaining the current mode and position of the cleaning robot, the target starting path point and the target end path point are dynamically determined. Based on these path points, the target screening area is determined, and the candidate sequences are screened to obtain the target sequence to be cleaned, and finally the target object to be cleaned is cleaned.
The cleaning efficiency of the cleaning robot in patrol cleaning tasks is improved, the length of the cleaning path is shortened, and the efficient cleaning of the objects to be cleaned is ensured.
Smart Images

Figure CN120604956A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a cleaning method, device, cleaning robot, storage medium and program product. Background Art
[0002] With the development of artificial intelligence technology, cleaning robots are widely used in life. Cleaning robots clean the areas that need to be cleaned by using cleaning equipment such as roller brushes, disc brushes, squeegees, dust pushers, vacuum rakes and fans.
[0003] In traditional technology, when performing patrol cleaning tasks, the cleaning robot divides the area to be cleaned into multiple sub-areas. The cleaning robot patrols the sub-areas and records the objects to be cleaned in the sub-areas during the patrol process. After completing the patrol of the sub-areas, the cleaning robot cleans the objects to be cleaned in the sub-areas, resulting in low cleaning efficiency of the cleaning robot. Summary of the Invention
[0004] Based on this, it is necessary to provide a cleaning method, device, cleaning robot, storage medium and program product that can improve cleaning efficiency in response to the above technical problems.
[0005] In a first aspect, the present application provides a cleaning method. The method comprises:
[0006] In a patrol cleaning task, obtaining the current mode and current position of the cleaning robot;
[0007] Based on the current mode and the current position, determining a target starting path point and a target ending path point corresponding to the current position;
[0008] Determining a target screening area corresponding to the current position based on the target starting path point and the target ending path point;
[0009] Screening the candidate data set in the candidate sequence based on the target screening area to obtain a target sequence to be cleaned;
[0010] Clean the object to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned.
[0011] In a second aspect, the present application further provides a cleaning device. The device comprises:
[0012] An acquisition module is used to obtain the current mode and current position of the cleaning robot during a patrol cleaning task;
[0013] A first determining module is configured to determine a target starting path point and a target ending path point corresponding to the current position based on the current mode and the current position;
[0014] A second determining module is configured to determine a target screening area corresponding to the current position based on the target starting path point and the target ending path point;
[0015] A screening module, configured to screen the candidate data set in the candidate sequence based on the target screening area to obtain a target sequence to be cleaned;
[0016] The cleaning module is used to clean the object to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned.
[0017] In a third aspect, the present application further provides a cleaning robot comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0018] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods described in the first aspect when the computer program is executed by a processor.
[0019] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which implements the steps of any one of the methods described in the first aspect when executed by a processor.
[0020] The above-mentioned cleaning method, device, cleaning robot, storage medium and program product obtain the current mode and current position of the cleaning robot in the inspection cleaning task; based on the current mode and current position, determine the target starting path point and target end path point corresponding to the current position; based on the target starting path point and target end path point, determine the target screening area corresponding to the current position; based on the target screening area, filter the candidate data set in the candidate sequence to obtain the target sequence to be cleaned; and clean the object to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned. That is, the target starting path point and the target ending path point are dynamically determined according to the current mode and current position of the cleaning robot, and the target screening area is determined according to the target starting path point and the target ending path point, so that the target screening area changes with the operation of the cleaning robot, and the target screening area is used to screen the candidate objects in the candidate sequence, and all the objects to be cleaned located in the target screening area are screened out to obtain the target sequence to be cleaned. The cleaning robot cleans the objects to be cleaned in the target sequence to be cleaned, and can clean all the objects to be cleaned located in the target screening area at one time, thereby improving the cleaning efficiency of the cleaning robot in the patrol cleaning task; and the objects to be cleaned located in the target screening area are spaced closer together, thereby shortening the length of the cleaning path, and further improving the cleaning efficiency of the cleaning robot in the patrol cleaning task. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A diagram showing an application environment of a cleaning method in one embodiment;
[0022] Figure 2 Schematic diagram of a cleaning method according to an embodiment;
[0023] Figure 3 A schematic diagram of a cleaning robot operating based on an inspection path in one embodiment;
[0024] Figure 4 A schematic diagram of a target screening area in one embodiment;
[0025] Figure 5 A schematic diagram of a target screening area in another embodiment;
[0026] Figure 6 is a schematic diagram of a cleaning state in one embodiment;
[0027] Figure 7 is a schematic diagram of a candidate sequence, a sequence to be cleaned, and a cleaned sequence in one embodiment;
[0028] Figure 8A FIG1 is a schematic diagram of a process for updating candidate sequences and cleaned sequences in one embodiment;
[0029] Figure 8B A schematic diagram of a process for determining a target sequence to be cleaned;
[0030] Figure 8C Schematic diagram of the update process of candidate sequences, cleaned sequences, and sequences to be cleaned in one embodiment;
[0031] Figure 9 is a structural block diagram of a cleaning device in one embodiment;
[0032] Figure 10 2 is a diagram showing the internal structure of a cleaning robot in one embodiment. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0034] The cleaning method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the cleaning robot 104 through the network. The terminal 102 and the cleaning machine 104 can be used together to execute the cleaning method provided in the embodiment of the present application, and the cleaning robot 104 can also be used alone to execute the cleaning method provided in the embodiment of the present application. Among them, the cleaning robot can be various self-moving devices that can perform cleaning tasks, such as: a sweeping and washing robot, a floor washing robot, a sweeping robot, a mopping robot, etc. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices, and can also be various robots; among them, the Internet of Things devices can be smart TVs and smart car-mounted devices, etc., and the portable wearable devices can be smart watches, etc.; the robots can be various cleaning robots, delivery robots, guide robots and inspection robots, etc.
[0035] In one embodiment, Figure 2 As shown, a cleaning method is provided, which can be applied to a cleaning robot. This embodiment takes the application of the method to a cleaning robot as an example for explanation, including steps 202 to 208.
[0036] Step 202: During the patrol cleaning task, obtain the current mode and current position of the cleaning robot.
[0037] Among them, the patrol cleaning task refers to the task of cleaning the object to be cleaned during the patrol process. During the patrol cleaning task, the working mode of the cleaning robot switches between patrol mode and cleaning mode, including switching from patrol mode to cleaning mode and from cleaning mode to patrol mode.
[0038] The inspection mode refers to the mode in which the cleaning robot performs inspection tasks based on the inspection path. In the inspection mode, the cleaning robot operates based on the inspection path, and collects perception data through sensors during the operation based on the inspection path. The inspection path refers to the path that the cleaning robot takes to inspect the target area. The inspection path is composed of multiple inspection path points, and the inspection path points can be represented by inspection path point identifiers and inspection path point positions. The inspection path point identifier refers to an identifier that represents the inspection path point, and the inspection path point identifier can be the arrangement order of the inspection path points in the inspection path. The inspection path can be a bow-shaped path. For example, the schematic diagram of the cleaning robot operating based on the patrol path is as follows. Figure 3As shown, path segment 302, path segment 304 and path segment 306 form a bow-shaped inspection path, and the cleaning robot follows the inspection path to perform inspections. The interval distance between path segment 302 and path segment 306 in the inspection path can be set according to the field of view of the sensor located on the cleaning robot. The sensor can be various visual sensors for collecting image data, such as RGB (Red Green Blue) cameras, AI (Artificial Intelligence) cameras, RGBD (Red Green Blue Depth) cameras, webcams, video recorders, etc.
[0039] The cleaning mode refers to the mode in which the cleaning robot performs cleaning tasks based on the cleaning path. In the cleaning mode, the cleaning robot operates along the cleaning path and cleans the object to be cleaned using the cleaning device during the operation based on the cleaning path. The cleaning path refers to the operation path of the cleaning robot in the cleaning mode.
[0040] The current mode refers to the cleaning robot's current operating mode, which can be either inspection mode or cleaning mode. The current position refers to the cleaning robot's current position in the operation map, which can be expressed in two-dimensional coordinates. The operation map refers to the map used by the cleaning robot during operation.
[0041] Exemplarily, in response to a triggering operation for a patrol cleaning task for a target area, the cleaning robot determines the current mode and operates in the current path based on the current mode. During the operation based on the current path, the current posture of the cleaning robot is obtained, and the current position is obtained from the current posture. The current path is one of the patrol path and the cleaning path, the current path corresponding to the patrol mode is the patrol path, and the current path corresponding to the cleaning mode is the cleaning path. The current posture of the cleaning robot can be obtained based on a preset time interval, which can be a pre-set time interval, and the preset time interval can be set according to the operating speed of the cleaning robot in the current mode. The current posture refers to the current position and posture of the robot, and the current posture includes the current position and current operating direction.
[0042] In one embodiment, when the current mode is the inspection mode, the method further includes: acquiring a sensing point set through a sensor during operation based on the inspection path, and updating the current candidate sequence based on the sensing point set to obtain an updated candidate sequence.
[0043] In one embodiment, the current candidate sequence is updated based on the perception point set to obtain an updated candidate sequence, including: determining whether the perception point set is in the current candidate sequence; if the current candidate sequence contains a candidate point set identical to the perception point set, updating the field of view identifier corresponding to the candidate point set identical to the perception point set in the candidate sequence to a second field of view identifier, the second field of view identifier indicating that the candidate object corresponding to the candidate point set is within the field of view of the cleaning robot; if the candidate sequence does not contain a candidate point set identical to the perception point set, updating the current candidate sequence based on the perception point set, the perception object identifier corresponding to the perception point set, the field of view identifier corresponding to the perception point set, and the cleaning state corresponding to the perception point set to obtain an updated candidate sequence.
[0044] In one embodiment, after obtaining the updated candidate sequence, it also includes: obtaining the current cleaned sequence; for each candidate data set in the updated candidate sequence, determining whether the field of view identifier in the candidate data set is the second identifier; if the field of view identifier in the candidate data set is the second identifier; then determining whether the candidate object identifier in the candidate data set is located in the current cleaned sequence; if the candidate object identifier in the candidate data set is located in the current cleaned sequence, then deleting the candidate object identifier in the above candidate data set from the current cleaned sequence to obtain an updated cleaned sequence.
[0045] Step 204 : Based on the current mode and the current position, determine the target starting path point and the target ending path point corresponding to the current position.
[0046] The target start path point is the inspection path point located at the beginning of the target screening area, used to determine the target screening area. The target end path point is the inspection path point located at the end of the target screening area, used to determine the target screening area. Both the target start path point and the target end path point are inspection path points on the inspection path corresponding to the inspection cleaning task.
[0047] Exemplarily, when the current mode of the cleaning robot is the inspection mode, the target starting path point and the target end path point are determined based on the current position, the forward extension length and the backward extension length; when the current mode is the cleaning mode, the target starting path point and the target end path point are determined based on the current position and the previous adjacent target screening area.
[0048] Step 206 : Determine the target screening area corresponding to the current position based on the target starting path point and the target ending path point.
[0049] Among them, the target screening area refers to the area used to determine the target sequence to be cleaned, which can be understood as the area for screening the objects to be cleaned that are about to be cleaned. The target screening area can be represented by an area of a specified color in the screening map. The screening map includes an area of a first color and an area of a second color. The first color and the second color are different. The target screening area can be represented by an area of the first color, and the non-target screening area can be represented by an area of the second color. Alternatively, the non-target screening area can be represented by an area of the first color, and the target screening area can be represented by an area of the second color. For example, the screening map includes a black area and a white area, the black area is the non-target screening area, and the white area is the target screening area. The target screening area corresponds to the current position, that is, if the current position changes, the target screening area may also change. The coordinate system of the screening map can be the same as the coordinate system of the running map, or it can be different from the coordinate system of the running map.
[0050] Exemplarily, the cleaning robot identifies inspection path points along the inspection path, from the target starting point to the target ending point, as screening path points. Based on the screening path points and a preset width, the cleaning robot determines the target screening area corresponding to the current position. The preset width refers to the preset width of the target screening area, which can be set based on the cleaning robot's field of view. The field of view width refers to the width of the sensor's field of view, which can be understood as the width of the sensor's field of view at its widest point. For example, the preset width can be equal to the sensor's field of view width, or the preset width can be less than the sensor's field of view width.
[0051] In one embodiment, based on the screening path points and the preset width, the target screening area corresponding to the current position is determined, including: for each screening path point, obtaining the running direction of the screening path point in the inspection path; determining the straight line segment that passes through the screening path point, is perpendicular to the running direction and has a length equal to the field of view width as the screening straight line segment; based on the screening straight line segments corresponding to all the screening path points, the target screening area is determined. The running direction of the screening path point in the inspection path can be determined based on the screening path point and the next adjacent screening path point of the screening path point. For example, a schematic diagram of the target screening area is shown as follows: Figure 4 As shown, the circles in the target screening area are screening path points, the first screening path point is the target starting path point, and the last screening path point is the target ending path point. Each screening path point corresponds to a screening straight line segment, and any two adjacent screening straight line segments form a quadrilateral. The area formed by all quadrilaterals is the target screening area.
[0052] In one embodiment, the target screening area surrounds the cleaning robot at its current location. That is, the cleaning robot at its current location is within the target screening area. For certain sensing objects, the sensor will only acquire sensing data of the sensing object when the cleaning robot is close to the sensing object. This makes the target screening area surround the cleaning robot, thus avoiding the situation where the sensing object exceeds the target screening area due to the time difference between data transmission and screening, thereby improving the accuracy of the target screening area. For example, the schematic diagram of the target screening area is as follows: Figure 5 As shown, the diagonal area is the target screening area, the target starting path point and the target ending path point are located on the inspection path, the target screening area is determined based on the target starting path point, the target ending path point and the field of view width, and the cleaning robot 502 is located in the target screening area.
[0053] Step 208 : Screen the candidate data set in the candidate sequence based on the target screening area to obtain a target sequence to be cleaned.
[0054] Among them, the candidate sequence refers to a sequence composed of candidate data sets, and the candidate sequence includes at least one candidate data set, and the candidate data set corresponds to the candidate object. The candidate data set includes but is not limited to a candidate object identifier, a candidate point set, a field of view identifier, and a cleaning status identifier. The candidate object identifier refers to a unique identifier that characterizes the candidate object, and the candidate object refers to an object that needs to be cleaned and is detected by the cleaning robot. The candidate point set refers to a point set that characterizes the candidate object, and the candidate point set includes multiple candidate points. The field of view identifier refers to an identifier that characterizes whether the candidate object is within the field of view of the cleaning robot. The field of view identifier can be a first field of view identifier and a second field of view identifier. The first field of view identifier characterizes that the candidate object is outside the field of view of the cleaning robot, and the second field of view identifier characterizes that the candidate object is within the field of view of the cleaning robot. The cleaning status identifier refers to an identifier that characterizes the cleaning status of the candidate object. The cleaning status identifier includes but is not limited to one of uncleaned, cleaning, and cleaned. Uncleaned indicates that the candidate object has not been cleaned; cleaning indicates that the candidate object has not been completely cleaned, that is, the candidate object is partially cleaned and partially uncleaned; cleaned indicates that the object to be cleaned is completely cleaned. For example, the schematic diagram of the cleaning status is as follows Figure 6 As shown, the cleaning status of the candidate object located outside the cleaned area is marked as uncleaned, the cleaning status of the candidate object located partially inside the cleaned area and partially outside the cleaned area is marked as cleaning, and the cleaning status of the candidate object located entirely inside the cleaned area is marked as cleaned.
[0055] The target sequence to be cleaned is a sequence consisting of a set of data to be cleaned, corresponding to the object to be cleaned. The set of data to be cleaned includes, but is not limited to, an identifier of the object to be cleaned and a set of points to be cleaned. The identifier of the object to be cleaned is a unique identifier that represents the object to be cleaned, and the object to be cleaned is a candidate object to be cleaned. The set of points to be cleaned is a set of points that represents the object to be cleaned. A set of points to be cleaned includes multiple points to be cleaned, and it can be understood that multiple points to be cleaned in a set of points to be cleaned represent one object to be cleaned. The set of data to be cleaned in the target sequence to be cleaned can be zero, one, or multiple.
[0056] Exemplarily, the cleaning robot obtains a candidate sequence, and filters a candidate data set in the candidate sequence based on a labeled screening area to obtain a target sequence to be cleaned.
[0057] In one embodiment, the cleaning robot saves the candidate sequence, the sequence to be cleaned and the cleaned sequence. The schematic diagram of the candidate sequence, the sequence to be cleaned and the cleaned sequence is as follows: Figure 7 As shown, the candidate data set in the candidate sequence includes a candidate object identifier, a candidate point set, a field of view identifier, and a cleaning status identifier, wherein the candidate object identifier, the candidate point set, and the field of view identifier are output by the sensor of the cleaning robot. The field of view identifier can be one of TRUE and FALSE, TRUE indicates that the candidate object is within the field of view, and FALSE indicates that the candidate object is outside the field of view. The cleaning status identifier is one of 0, 1, and 2, 0 indicating uncleaned, 1 indicating cleaning, and 2 indicating cleaned. The set of data to be cleaned in the target sequence to be cleaned includes the object identifier to be cleaned and the point set to be cleaned. The cleaned sequence includes the cleaned object identifier.
[0058] Step 210 : Clean the object to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned.
[0059] Exemplarily, when the set of data to be cleaned in the target sequence to be cleaned is not zero, the cleaning robot switches from patrol mode to cleaning mode, generates a cleaning path based on the set of points to be cleaned in the target sequence to be cleaned, and cleans the objects to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned based on the cleaning path.
[0060] In one embodiment, after obtaining the target sequence to be cleaned, the method further includes: when the set of data to be cleaned in the target sequence to be cleaned is zero, the cleaning robot maintains the inspection mode and repeatedly executes steps 202 to 210 .
[0061] In the above cleaning method, the target starting path point and the target ending path point are dynamically determined according to the current mode and current position of the cleaning robot, and the target screening area is determined according to the target starting path point and the target ending path point, so that the target screening area changes with the operation of the cleaning robot, and the target screening area is used to screen the candidate objects in the candidate sequence, and all the objects to be cleaned located in the target screening area are screened out to obtain the target sequence to be cleaned. The cleaning robot cleans the objects to be cleaned in the target sequence to be cleaned, and all the objects to be cleaned located in the target screening area can be cleaned at one time, thereby improving the cleaning efficiency of the cleaning robot in the patrol cleaning task; and the objects to be cleaned located in the target screening area are spaced closer together, thereby shortening the length of the cleaning path, and further improving the cleaning efficiency of the cleaning robot in the patrol cleaning task.
[0062] In one embodiment, based on the current mode and the current position, determining a target starting path point and a target ending path point corresponding to the current position includes:
[0063] When the current mode is the inspection mode, the inspection path point closest to the current position in the inspection path corresponding to the inspection cleaning task is determined as the target matching path point; based on the target matching path point identifier and forward extension length of the target matching path point in the inspection path, the target end path point is determined; based on the target matching path point identifier and backward extension length, the target starting path point is determined.
[0064] Among them, the target matching path point identifier refers to the identifier of the target matching path point in the inspection path. The forward extension length refers to the length used to determine the target end path point. The forward extension length can be expressed by the number of path points. For example, the forward extension length front_lenth=40 indicates that there are 40 inspection path points between the target end path point and the target matching path point, or front_lenth=35 indicates that there are 35 inspection path points between the target end path point and the target matching path point. The backward extension length refers to the length used to determine the target starting path point. The backward extension length can be expressed by the number of path points. For example, the backward extension length back_lenth=5 indicates that there are 5 inspection path points between the target starting path point and the target matching path point, or back_lenth=8 indicates that there are 8 inspection path points between the target starting path point and the target matching path point.
[0065] Exemplarily, when the current mode is the inspection mode, the cleaning robot calculates the straight-line distance between the inspection path point and the current position for each inspection path point in the inspection path, obtains the straight-line distance corresponding to the inspection path point, compares the straight-line distances corresponding to all inspection path points, obtains the minimum straight-line distance, and determines the inspection path point corresponding to the minimum straight-line distance as the target matching path point corresponding to the current position; adds the target matching path point identifier in the inspection path to the forward extension length to obtain the target end path point identifier, and determines the inspection path point corresponding to the target end path point identifier as the target end path point; subtracts the backward extension length from the target matching path point identifier to obtain the target starting path point identifier, and determines the inspection path point corresponding to the target starting path point identifier as the target starting path point.
[0066] In one embodiment, the process of determining the target end path point and the target start path point is as follows:
[0067] Formula (1)
[0068] Formula (2)
[0069] Among them, index is the target matching path point identifier of the target matching path point in the inspection path; front_lenth is the forward extension length; back_lenth is the backward extension length; path[index+front_lenth] is the inspection path point corresponding to index+front_lenth in the inspection path; end_point is the target end path point; path[index-back_lenth] is the inspection path point corresponding to index-back_lenth in the inspection path; start_point is the target starting path point.
[0070] In this embodiment, when the cleaning robot is in patrol mode, the target end path point is determined by the target matching path point identifier and the forward extension length, and the target starting path point is determined by the target matching path point identifier and the backward extension length, providing accurate basic data for the subsequent determination of the target screening range.
[0071] In one embodiment, based on the current mode and the current position, determining a target starting path point and a target ending path point corresponding to the current position includes:
[0072] When the current mode is the cleaning mode, the historical end path point and the historical start path point corresponding to the previous adjacent target screening area are obtained.
[0073] The previous adjacent target screening area refers to the target screening area determined before the target screening area corresponding to the current position is determined. The historical end path point refers to the target end path point used to determine the previous adjacent target screening area. The historical start path point refers to the target start path point used to determine the previous adjacent target screening area.
[0074] Exemplarily, when the current mode is the cleaning mode, the cleaning robot obtains the historical end path point and the historical start path point corresponding to the previous adjacent target screening area.
[0075] Determine the angle between the current running direction corresponding to the current position and the reference running direction from the current position to the historical end path point.
[0076] The current direction refers to the cleaning robot's current direction, which can be understood as the direction the cleaning robot is moving from its current position to the next adjacent cleaning path point. The current direction can be obtained from the current position. The reference direction refers to the direction from the current position to the historical end path point. The angle refers to the angle between the current direction and the reference direction.
[0077] Exemplarily, the cleaning robot obtains the current running direction corresponding to the current position from the current posture, determines the reference running direction from the current position to the historical end path point, and calculates the angle between the current running direction and the reference running direction.
[0078] In one embodiment, the calculation process of the reference running direction is as follows:
[0079] Formula (3)
[0080] Among them, robot_pose is the current position of the cleaning robot; cur_end_point is the historical end path point; Theta(robot_pose,cur_end_point) is the reference running direction; theta is the reference running direction.
[0081] Determine the straight-line distance between your current location and the end of a historical waypoint.
[0082] Exemplarily, the cleaning robot calculates the straight-line distance between the current position and the historical end path point.
[0083] In one embodiment, the straight-line distance is calculated as follows:
[0084] Formula (4)
[0085] Among them, robot_pose is the current position of the cleaning robot; cur_end_point is the historical end path point; Dist(robot_pose,cur_end_point) is the straight-line distance between the current position and the historical end path point; dist is the straight-line distance.
[0086] Based on the angle and straight-line distance, determine the target end path point corresponding to the current position.
[0087] Exemplarily, the cleaning robot determines the target end path point corresponding to the current position based on the size relationship between the included angle and the angle threshold, and the size relationship between the straight-line distance and the distance threshold. The angle threshold refers to the threshold used for comparison with the included angle, and the angle threshold can be set to an angle less than 90 degrees, for example, the angle threshold is 70 degrees or 75 degrees. The distance threshold refers to the threshold used for comparison with the straight-line distance, and the distance threshold can be set according to the forward extension length. The distance threshold can be equal to the forward extension length multiplied by the interval distance. The interval distance refers to the straight-line distance between two adjacent inspection path points in the inspection path.
[0088] The historical starting path point is determined as the target starting path point corresponding to the current position.
[0089] Exemplarily, the cleaning robot determines the historical starting path point as the target starting path point corresponding to the current position.
[0090] In this embodiment, when the cleaning robot is in cleaning mode, the target end path point is determined by the historical end path point corresponding to the current position and the previous adjacent target screening area. That is, on the basis of the historical end path point, the target end path point is dynamically determined according to the current position of the cleaning robot. By determining the historical starting path point as the target starting path point, that is, the target starting path point remains unchanged on the basis of the historical starting path point, accurate basic data is provided for the subsequent determination of the target screening range.
[0091] In one embodiment, determining the target end path point corresponding to the current position based on the angle and the straight-line distance includes:
[0092] Compare the included angle with the angle threshold, and compare the straight-line distance with the distance threshold; when the included angle is less than or equal to the angle threshold, and the straight-line distance is less than or equal to the distance threshold, determine the target end path point corresponding to the current position based on the current position and the forward extension length; when the included angle is greater than the angle threshold, or the straight-line distance is greater than the distance threshold, determine the historical end path point as the target end path point corresponding to the current position.
[0093] Exemplarily, the cleaning robot compares the included angle with the angle threshold and compares the straight-line distance with the distance threshold. When the included angle is less than or equal to the angle threshold and the straight-line distance is less than or equal to the distance threshold, the target end path point corresponding to the current position is determined based on the current position and the forward extension length; when the included angle is greater than the angle threshold, or the straight-line distance is greater than the distance threshold, the target end path point corresponding to the current position is determined based on the historical end path point.
[0094] In this embodiment, if the included angle is less than or equal to the angle threshold, and the straight-line distance is less than or equal to the distance threshold, it indicates that the cleaning robot is running forward of the inspection path, and the cleaning robot is running in the previous adjacent target screening area, then the target end path point corresponding to the current position is determined according to the current position and the forward extension length, and the target end path point has changed according to the current position; if the included angle is greater than the angle threshold, and / or the straight-line distance is greater than the path distance, it indicates that the cleaning robot is not running forward of the inspection path, and / or the cleaning robot is running outside the previous adjacent target screening area, then the historical end path point is determined as the target end path point, the target end path point is kept the same as the historical end path point, and the historical end path point is determined according to different situations, thereby improving the accuracy of the historical end path point.
[0095] In one embodiment, determining a target end path point corresponding to the current position based on the current position and the forward extension length includes:
[0096] Obtain the historical matching path point corresponding to the previous adjacent target screening area; determine the inspection path point closest to the current position in the inspection path corresponding to the inspection and cleaning task as the candidate matching path point; compare the running order of the candidate matching path points in the inspection path with the running order of the historical matching path points in the inspection path, and obtain the inspection path points with a later running order; determine the inspection path points with a later running order as the target matching path point; determine the target end path point corresponding to the current position based on the target matching path point and the forward extension length.
[0097] Among them, the historical matching path point refers to the target matching path point used to determine the previous adjacent target screening area. The running order refers to the arrangement order of the inspection path points in the inspection path. The running order can be represented by the inspection path point identifier. The inspection path point identifier can be the inspection path point index or the inspection path point number, etc. For example, the inspection path point index is used to represent the running order, path[0] represents the inspection path point with the first running order, path[1] represents the inspection path point with the second running order, and so on; or the inspection path point number is used to represent the running order, ID_1 represents the inspection path point with the first running order, ID_2 represents the inspection path point with the first running order, and so on. The inspection path point with a later running order refers to the path point with a later running order among the candidate matching path points and the historical matching path points. For example, the inspection path point identifier of the candidate matching path point is path[8], and the inspection path point identifier of the historical matching path point is path
[10] , then the historical matching path point is the inspection path point with a later running order, that is, the historical matching path point is the target matching path point; or, the inspection path point identifier of the candidate matching path point is ID_7, and the inspection path point identifier of the historical matching path point is ID_3, then the candidate matching path point is the inspection path point with a later running order, that is, the candidate matching path point is the target matching path point.
[0098] Exemplarily, when the included angle is less than or equal to the angle threshold, and the straight-line distance is less than or equal to the distance threshold, the cleaning robot obtains the historical matching path point corresponding to the previous adjacent target screening area, determines the inspection path point in the inspection path corresponding to the inspection cleaning task that is closest to the current position as the candidate matching path point, obtains the inspection path point identifier of the candidate matching path point in the inspection path, and the inspection path point identifier of the historical matching path point in the inspection path, compares the inspection path point identifier of the candidate matching path point in the patrol path with the inspection path point identifier of the historical matching path point in the patrol path, obtains the larger inspection path point identifier, determines the inspection path point corresponding to the larger inspection path point identifier as the target matching path point, adds the forward extension length to the target matching path point, obtains the target end path point identifier, and determines the inspection path point corresponding to the target end path point identifier in the patrol path as the target end path point.
[0099] In one embodiment, the process of determining the target matching path point is as follows:
[0100] Formula (5)
[0101] Among them, NearestPathPointIndex(path) is the inspection path point identifier of the candidate matching path point in the inspection path; the index in max(NearestPathPointIndex(path), index) is the inspection path point identifier of the historical matching path point in the inspection path; max(NearestPathPointIndex(path), index) means taking the larger value between NearestPathPointIndex(path) and index; the index on the left of the equal sign is the target matching path point.
[0102] In one embodiment, the process of determining the target end path point is as follows:
[0103] Formula (6)
[0104] Formula (7)
[0105] Among them, end_point is the target end path point; index is the inspection path point identifier of the target matching path point in the inspection path; front_lenth is the forward extension length; index+front_lenth is the target end path point identifier; path[index+front_lenth] is the inspection path point corresponding to the target end path point identifier; T is the angle threshold; L is the distance threshold; theta is the angle; dist is the straight-line distance; cur_end_point is the historical end path point.
[0106] In this embodiment, by comparing the running order of the candidate matching path points in the patrol path with the running order of the historical matching path points in the patrol path, the patrol path points with a later running order are obtained, and the patrol path points with a later running order are determined as the target matching path points. Then, the target terminal path point is determined based on the target matching path point and the forward extension length, so that the patrol path point identifier of the target terminal path point in the patrol path is greater than the patrol path point identifier of the historical terminal path point in the patrol path, so as to ensure that the cleaning robot runs to the front of the patrol path in the cleaning mode.
[0107] In one embodiment, screening the candidate data set in the candidate sequence based on the target screening area to obtain the target sequence to be cleaned includes:
[0108] For each candidate data set in the candidate sequence, if the candidate point set in the candidate data set is located in the target screening area, the current sequence to be cleaned is updated based on the candidate data set to obtain an updated sequence to be cleaned.
[0109] Exemplarily, after determining the target screening area, the cleaning robot obtains a candidate sequence, and for each candidate data set in the candidate sequence, projects the candidate points of the candidate point set in the candidate data set into the screening map, and determines the screening pixel value corresponding to the candidate point in the screening map, where the screening pixel value is one of a first pixel value and a second pixel value, the first pixel value representing that the candidate point is located within the target screening area, and the second pixel value representing that the candidate point is located outside the target screening area, and based on the screening pixel values corresponding to each candidate point in the candidate point set, determines whether the candidate point set is located within the target screening area, and if the candidate point set is located within the target screening area, then the current sequence to be cleaned is updated based on the candidate data set to obtain an updated sequence to be cleaned.
[0110] In one embodiment, determining whether the candidate point set is located in the target screening area based on the screening pixel values corresponding to each candidate point in the candidate point set includes: if the screening pixel value corresponding to at least one candidate point in the candidate point set is a first pixel value, then determining that the candidate point set is located in the target screening area; otherwise, determining that the candidate point set is located outside the target screening area. That is, if the number of candidate points in the candidate point set located in the target screening area is greater than or equal to one, then determining that the candidate point set is located in the target screening area.
[0111] In one embodiment, determining whether the candidate point set is located in the target screening area based on the screening pixel values corresponding to each candidate point in the candidate point set includes: if the screening pixel values corresponding to all candidate points in the candidate point set are the first pixel value, then determining that the candidate point set is located in the target screening area; otherwise, determining that the candidate point set is located outside the target screening area. That is, if all candidate points in the candidate point set are located in the target screening area, then determining that the candidate point set is located in the target screening area.
[0112] In one embodiment, the current sequence to be cleaned is updated based on the candidate data set to obtain an updated sequence to be cleaned, including: determining whether the current sequence to be cleaned contains a candidate object identifier in the candidate data set; if there is an object identifier to be cleaned identical to the candidate object identifier in the sequence to be cleaned, updating the point set to be cleaned corresponding to the object identifier to be cleaned identical to the candidate object identifier in the current sequence to be cleaned based on the candidate point set in the candidate data set to obtain an updated sequence to be cleaned; if there is no object identifier to be cleaned identical to the candidate object identifier in the sequence to be cleaned, adding the candidate point set and candidate object identifier in the candidate data set to the current sequence to be cleaned to obtain an updated sequence to be cleaned.
[0113] In one embodiment, when it is determined that the candidate point set is outside the target screening area, it also includes: determining whether there is a candidate point set in the current sequence to be cleaned, and when there is a point set to be cleaned that is identical to the candidate point set in the current sequence to be cleaned, deleting the point set to be cleaned that is identical to the candidate point set and the object to be cleaned identifier corresponding to the point set to be cleaned from the current sequence to be cleaned to obtain an updated sequence to be cleaned; and deleting the candidate data set corresponding to the candidate point set from the current candidate sequence to obtain an updated candidate sequence.
[0114] For each set of points to be cleaned in the updated sequence to be cleaned, if at least one point to be cleaned in the set of points to be cleaned is located in the cleaned area, a field of view identifier corresponding to the set of points to be cleaned is obtained.
[0115] Among them, the cleaned area refers to the area that the cleaning robot has cleaned. The cleaned area can be represented by an area of a specified color in the cleaning map. The cleaning map includes an area of a third color and an area of a fourth color. The third color and the fourth color are different. The area of the third color can be used to represent the cleaned area, and the area of the fourth color can be used to represent the uncleaned area. Alternatively, the area of the third color can be used to represent the uncleaned area, and the area of the fourth color can be used to represent the cleaned area. For example, the cleaning map includes a black area and a white area, the black area is the uncleaned area, and the white area is the cleaned area. The coordinate system of the cleaning map can be the same as the coordinate system of the running map, or it can be different from the coordinate system of the running map.
[0116] Exemplarily, after obtaining the updated sequence to be cleaned, for each set of points to be cleaned in the sequence to be cleaned, the points to be cleaned in the set of points to be cleaned are projected into the cleaning map to obtain the clean pixel values corresponding to the points to be cleaned in the cleaning map, and the clean pixel values are one of the third pixel values and the fourth pixel values, the third pixel value representing that the point to be cleaned is located in the cleaned area, and the fourth pixel value representing that the point to be cleaned is located outside the cleaned area; when the clean pixel value corresponding to at least one point to be cleaned in the set of points to be cleaned is the third pixel value, the field of view identifier corresponding to the set of points to be cleaned is obtained from the candidate data set corresponding to the set of points to be cleaned.
[0117] When the field of view identifier corresponding to the set of points to be cleaned is the first field of view identifier, the points to be cleaned located in the cleaned area are removed from the set of points to be cleaned to obtain a target sequence to be cleaned; the first field of view identifier indicates that the object to be cleaned corresponding to the set of points to be cleaned is outside the field of view of the cleaning robot.
[0118] Exemplarily, if the field of view identifier corresponding to the set of points to be cleaned is the first field of view identifier, the cleaning robot removes the points to be cleaned whose cleaning pixel values are the third pixel values from the set of points to be cleaned to obtain the target sequence to be cleaned.
[0119] In one embodiment, after determining the target sequence to be cleaned, it also includes: generating a cleaning path based on the set of points to be cleaned in the target sequence to be cleaned, cleaning the objects to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned based on the cleaning path; and updating the current cleaning map based on the cleaning path to obtain an updated cleaning map.
[0120] In one embodiment, in the updated cleaning map, for each set of points to be cleaned in the sequence to be cleaned, it is determined whether the set of points to be cleaned is located in the cleaned area in the updated cleaning map; if all the points to be cleaned in the set of points to be cleaned are located in the cleaned area, the identifier of the object to be cleaned corresponding to the set of points to be cleaned is added to the current cleaned sequence to obtain an updated cleaned sequence, the set of points to be cleaned and the identifier of the object to be cleaned corresponding to the set of points to be cleaned are deleted from the current sequence to be cleaned to obtain an updated sequence to be cleaned, the candidate data set corresponding to the set of points to be cleaned is deleted from the current candidate sequence to obtain an updated candidate sequence; otherwise, the step of determining whether the set of points to be cleaned is located in the cleaned area in the updated cleaning map is repeated.
[0121] In this embodiment, the target screening area is used to dynamically screen out the target sequence to be cleaned from the candidate sequence, avoiding screening of candidate objects that are far away from the current position as objects to be cleaned, and also avoiding not screening candidate objects that are close to the current position as objects to be cleaned. The cleaning robot cleans the objects to be cleaned in the target sequence to be cleaned, avoiding the cleaning robot from running a long distance, shortening the time for cleaning the objects to be cleaned, and thus improving the cleaning efficiency of the cleaning robot; and all objects to be cleaned near the current position can be cleaned, thereby further improving the cleaning efficiency of the cleaning robot.
[0122] In one embodiment, the cleaning robot includes a garbage target management module and a selection module. The garbage target management module includes a candidate sequence, a sequence to be cleaned, and a cleaned sequence. The candidate data set in the candidate sequence includes a candidate object identifier, a candidate point set, a field of view identifier, and a cleaning state identifier; the to-be-cleaned data set in the to-be-cleaned sequence includes a to-be-cleaned object identifier and a to-be-cleaned point set; and the cleaned sequence includes a cleaned object identifier.
[0123] The update process diagram of candidate sequences and cleaned sequences is as follows Figure 8A Shown, including:
[0124] The cleaning robot responds to the trigger operation of the inspection and cleaning task for the target area and obtains the inspection path corresponding to the inspection and cleaning task. During the operation based on the inspection path, the target management module obtains the perception point set through the sensor. The target management module determines whether the perception point set is located in the current candidate sequence. If the current candidate sequence contains a candidate point set that is identical to the perception point set, the field of view identifier of the candidate data set including the perception point set in the candidate sequence is updated to the second field of view identifier (i.e., the updated field of view identifier) to obtain an updated candidate sequence. The second field of view identifier indicates that the candidate object corresponding to the candidate point set is within the field of view of the cleaning robot. If the candidate sequence does not contain a candidate point set that is identical to the perception point set, the perception point set, the perception object identifier corresponding to the perception point set, the field of view identifier corresponding to the perception point set, and the cleaning status corresponding to the perception point set are saved to the current candidate sequence to obtain an updated candidate sequence.
[0125] After obtaining the updated candidate sequence, the target management module obtains the current cleaned sequence, and for each candidate data set in the updated candidate sequence, determines whether the field of view identifier in the candidate data set is the second field of view identifier; if the field of view identifier in the candidate data set is the second field of view identifier, determines whether the candidate object identifier in the candidate data set is located in the current cleaned sequence; if the candidate object identifier in the candidate data set is located in the current cleaned sequence, deletes the candidate object identifier and candidate point set in the above candidate data set from the current cleaned sequence to obtain an updated cleaned sequence; if the current cleaned sequence does not include the candidate object identifier in the candidate data set, determines the current cleaned sequence as the updated cleaned sequence.
[0126] The steps to determine the target screening area include:
[0127] The cleaning robot determines the current mode and runs based on the current path corresponding to the current mode. During the operation based on the current path, the selection module obtains the current position of the cleaning robot. For each inspection path point in the inspection path, the selection module calculates the straight-line distance between the inspection path point and the current position, obtains the straight-line distance corresponding to the inspection path point, compares the straight-line distances corresponding to all inspection path points, obtains the minimum straight-line distance, and determines the inspection path point corresponding to the minimum straight-line distance as the target matching path point corresponding to the current position.
[0128] When the current mode is the inspection mode, the selection module calculates the straight-line distance between each inspection path point and the current position for each inspection path point in the inspection path, obtains the straight-line distance corresponding to the inspection path point, compares the straight-line distances corresponding to all inspection path points, obtains the minimum straight-line distance, and determines the inspection path point corresponding to the minimum straight-line distance as the target matching path point corresponding to the current position.
[0129] The selection module adds the forward extension length to the target matching path point identifier in the inspection path to obtain the target end path point identifier, determines the target end path point with the inspection path point corresponding to the target end path point identifier, subtracts the backward extension length from the target matching path point identifier to obtain the target starting path point identifier, and determines the target starting path point with the inspection path point corresponding to the target starting path point identifier.
[0130] When the current mode is the cleaning mode, the selection module obtains the historical matching path points, historical end path points and historical starting path points corresponding to the previous adjacent target screening area; the selection module calculates the straight-line distance between the inspection path point and the current position for each inspection path point in the inspection path, obtains the straight-line distance corresponding to the inspection path point, compares the straight-line distances corresponding to all inspection path points, obtains the minimum straight-line distance, determines the inspection path point corresponding to the minimum straight-line distance as the candidate matching path point corresponding to the current position, compares the inspection path point identifier of the candidate matching path point in the inspection path, and the inspection path point identifier of the historical matching path point in the inspection path, obtains the larger inspection path point identifier, and determines the inspection path point corresponding to the larger inspection path point identifier as the target matching path point.
[0131] The selection module determines the next adjacent cleaning path point corresponding to the current position, determines the current running direction corresponding to the current position based on the current position and the next adjacent cleaning path point, determines the reference running direction based on the current position and the historical end path point, and calculates the angle between the current running direction and the reference running direction; calculates the straight-line distance between the current position and the historical end path point, multiplies the forward extension length by the interval distance, and obtains the path distance corresponding to the forward extension length. The selection module compares the angle with the angle threshold and the straight-line distance with the path distance. If the angle is less than or equal to the angle threshold and the straight-line distance is less than or equal to the path distance, the inspection path point identifier of the target matching path point in the inspection path is added to the forward extension length to obtain the target end path point identifier, and the inspection path point corresponding to the target end path point identifier in the inspection path is determined as the target end path point; if the angle is greater than the angle threshold, or the straight-line distance is greater than the path distance, the historical end path point is determined as the target end path point. The historical starting path point is determined as the target starting path point.
[0132] After determining the target starting path point and the target end path point, the selection module determines the inspection path points from the target starting path point to the target end path point in the inspection path as screening path points; for each screening path point, the running direction of the screening path point in the inspection path is obtained, and the straight line segment passing through the screening path point, perpendicular to the running direction and with a length equal to the field of view width is determined as the screening straight line segment; the area range composed of the screening straight line segments corresponding to all the screening path points is determined as the target screening area.
[0133] The flow chart for determining the target cleaning sequence is as follows: Figure 8B Shown, including:
[0134] After determining the target screening area, the selection module obtains a candidate sequence, and for each candidate data set in the candidate sequence, projects the candidate points of the candidate point set in the candidate data set into the screening map, and determines the screening pixel value corresponding to the candidate point in the screening map. The screening pixel value is one of a first pixel value and a second pixel value. The first pixel value represents that the candidate point is located in the target screening area, and the second pixel value represents that the candidate point is located outside the target screening area. If the screening pixel values corresponding to all candidate points in the candidate point set are the first pixel value, then it is determined that the candidate point set is located in the target screening area; otherwise, it is determined that the candidate point set is located outside the target screening area.
[0135] If the candidate point set is located in the target screening area, determine whether the candidate object identifier in the candidate data set exists in the current sequence to be cleaned. If the candidate object identifier exists in the sequence to be cleaned, update the point set to be cleaned corresponding to the candidate object identifier in the current sequence to be cleaned based on the candidate point set in the candidate data set to obtain an updated sequence to be cleaned; if the candidate object identifier does not exist in the sequence to be cleaned, add the candidate point set and candidate object identifier in the candidate data set to the current sequence to be cleaned to obtain an updated sequence to be cleaned.
[0136] If the candidate point set is outside the target screening area, determine whether the candidate point set exists in the current sequence to be cleaned. If the same point set exists in the current sequence to be cleaned as the candidate point set, delete the same point set and the corresponding object identifier from the current sequence to be cleaned to obtain an updated sequence to be cleaned. If the same point set does not exist in the current sequence to be cleaned as the candidate point set, determine the current sequence to be cleaned as the updated sequence to be cleaned, and delete the candidate data set corresponding to the candidate point set from the current candidate sequence to obtain an updated candidate sequence.
[0137] After obtaining the updated sequence to be cleaned, for each set of points to be cleaned in the sequence to be cleaned, the points to be cleaned in the set are projected onto the cleaning map to obtain the clean pixel values corresponding to the points to be cleaned in the cleaning map. The clean pixel values are one of a third pixel value and a fourth pixel value. The third pixel value indicates that the point to be cleaned is located within the cleaned area, and the fourth pixel value indicates that the object to be cleaned is located outside the cleaned area. If the clean pixel value corresponding to at least one point to be cleaned in the set of points to be cleaned is the third pixel value, it is determined that the object to be cleaned corresponding to the set of points to be cleaned is located within the cleaned area. The field of view identifier corresponding to the set of points to be cleaned is obtained from the candidate data set corresponding to the set of points to be cleaned. If the field of view identifier corresponding to the set of points to be cleaned is the first field of view identifier, the selection module removes the points to be cleaned whose clean pixel values in the set of points to be cleaned are the third pixel value from the set of points to be cleaned to obtain the target sequence to be cleaned. If the field of view identifier corresponding to the set of points to be cleaned is not the first field of view identifier (i.e., the field of view identifier corresponding to the set of points to be cleaned is the second field of view identifier), the updated sequence to be cleaned is determined as the target sequence to be cleaned. If the clean pixel values corresponding to all the points to be cleaned in the set of points to be cleaned are the fourth pixel values, it is determined that the object to be cleaned corresponding to the set of points to be cleaned is outside the cleaned area, and the updated sequence to be cleaned is determined as the target sequence to be cleaned. After obtaining the target sequence to be cleaned, the field of view identifiers in all candidate data sets in the candidate sequence are modified to the first field of view identifier.
[0138] After determining the target sequence to be cleaned, the cleaning robot generates a cleaning path based on the set of points to be cleaned in the target sequence to be cleaned, cleans the objects to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned based on the cleaning path; and updates the current cleaning map based on the cleaning path to obtain an updated cleaning map.
[0139] The update process diagram of candidate sequence, cleaned sequence and sequence to be cleaned is as follows: Figure 8C Shown, including:
[0140] In the updated cleaning map, the target management module obtains the set of points to be cleaned from the sequence to be cleaned, and determines whether the set of points to be cleaned is located in the cleaned area in the updated cleaning map for the obtained set of points to be cleaned; if all the points to be cleaned in the set of points to be cleaned are located in the cleaned area, the identifier of the object to be cleaned corresponding to the set of points to be cleaned is added to the current cleaned sequence to obtain an updated cleaned sequence, the set of points to be cleaned and the identifier of the object to be cleaned corresponding to the set of points to be cleaned are deleted from the current sequence to be cleaned to obtain an updated sequence to be cleaned, the candidate data set corresponding to the set of points to be cleaned is deleted from the current candidate sequence to obtain an updated candidate sequence; otherwise, another set of points to be cleaned is obtained from the sequence to be cleaned, and the above steps are repeated.
[0141] In the above cleaning method, the target starting path point and the target end path point are determined by the current mode and the current position, the target screening area corresponding to the current position is determined by the target starting path point and the target end path point, and the target screening area is used to dynamically screen the target to-be-cleaned sequence from the candidate sequence, thereby avoiding screening the candidate objects that are far away from the current position as the objects to be cleaned, and also avoiding not screening the candidate objects that are close to the current position as the objects to be cleaned. The cleaning robot cleans the objects to be cleaned in the target to-be-cleaned sequence, thereby avoiding the cleaning robot from running a long distance, shortening the time for cleaning the objects to be cleaned, and thus improving the cleaning efficiency of the cleaning robot in the patrol cleaning task; and it can realize the cleaning of multiple objects to be cleaned in the target screening area, thereby further improving the cleaning efficiency of the cleaning robot in the patrol cleaning task.
[0142] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0143] Based on the same inventive concept, the present application also provides a cleaning device for implementing the aforementioned cleaning method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more cleaning device embodiments provided below can be found in the above-mentioned limitations of the cleaning method and will not be repeated here.
[0144] In one embodiment, Figure 9 As shown, a cleaning device is provided, including: an acquisition module 902, a first determination module 904, a second determination module 906, a screening module 908 and a cleaning module 910, wherein:
[0145] The acquisition module 902 is used to obtain the current mode and current position of the cleaning robot during the patrol cleaning task;
[0146] A first determining module 904 is configured to determine a target starting path point and a target ending path point corresponding to the current location based on the current mode and the current location;
[0147] A second determining module 906 is configured to determine a target screening area corresponding to the current position based on the target starting path point and the target ending path point;
[0148] A screening module 908 is configured to screen the candidate data set in the candidate sequence based on the target screening region to obtain a target sequence to be cleaned;
[0149] The cleaning module 910 is configured to clean the object to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned.
[0150] In one embodiment, the first determination module 904 is also used to: when the current mode is the inspection mode, determine the inspection path point in the inspection path corresponding to the inspection cleaning task that is closest to the current position as the target matching path point; determine the target end path point based on the target matching path point identifier and forward extension length of the target matching path point in the inspection path; and determine the target starting path point based on the target matching path point identifier and backward extension length.
[0151] In one embodiment, the first determination module 904 is also used to: when the current mode is the cleaning mode, obtain the historical end path point and the historical starting path point corresponding to the previous adjacent target screening area; determine the current running direction corresponding to the current position and the angle between the reference running direction from the current position to the historical end path point; determine the straight-line distance between the current position and the historical end path point; based on the angle and the straight-line distance, determine the target end path point corresponding to the current position; and determine the historical starting path point as the target starting path point corresponding to the current position.
[0152] In one embodiment, the first determination module 904 is also used to: compare the included angle with the angle threshold, and compare the straight-line distance with the distance threshold; when the included angle is less than or equal to the angle threshold, and the straight-line distance is less than or equal to the distance threshold, determine the target end path point corresponding to the current position based on the current position and the forward extension length; when the included angle is greater than the angle threshold, or the straight-line distance is greater than the distance threshold, determine the historical end path point as the target end path point corresponding to the current position.
[0153] In one embodiment, the first determination module 904 is also used to: obtain the historical matching path point corresponding to the previous adjacent target screening area; determine the inspection path point in the inspection path corresponding to the inspection and cleaning task that is closest to the current position as a candidate matching path point; compare the running order of the candidate matching path points in the inspection path with the running order of the historical matching path points in the inspection path to obtain the inspection path points with a later running order; determine the inspection path points with a later running order as the target matching path point; and determine the target end path point corresponding to the current position based on the target matching path point and the forward extension length.
[0154] In one embodiment, the screening module 908 is also used to: for each candidate data set in the candidate sequence, if the candidate point set in the candidate data set is located in the target screening area, then the current sequence to be cleaned is updated based on the candidate data set to obtain an updated sequence to be cleaned; for each point set to be cleaned in the updated sequence to be cleaned, if at least one point to be cleaned in the point set to be cleaned is located in the cleaned area, then the field of view identifier corresponding to the point set to be cleaned is obtained; when the field of view identifier corresponding to the point set to be cleaned is the first field of view identifier, the points to be cleaned located in the cleaned area are removed from the point set to be cleaned to obtain the target sequence to be cleaned; the first field of view identifier indicates that the object to be cleaned corresponding to the point set to be cleaned is outside the field of view of the cleaning robot.
[0155] Each module in the cleaning device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor of the cleaning robot in hardware form, or can be stored in the memory of the cleaning robot in software form, so that the processor can call and execute the corresponding operations of each module.
[0156] In one embodiment, a cleaning robot is provided. The cleaning robot may be a terminal, and its internal structure may be as shown in FIG. Figure 10 As shown. The cleaning robot includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The cleaning robot's processor provides computing and control capabilities. The cleaning robot's memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operating system and computer programs stored in the non-volatile storage medium. The cleaning robot's input / output interface is used to exchange information between the processor and external devices. The cleaning robot's communication interface is used to communicate with external terminals via wired or wireless means, with wireless communication being achieved via Wi-Fi, mobile cellular networks, NFC (near-field communication), or other technologies. When executed by the processor, the computer program implements a cleaning method. The cleaning robot's display unit is used to produce visually visible images and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the cleaning robot can be a touch layer covering the display screen, or a button, trackball or touchpad set on the cleaning robot shell, or an external keyboard, touchpad or mouse.
[0157] Those skilled in the art will understand that Figure 10The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the cleaning robot to which the solution of the present application is applied. The specific cleaning robot may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0158] In one embodiment, a cleaning robot is provided, comprising a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0159] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0160] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0161] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0162] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.
[0163] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0164] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A cleaning method, characterized in that: The method is used for a cleaning robot, comprising: In a patrol cleaning task, obtaining the current mode and current position of the cleaning robot; Based on the current mode and the current position, determining a target starting path point and a target ending path point corresponding to the current position; Determining a target screening area corresponding to the current position based on the target starting path point and the target ending path point; Screening the candidate data set in the candidate sequence based on the target screening area to obtain a target sequence to be cleaned; Clean the object to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned.
2. The method according to claim 1, characterized in that The determining, based on the current mode and the current position, a target starting path point and a target ending path point corresponding to the current position, includes: In the case where the current mode is the inspection mode, determining the inspection path point closest to the current position in the inspection path corresponding to the inspection cleaning task as the target matching path point; Determining a target end path point based on a target matching path point identifier and a forward extension length of the target matching path point in the inspection path; The target starting path point is determined based on the target matching path point identifier and the backward extension length.
3. The method according to claim 1, characterized in that The determining, based on the current mode and the current position, a target starting path point and a target ending path point corresponding to the current position, includes: When the current mode is the cleaning mode, obtaining a historical end path point and a historical start path point corresponding to a previous adjacent target screening area; Determine an angle between a current running direction corresponding to the current position and a reference running direction from the current position to the historical end path point; Determining the straight-line distance between the current location and the historical end path point; Determine a target end path point corresponding to the current position based on the angle and the straight-line distance; The historical starting path point is determined as the target starting path point corresponding to the current position.
4. The method according to claim 3, characterized in that The determining, based on the angle and the straight-line distance, a target end path point corresponding to the current position includes: comparing the included angle with an angle threshold, and comparing the straight-line distance with a distance threshold; When the included angle is less than or equal to the angle threshold and the straight-line distance is less than or equal to the distance threshold, determining a target end path point corresponding to the current position based on the current position and the forward extension length; When the included angle is greater than the angle threshold, or the straight-line distance is greater than the distance threshold, the historical end path point is determined as the target end path point corresponding to the current position.
5. The method according to claim 4, characterized in that The determining, based on the current position and the forward extension length, a target end path point corresponding to the current position includes: Obtaining the historical matching path point corresponding to the previous adjacent target screening area; Determine the inspection path point closest to the current position in the inspection path corresponding to the inspection and cleaning task as a candidate matching path point; Comparing the running order of the candidate matching path points in the inspection path with the running order of the historical matching path points in the inspection path, and obtaining the inspection path points with the later running order; Determine the inspection path point at the end of the running order as the target matching path point; Based on the target matching path point and the forward extension length, a target end path point corresponding to the current position is determined.
6. The method according to claim 1, characterized in that The step of screening the candidate data set in the candidate sequence based on the target screening area to obtain a target sequence to be cleaned includes: For each candidate data set in the candidate sequence, if a candidate point set in the candidate data set is located within the target screening area, updating the current sequence to be cleaned based on the candidate data set to obtain an updated sequence to be cleaned; For each set of points to be cleaned in the updated sequence to be cleaned, if at least one point to be cleaned in the set of points to be cleaned is located in the cleaned area, obtaining a field of view identifier corresponding to the set of points to be cleaned; When the field of view identifier corresponding to the set of points to be cleaned is the first field of view identifier, the points to be cleaned located in the cleaned area are removed from the set of points to be cleaned to obtain a target sequence to be cleaned; the first field of view identifier indicates that the objects to be cleaned corresponding to the set of points to be cleaned are outside the field of view of the cleaning robot.
7. A cleaning device, characterized in that: The device is used for a cleaning robot and comprises: An acquisition module is used to obtain the current mode and current position of the cleaning robot during a patrol cleaning task; A first determining module is configured to determine a target starting path point and a target ending path point corresponding to the current position based on the current mode and the current position; A second determining module is configured to determine a target screening area corresponding to the current position based on the target starting path point and the target ending path point; A screening module, configured to screen the candidate data set in the candidate sequence based on the target screening area to obtain a target sequence to be cleaned; The cleaning module is used to clean the object to be cleaned corresponding to the set of points to be cleaned in the target sequence to be cleaned.
8. A cleaning robot comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Inspection cleaning method, device and equipment and storage medium
CN115933685A
Dynamic full-coverage path planning method and device, cleaning equipment and storage medium
CN116700235A
Cleaning method of cleaning robot and cleaning robot
CN118021206A
Cleaning robot control method, and processing, generation, area division and exploration method, device and system
WO2024021111A1