Obstacle detection method and cleaning robot

By controlling the detection sensor on the cleaning robot to detect in different location areas, obtaining detection data and analyzing differences, the problem of inconsistent detection of obstacles during navigation by cleaning robots is solved, and the accuracy of detection is improved.

CN120214825APending Publication Date: 2025-06-27ANKER INNOVATIONS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311798028.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2025-06-27

Smart Images

  • Figure CN120214825A_ABST
    Figure CN120214825A_ABST
Patent Text Reader

Abstract

The invention relates to an obstacle detection method and a cleaning robot, the method is applied to the cleaning robot, the cleaning robot comprises a detection sensor, and the method comprises the steps that the detection sensor is controlled to carry out detection in a first position area to obtain first detection data; the detection sensor is controlled to carry out detection in a second position area to obtain second detection data, and the first relative distance between the first position area and the target area is smaller than the second relative distance between the second position area and the target area; and according to the difference between the first detection data and the second detection data, determining whether an obstacle existing in the target area can pass. By adopting the method, the obstacle detection accuracy of the cleaning robot can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of smart home devices, and particularly to an obstacle detection method and a cleaning robot. Background Art

[0002] With the development of smart home device technology, obstacle detection technology has emerged. According to the obstacle detection technology, a cleaning robot can detect whether there are obstacles nearby.

[0003] In traditional technology, a cleaning robot emits detection rays in all directions through a detection sensor, and then determines whether there are obstacles in the coverage area of the detection sensor according to the return value of the detection rays.

[0004] However, when detecting obstacles through a detection sensor, there are often situations where after the robot detects an obstacle in the target area, if the cleaning robot moves a certain distance relative to the obstacle, the detection sensor can no longer detect the obstacle. That is, during the navigation movement of the cleaning robot, the same area may sometimes detect an obstacle and sometimes not detect an obstacle, and the accuracy of obstacle detection is questionable. Summary of the Invention

[0005] Based on this, in view of the above technical problems, it is necessary to provide an obstacle detection method, device and cleaning robot that can improve the accuracy of obstacle detection of the cleaning robot.

[0006] In a first aspect, the present application provides an obstacle detection method applied to a cleaning robot, and the cleaning robot includes a detection sensor. The method includes:

[0007] Controlling the detection sensor to detect in a first position area to obtain first detection data;

[0008] Controlling the detection sensor to detect in a second position area to obtain second detection data, where the first relative distance between the first position area and the target area is less than the second relative distance between the second position area and the target area;

[0009] Determining whether the obstacles existing in the target area are passable according to the difference between the first detection data and the second detection data.

[0010] In a second aspect, the present application further provides an obstacle detection device applied to a cleaning robot, and the cleaning robot includes a detection sensor. The device includes:

[0011] A first detection module, configured to control the detection sensor to detect in a first position area to obtain first detection data.

[0012] A second detection module, configured to control the detection sensor to perform detection in a second position area to obtain second detection data, where a first relative distance between a first position area and a target area is less than a second relative distance between the second position area and the target area.

[0013] A detection module, configured to determine whether an obstacle existing in the target area is passable according to a difference between the first detection data and the second detection data.

[0014] In a third aspect, the present application further provides a cleaning robot. The cleaning robot includes a body, a driving component, a cleaning component, a detection sensor, a memory, and a processor. The driving component, the cleaning component, and the detection sensor are all mounted on the body. The driving component is configured to drive the body to move on a working surface. The cleaning component is configured to clean the working surface. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0015] Control the detection sensor to perform detection in a first position area to obtain first detection data; control the detection sensor to perform detection in a second position area to obtain second detection data, where a first relative distance between the first position area and the target area is less than a second relative distance between the second position area and the target area; determine whether an obstacle existing in the target area is passable according to a difference between the first detection data and the second detection data.

[0016] For the above obstacle detection method and cleaning robot, by controlling the detection sensor to perform detection in the first position area to obtain the first detection data, and controlling the detection sensor to perform detection in the second position area to obtain the second detection data, where the first relative distance between the first position area and the target area is less than the second relative distance between the second position area and the target area, it is possible to control the cleaning robot to detect the target area at a distance and nearby in the target area respectively. Since the detection ray of the detection sensor has a certain elevation angle relative to the horizontal line, according to this difference between the first detection data and the second detection data, that is, whether the detection ray of the detection sensor hits the target area at a distance and penetrates the target area nearby, or penetrates the target area at a distance and hits the target area nearby, it is possible to identify whether the obstacle in the target area is passable, thereby achieving accurate identification of the obstacle and avoiding the situation that in the process of navigation and movement of the cleaning robot, the same area may sometimes detect an obstacle and sometimes not detect an obstacle. Therefore, the accuracy of obstacle detection of the cleaning robot can be improved. Description of the Drawings

[0017] Figure 1Schematic diagram of a lidar emitting laser light near and far from a passable obstacle in an embodiment;

[0018] Figure 2 Schematic diagram of a lidar emitting laser light near and far from an impassable obstacle in an embodiment;

[0019] Figure 3 Flow schematic diagram of an obstacle detection method in an embodiment;

[0020] Figure 4 Flow schematic diagram of detecting whether an obstacle existing in a target area is passable in an embodiment;

[0021] Figure 5 Structural block diagram of an obstacle detection device in an embodiment;

[0022] Figure 6 Internal structure diagram of a cleaning robot in an embodiment. Detailed implementation manners

[0023] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0024] Currently, a cleaning robot emits detection rays in all directions through a detection sensor, and then determines whether there is an obstacle in the coverage area of the detection sensor according to the return value of the detection rays. However, when detecting an obstacle through the detection sensor, there is often a situation where after the robot detects an obstacle in the target area, if the cleaning robot moves a certain distance relative to the obstacle, the detection sensor can no longer detect the obstacle, that is, during the navigation movement of the cleaning robot, the same area may sometimes detect an obstacle and sometimes not detect an obstacle, and the accuracy of obstacle detection is questionable.

[0025] Furthermore, in order to prevent the detection rays emitted by the detection sensor from hitting the ground, thereby affecting the accuracy of obstacle detection, currently, the emission angle of the detection rays of the detection sensor is usually adjusted upward by a certain angle, so that the detection rays of the detection sensor form a certain elevation angle with the horizontal line. In this way, for a passable obstacle, the detection rays emitted by the detection sensor at a long distance are not likely to hit the obstacle, and the detection rays emitted by the detection sensor at a short distance are likely to hit the obstacle; for an impassable obstacle, the detection rays emitted by the detection sensor at a long distance are likely to hit the obstacle, and the detection rays emitted by the detection sensor at a short distance are not likely to hit the obstacle.

[0026] As an example, the detection sensor can be a lidar, and the emitted detection ray can be a laser; the detection sensor can also be a structured light sensor, and the emitted detection ray can be structured light.

[0027] As an example, as Figure 1 and Figure 2 shown, the detection sensor can protrude from the upper cover of the cleaning robot to achieve 360° detection of the surrounding environment and improve work efficiency; in other embodiments, the detection sensor can also be embedded inside the body of the cleaning robot, that is, below the upper cover of the cleaning robot, to achieve detection of the environment within a large angle range in the front side.

[0028] As an example, an impassable obstacle refers to an obstacle whose upper surface height is approximately the same as the height of the cleaning robot, and the cleaning robot cannot cross these obstacles by itself; a passable obstacle refers to an obstacle whose lower surface height is approximately the same as the height of the cleaning robot, and the cleaning robot can pass through the target area where the obstacle is located. For example, a passable obstacle can be a sofa, a bed, a cabinet, etc. that has a certain distance from the ground. A passable obstacle can be simply understood as an obstacle through which the cleaning robot can smoothly enter and exit the bottom space without being stuck.

[0029] As an example, as Figure 1 shown, the detection sensor is a lidar, Figure 1 FIG. is a schematic diagram of the lidar emitting laser at the near and far positions of a passable obstacle. Since the position where the lidar emits the laser is slightly lower than the height of the cleaning robot (the height of the cleaning robot mentioned here refers to the ground clearance of the upper surface of the lidar protection cover of the cleaning robot), and the laser emitted by the lidar forms a certain elevation angle with the horizontal line. When the cleaning robot is relatively close to the passable obstacle, the laser emitted by the lidar will pass through the target area where the passable obstacle is located. At this time, the detection result of the lidar indicates that the target area is passable; when the cleaning robot is relatively far from the passable obstacle, the laser emitted by the lidar will hit the passable obstacle. At this time, the detection result of the lidar indicates that the target area is impassable.

[0030] As an example, as Figure 2 shown, the detection sensor is a lidar, Figure 2Schematic diagram of a lidar emitting laser light near and far from an impassable obstacle. Since the position where the lidar emits laser light is slightly lower than the height of the cleaning robot, and the laser light emitted by the lidar forms a certain elevation angle with the horizontal line, when the cleaning robot is relatively close to a passable obstacle, the laser light emitted by the lidar will hit the impassable obstacle. At this time, the detection result of the lidar indicates that the target area is impassable; when the cleaning robot is relatively far from the impassable obstacle, the laser light emitted by the lidar will pass through the target area where the passable obstacle is located. At this time, the detection result of the lidar indicates that the target area is passable.

[0031] Among them, Figure 1 and Figure 2 the equal-height obstacles in refer to obstacles whose height is approximately the same as the height of the cleaning robot's body; ordinary obstacles refer to obstacles whose height difference from the height of the cleaning robot's body is greater than a preset difference threshold; the above-mentioned impassable obstacles include impassable equal-height obstacles and ordinary obstacles, and the above-mentioned passable obstacles include passable equal-height obstacles.

[0032] In one embodiment, as Figure 3 shown, an obstacle detection method is provided. In this embodiment, this method is exemplified by being applied to a cleaning robot. The cleaning robot includes a detection sensor. In this embodiment, the method includes the following steps:

[0033] Step 202, control the detection sensor to detect in the first position area to obtain first detection data.

[0034] Step 204, control the detection sensor to detect in the second position area to obtain second detection data, where the first relative distance between the first position area and the target area is less than the second relative distance between the second position area and the target area.

[0035] Among them, the first position area is an area relatively close to the target area, and the relative distance between any position point in the first position area and the target area is greater than a preset distance. At this time, it is considered that the cleaning robot is near the target area; the second position area is an area relatively far from the target area, and the relative distance between any position point in the second position area and the target area is less than or equal to the preset distance. At this time, it is considered that the cleaning robot is far from the target area.

[0036] It should be noted that the cleaning robot will control the detection sensor to emit detection rays around while moving. Therefore, during the movement of the cleaning robot, detection data at different distances from the cleaning robot to the target area can be obtained, specifically including the first detection data obtained when the cleaning robot is in the first position area and the second detection data obtained when the cleaning robot is in the second position area. In this embodiment, the target area can be any position area in the working space of the cleaning robot. The target area does not specifically refer to a specific position area in the working space of the cleaning robot. Therefore, the above cleaning robot can control the detection sensor to detect any position area in the working space, rather than specifically controlling the detection sensor to detect a certain specific position area.

[0037] Furthermore, since the detection rays emitted by the detection sensor form a certain elevation angle with the horizontal line, when the cleaning robot is in the first position area, if there is a passable obstacle in the target area, the detection rays emitted by the detection sensor will pass through the target area. If there is an impassable obstacle in the target area, the detection rays emitted by the detection sensor will hit the obstacle, that is, they will not pass through the target area. When the cleaning robot is in the second position area, if there is a passable obstacle in the target area, the detection rays emitted by the detection sensor will hit the obstacle, that is, they will not pass through the target area. If there is an impassable obstacle in the target area, the detection rays emitted by the detection sensor will pass through the target area.

[0038] As an example, steps 202 to 204 include: controlling the cleaning robot to move and controlling the detection sensor to detect obstacles; obtaining the detection return value of the detection sensor when the cleaning robot is in the first position area as the first detection data, and obtaining the detection return value of the detection sensor when the cleaning robot is in the second position area as the second detection data, where the first relative distance between the first position area and the target area is less than the second relative distance between the second position area and the target area.

[0039] As an example, the detection return value is the detection data generated by the detection sensor by emitting detection rays and receiving the reflected detection rays. The detection return value can indicate whether there is an obstacle in the emission direction of the detection rays, and indicate the interval distance between the obstacle and the cleaning robot when there is an obstacle. This interval distance can be determined according to the interval time between the detection sensor emitting the detection rays and receiving the detection rays.

[0040] Step 206, according to the difference between the first detection data and the second detection data, detect whether the obstacle existing in the target area is passable.

[0041] Among them, if there is no difference between the first detection data and the second detection data, it indicates that there is no obstacle in the direction of the detection ray emission, and the detection return value of the detection sensor will not change with the movement of the cleaning robot, which will not affect the accuracy of the detection sensor for normal obstacle detection; if there is a difference between the first detection data and the second detection data, it indicates that there is an obstacle in the direction of the detection ray emission, and the detection return value of the detection sensor will change with the movement of the cleaning robot, which will affect the accuracy of the detection sensor for normal obstacle detection.

[0042] As an example, step 206 includes: detecting whether there is a difference between the first detection data and the second detection data; if there is no difference between the first detection data and the second detection data, it indicates that there is no obstacle in the target area; if there is a difference between the first detection data and the second detection data, then according to the difference between the first detection data and the second detection data, detecting whether the obstacle existing in the target area is passable.

[0043] In one embodiment, detecting whether the obstacle existing in the target area is passable according to the difference between the first detection data and the second detection data includes:

[0044] If the first detection data indicates that there is an obstacle in the target area and the second detection data indicates that there is no obstacle in the target area, it is determined that the obstacle existing in the target area is not passable; if the first detection data indicates that there is no obstacle in the target area and the second detection data indicates that there is an obstacle in the target area, it is determined that the obstacle existing in the target area is passable.

[0045] Specifically, according to the first detection data, it is determined whether the detection ray emitted by the detection sensor in the first position area passes through the target area. If the detection ray emitted by the detection sensor in the first position area passes through the target area, it is considered that the first detection data indicates that there is an obstacle in the target area. If the detection ray emitted by the detection sensor in the first position area does not pass through the target area, it is considered that the first detection data indicates that there is no obstacle in the target area; according to the second detection data, it is determined whether the detection ray emitted by the detection sensor in the second position area passes through the target area. If the detection ray emitted by the detection sensor in the second position area passes through the target area, it is considered that the second detection data indicates that there is an obstacle in the target area. If the detection ray emitted by the detection sensor in the second position area does not pass through the target area, it is considered that the second detection data indicates that there is no obstacle in the target area; if the first detection data indicates that there is an obstacle in the target area and the second detection data indicates that there is no obstacle in the target area, it is determined that the obstacle existing in the target area is an impassable obstacle; if the first detection data indicates that there is no obstacle in the target area and the second detection data indicates that there is an obstacle in the target area, it is determined that the obstacle existing in the target area is a passable obstacle.

[0046] In the above obstacle detection method, the detection sensor is controlled to detect in the first position area to obtain the first detection data, and the detection sensor is controlled to detect in the second position area to obtain the second detection data. Among them, the first relative distance between the first position area and the target area is less than the second relative distance between the second position area and the target area. In this way, it is possible to separately control the cleaning robot to detect the target area at a distance and near the target area. Since the detection ray of the detection sensor has a certain elevation angle relative to the horizontal line, according to this difference between the first detection data and the second detection data, that is, whether the detection ray emitted by the detection sensor hits the target area at a distance and penetrates the target area at a near distance, or penetrates the target area at a distance and hits the target area at a near distance, it is possible to identify whether the obstacle in the target area is passable, thereby realizing the accurate identification of the obstacle, and avoiding the situation that the cleaning robot may sometimes detect an obstacle and sometimes not detect an obstacle in the same area during the navigation movement. Therefore, the accuracy of the obstacle detection of the cleaning robot can be improved.

[0047] Furthermore, since the accuracy of the obstacle detection in the target area is higher in this embodiment, the working map constructed based on the obstacle detection result in the target area will also be more accurate, which can improve the accuracy of the working map constructed by the cleaning robot. Therefore, the cleaning robot can perform path planning more accurately during the cleaning process, avoiding the situation of collision between the cleaning robot and the obstacle or omission of the area to be cleaned.

[0048] In one embodiment, as Figure 4 shown, the first position area includes a plurality of first position points, the first detection data includes the first detection values of the plurality of first position points, the second position area includes a plurality of second position points, and the second detection data includes the second detection values of the plurality of second position points; determining whether the obstacle existing in the target area is passable according to the difference between the first detection data and the second detection data includes:

[0049] Step 302, determining the first quantity of the first preset value in each of the first detection values, where the first preset value is used to represent that the detection ray emitted by the detection sensor in the first position area hits the target area.

[0050] Step 304, determining the second quantity of the second preset value in each of the second detection values, where the second preset value is used to represent that the detection ray emitted by the detection sensor in the second position area penetrates the target area.

[0051] Among them, the cleaning robot will emit detection rays at multiple first position points in the first position area to detect obstacles, so as to obtain the first detection values of the multiple first position points. The first detection value is the detection return value obtained after the detection sensor emits a detection ray at the first position point. The cleaning robot will emit detection rays at multiple second position points in the second position area to detect obstacles, so as to obtain the second detection values of the multiple second position points. The second detection value is the detection return value obtained after the detection sensor emits a detection ray at the second position point.

[0052] As an example, steps 302 to 304 include: counting the first quantity of the first preset value in each first detection value, where the first preset value is used to represent that the detection ray emitted by the detection sensor in the first position area hits the target area; counting the second quantity of the second preset value in each second detection value, where the second preset value is used to represent that the detection ray emitted by the detection sensor in the second position area penetrates the target area.

[0053] Step 306, if the first quantity is greater than the first preset threshold and the second quantity is greater than the second preset threshold, it is determined that the obstacle existing in the target area is impassable.

[0054] Among them, if the first quantity is greater than the first preset threshold and the second quantity is greater than the second preset threshold, it means that the detection ray emitted by the detection sensor in the first position area can always hit the obstacle in the target area, and the detection ray emitted by the detection sensor in the second position area can always penetrate the target area. Since there is a certain elevation angle between the detection ray emitted by the detection sensor and the horizontal line, it is determined that the obstacle existing in the target area is an impassable obstacle.

[0055] In this embodiment, controlling the cleaning robot to detect obstacles at multiple first position points to obtain the first detection values of the multiple first position points, and controlling the cleaning robot to detect obstacles at multiple second position points to obtain the second detection values of the multiple second position points; thus, after counting the first quantity of the first preset value in each first detection value and counting the second quantity of the second preset value in each second detection value, according to the first quantity and the second quantity, it can be determined through quantitative analysis that the obstacle existing in the target area is an impassable obstacle, so the detection accuracy of whether the obstacle in the target area is passable by the cleaning robot can be improved.

[0056] In one embodiment, the first position area includes multiple first position points, the first detection data includes the first detection values of the multiple first position points, the second position area includes multiple second position points, and the second detection data includes the second detection values of the multiple second position points; determining whether the obstacle existing in the target area is passable according to the difference between the first detection data and the second detection data includes:

[0057] Determine the third quantity of the third preset value among the first detection values, where the third preset value is used to represent that the detection ray emitted by the detection sensor in the first position area penetrates the target area; determine the fourth quantity of the fourth preset value among the second detection values, where the fourth preset value is used to represent that the detection ray emitted by the detection sensor in the second position area hits the target area; if the third quantity is greater than the third preset threshold and the fourth quantity is greater than the fourth preset threshold, it is determined that the obstacle existing in the target area is passable.

[0058] Specifically, count the third quantity of the third preset value among the first detection values, where the third preset value is used to represent that the detection ray emitted by the detection sensor in the first position area penetrates the target area; count the fourth quantity of the fourth preset value among the second detection values, where the fourth preset value is used to represent that the detection ray emitted by the detection sensor in the second position area hits the target area; if the third quantity is greater than the third preset threshold and the fourth quantity is greater than the fourth preset threshold, it means that the detection ray emitted by the detection sensor in the first position area can always penetrate the obstacle in the target area, and the detection ray emitted by the detection sensor in the second position area can always hit the target area. Since there is a certain elevation angle between the detection ray emitted by the detection sensor and the horizontal line, it is determined that the obstacle existing in the target area is a passable obstacle.

[0059] In this embodiment, the cleaning robot is controlled to perform obstacle detection at multiple first position points to obtain the first detection values of the multiple first position points, and the cleaning robot is controlled to perform obstacle detection at multiple second position points to obtain the second detection values of the multiple second position points; thus, after counting the third quantity of the third preset value among the first detection values and counting the fourth quantity of the fourth preset value among the second detection values, according to the third quantity and the fourth quantity, it can be determined through quantitative analysis that the obstacle existing in the target area is a passable obstacle, so the detection accuracy of whether the obstacle in the target area is passable by the cleaning robot can be improved.

[0060] In one embodiment, the obstacle detection method further includes:

[0061] Construct or update the working map of the cleaning robot according to the obstacle detection results of all target areas, where the obstacle detection results are used to represent whether there is an obstacle in the target area and the type of the obstacle if there is an obstacle in the target area, and the type of the obstacle includes at least one of a passable obstacle and an impassable obstacle.

[0062] Among them, in this embodiment, the working space of the cleaning robot can be divided into multiple target areas. The obstacle detection sensor can perform obstacle detection on each target area to obtain an obstacle detection result, which is used to characterize whether there is an obstacle in the target area, and the obstacle detection result is also used to characterize the type of obstacle when there is an obstacle in the target area. The type of obstacle can be one of a passable equal-height obstacle, an impassable equal-height obstacle, and a general obstacle. Among them, the general obstacle includes all types of obstacles except for the passable equal-height obstacle and the impassable equal-height obstacle.

[0063] As an example, according to the obstacle detection results of all target areas, the map area probability corresponding to each target area can be initialized, and an initial working map can be constructed according to the position information and map area probability of each target area. Among them, the map area probability is used to characterize the probability that the cleaning robot cannot pass through the target area. When the map area probability is greater than the preset probability, the target area where the cleaning robot cannot pass is marked in the working map. When the map area probability is less than or equal to the preset probability, the target area where the cleaning robot can pass is marked in the working map.

[0064] As an example, according to the obstacle detection results of all target areas, the map area probability of each target area can be updated in the working map, so as to update the working map of the cleaning robot.

[0065] As an example, the obstacle detection result can be an obstacle label. If the obstacle label is the first preset label, it means that there is no obstacle in the target area. If the obstacle label is the second preset label, it means that there is a passable obstacle in the target area. If the obstacle label is the third preset label, it means that there is an impassable obstacle in the target area. If the obstacle label is the fourth preset label, it means that there is an unknown obstacle in the target area.

[0066] As an example, initializing the map area probability corresponding to each target area according to the obstacle detection results of all target areas includes:

[0067] If the obstacle detection result indicates that there is no obstacle in the target area, the map area probability of the target area is initialized to a first preset probability; if the obstacle detection result indicates that there is a passable obstacle in the target area, the map area probability of the target area is initialized to a second preset probability; if the obstacle detection result indicates that there is an impassable obstacle in the target area, the map area probability of the target area is initialized to a third preset probability; if the obstacle detection result indicates that there is a general obstacle in the target area, the map area probability of the target area is initialized to a fourth preset probability, where the first preset probability and the second preset probability are less than the preset probability, and the third preset probability and the fourth preset probability are greater than or equal to the preset probability.

[0068] In this embodiment, not only can it be detected whether there is an obstacle in the target area, but also when there is an obstacle in the target area, it can specifically identify which one of the general obstacle, the passable equal-height obstacle, and the impassable equal-height obstacle exists in the target area. The obstacle detection result is more specific and accurate. Therefore, according to the obstacle detection results of all target areas, the working map of the cleaning robot can be constructed or updated, which can improve the accuracy of the map construction or update of the cleaning robot.

[0069] It should be noted that after the working map is successfully constructed, to ensure the accuracy of the working map, the cleaning robot will also update the working map in real time to ensure the timeliness and accuracy of the working map.

[0070] As an example, the working map can be a grid map, and the map area probability can be the grid probability of the map grid corresponding to the target area in the grid map.

[0071] Among them, the map area probability is the probability indicating that the cleaning robot cannot pass through the target area in the working map; if the detection ray emitted by the detection sensor passes through the target area, it means that the target area is passable, and the map area probability of the target area will be lowered. If the detection ray emitted by the detection sensor does not pass through the target area, it means that the target area is impassable, and the map area probability of the target area will be raised.

[0072] In one embodiment, after determining that the obstacle existing in the target area is impassable, it further includes:

[0073] If the detection ray emitted by the detection sensor in the first position area hits the target area, the map area probability corresponding to the target area in the working map is increased; if the detection ray emitted by the detection sensor in the first position area penetrates the target area, the map area probability corresponding to the target area in the working map is decreased; if the detection ray emitted by the detection sensor in the second position area penetrates the target area, the map area probability corresponding to the target area in the working map remains unchanged; if the detection ray emitted by the detection sensor in the second position area hits the target area, the map area probability corresponding to the target area in the working map is decreased; wherein, the map area probability is the probability of representing an impassable target area in the working map.

[0074] Specifically, if the detection ray emitted by the detection sensor in the first position area hits the target area, since the detection ray emitted by the detection sensor in the first position area is likely to hit an impassable obstacle, the credibility of determining that there is an impassable obstacle in the target area becomes higher, so the map area probability corresponding to the target area in the working map is increased; if the detection ray emitted by the detection sensor in the first position area penetrates the target area, since the detection ray emitted by the detection sensor in the first position area is likely to hit an impassable obstacle, the credibility of determining that there is an impassable obstacle in the target area becomes lower, so the map area probability corresponding to the target area in the working map is decreased; if the detection ray emitted by the detection sensor in the second position area penetrates the target area, since the detection ray emitted by the detection sensor in the second position area is not likely to hit an impassable obstacle, this does not affect the credibility of there being an impassable obstacle in the target area, so the map area probability corresponding to the target area in the working map remains unchanged; if the detection ray emitted by the detection sensor in the second position area hits the target area, since the detection ray emitted by the detection sensor in the second position area is not likely to hit an impassable obstacle, the credibility of there being an impassable obstacle in the target area becomes lower, so the map area probability corresponding to the target area in the working map is decreased.

[0075] In this embodiment, according to the detection results of the target area by the cleaning robot in the first position area and the second position area, the map area probabilities of all target areas can be continuously updated, which can ensure the accuracy of the map area probabilities of all target areas in the working map, and thus helps to improve the accuracy of the working map.

[0076] In one embodiment, after determining that the obstacle existing in the target area is impassable, it further includes:

[0077] If the detection ray emitted by the detection sensor at the first position area hits the target area, the map area probability corresponding to the target area in the working map is increased at a first preset speed; if the detection ray emitted by the detection sensor at the first position area penetrates the target area, the map area probability corresponding to the target area in the working map is decreased at a second preset speed; if the detection ray emitted by the detection sensor at the second position area penetrates the target area, the map area probability corresponding to the target area in the working map remains unchanged; if the detection ray emitted by the detection sensor at the second position area hits the target area, the map area probability corresponding to the target area in the working map is decreased at a third preset speed; wherein, the map area probability is the probability representing the non-passable target area in the working map, the first preset speed is greater than the preset standard update speed, the second preset speed is less than the preset standard update speed, and the third preset speed is less than the preset standard update speed.

[0078] Wherein, the preset standard update speed is the update speed of the map area probability of the target area without obstacles in the working map; the map area probability is the probability representing the non-passable target area in the working map.

[0079] Specifically, if the detection ray emitted by the detection sensor at the first position area hits the target area, since the detection ray emitted by the detection sensor at the first position area is likely to hit non-passable obstacles, the credibility of determining that there are non-passable obstacles in the target area becomes higher. Therefore, the map area probability corresponding to the target area in the working map is increased at a first preset speed; if the detection ray emitted by the detection sensor at the first position area penetrates the target area, since the detection ray emitted by the detection sensor at the first position area is likely to hit non-passable obstacles, the credibility of determining that there are non-passable obstacles in the target area becomes lower. Therefore, the map area probability corresponding to the target area in the working map is decreased at a second preset speed, wherein the first preset speed is greater than the preset standard update speed and the second preset speed is less than the preset standard update speed; if the detection ray emitted by the detection sensor at the second position area penetrates the target area, since the detection ray emitted by the detection sensor at the second position area is not likely to hit non-passable obstacles, this does not affect the credibility of the existence of non-passable obstacles in the target area. Therefore, the map area probability corresponding to the target area in the working map remains unchanged; if the detection ray emitted by the detection sensor at the second position area hits the target area, since the detection ray emitted by the detection sensor at the second position area is not likely to hit non-passable obstacles, the credibility of the existence of non-passable obstacles in the target area becomes lower. Therefore, the map area probability corresponding to the target area in the working map is decreased at a third preset speed, wherein the third preset speed is less than the preset standard update speed.

[0080] In this embodiment, if the laser emitted by the detection sensor at the first position area hits the target area, it further confirms that there are indeed impassable obstacles in the target area. Therefore, the probability of the map area corresponding to the target area in the working map can be increased at a relatively fast first preset speed, which helps to ensure the accuracy of the working map. If the laser emitted by the detection sensor at the first position area penetrates the target area, the probability of the map area corresponding to the target area in the working map can be decreased at a relatively slow second preset speed, which can reduce the possibility of misjudging the target area as having no impassable obstacles due to the detection error of the detection sensor, and helps to improve the accuracy of the working map. If the detection ray emitted by the detection sensor at the second position area penetrates the target area, since the detection ray emitted by the detection sensor at the second position area is not likely to hit an impassable obstacle, the probability of the map area corresponding to the target area in the working map will not be blindly decreased, which helps to ensure the accuracy of the working map. If the detection ray emitted by the detection sensor at the second position area hits the target area, the probability of the map area corresponding to the target area in the working map can be decreased at a relatively slow third preset speed, and the probability of the map area corresponding to the target area in the working map will not be blindly increased, which helps to further ensure the accuracy of the working map.

[0081] In one embodiment, after determining that the obstacle in the target area is passable, the method further includes:

[0082] If the detection ray emitted by the detection sensor at the first position area penetrates the target area, the probability of the map area corresponding to the target area in the working map is decreased; if the detection ray emitted by the detection sensor at the first position area hits the target area, the probability of the map area corresponding to the target area in the working map is increased; if the detection ray emitted by the detection sensor at the second position area penetrates the target area, the probability of the map area corresponding to the target area in the working map is decreased; if the detection ray emitted by the detection sensor at the second position area hits the target area, the probability of the map area corresponding to the target area in the working map remains unchanged; wherein, the map area probability is the probability of representing the impassable target area of the cleaning robot in the working map.

[0083] Specifically, if the detection sensor's detection ray emitted in the first position area penetrates the target area, since the detection ray emitted by the detection sensor in the first position area is not likely to hit a passable obstacle, the credibility of determining that there is a passable obstacle in the target area becomes higher. Therefore, the map area probability corresponding to the target area in the working map is decreased. If the detection ray emitted by the detection sensor in the first position area hits the target area, since the detection ray emitted by the detection sensor at a close range is not likely to hit a passable obstacle, the credibility of determining that there is a passable obstacle in the target area becomes lower. Therefore, the map area probability corresponding to the target area in the working map is increased. If the detection ray emitted by the detection sensor in the second position area penetrates the target area, it indicates that the cleaning robot can pass through the target area. Therefore, the map area probability corresponding to the target area in the working map is decreased. If the detection ray emitted by the detection sensor in the second position area hits the target area, since the detection ray emitted by the detection sensor in the second position area is likely to hit a passable obstacle, this does not affect the credibility of there being a passable obstacle in the target area. Therefore, the map area probability corresponding to the target area in the working map remains unchanged.

[0084] In this embodiment, according to the detection results of the cleaning robot for the target area in the first position area and the second position area, the map area probabilities of all target areas can be continuously updated, which can ensure the accuracy of the map area probabilities of all target areas in the working map. Therefore, it helps to improve the accuracy of the working map.

[0085] In one embodiment, after determining that the obstacle existing in the target area is passable, it further includes:

[0086] If the detection ray emitted by the detection sensor in the first position area penetrates the target area, the map area probability corresponding to the target area in the working map is decreased at a fourth preset speed. If the detection ray emitted by the detection sensor in the first position area hits the target area, the map area probability corresponding to the target area in the working map is increased at a fifth preset speed. If the detection ray emitted by the detection sensor in the second position area penetrates the target area, the map area probability corresponding to the target area in the working map is decreased at a sixth preset speed. If the detection ray emitted by the detection sensor in the second position area hits the target area, the map area probability corresponding to the target area in the working map remains unchanged. Wherein, the map area probability is the probability representing that the cleaning robot cannot pass through the target area in the working map. The fourth preset speed is greater than the preset standard update speed, the fifth preset speed is less than the preset standard update speed, and the sixth preset speed is less than the preset standard update speed.

[0087] Specifically, if the detection ray emitted by the detection sensor in the first position area penetrates the target area, since the detection ray emitted by the detection sensor in the first position area is not likely to hit a passable obstacle, the credibility of determining that there is a passable obstacle in the target area becomes higher. Therefore, the probability of the map area corresponding to the target area in the working map is lowered at the fourth preset speed; if the detection ray emitted by the detection sensor in the first position area hits the target area, since the detection ray emitted by the detection sensor at a close range is not likely to hit a passable obstacle, the credibility of determining that there is a passable obstacle in the target area becomes lower. Therefore, the probability of the map area corresponding to the target area in the working map is increased at the fifth preset speed, where the fourth preset speed is greater than the preset standard update speed and the fifth preset speed is less than the preset standard update speed; if the detection ray emitted by the detection sensor in the second position area penetrates the target area, although the detection ray penetrating the target area means that the cleaning robot can pass through the target area, since the detection ray emitted by the detection sensor in the second position area is likely to hit a passable obstacle, the probability of the map area corresponding to the target area in the working map is lowered at a slower sixth preset speed; if the detection ray emitted by the detection sensor in the second position area hits the target area, since the detection ray emitted by the detection sensor in the second position area is likely to hit a passable obstacle, this does not affect the credibility of there being a passable obstacle in the target area. Therefore, the probability of the map area corresponding to the target area in the working map remains unchanged; where the sixth preset speed is less than the preset standard update speed.

[0088] In this embodiment, if the detection ray emitted by the detection sensor at the first position area hits the target area, it further confirms that there are passable obstacles in the target area. Therefore, the probability of the map area corresponding to the target area in the working map can be adjusted downwards at a relatively fast fourth preset speed, which helps to ensure the accuracy of the working map. If the detection ray emitted by the detection sensor at the first position area penetrates the target area, the probability of the map area corresponding to the target area in the working map can be adjusted upwards at a relatively slow fifth preset speed, which can reduce the possibility of misjudging the target area as having no passable obstacles due to the detection error of the detection sensor, and helps to improve the accuracy of the working map. If the detection ray emitted by the detection sensor at the second position area penetrates the target area, although the penetration of the detection ray through the target area indicates that the cleaning robot can pass through the target area, since the detection ray emitted by the detection sensor at the second position area is likely to hit passable obstacles, the probability of the map area corresponding to the target area in the working map is adjusted downwards at a relatively slow sixth preset speed, and it will not blindly adjust the probability of the map area corresponding to the target area in the working map at the normal speed directly, which helps to ensure the accuracy of the working map. If the detection ray emitted by the detection sensor at the second position area hits the target area, since the detection ray emitted by the detection sensor at the second position area is likely to hit passable obstacles, the probability of the map area corresponding to the target area in the working map remains unchanged, and it will not blindly adjust the probability of the map area corresponding to the target area in the working map upwards, which helps to further ensure the accuracy of the working map.

[0089] It should be noted that when using the detection sensor for obstacle detection, if there is a smooth mirror surface in the direction of the detection ray emitted by the detection sensor or there is an empty area beyond the detection azimuth of the detection sensor, there will be no detection return value in the direction of the emitted detection ray. At this time, the cleaning robot will set the area without detection return value as an unknown area, and both in map construction and working navigation, this unknown area will be directly avoided, affecting the accuracy of map construction or working navigation.

[0090] In one embodiment, the obstacle detection method further includes:

[0091] If it is determined, according to the detection data of the detection sensor, that there is a detection ray emission angle section without a detection return value, then according to the angle range of the detection ray emission angle section and a preset radius, the passable area of the cleaning robot is determined.

[0092] Among them, the detection azimuth range of the detection sensor is usually 360 degrees centered on itself. The detection sensor can emit detection rays within the 360-degree range and receive detection return values within the 360-degree range. In addition, the detection sensor usually has an effective detection radius. For the detection return values returned within the effective detection radius, the lidar can accurately receive them, while for the detection return values returned outside the effective detection radius, the detection sensor cannot accurately receive them.

[0093] Specifically, according to the detection return values of the detection sensor in the 360-degree full azimuth, it is detected whether there is a detection ray emission angle section without detection return values. If there is a detection ray emission angle section without detection return values, the fan-shaped area defined by the detection ray emission angle section and the preset radius is determined as the passable area of the cleaning robot.

[0094] Among them, the preset radius can be set to be less than or equal to the effective detection radius of the detection sensor.

[0095] In this embodiment, after determining that there is a detection ray emission angle section without detection return values according to the detection data of the detection sensor, the passable area of the cleaning robot is determined according to the detection ray emission angle section and the preset radius, rather than marking the area without detection return values as an unknown area. This can prevent the situation where the unknown area is directly avoided during map construction or work navigation, so the accuracy of map construction or work navigation can be improved.

[0096] In one embodiment, the cleaning robot includes a detection sensor. The detection ray of the detection sensor has a certain elevation angle relative to the horizontal line. First, when the cleaning robot moves to the first position area, the detection sensor is controlled to detect obstacles, and the detection return value of the detection sensor is used as the first detection data. When the cleaning robot moves to the second position area, the detection sensor is controlled to detect obstacles; the detection return value of the detection sensor is used as the second detection data. Among them, the first relative distance between the first position area and the target area is less than the second relative distance between the second position area and the target area. The first position area includes multiple first position points, the first detection data includes the first detection values of multiple first position points, the second position area includes multiple second position points, and the second detection data includes the second detection values of multiple second position points.

[0097] After obtaining the first detection values of multiple first position points and the second detection values of multiple second position points, count the first quantity of the first preset value and the third quantity of the third preset value in each first detection value, where the first preset value is used to represent that the laser emitted by the detection sensor in the first position area hits the target area, and the third preset value is used to represent that the laser emitted by the detection sensor in the second position area penetrates the target area; count the second quantity of the second preset value and the fourth quantity of the fourth preset value in each second detection value, where the second preset value is used to represent that the laser emitted by the detection sensor in the first position area penetrates the target area, and the fourth preset value is used to represent that the laser emitted by the detection sensor in the second position area hits the target area.

[0098] Further, if the first quantity is greater than the first preset threshold and the second quantity is greater than the second preset threshold, it means that the laser emitted by the detection sensor in the first position area can always hit the obstacle in the target area, and the laser emitted by the excitation radar in the second position area can always penetrate the target area. Since there is a certain elevation angle between the laser emitted by the detection sensor and the horizontal line, it is determined that the obstacle existing in the target area is an impassable obstacle; if the third quantity is greater than the third preset threshold and the fourth quantity is greater than the fourth preset threshold, it means that the laser emitted by the detection sensor in the first position area can always penetrate the target area, and the laser emitted by the detection sensor in the second position area can always hit the obstacle in the target area. Since there is a certain elevation angle between the laser emitted by the detection sensor and the horizontal line, it is determined that the obstacle existing in the target area is a passable obstacle.

[0099] In this embodiment, it is possible to quantitatively analyze whether the obstacle existing in the target area is a passable obstacle or an impassable obstacle, so the detection accuracy of whether the obstacle in the target area is passable by the cleaning robot can be improved.

[0100] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps do not necessarily have to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps does not have a strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily have to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily have to be sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.

[0101] Based on the same inventive concept, an embodiment of the present application further provides an obstacle detection device for implementing the above-mentioned obstacle detection method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the obstacle detection device provided below can refer to the limitations on the obstacle detection method in the above text and will not be repeated here.

[0102] In one embodiment, as Figure 5 shown, an obstacle detection device is provided, which is applied to a cleaning robot. The cleaning robot includes a detection sensor. The device includes: a first detection module 402, a second detection module 404, and a detection module 406, where:

[0103] The first detection module is used to control the detection sensor to detect in a first position area to obtain first detection data.

[0104] The second detection module is used to control the detection sensor to detect in a second position area to obtain second detection data, where the first relative distance between the first position area and the target area is less than the second relative distance between the second position area and the target area.

[0105] The detection module is used to determine whether the obstacle existing in the target area is passable according to the difference between the first detection data and the second detection data.

[0106] In one embodiment, the detection module is further used for:

[0107] If the first detection data indicates that there is an obstacle in the target area and the second detection data indicates that there is no obstacle in the target area, it is determined that the obstacle existing in the target area is not passable; if the first detection data indicates that there is no obstacle in the target area and the second detection data indicates that there is an obstacle in the target area, it is determined that the obstacle existing in the target area is passable.

[0108] In one embodiment, the first position area includes a plurality of first position points, the first detection data includes first detection values of the plurality of first position points, the second position area includes a plurality of second position points, and the second detection data includes second detection values of the plurality of second position points; the detection module is further used for:

[0109] Determine the first quantity of the first preset value among the first detection values, where the first preset value is used to represent that the detection ray emitted by the detection sensor in the first position area hits the target area; determine the second quantity of the second preset value among the second detection values, where the second preset value is used to represent that the detection ray emitted by the detection sensor in the second position area penetrates the target area; if the first quantity is greater than the first preset threshold and the second quantity is greater than the second preset threshold, then determine that the obstacle existing in the target area is impassable.

[0110] In one embodiment, the first position area includes a plurality of first position points, the first detection data includes the first detection values of the plurality of first position points, the second position area includes a plurality of second position points, and the second detection data includes the second detection values of the plurality of second position points; the detection module is further configured to:

[0111] Determine the third quantity of the third preset value among the first detection values, where the third preset value is used to represent that the detection ray emitted by the detection sensor in the first position area penetrates the target area; determine the fourth quantity of the fourth preset value among the second detection values, where the fourth preset value is used to represent that the detection ray emitted by the detection sensor in the second position area hits the target area; if the third quantity is greater than the third preset threshold and the fourth quantity is greater than the fourth preset threshold, then determine that the obstacle existing in the target area is passable.

[0112] In one embodiment, the obstacle detection device further includes:

[0113] A map construction or update module, configured to construct or update the working map of the cleaning robot according to the obstacle detection results of all target areas, where the obstacle detection results are used to represent whether there is an obstacle in the target area, and the type of the obstacle if there is an obstacle in the target area, and the type of the obstacle includes at least one of a passable obstacle and an impassable obstacle.

[0114] In one embodiment, the obstacle detection device further includes:

[0115] A map area probability update module is used to increase the map area probability corresponding to the target area in the working map if the detection ray emitted by the detection sensor at the first position area hits the target area; decrease the map area probability corresponding to the target area in the working map if the detection ray emitted by the detection sensor at the first position area penetrates the target area; keep the map area probability corresponding to the target area in the working map unchanged if the detection ray emitted by the detection sensor at the second position area penetrates the target area; decrease the map area probability corresponding to the target area in the working map if the detection ray emitted by the detection sensor at the second position area hits the target area; wherein, the map area probability is the probability that the cleaning robot cannot pass through the target area in the working map.

[0116] In one embodiment, the map area probability update module is further used for:

[0117] If the detection ray emitted by the detection sensor at the first position area hits the target area, increase the map area probability corresponding to the target area in the working map at a first preset speed; if the detection ray emitted by the detection sensor at the first position area penetrates the target area, decrease the map area probability corresponding to the target area in the working map at a second preset speed; if the detection ray emitted by the detection sensor at the second position area penetrates the target area, keep the map area probability corresponding to the target area in the working map unchanged; if the detection ray emitted by the detection sensor at the second position area hits the target area, decrease the map area probability corresponding to the target area in the working map at a third preset speed; wherein, the map area probability is the probability that the cleaning robot cannot pass through the target area in the working map, the first preset speed is greater than the preset standard update speed, the second preset speed is less than the preset standard update speed, and the third preset speed is less than the preset standard update speed.

[0118] In one embodiment, the map area probability update module is further used for:

[0119] If the detection ray emitted by the detection sensor in the first position area penetrates the target area, the probability of the map area corresponding to the target area in the working map is decreased; if the detection ray emitted by the detection sensor in the first position area hits the target area, the probability of the map area corresponding to the target area in the working map is increased; if the detection ray emitted by the detection sensor in the second position area penetrates the target area, the probability of the map area corresponding to the target area in the working map is decreased; if the detection ray emitted by the detection sensor in the second position area hits the target area, the probability of the map area corresponding to the target area in the working map remains unchanged; wherein, the map area probability is the probability indicating that the cleaning robot cannot pass through the target area in the working map.

[0120] In one embodiment, the map area probability updating module is further configured to:

[0121] If the detection ray emitted by the detection sensor in the first position area penetrates the target area, the probability of the map area corresponding to the target area in the working map is decreased at a fourth preset speed; if the detection ray emitted by the detection sensor in the first position area hits the target area, the probability of the map area corresponding to the target area in the working map is increased at a fifth preset speed; if the detection ray emitted by the detection sensor in the second position area penetrates the target area, the probability of the map area corresponding to the target area in the working map is decreased at a sixth preset speed; if the detection ray emitted by the detection sensor in the second position area hits the target area, the probability of the map area corresponding to the target area in the working map remains unchanged; wherein, the map area probability is the probability indicating that the cleaning robot cannot pass through the target area in the working map, the fourth preset speed is greater than the preset standard update speed, the fifth preset speed is less than the preset standard update speed, and the sixth preset speed is less than the preset standard update speed.

[0122] In one embodiment, the map construction module is further configured to:

[0123] If it is determined according to the detection data of the detection sensor that there is a detection ray emission angle section without a detection return value, the passable area of the cleaning robot is determined according to the angle range of the detection ray emission angle section and a preset radius.

[0124] Each module in the above obstacle detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the cleaning robot in hardware form or be independent of it, or stored in the memory of the cleaning robot in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0125] In one embodiment, a cleaning robot is provided, which includes a body, a driving assembly, a cleaning assembly, a detection sensor, a memory, and a processor. The driving assembly, the cleaning assembly, and the detection sensor are all installed on the body. The driving assembly is used to drive the body to move on the working surface, and the cleaning assembly is used to clean the working surface. The detection ray of this detection sensor has a certain elevation angle relative to the horizontal line, and its internal structure diagram can be as Figure 6 shown. This cleaning robot includes a processor, a memory, a communication interface, a display screen, an input device, a detection sensor, a driving assembly, and a cleaning assembly connected through a system bus. Among them, the processor of this cleaning robot is used to provide computing and control capabilities. The memory of this cleaning robot includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of this cleaning robot is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an obstacle detection method.

[0126] Those skilled in the art can understand that Figure 6 the structure shown in

[0127] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the cleaning robot to which the solution of this application is applied. The specific cleaning robot may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0128] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, it implements the steps in the above method embodiments.

[0129] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing 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 embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. 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), magnetoresistive 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 be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0130] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope described in this specification.

[0131] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. An obstacle detection method, characterized in that, Applied to a cleaning robot, the cleaning robot includes a detection sensor, and the method includes: Controlling the detection sensor to detect in a first position area to obtain first detection data; Controlling the detection sensor to detect in a second position area to obtain second detection data, wherein a first relative distance between the first position area and a target area is less than a second relative distance between the second position area and the target area; Determining whether an obstacle existing in the target area is passable according to a difference between the first detection data and the second detection data.

2. The method according to claim 1, wherein The determining whether an obstacle existing in the target area is passable according to a difference between the first detection data and the second detection data includes: If the first detection data indicates that an obstacle exists in the target area and the second detection data indicates that no obstacle exists in the target area, determining that the obstacle existing in the target area is not passable; If the first detection data indicates that no obstacle exists in the target area and the second detection data indicates that an obstacle exists in the target area, determining that the obstacle existing in the target area is passable.

3. The method according to claim 1, characterized in that, The first position area includes a plurality of first position points, the first detection data includes first detection values of the plurality of first position points, the second position area includes a plurality of second position points, and the second detection data includes second detection values of the plurality of second position points; the determining whether an obstacle existing in the target area is passable according to a difference between the first detection data and the second detection data includes: Determining a first quantity of a first preset value among the first detection values, wherein the first preset value is used to represent that a detection ray emitted by the detection sensor in the first position area hits the target area; Determining a second quantity of a second preset value among the second detection values, wherein the second preset value is used to represent that a detection ray emitted by the detection sensor in the second position area penetrates the target area; If the first quantity is greater than a first preset threshold and the second quantity is greater than a second preset threshold, determining that the obstacle existing in the target area is not passable.

4. The method according to claim 1, characterized in that, The first position area includes a plurality of first position points, the first detection data includes first detection values of the plurality of first position points, the second position area includes a plurality of second position points, and the second detection data includes second detection values of the plurality of second position points; the determining whether an obstacle existing in the target area is passable according to a difference between the first detection data and the second detection data includes: Determining a third quantity of a third preset value among the first detection values, wherein the third preset value is used to represent that a detection ray emitted by the detection sensor in the first position area penetrates the target area; Determining a fourth quantity of a fourth preset value among the second detection values, wherein the fourth preset value is used to represent that a detection ray emitted by the detection sensor in the second position area hits the target area; If the third quantity is greater than a third preset threshold and the fourth quantity is greater than a fourth preset threshold, it is determined that the obstacles existing in the target area are passable.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Constructing or updating a working map of the cleaning robot according to the obstacle detection results of all target areas, where the obstacle detection results are used to characterize whether there are obstacles in the target area and the type of obstacles if there are obstacles in the target area, and the type of obstacles includes at least one of passable obstacles and impassable obstacles.

6. The method according to claim 5, wherein After determining that the obstacles existing in the target area are impassable, the method further includes: If the detection ray emitted by the detection sensor in the first position area hits the target area, increasing the map area probability corresponding to the target area in the working map; If the detection ray emitted by the detection sensor in the first position area penetrates the target area, decreasing the map area probability corresponding to the target area in the working map; If the detection ray emitted by the detection sensor in the second position area penetrates the target area, keeping the map area probability corresponding to the target area in the working map unchanged; If the detection ray emitted by the detection sensor in the second position area hits the target area, decreasing the map area probability corresponding to the target area in the working map; Wherein, the map area probability is the probability that the cleaning robot cannot pass through the target area in the working map.

7. The method according to claim 6, wherein The method further includes: If the detection ray emitted by the detection sensor in the first position area hits the target area, increasing the map area probability corresponding to the target area in the working map at a first preset speed; If the detection ray emitted by the detection sensor in the first position area penetrates the target area, decreasing the map area probability corresponding to the target area in the working map at a second preset speed; If the detection ray emitted by the detection sensor in the second position area penetrates the target area, keeping the map area probability corresponding to the target area in the working map unchanged; If the detection ray emitted by the detection sensor in the second position area hits the target area, decreasing the map area probability corresponding to the target area in the working map at a third preset speed; Wherein, the map area probability is the probability that the cleaning robot cannot pass through the target area in the working map, the first preset speed is greater than a preset standard update speed, the second preset speed is less than the preset standard update speed, and the third preset speed is less than the preset standard update speed.

8. The method according to claim 5, characterized in that After determining that the obstacles existing in the target area are passable, the method further includes: If the detection ray emitted by the detection sensor in the first position area penetrates the target area, decreasing the map area probability corresponding to the target area in the working map; If the detection ray emitted by the detection sensor in the first position area hits the target area, increase the probability of the map area corresponding to the target area in the working map; If the detection ray emitted by the detection sensor in the second position area penetrates the target area, decrease the probability of the map area corresponding to the target area in the working map; If the detection ray emitted by the detection sensor in the second position area hits the target area, keep the probability of the map area corresponding to the target area in the working map unchanged; Wherein, the map area probability is the probability that the cleaning robot cannot pass through the target area in the working map.

9. The method according to claim 8, wherein The method further includes: If the detection ray emitted by the detection sensor in the first position area penetrates the target area, decrease the probability of the map area corresponding to the target area in the working map at a fourth preset speed; If the detection ray emitted by the detection sensor in the first position area hits the target area, increase the probability of the map area corresponding to the target area in the working map at a fifth preset speed; If the detection ray emitted by the detection sensor in the second position area penetrates the target area, decrease the probability of the map area corresponding to the target area in the working map at a sixth preset speed; If the detection ray emitted by the detection sensor in the second position area hits the target area, keep the probability of the map area corresponding to the target area in the working map unchanged; Wherein, the map area probability is the probability that the cleaning robot cannot pass through the target area in the working map, the fourth preset speed is greater than the preset standard update speed, the fifth preset speed is less than the preset standard update speed, and the sixth preset speed is less than the preset standard update speed.

10. The method according to claim 1, characterized in that, The method further includes: If it is determined according to the detection data of the detection sensor that there is a detection ray emission angle section without a detection return value, determine the passable area of the cleaning robot according to the angle range of the detection ray emission angle section and the preset radius.

11. A cleaning robot, comprising a body, a driving assembly, a cleaning assembly, a detection sensor, a memory and a processor. The driving assembly, the cleaning assembly and the detection sensor are all installed on the body. The driving assembly is used to drive the body to move on a working surface. The cleaning assembly is used to clean the working surface. The memory stores a computer program, and is characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.