Cleaning method, device, cleaning robot and computer-readable storage medium
By detecting environmental data, judging the channel width and height, and choosing the appropriate strategy for cleaning, the problem of sweeping robots stuck in narrow areas is solved, and the cleaning success rate and probability of getting out of trouble is improved.
Patent Information
- Application Number
- CN202210859833.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-07-21
AI Technical Summary
Existing sweeping robots are easily stuck in narrow areas, making it difficult to clean and get out of trouble smoothly.
By detecting environmental data, judging the width and height of the channel, selecting the corresponding strategy to enter and exit the channel, ensuring the successful cleaning and reducing the probability of stuck.
It improves the success rate and probability of clearing the sweeping robot in narrow areas, ensuring that the channels can be cleaned smoothly and reducing the risk of getting out.
Smart Images

Figure CN115177186B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of sweeping robots, and in particular to a cleaning method, a device, a sweeping robot, and a computer-readable storage medium. Background Art
[0002] Nowadays, in addition to the round shape, sweepers also come in non-circular shapes such as square and D-shaped.
[0003] Due to their different shapes, non-circular sweepers (such as square sweepers) and circular sweepers usually have different sweeping strategies when performing sweeping tasks. For example, when sweeping a narrow area, a circular sweeper can exit the narrow area by repeatedly colliding, while a non-circular sweeper is prone to getting stuck in the narrow area during repeated collisions. Summary of the invention
[0004] The embodiments of the present application provide a cleaning method, a device, a cleaning robot and a computer-readable storage medium to solve the problem that the cleaning robot is easily stuck in the passage in the existing method.
[0005] In a first aspect, an embodiment of the present application provides a cleaning method, which is applied to a sweeping robot, comprising:
[0006] Detecting environmental data in front of the sweeping robot within a preset distance;
[0007] Determine whether there is a passage around the sweeping robot according to the environmental data;
[0008] When there is a passage around the cleaning robot, determining a width of the passage;
[0009] Determine whether the width of the channel is greater than the body width of the cleaning robot, where the body width is the size of the body perpendicular to the forward direction of the cleaning robot;
[0010] If the width of the passage is greater than the width of the body of the cleaning robot, controlling the cleaning robot to enter the passage and clean the passage;
[0011] determining a height of the passage;
[0012] A corresponding strategy is selected according to the width of the channel or the height of the channel, and the channel is moved out according to the selected strategy.
[0013] In a second aspect, an embodiment of the present application provides a cleaning device, which is applied to a sweeping robot, comprising:
[0014] An environmental data detection module, used to detect environmental data in front of the sweeping robot within a preset distance;
[0015] A channel detection module, used for determining whether there is a channel around the sweeping robot according to the environmental data;
[0016] A channel width determination module, used to determine the width of the channel when there is a channel around the cleaning robot;
[0017] A channel width comparison module, used to determine whether the channel width is greater than the body width of the sweeping robot;
[0018] A cleaning module, configured to control the cleaning robot to enter the channel and clean the channel if the width of the channel is greater than the width of the cleaning robot body;
[0019] A channel height determination module, used to determine the height of the channel;
[0020] A strategy selection module is used to select a corresponding strategy according to the width of the channel or the height of the channel, and move out of the channel according to the selected strategy.
[0021] In a third aspect, an embodiment of the present application provides a sweeping robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.
[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0023] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0024] In the embodiment of the present application, when the sweeping robot determines that its body width is smaller than the width of the passage, it will enter the passage to clean, so that the passage can be cleaned smoothly, thereby improving the success rate of the sweeping robot in performing the cleaning task. In addition, when the width of the passage is large enough, the sweeping robot can smoothly move out of the passage, and when the height of the passage is low enough, the sweeping robot can also smoothly move out of the passage. Therefore, selecting a corresponding strategy to move out of the passage according to the width or height of the passage can increase the probability of the sweeping robot moving out of the passage, that is, it can reduce the probability of the sweeping robot escaping from the passage. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0026] Figure 1is a flow chart of a cleaning method provided by an embodiment of the present application;
[0027] Figure 2 is a schematic diagram of a body width and a forward direction of a sweeping robot provided by an embodiment of the present application;
[0028] Figure 3 This is a schematic diagram of projection of lasers from line structured light sensors installed on the left and right sides of a sweeping robot on a flat ground provided by an embodiment of the present application;
[0029] Figure 4 is a schematic diagram of point cloud data with jumps provided by an embodiment of the present application;
[0030] Figure 5 is a schematic diagram of calculating the width of a channel of a non-circular sweeping robot provided in an embodiment of the present application;
[0031] Figure 6 It is a structural schematic diagram of a cleaning device provided in one embodiment of the present application;
[0032] Figure 7 It is a schematic diagram of the framework of a sweeping robot provided in one embodiment of the present application. DETAILED DESCRIPTION
[0033] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0034] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0035] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0036] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0037] References to "one embodiment" or "some embodiments" etc. described in the specification of the present application mean that one or more embodiments of the present application include a particular feature, structure or characteristic described in conjunction with the embodiment. That is, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in the specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0038] Embodiment 1:
[0039] When a sweeping robot performs a sweeping task, it may encounter a situation where the sweeping area is a narrow area. Since the sweeping robot itself has a certain width and it is difficult for the sweeping robot to change its posture as arbitrarily as a human, the sweeping robot is likely to get stuck when entering a narrow area.
[0040] In order to increase the probability of a sweeping robot escaping from a narrow area, an embodiment of the present application provides a cleaning method, which is applied to a sweeping robot. Specifically, when the sweeping robot determines that there is a passage around it, it will determine the width of the passage and compare the width of the passage with its own body width. When it is determined that the width of the passage is greater than the width of its own body, the sweeping robot will enter the passage and clean the passage. When the cleaning is completed, the sweeping robot will select a corresponding strategy according to the width and height of the passage to move out of the passage.
[0041] The cleaning method provided in the embodiment of the present application is described below in conjunction with the accompanying drawings.
[0042] Figure 1 A flow chart of a cleaning method provided in an embodiment of the present application is shown. The cleaning method is applied to a sweeping robot. The shape of the sweeping robot may be circular or non-circular. In the embodiment of the present application, a non-circular sweeping robot is mainly used as an example for description, and the details are as follows:
[0043] Step S11, detecting environmental data within a preset distance from the cleaning robot in front.
[0044] Specifically, during the movement of the sweeping robot, the sweeping robot will detect environmental data within a preset distance range from the sweeping robot in its forward direction. The environmental data refers to data that can reflect at least one of the following information: the flatness of the ground, whether there are obstacles on the ground, and if there are obstacles, the location of the obstacles, etc.
[0045] In some embodiments, the preset distance can be determined based on the body width of the sweeping robot and the current moving speed of the sweeping robot. For example, when the body width is larger, the preset distance is set larger, and when the moving speed of the sweeping robot is larger, the preset distance is also set larger. In some embodiments, the preset distance can be set in direct proportion to the target sum, which is the sum of the numerical value of the body width and the numerical value of the moving speed. Since the larger the target sum, the greater the distance the sweeping robot moves in a period of time, therefore, by setting a larger preset distance to obtain environmental data in a larger range, the timeliness of determining whether there is a channel can be improved.
[0046] Step S12: determining whether there is a passage around the cleaning robot according to the environmental data.
[0047] Among them, when there is a U-shaped (or similar U-shaped) area around the sweeping robot, that is, there are at least three sides (such as the left side, the right side and the front) in an area whose heights are higher than the ground, it indicates that there is a passage around the sweeping robot.
[0048] Step S13, when there is a channel around the cleaning robot, determine the width of the channel.
[0049] The width of the channel here mainly refers to the width at the entrance of the channel, so as to determine whether it is possible to enter the channel for cleaning later.
[0050] In the embodiment of the present application, the distance between two positions on the same horizontal line in two sides of the channel (two opposite sides) (such as two positions at the entrance of the channel) is calculated, and the distance is used as the width of the channel.
[0051] Step S14, determining whether the width of the passage is greater than the body width of the cleaning robot, where the body width is the size of the body perpendicular to the forward direction of the cleaning robot.
[0052] Among them, the body width and the moving direction of the sweeping robot are as follows Figure 2 shown.
[0053] Step S15: if the width of the passage is greater than the body width of the cleaning robot, control the cleaning robot to enter the passage and clean the passage.
[0054] In the embodiment of the present application, when the sweeping robot determines that it can enter the passage (ie, the body width of the robot is smaller than the width of the passage), it will enter the passage and clean the passage.
[0055] It should be pointed out that the embodiment of the present application enters the channel after determining that the width of the channel is greater than the width of the fuselage, rather than entering the channel only after determining that the width of the channel is greater than the diameter of the circumscribed circle of the fuselage.
[0056] Step S16, determining the height of the above-mentioned channel.
[0057] Specifically, the height of each side of the channel can be calculated respectively, and the lowest value is used as the height of the channel. For example, assuming that the heights of the three sides of the channel are 5 cm, 6 cm and 7 cm respectively, the height of the channel is 5 cm.
[0058] In some embodiments, the heights of the sides of the passage whose length is greater than the diameter of the circumscribed circle of the sweeping robot are calculated respectively, and the minimum value of these heights is used as the height of the passage. Since the sweeping robot is more stable when crossing the side whose length is greater than the diameter of the circumscribed circle of the sweeping robot than when crossing the side whose length is not greater than the diameter of the circumscribed circle of the sweeping robot, therefore, using the minimum value of the height of the side whose length is greater than the diameter of the circumscribed circle of the sweeping robot as the height of the passage is beneficial to the stability of the sweeping robot when crossing the passage from the side when it is determined that the height of the passage is less than its obstacle crossing height.
[0059] Step S17, selecting a corresponding strategy according to the width of the channel or the height of the channel, and moving out of the channel according to the selected strategy.
[0060] After analyzing the channel, the inventor of the present application concluded that the sweeping robot can be moved out from the entrance of the channel, or can flip out from one side of the channel. Therefore, selecting a strategy for moving out of the channel according to the width or height of the channel can improve the accuracy of the obtained strategy, thereby increasing the probability of the sweeping robot moving out of the channel.
[0061] In the embodiment of the present application, when the sweeping robot determines that its body width is smaller than the width of the passage, it will enter the passage to clean, so that the passage can be cleaned smoothly, thereby improving the success rate of the sweeping robot in performing the cleaning task. In addition, when the width of the passage is large enough, the sweeping robot can smoothly move out of the passage, and when the height of the passage is low enough, the sweeping robot can also smoothly move out of the passage. Therefore, selecting a corresponding strategy to move out of the passage according to the width or height of the passage can increase the probability of the sweeping robot moving out of the passage, that is, it can reduce the probability of the sweeping robot escaping from the passage.
[0062] In some embodiments, a line structured light sensor is installed on the target side of the sweeping robot, and the environmental data includes point cloud data corresponding to the line structured light sensor, wherein the target side is the side opposite to the direction in which the sweeping robot moves along the edge.
[0063] Correspondingly, the above step S12 includes:
[0064] Detect whether there is a jump in the point cloud data corresponding to the above-mentioned line structured light sensor included in the above-mentioned environmental data. If there is a jump in the point cloud data corresponding to the above-mentioned line structured light sensor, and the number of continuous point cloud data with jumps is greater than a preset number threshold, it is determined that there is a channel around the above-mentioned sweeping robot.
[0065] Assuming that the sweeping robot moves along the right wall, that is, the direction of the sweeping robot moving along the edge is to the right, then the target side refers to the side opposite to the right side of the sweeping robot (that is, the left side of the sweeping robot).
[0066] Assume that line structured light sensors are installed on the left and right sides of the sweeping robot respectively. If the sweeping robot runs on a flat surface, the projection of the lasers of the two line structured light sensors on the ground is a straight line. However, if the sweeping robot runs on an uneven surface (such as on a passage), the projection of the lasers of the two line structured light sensors on the ground is no longer a straight line (such as on a passage). Figure 3 As shown in the figure), the corresponding point cloud data will have jumps, such as Figure 4 The transition shown.
[0067] In the embodiment of the present application, after acquiring the point cloud data, the difference in the values of the adjacent point cloud data is calculated. If the obtained difference is greater than the preset difference threshold, it is determined that the corresponding adjacent point cloud data has a jump. Considering that the side of a channel has a certain length, after determining that the adjacent point cloud data has a jump, the number of these adjacent point cloud data with jumps will be counted. If the counted number is large, it is determined that there is a channel around the sweeping robot, that is, the point cloud data jumps because of the existence of the channel, thereby improving the accuracy of the determination result of the existence of the channel.
[0068] In some embodiments, the cleaning robot is equipped with a radar, and the distance between the objects around the cleaning robot and the cleaning robot is obtained by rotating the radar. In this case, the step S13 includes:
[0069] A1. When there is a channel around the sweeping robot, the distance between the radar and two sides of the channel and two angles in the vertical direction of the rays emitted by the radar when obtaining the distances of the two sides of the channel are determined according to the radar.
[0070] A2. Determine the width of the channel according to the distance between the radar and the two sides of the channel and the two obtained angles.
[0071] Specifically, when the line structured light sensor determines that there is a channel around the sweeping robot, the distance between the radar and one side of the channel measured by the installed radar and the angle of the radar's rays in the vertical direction when the distance is obtained are obtained. When the radar continues to rotate, the distance between it and the other side of the channel and the corresponding angle will be measured.
[0072] like Figure 5 As shown in the figure, the laser of the line structured light sensor on the right hits one side of the channel, that is, the projection of the lasers of the left and right line structured light sensors of the sweeping robot is no longer a straight line (but two broken lines in the shape of a roof). At this time, it is determined that there is a channel. The radar obtains the distance between it and the side of the channel closest to the sweeping robot and the vertical angle of the ray emitted by the radar when obtaining the distance. Based on the distance and the angle, the horizontal distance between the radar and the side of the channel closest to the radar can be calculated, that is, Figure 5 As the radar continues to rotate, it will detect the distance between it and the other side of the channel and the corresponding angle (i.e. Figure 5 α in the figure), the horizontal distance between the radar and the other side of the channel can be calculated based on the distance between the radar and the other side of the channel and the corresponding angle, that is, Figure 5 S2 in . (S2-S1) is the width of the channel.
[0073] In the embodiment of the present application, since the line structured light sensor can quickly detect whether there is a channel in front of the sweeping robot, and the radar can quickly detect the distance between the object and the radar, after the line structured light sensor and the radar are installed on the sweeping robot, after judging the existence of the channel through the point cloud data of the line structured light sensor, the distance between the radar and the object can be obtained in time through the point cloud data of the radar, so that the width of the channel can be quickly calculated.
[0074] In some embodiments, the above step S15 includes:
[0075] If the width of the channel is greater than the body width of the sweeping robot and less than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, the sweeping robot is controlled to continue to move forward the first target distance and then rotate 90° in the target direction on the spot to enter the channel and clean the channel, wherein the first target distance is equal to the distance between the radar and the target side of the channel plus half of the width of the channel, the target side of the channel is: the side of the channel closest to the sweeping robot, and the target direction is the direction of the sweeping robot when moving along the edge.
[0076] In the embodiment of the present application, when the sweeping robot is controlled to rotate 90° in the target direction, it can be ensured that the head of the sweeping robot is facing the entrance direction of the channel. Since the first target distance is equal to the distance between the radar and the target side of the channel plus half the width of the channel, it can be ensured that the sweeping robot moves to the center of the channel before rotating, thereby reducing the probability of the sweeping robot colliding with the two sides of the channel when entering the channel.
[0077] In some embodiments, if the width of the channel is greater than the body width of the cleaning robot, step S15 includes:
[0078] If the width of the channel is greater than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, the sweeping robot is controlled to continue to move forward a second target distance and then move along the target side of the channel to enter the channel and clean the channel, wherein the second target distance is the distance between the sweeping robot and the target side of the channel.
[0079] In an embodiment of the present application, when it is determined that the width of the channel is wide, the sweeping robot can turn at the entrance of the channel to enter the channel, that is, there is no need to move to the center of the channel and then rotate 90° to enter the channel, so as to increase the speed of the sweeping robot entering the channel.
[0080] In some embodiments, when the width of the channel is small and the height of the channel is high, the above step S17 includes:
[0081] If the width of the channel is greater than the width of the body of the sweeping robot and less than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, and the height of the channel is greater than the obstacle crossing height of the sweeping robot, then the first strategy is selected and the robot moves out of the channel according to the first strategy, wherein the first strategy is a strategy for controlling the sweeping robot to retreat in a straight line.
[0082] In the embodiment of the present application, when the height of the passage (such as the smallest of the heights of the three sides of the passage) is greater than the obstacle crossing height of the sweeping robot, it indicates that the sweeping robot cannot directly cross the side of the passage, that is, the sweeping robot can only move out of the passage from the entrance of the passage, and at this time, it will retreat straight from the passage according to the track pre-recorded when cleaning the passage. Since the sweeping robot can clean the passage, that is, the sweeping robot will not be stuck in the passage, therefore, retreating straight from the passage according to the track recorded when cleaning the passage can not only save the resources consumed by the sweeping robot in planning the path to move out of the passage, but also increase the speed of the sweeping robot moving out of the passage.
[0083] In some embodiments, when the width of the channel is small but the height of the channel is small, the above step S17 includes:
[0084] If the width of the channel is greater than the width of the body of the sweeping robot and less than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, and the height of the channel is not greater than the obstacle crossing height of the sweeping robot, then the second strategy is selected and the robot moves out of the channel according to the second strategy, wherein the second strategy is a strategy for controlling the sweeping robot to cross the channel.
[0085] In the embodiment of the present application, when the height of the passage is less than or equal to the obstacle crossing height, the sweeping robot will still clean the passage, that is, it will not ignore the passage (the existing sweeping robot will ignore the passage with a height less than the obstacle crossing height, and will not clean the passage). Since the passage with a smaller height will also accumulate some garbage, after cleaning the passage with a smaller height, the cleanliness of the sweeping robot after cleaning can be improved. In addition, since the sweeping robot no longer exits from the entrance of the passage, but crosses out from the side of the passage, the efficiency of the sweeping robot moving out of the passage is saved.
[0086] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0087] Embodiment 2:
[0088] Corresponding to the cleaning method of the above embodiment, Figure 6 A structural block diagram of a cleaning device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0089] The cleaning device 6 is applied to a sweeping robot, and includes: an environment data detection module 61, a channel detection module 62, a channel width determination module 63, a channel width comparison module 64, a cleaning module 65, a channel height determination module 66, and a strategy selection module 67. Among them:
[0090] The environmental data detection module 61 is used to detect environmental data in front of the cleaning robot within a preset distance.
[0091] Specifically, during the movement of the sweeping robot, the sweeping robot will detect environmental data within a preset distance range from the sweeping robot in its forward direction. The environmental data refers to data that can reflect at least one of the following information: the flatness of the ground, whether there are obstacles on the ground, and if there are obstacles, the location of the obstacles, etc.
[0092] In some embodiments, the preset distance can be determined based on the body width of the sweeping robot and the current moving speed of the sweeping robot. For example, when the body width is larger, the preset distance is set larger, and when the moving speed of the sweeping robot is larger, the preset distance is also set larger. In some embodiments, the preset distance can be set in direct proportion to the target sum, which is the sum of the numerical value of the body width and the numerical value of the moving speed. Since the larger the target sum, the greater the distance the sweeping robot moves in a period of time, therefore, by setting a larger preset distance to obtain environmental data in a larger range, the timeliness of determining whether there is a channel can be improved.
[0093] The channel detection module 62 is used to determine whether there is a channel around the cleaning robot according to the environmental data.
[0094] The channel width determination module 63 is used to determine the width of the channel when there is a channel around the cleaning robot.
[0095] The width of the channel here mainly refers to the width at the entrance of the channel, so as to determine whether it is possible to enter the channel for cleaning later.
[0096] In the embodiment of the present application, the distance between two positions on the same horizontal line in two sides of the channel (two opposite sides) (such as two positions at the entrance of the channel) is calculated, and the distance is used as the width of the channel.
[0097] The channel width comparison module 64 is used to determine whether the width of the channel is greater than the body width of the cleaning robot.
[0098] The cleaning module 65 is used to control the cleaning robot to enter the passage and clean the passage if the width of the passage is greater than the width of the cleaning robot.
[0099] In the embodiment of the present application, when the sweeping robot determines that it can enter the passage (ie, the body width of the robot is smaller than the width of the passage), it will enter the passage and clean the passage.
[0100] It should be pointed out that the embodiment of the present application enters the channel after determining that the width of the channel is greater than the width of the fuselage, rather than entering the channel only after determining that the width of the channel is greater than the diameter of the circumscribed circle of the fuselage.
[0101] The channel height determination module 66 is used to determine the height of the channel.
[0102] Specifically, the height of each side of the channel can be calculated respectively, and the lowest value is used as the height of the channel. For example, assuming that the heights of the three sides of the channel are 5 cm, 6 cm and 7 cm respectively, the height of the channel is 5 cm.
[0103] In some embodiments, the heights of the sides of the passage whose length is greater than the diameter of the circumscribed circle of the sweeping robot are calculated respectively, and the minimum value of these heights is used as the height of the passage. Since the sweeping robot has better stability when moving on a flat ground, therefore, using the minimum value of the height of the side whose length is greater than the diameter of the circumscribed circle of the sweeping robot as the height of the passage is conducive to the stability of the sweeping robot when it determines that the height of the passage is less than its obstacle crossing height and crosses the passage from the side.
[0104] The strategy selection module 67 is used to select a corresponding strategy according to the width of the channel or the height of the channel, and move out of the channel according to the selected strategy.
[0105] After analyzing the channel, the inventor of the present application concluded that the sweeping robot can be moved out from the entrance of the channel, or can flip out from one side of the channel. Therefore, selecting a strategy for moving out of the channel according to the width or height of the channel can improve the accuracy of the obtained strategy, thereby increasing the probability of the sweeping robot moving out of the channel.
[0106] In the embodiment of the present application, when the sweeping robot determines that its body width is smaller than the width of the passage, it will enter the passage to clean, so that the passage can be cleaned smoothly, thereby improving the success rate of the sweeping robot in performing the cleaning task. In addition, when the width of the passage is large enough, the sweeping robot can smoothly move out of the passage, and when the height of the passage is low enough, the sweeping robot can also smoothly move out of the passage. Therefore, selecting a corresponding strategy to move out of the passage according to the width or height of the passage can increase the probability of the sweeping robot moving out of the passage, that is, it can reduce the probability of the sweeping robot escaping from the passage.
[0107] In some embodiments, a line structured light sensor is installed on the target side of the cleaning robot, and the environmental data includes point cloud data corresponding to the line structured light sensor, wherein the target side is a side opposite to the direction in which the cleaning robot moves along the edge;
[0108] The channel detection module 62 is specifically used for:
[0109] Detect whether there is a jump in the point cloud data corresponding to the line structured light sensor included in the environmental data. If there is a jump in the point cloud data corresponding to the line structured light sensor, and the number of continuous point cloud data with jumps is greater than a preset number threshold, it is determined that there is a channel around the sweeping robot.
[0110] Assuming that the sweeping robot moves along the right wall, that is, the direction of the sweeping robot moving along the edge is to the right, then the target side refers to the side opposite to the right side of the sweeping robot (that is, the left side of the sweeping robot).
[0111] Assume that line structured light sensors are installed on the left and right sides of the sweeping robot respectively. If the sweeping robot runs on a flat surface, the projection of the lasers of the two line structured light sensors on the ground is a straight line. However, if the sweeping robot runs on an uneven surface (such as on a passage), the projection of the lasers of the two line structured light sensors on the ground is no longer a straight line (such as on a passage). Figure 3 As shown in the figure), the corresponding point cloud data will have jumps, such as Figure 4 The transition shown.
[0112] In the embodiment of the present application, after acquiring the point cloud data, the difference in the values of the adjacent point cloud data is calculated. If the obtained difference is greater than the preset difference threshold, it is determined that the corresponding adjacent point cloud data has a jump. Considering that the side of a channel has a certain length, after determining that the adjacent point cloud data has a jump, the number of these adjacent point cloud data with jumps will be counted. If the counted number is large, it is determined that there is a channel around the sweeping robot, that is, the point cloud data jumps because of the existence of the channel, thereby improving the accuracy of the determination result of the existence of the channel.
[0113] In some embodiments, the cleaning robot is equipped with a radar, and the channel width determination module 63 includes:
[0114] The distance determination unit is used to determine the distance between the radar and the two sides of the channel and the two angles in the vertical direction of the rays emitted by the radar when obtaining the distances of the two sides of the channel according to the radar when there is a channel around the sweeping robot.
[0115] A width determination unit is used to determine the width of the channel according to the distance between the radar and the two sides of the channel and the two obtained angles.
[0116] Specifically, when the line structured light sensor determines that there is a channel around the sweeping robot, the distance between the radar and one side of the channel measured by the installed radar and the angle of the radar's rays in the vertical direction when the distance is obtained are obtained. When the radar continues to rotate, the distance between it and the other side of the channel and the corresponding angle will be measured.
[0117] In the embodiment of the present application, since the line structured light sensor can quickly detect whether there is a channel in front of the sweeping robot, and the radar can quickly detect the distance between the object and the radar, after the line structured light sensor and the radar are installed on the sweeping robot, after judging the existence of the channel through the point cloud data of the line structured light sensor, the distance between the radar and the object can be obtained in time through the point cloud data of the radar, so that the width of the channel can be quickly calculated.
[0118] In some embodiments, the cleaning module 65 is specifically used to:
[0119] If the width of the channel is greater than the body width of the sweeping robot and less than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, the sweeping robot is controlled to continue to move forward the first target distance and then rotate 90° in the target direction to enter the channel and clean the channel, wherein the first target distance is equal to the distance between the radar and the target side of the channel plus half the width of the channel, the target side of the channel is: the side of the channel closest to the sweeping robot, and the target direction is the direction of the sweeping robot when moving along the edge.
[0120] In the embodiment of the present application, when the sweeping robot is controlled to rotate 90° in the target direction, it can be ensured that the head of the sweeping robot is facing the entrance direction of the channel. Since the first target distance is equal to the distance between the radar and the target side of the channel plus half the width of the channel, it can be ensured that the sweeping robot moves to the center of the channel before rotating, thereby reducing the probability of the sweeping robot colliding with the two sides of the channel when entering the channel.
[0121] In some embodiments, the cleaning module 65 is specifically used to:
[0122] If the width of the channel is greater than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, the sweeping robot is controlled to continue to move forward a second target distance and then move along the target side of the channel to enter the channel and clean the channel, wherein the second target distance is the distance between the sweeping robot and the target side of the channel.
[0123] In an embodiment of the present application, when it is determined that the width of the channel is wide, the sweeping robot can turn at the entrance of the channel to enter the channel, that is, there is no need to move to the center of the channel and then rotate 90° to enter the channel, so as to increase the speed of the sweeping robot entering the channel.
[0124] In some embodiments, the strategy selection module 67 is specifically used to:
[0125] If the width of the channel is greater than the width of the body of the sweeping robot and less than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, and the height of the channel is greater than the obstacle crossing height of the sweeping robot, a first strategy is selected and the robot moves out of the channel according to the first strategy, wherein the first strategy is a strategy for controlling the sweeping robot to retreat in a straight line.
[0126] In the embodiment of the present application, when the height of the passage (such as the smallest of the heights of the three sides of the passage) is greater than the obstacle crossing height of the sweeping robot, it indicates that the sweeping robot cannot directly cross the side of the passage, that is, the sweeping robot can only move out of the passage from the entrance of the passage, and at this time, it will retreat straight from the passage according to the track pre-recorded when cleaning the passage. Since the sweeping robot can clean the passage, that is, the sweeping robot will not be stuck in the passage, therefore, retreating straight from the passage according to the track recorded when cleaning the passage can not only save the resources consumed by the sweeping robot in planning the path to move out of the passage, but also increase the speed of the sweeping robot moving out of the passage.
[0127] In some embodiments, the strategy selection module 67 is specifically used to:
[0128] If the width of the channel is greater than the width of the body of the sweeping robot and less than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, and the height of the channel is not greater than the obstacle crossing height of the sweeping robot, a second strategy is selected and the robot moves out of the channel according to the second strategy, wherein the second strategy is a strategy for controlling the sweeping robot to cross the channel.
[0129] In the embodiment of the present application, when the height of the passage is less than or equal to the obstacle crossing height, the sweeping robot will still clean the passage, that is, it will not ignore the passage (the existing sweeping robot will ignore the passage with a height less than the obstacle crossing height, and will not clean the passage). Since the passage with a smaller height will also accumulate some garbage, after cleaning the passage with a smaller height, the cleanliness of the sweeping robot after cleaning can be improved. In addition, since the sweeping robot no longer exits from the entrance of the passage, but crosses out from the side of the passage, the efficiency of the sweeping robot moving out of the passage is saved.
[0130] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0131] Embodiment three:
[0132] Figure 7 This is a schematic diagram of the structure of a sweeping robot provided by an embodiment of the present application. Figure 7 As shown, the cleaning robot 7 of this embodiment includes: at least one processor 70 ( Figure 7 Only one processor is shown in the figure), a memory 71, and a computer program 72 stored in the memory 71 and executable on at least one processor 70. When the processor 70 executes the computer program 72, the steps in any one of the above method embodiments are implemented.
[0133] The cleaning robot 7 may be a non-circular cleaning robot, which includes, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 7 It is only an example of the sweeping robot 7 and does not constitute a limitation on the sweeping robot 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. In a scenario, it may also include input and output devices, network access devices, etc.
[0134] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0135] In some embodiments, the memory 71 may be an internal storage unit of the sweeping robot 7, such as a hard disk or memory of the sweeping robot 7. In other embodiments, the memory 71 may also be an external storage device of the sweeping robot 7, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the sweeping robot 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the sweeping robot 7. The memory 71 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of computer programs. The memory 71 may also be used to temporarily store data that has been output or is to be output.
[0136] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0137] An embodiment of the present application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.
[0138] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0139] An embodiment of the present application provides a computer program product. When the computer program product runs on a sweeping robot, the sweeping robot can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0140] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0141] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0142] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0143] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A cleaning method, characterized in that: Applied to sweeping robots, including: Detecting environmental data in front of the sweeping robot within a preset distance; Determine whether there is a passage around the sweeping robot according to the environmental data; When there is a passage around the cleaning robot, determining a width of the passage; Determine whether the width of the channel is greater than the body width of the cleaning robot, where the body width is the size of the body perpendicular to the forward direction of the cleaning robot; If the width of the passage is greater than the width of the body of the cleaning robot, controlling the cleaning robot to enter the passage and clean the passage; determining a height of the passage; Selecting a corresponding strategy according to the width of the channel or the height of the channel, and moving out of the channel according to the selected strategy; A line structured light sensor is installed on the target side of the sweeping robot, and the environmental data includes point cloud data corresponding to the line structured light sensor, wherein the target side is a side opposite to the direction in which the sweeping robot moves along the edge, and if the sweeping robot runs on a flat ground, the projection of the laser of the line structured light sensor on the ground is a straight line, and if the sweeping robot runs on an uneven ground, the projection of the laser of the line structured light sensor on the ground is no longer a straight line; The determining, according to the environmental data, whether there is a passage around the sweeping robot includes: Detect whether there is a jump in the point cloud data corresponding to the line structured light sensor included in the environmental data. If there is a jump in the point cloud data corresponding to the line structured light sensor, and the number of continuous point cloud data with jumps is greater than a preset number threshold, determine that there is a channel around the sweeping robot, wherein the point cloud data is detected to have a jump in the following manner: calculate the difference in values of adjacent point cloud data, and if the obtained difference is greater than a preset difference threshold, determine that the corresponding adjacent point cloud data has a jump.
2. The cleaning method according to claim 1, characterized in that: The sweeping robot is equipped with a radar, and when there is a channel around the sweeping robot, determining the width of the channel includes: When there is a channel around the cleaning robot, the distance between the radar and two sides of the channel and two included angles of the rays emitted by the radar in the vertical direction when obtaining the distances of the two sides of the channel are determined according to the radar; The width of the channel is determined according to the distance between the radar and the two sides of the channel and the two obtained angles.
3. The cleaning method according to claim 2, characterized in that: If the width of the passage is greater than the width of the body of the cleaning robot, controlling the cleaning robot to enter the passage and clean the passage comprises: If the width of the channel is greater than the body width of the sweeping robot and less than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, the sweeping robot is controlled to continue to move forward the first target distance and then rotate 90° in the target direction to enter the channel and clean the channel, wherein the first target distance is equal to the distance between the radar and the target side of the channel plus half the width of the channel, the target side of the channel is: the side of the channel closest to the sweeping robot, and the target direction is the direction of the sweeping robot when moving along the edge.
4. The cleaning method according to claim 2, characterized in that: If the width of the passage is greater than the width of the body of the cleaning robot, controlling the cleaning robot to enter the passage and clean the passage comprises: If the width of the channel is greater than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, the sweeping robot is controlled to continue to move forward a second target distance and then move along the target side of the channel to enter the channel and clean the channel, wherein the second target distance is the distance between the sweeping robot and the target side of the channel.
5. The cleaning method according to any one of claims 1 to 4, characterized in that: The selecting a corresponding strategy according to the width of the channel or the height of the channel, and moving out of the channel according to the selected strategy, includes: If the width of the channel is greater than the width of the body of the sweeping robot and less than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, and the height of the channel is greater than the obstacle crossing height of the sweeping robot, a first strategy is selected and the robot moves out of the channel according to the first strategy, wherein the first strategy is a strategy for controlling the sweeping robot to retreat in a straight line.
6. The cleaning method according to any one of claims 1 to 4, characterized in that: The selecting a corresponding strategy according to the width of the channel or the height of the channel, and moving out of the channel according to the selected strategy, includes: If the width of the channel is greater than the width of the body of the sweeping robot and less than or equal to the diameter of the circumscribed circle of the body of the sweeping robot, and the height of the channel is not greater than the obstacle crossing height of the sweeping robot, a second strategy is selected and the robot moves out of the channel according to the second strategy, wherein the second strategy is a strategy for controlling the sweeping robot to cross the channel.
7. A cleaning device, characterized in that: Applied to sweeping robots, including: An environmental data detection module, used to detect environmental data in front of the sweeping robot within a preset distance; A channel detection module, used for determining whether there is a channel around the sweeping robot according to the environmental data; A channel width determination module, used to determine the width of the channel when there is a channel around the cleaning robot; A channel width comparison module, used to determine whether the channel width is greater than the body width of the sweeping robot; A cleaning module, configured to control the cleaning robot to enter the channel and clean the channel if the width of the channel is greater than the width of the cleaning robot body; A channel height determination module, used to determine the height of the channel; A strategy selection module, used to select a corresponding strategy according to the width of the channel or the height of the channel, and move out of the channel according to the selected strategy; A line structured light sensor is installed on the target side of the sweeping robot, and the environmental data includes point cloud data corresponding to the line structured light sensor, wherein the target side is a side opposite to the direction in which the sweeping robot moves along the edge, and if the sweeping robot runs on a flat ground, the projection of the laser of the line structured light sensor on the ground is a straight line, and if the sweeping robot runs on an uneven ground, the projection of the laser of the line structured light sensor on the ground is no longer a straight line; The channel detection module is specifically used for: Detect whether there is a jump in the point cloud data corresponding to the line structured light sensor included in the environmental data. If there is a jump in the point cloud data corresponding to the line structured light sensor, and the number of continuous point cloud data with jumps is greater than a preset number threshold, determine that there is a channel around the sweeping robot, wherein the point cloud data is detected to have a jump in the following manner: calculate the difference in values of adjacent point cloud data, and if the obtained difference is greater than a preset difference threshold, determine that the corresponding adjacent point cloud data has a jump.
8. A sweeping robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
