Cliff detection method and device, self-moving robot and storage medium
By acquiring and analyzing the height difference in the point cloud dataset, and combining it with downward-looking sensor correction, the problem of misjudgment in step detection by the cleaning robot was solved, achieving more accurate step height judgment and safe movement of the self-moving robot.
Patent Information
- Application Number
- CN202511750341.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-18
- Publication Date
- 2026-02-10
AI Technical Summary
Existing cleaning robots are prone to misjudging step height, resulting in some areas of the floor being missed during cleaning. Current technology mainly relies on downward-facing sensors located under the robot body, which are susceptible to misjudgment.
By acquiring a point cloud dataset of a preset area, a line lidar sensor is used to continuously scan and identify discontinuous point cloud subsets that are not at the same height. The height difference is calculated to determine the step height, and the results are combined with the detection results of the downward-looking sensor for correction.
Accurately judging the height of steps reduces the risk of self-moving robots falling, avoids misjudgment, and ensures complete coverage of the cleaning area.
Smart Images

Figure CN121500973A_ABST
Abstract
Description
[0001] This application is a divisional application of application number "202310067224.3", filed on "January 18, 2023", entitled "Method for detecting step height and control method for self-moving robot". Technical Field
[0002] This invention belongs to the field of cleaning device technology, specifically relating to a cliff detection method, device, self-moving robot, and storage medium. Background Technology
[0003] With the development of technology and the improvement of people's living standards, autonomous mobile robots are increasingly being used in various fields, such as cleaning robots (sweeping robots, floor scrubbers, etc.) and other service robots (such as food delivery robots), freeing people from tedious cleaning work. They can keep the environment of homes and offices clean and allow people to enjoy more free time, which is why they are favored by people.
[0004] Taking cleaning robots as an example, the existing technology of cleaning robots mainly relies on the downward-looking sensor under the robot body to detect the height of the steps. However, the downward-looking sensor usually needs part of the robot body to go over the step to be triggered, which is prone to misjudgment and may even lead to some parts of the ground being missed for cleaning. Summary of the Invention
[0005] This invention provides a method for detecting step height and a control method for a self-moving robot, which can determine step height in advance and accurately.
[0006] To achieve the above objectives, the present invention provides a method for detecting step height, applied to a self-moving robot, the method comprising:
[0007] Acquire a point cloud dataset of a preset area, wherein the point cloud dataset includes at least two point cloud subsets, and the point cloud data in each point cloud subset is continuous.
[0008] When the point cloud data of two subsets of point clouds are not continuous and are not at the same height, determine two points or two lines that are not at the same height based on the two subsets of point clouds.
[0009] Calculate the height difference between the two points or the two lines along the height direction, and use it as the first height of the target step.
[0010] Preferably, in the method for detecting the height of a step, the step of determining two points or two lines at different heights based on the two point cloud subsets when the point cloud data of two subsets are discontinuous and not at the same height includes:
[0011] When the point cloud data of two point cloud subsets are not continuous and are not at the same height, the two point cloud subsets are fitted to form two line segments that are not at the same height.
[0012] Preferably, in the method for detecting the height of a step, the step of calculating the height difference between the two points or two lines along the height direction as the first height of the target step includes:
[0013] Identify two discontinuous edge point cloud data points of the two line segments, and calculate the height difference between the two edge point cloud data points along the height direction.
[0014] Preferably, in the method for detecting the height of a step, the step of determining two points or two lines at different heights based on the two point cloud subsets when the point cloud data of two subsets are discontinuous and not at the same height includes:
[0015] When the point cloud data of two subsets of point clouds are not continuous and are not at the same height, determine any two points that are not at the same height.
[0016] Preferably, in the method for detecting the step height, the step of determining any two points not at the same height when the point cloud data of two subsets of point clouds are discontinuous and not at the same height includes:
[0017] When two subsets of point clouds are discontinuous and not at the same height, the two edge point cloud data of the two subsets of point clouds are determined to be discontinuous and not at the same height.
[0018] Preferably, in the method for detecting the step height, the step of acquiring the point cloud dataset of the collected preset area includes:
[0019] The robot continuously scans using a linear lidar sensor during its movement.
[0020] Obtain the point cloud dataset of a preset region from the collected point cloud dataset.
[0021] To achieve the above objectives, the present invention also provides a control method for a self-moving robot, the self-moving robot including a downward-looking sensor, and the control method for the self-moving robot including:
[0022] Based on the above method for detecting step height, the first height of the preset area is detected;
[0023] Based on the first height, determine whether there is a cliff in the preset area as the first determination result;
[0024] The movement of the self-moving robot is controlled based on the first judgment result.
[0025] Preferably, in the control method for the self-moving robot, after the step of determining whether a cliff exists in the preset area based on the first height as the first determination result, the control method further includes:
[0026] Obtain the current detection result of the downward-looking sensor, including whether a cliff exists in the preset area;
[0027] When the current detection result indicates that a cliff exists in the preset area, the current detection result is corrected based on the first judgment result;
[0028] Accordingly, controlling the movement of the self-moving robot based on the first judgment result specifically includes:
[0029] The movement of the self-moving robot is controlled based on the corrected current detection results.
[0030] Preferably, in the control method for the self-moving robot, the step of correcting the current detection result based on the first judgment result when the current detection result indicates the existence of a cliff in a preset area includes:
[0031] Determine whether the body of the self-moving robot is tilted up and whether the height of the downward-looking sensor is greater than the first threshold, and use this as the second determination result;
[0032] When the judgment result is yes and the current detection result indicates that there is a cliff in the preset area, the current detection result is corrected according to the first judgment result.
[0033] Preferably, in the control method for the self-moving robot, the step of correcting the current detection result based on the first judgment result when the current detection result indicates the existence of a cliff in a preset area includes:
[0034] When the current detection result indicates that a cliff exists in the preset area, the historical detection results of the preset area are obtained;
[0035] If the historical detection results are inconsistent with the current detection results, the current detection results shall be corrected according to the first judgment result.
[0036] Preferably, in the control method for the self-moving robot, the step of correcting the current detection result based on the first judgment result when the current detection result indicates the existence of a cliff in a preset area includes:
[0037] When the current detection result indicates that there is a cliff in the preset area, the self-moving robot is controlled to avoid the cliff and continue moving.
[0038] After the self-moving robot avoids the obstacle and continues to move for a preset time, the second detection result of the downward-looking sensor after the preset time is obtained;
[0039] If the second detection result still indicates that there is a cliff in the preset area, the current detection result is corrected based on the first judgment result.
[0040] To achieve the above objectives, the present invention also provides a step height detection device, the step height detection device comprising:
[0041] The first acquisition unit is configured to acquire a point cloud dataset of a preset area, wherein the point cloud dataset includes at least two point cloud subsets, and the point cloud data in each point cloud subset is continuous.
[0042] The first determining unit is configured to determine two points or two lines that are not at the same height based on the two point cloud subsets when the point cloud data of two point cloud subsets are discontinuous and not at the same height.
[0043] The first calculation unit is configured to calculate the height difference between the two points or two lines along the height direction, as the first height of the target step.
[0044] To achieve the above objectives, the present invention also provides a control device for a self-moving robot, the control device comprising:
[0045] The first detection unit is configured to detect the first height of a preset area according to the step height detection method;
[0046] The first judgment unit is configured to determine, based on the first height, whether there is a cliff in the preset area as a first judgment result;
[0047] The first control unit is configured to control the movement of the self-moving robot based on a first judgment result.
[0048] To achieve the above objectives, the present invention also provides a self-moving robot, the self-moving robot comprising:
[0049] At least one processor; and,
[0050] A memory communicatively connected to the at least one processor; wherein,
[0051] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the aforementioned step height detection method and / or the aforementioned self-moving robot control method.
[0052] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the above-described method for detecting step height and / or the above-described method for controlling a self-moving robot.
[0053] The technical solution provided by this invention has the following advantages:
[0054] This invention acquires a point cloud dataset of a preset area, which includes at least two point cloud subsets. The point cloud data in each subset is continuous. When the point cloud data of two subsets are discontinuous and not at the same height, two points or two lines at different heights are identified based on the two subsets. The height difference between the two points or two lines along the height direction is calculated as the first height of the target step. In this way, the existence of the preset area can be determined in advance by the first height of the target step to determine whether there is a cliff and whether it is possible to continue. This reduces the risk of the self-moving robot falling and avoids the situation in the prior art where the detection of step height by the self-moving robot mainly relies on the downward-looking sensor under the robot body. However, the downward-looking sensor usually needs part of the robot body to cross the step to be triggered, which is prone to misjudgment. Attached Figure Description
[0055] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0056] Figure 1 This is a schematic diagram illustrating the laser scanning employed by the self-moving robot of the present invention using a line lidar.
[0057] Figure 2 This is a schematic diagram of the self-moving robot of the present invention in a special scenario;
[0058] Figure 3 for Figure 2 A partial schematic diagram;
[0059] Figure 4 This is a schematic diagram of one embodiment of the step height detection method of the present invention;
[0060] Figure 5 This is a schematic diagram of yet another embodiment of the step height detection method of the present invention;
[0061] Figure 6 This is a schematic diagram of the first embodiment of the step height detection method of the present invention;
[0062] Figure 7 This is a schematic diagram of the second embodiment of the step height detection method of the present invention;
[0063] Figure 8 This is a schematic diagram of the third embodiment of the step height detection method of the present invention;
[0064] Figure 9 This is a schematic diagram of the control method for the self-moving robot of the present invention in the fourth embodiment;
[0065] Figure 10 This is a schematic diagram of the control method for the self-moving robot of the present invention in the fifth embodiment;
[0066] Figure 11 This is a schematic diagram of the control method for the self-moving robot of the present invention in the sixth embodiment;
[0067] Figure 12 This is a schematic diagram of the control method for the self-moving robot of the present invention in the seventh embodiment.
[0068] Figure 13 This is a schematic diagram of an embodiment of the step height detection device of the present invention;
[0069] Figure 14 This is a schematic diagram of an embodiment of the control device for a self-moving robot according to the present invention;
[0070] Figure 15 This is a schematic diagram of an embodiment of a self-moving robot.
[0071] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0072] In this embodiment of the invention, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0073] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0074] In this embodiment of the invention, the term "multiple" refers to two or more, and other quantifiers are similar.
[0075] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the embodiments of the present invention to facilitate a better understanding of the invention. However, the technical solutions claimed in the present invention can be implemented even without these technical details and various variations and modifications based on the following embodiments. The division of the following embodiments is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.
[0076] This embodiment relates to a method for detecting step height. In this embodiment, a self-moving robot is used as an example. The method for detecting step height is mainly applied to cleaning robots, such as sweeping robots, floor scrubbers, etc., which will not be listed here. The method for detecting step height can also be applied to vending robots or other service robots, such as food delivery robots, etc. This embodiment does not make any specific limitations on this.
[0077] The implementation details of the step height detection method according to the first embodiment of the present invention are described below. The following implementation details are provided for ease of understanding only and are not necessary for implementing this solution.
[0078] The specific process of this implementation method is as follows: Figure 6 As shown, it specifically includes:
[0079] Step S110: Obtain the point cloud dataset of the preset area, wherein the point cloud dataset includes at least two point cloud subsets, and the point cloud data in each point cloud subset is continuous.
[0080] It should be noted that the implementing entity in this embodiment is a self-moving robot, which can be a cleaning robot (such as a sweeping robot, floor scrubber, etc.) or other service robots (such as a food delivery robot), and there are no specific limitations here. However, for ease of explanation, the following description uses a sweeping robot as the self-moving robot, but it does not mean that it is limited to sweeping robots.
[0081] Specifically, such as Figure 1 As shown, assuming the obstacle is in front of the robot vacuum's travel direction, the robot continuously scans the front to acquire information about the obstacle, including a point cloud dataset of a preset area. The point cloud data in this dataset can be acquired by a line LiDAR sensor or generated by other sensors; no specific limitation is made here. In this embodiment, the point cloud data is acquired by a line LiDAR sensor. Alternatively, it can be assumed that the obstacle is behind the robot vacuum's travel direction, and the robot continuously scans the back side to acquire information about the obstacle during its travel.
[0082] Linear LiDAR sensors can be installed at the front of the robot vacuum cleaner, allowing it to scan for obstacles while moving forward. Alternatively, they can be installed on the back of the robot vacuum cleaner, opposite to its forward movement, enabling it to detect obstacles behind it while moving forward or backward.
[0083] The point cloud data in each subset of the point cloud is continuous, with Figure 4 and Figure 5 For example, please refer to [link / reference]. Figure 4 and Figure 5 The point cloud dataset comprises multiple point cloud subsets {A, B}. Subset A includes point cloud data {a1, a2, ..., a30}, where the point cloud data in subset A is continuous, meaning a1, a2, ..., a30 are consecutive point cloud data without breaks. Subset B includes point cloud data {b1, b2, ..., b15}, where b1, b2, ..., b15 are consecutive point cloud data without breaks. Any two point cloud subsets in the dataset can be located at the same height or at different heights; no specific restrictions are imposed here.
[0084] In addition, the height mentioned in this embodiment refers to the height in the direction of gravity, that is, the height perpendicular to the ground, which can also be called vertical height.
[0085] Specifically, step S110 includes:
[0086] Step S111: Continuously scan using a line lidar sensor during the movement of the self-moving robot;
[0087] It should be understood that self-moving robots typically perform line LiDAR sensor scanning on the front during movement; in other embodiments, line LiDAR sensors can also be used to scan the back during movement, thus preventing them from falling off cliffs when they need to reverse.
[0088] Step S112: Obtain the point cloud dataset of the preset region in the collected point cloud dataset.
[0089] It should be understood that when it is necessary to calculate the height of the steps in a preset area, the corresponding point cloud dataset of the preset area can be obtained from the collected point cloud dataset.
[0090] Step S120: When the point cloud data of two point cloud subsets are not continuous and not at the same height, determine two points or two lines that are not at the same height based on the two point cloud subsets.
[0091] It should be understood that in a point cloud dataset within a preset region, if the point cloud data of two point cloud subsets are not continuous, that is, the point cloud data of the two point cloud subsets are disconnected from each other at their edges; and the point cloud data of the two point cloud subsets are located at different heights, that is, not on the same plane.
[0092] Taking a step as an example, a step includes a first plane near or where the robot vacuum cleaner is located, a second plane parallel or approximately parallel to the first plane, and a step surface connecting the first and second planes. Assuming the preset area is a step, the point cloud subset in the point cloud dataset of the preset area can be either a first point cloud subset consisting of point cloud data located on the first plane, or a second point cloud subset consisting of point cloud data located on the second plane. The first and second point cloud subsets are not at the same height.
[0093] by Figure 4 and Figure 5 For example, the point cloud dataset includes point cloud subset A and point cloud subset B. The point cloud data {a1, a2, ..., a30} in point cloud subset A are all located in the first plane, and the point cloud data {b1, b2, ..., b15} in point cloud dataset A are all located in the second plane. Point cloud subset A and point cloud subset B are disconnected and discontinuous at the edge points a1 and b1.
[0094] Based on the two point cloud subsets, determine two points or two lines that are not at the same height. Please refer to [link / reference]. Figure 4 This can involve extracting any point from a subset A of the point cloud and any point from a subset B of the point cloud, i.e., selecting any point from {a1, a2, ..., a30} and any point from {b1, b2, ..., b15}. The combinations can be varied. For example, it could be selecting a1 from subset A and b1 from subset B, or a2 from subset A and b3 from subset B, and so on. Further examples are not provided here. Alternatively, subsets A and B can be fitted to form two lines, and the height difference between these two lines can be calculated.
[0095] Step S130: Calculate the height difference between the two points or two lines along the height direction, and use it as the first height of the target step.
[0096] It should be understood that calculating the height difference between the two points or two line segments along the height direction means calculating the vertical height difference between the two points or two lines.
[0097] by Figure 4 For example, Figure 4 The diagram illustrates the calculation of the height difference h1 between point cloud subsets a1 in subset A and b1 in subset B. Figure 5 For example, Figure 5 The diagram illustrates fitting point cloud subsets A and B into two line segments, and then calculating the height difference h2 between the two fitted line segments. Since there may be an error between the point cloud data acquired by the line lidar sensor, for example, a 5mm error in the spacing between two adjacent point cloud data points, fitting the point cloud data from the subsets into lines and then calculating the height difference between the two fitted lines can compensate for the spacing error between adjacent point cloud data points, making the calculation results more accurate.
[0098] This invention acquires a point cloud dataset of a preset area, which includes at least two point cloud subsets. The point cloud data in each subset is continuous. When the point cloud data of two subsets are discontinuous and not at the same height, two points or two lines at different heights are identified based on the two subsets. The height difference between the two points or two lines along the height direction is calculated as the first height of the target step. In this way, the existence of the preset area can be determined in advance by the first height of the target step to determine whether there is a cliff and whether it is possible to continue. This reduces the risk of the self-moving robot falling and avoids the situation in the prior art where the detection of step height by the self-moving robot mainly relies on the downward-looking sensor under the robot body. However, the downward-looking sensor usually needs part of the robot body to cross the step to be triggered, which is prone to misjudgment.
[0099] like Figure 7 As shown, the step height detection method according to the second embodiment specifically includes step S120:
[0100] Step S121: When the point cloud data of two point cloud subsets are not continuous and are not at the same height, the two point cloud subsets are fitted to form two line segments that are not at the same height.
[0101] It should be understood that, based on the two subsets of point clouds, determining two lines that are not at the same height can be done by fitting the two subsets of point clouds separately to form straight lines, or by forming line segments; no specific restrictions are imposed here.
[0102] In this embodiment, two subsets of point clouds are fitted to form two lines respectively, so as to Figure 5 For example, Figure 5 This illustrates how point cloud subsets A and B are fitted to form two line segments.
[0103] Accordingly, step S130 specifically includes:
[0104] Step S131: Determine the two discontinuous edge point cloud data of the two line segments, and calculate the height difference of the two edge point cloud data along the height direction.
[0105] It should be understood that when fitting two subsets of point clouds to form two line segments, the two line segments will have edge point cloud data, that is, the edge points where the two line segments are discontinuous (broken), and then the height difference between the two line segments formed by fitting is calculated.
[0106] by Figure 5 For example, a1 and b1 are the edge points of the two line segments, and then the height difference h2 between a1 and b1 is calculated.
[0107] It should be understood that by first fitting the point cloud data of the two point cloud subsets to form two line segments, and then determining the edge points of the two line segments, since the edge points of the two line segments are also the points closest to the steps, and are also the key to determining whether the self-moving robot can climb up, the accuracy can be further improved by calculating the height difference between the edge points of the two line segments as the first height.
[0108] It should be noted that in this embodiment, it is assumed that a step is insurmountable, meaning that one cannot climb back up after falling off the step, or that it is impossible to climb from the lower plane of the step to the higher plane. This step is referred to as a cliff. A cliff can also be defined as a step with an inclination angle greater than 45° and a height difference greater than 2cm. Since there are various reasons why a self-moving robot cannot climb from the lower plane of a step to the higher plane, such as the degree of ground moisture, the coefficient of friction, etc., the definition of a cliff can also be defined according to the specific application environment, and no specific restrictions are made here. Since the edge points of the two fitted line segments are also crucial in determining whether one can climb the cliff, using the edge points of the two fitted lines can improve accuracy.
[0109] like Figure 8 As shown, in the step height detection method of the third embodiment, step S120 may further include:
[0110] Step S122: When the point cloud data of two subsets of point clouds are not continuous and not at the same height, determine any two points that are not at the same height.
[0111] It should be understood that when the point cloud data of two subsets of point clouds are not continuous and are not at the same height, any two points that are not at the same height are determined, that is, any point is arbitrarily selected from the two subsets of point clouds.
[0112] Please see Figure 4 This can be done by extracting any point from a subset A of the point cloud and any point from a subset B of the point cloud, i.e., selecting any point from {a1, a2, ..., a30} and any point from {b1, b2, ..., b15}. There can be many possible combinations. For example, it could be selecting a1 from subset A and b1 from subset B, or it could be selecting a2 from subset A and b3 from subset B, and so on. Examples are not provided here.
[0113] More specifically, step S1222 includes:
[0114] When two subsets of point clouds are discontinuous and not at the same height, the two edge point cloud data of the two subsets of point clouds are determined to be discontinuous and not at the same height.
[0115] It should be understood that the edge points of the two point cloud subsets are the points closest to the steps and are crucial in determining whether one can climb the cliff. Therefore, the height difference can be calculated by taking the edge point cloud data of two discontinuous subsets at different heights, which will yield more accurate results. Figure 4 For example, we can take the edge point in the point cloud subset A as a1 and the edge point in the point cloud subset B as b1, and use a1 and b1 to calculate the height difference of the steps.
[0116] Additionally, it should be noted that the step height can be detected using the step height detection method provided in the second embodiment alone; or the step height can be detected using the step height detection method provided in the third embodiment alone; or the step height can be calculated simultaneously using the step height detection methods provided in the second and third embodiments, and then the optimal value of the two can be taken, or the two methods can be combined with certain weights.
[0117] For example, the step height detection method provided in the second embodiment calculates the step height as H1, while the step height detection method provided in the third embodiment calculates the step height as H2, where the first height H = α*H1 + β*H2. Since the step height calculation accuracy of the second embodiment is higher than that of the third embodiment, it is also possible to set certain conditions and prioritize H1 when the conditions are met, and use H2 when the conditions are not met. Other methods are also possible, which will not be listed here.
[0118] To achieve the above objectives, this embodiment also provides a control method for a self-moving robot, such as... Figure 9 As shown, the self-moving robot includes a downward-looking sensor. In this embodiment, taking the self-moving robot as an example, the step height detection method is mainly applied to cleaning robots, such as sweeping robots, floor scrubbers, etc., which will not be listed here. The control method of the self-moving robot can also be applied to vending robots or other service robots, such as food delivery robots, etc. This embodiment does not limit this.
[0119] The implementation details of the control method for the self-moving robot according to the fourth embodiment of the present invention will be described below. The following implementation details are provided for ease of understanding only and are not necessary for implementing this solution.
[0120] like Figure 9 As shown, the control method for this self-moving robot includes:
[0121] Step S210: Detect the first height of the preset area according to the above-described step height detection method;
[0122] It should be understood that the embodiments of the above-described step height detection method can all be applied to detect the first height of a preset area, and the beneficial effects of the above-described step height detection method are also applicable to step S210.
[0123] Step S220: Based on the first height, determine whether there is a cliff in the preset area as the first determination result;
[0124] It should be understood that if a step is insurmountable, meaning that one cannot climb back up after falling down the step, or cannot climb from the lower plane of the step to the higher plane, then the step is called a cliff. A cliff can also be defined as a step with an inclination angle greater than 45° and a height difference greater than 2cm (in other embodiments, it can also be determined according to the size of the rotating wheels of the self-moving robot). Since there are many reasons why the self-moving robot cannot climb from the lower plane of the step to the higher plane, such as the degree of moisture of the ground, the coefficient of friction, etc., the definition of a cliff can also be defined according to the specific application environment, and no specific restrictions are made here.
[0125] In this embodiment, since the operating environment of the self-moving robot is usually constant, it can be defined by a first height. For example, if the first height is greater than a threshold, it is considered a cliff. The threshold can also be set based on factors such as the size of the self-moving robot's rotating wheels and the operating environment.
[0126] Step S230: Control the movement of the self-moving robot according to the first judgment result.
[0127] It should be understood that if the first judgment result indicates that the obstacle is a cliff, then the self-moving robot needs to be controlled to avoid it, such as by moving backward; if the first judgment result indicates that the obstacle is not a cliff, then the self-moving robot needs to move along the original activity route.
[0128] like Figure 10 As shown, in the fifth embodiment of the control method for a self-moving robot, after step S220, the control method further includes:
[0129] Step S221: Obtain the current detection result of the downward-looking sensor, the current detection result including whether there is a cliff in the preset area;
[0130] It should be noted that if the downward-looking sensor is malfunctioning or in some special scenarios, simply using the downward-looking sensor to detect whether there is a cliff in a preset area will lead to inaccurate detection results.
[0131] An abnormality in the downward-facing sensor could be due to obstruction, aging, or other malfunctions, all of which can lead to inconsistent detection results. There are also special scenarios, such as when a self-moving robot crosses an obstacle, causing its head to tilt upwards. In this case, the distance detected by the downward-facing sensor increases, potentially triggering a downward-facing obstacle avoidance maneuver. For example, in the case of a robotic vacuum cleaner, this could result in missed areas being cleaned.
[0132] Step S222: When the current detection result indicates that there is a cliff in the preset area, the current detection result is corrected according to the first judgment result.
[0133] It should be understood that in cases of malfunction of the downward-looking sensor or in the aforementioned characteristic scenarios, the detection results of the downward-looking sensor may be abnormal, thus requiring correction of the current detection results based on the first judgment result.
[0134] First, determine whether a cliff exists using the aforementioned method for detecting the step height (this can also be understood as first detecting whether a cliff exists in a preset area using a lidar sensor). If it is determined that there is no cliff in the preset area, for example... Figure 2 and Figure 3 In this scenario, when the head of the self-moving robot is tilted up, the distance detected by the downward-looking sensor increases. Even if the self-moving robot moves to the corresponding position, the downward-looking sensor still detects the existence of a cliff. At this time, it is necessary to correct the result measured by the downward-looking sensor based on the first judgment result. If the first judgment result is that there is no cliff, the current detection result is corrected to no cliff, and normal passage is possible, thereby reducing the misjudgment of cliffs.
[0135] Accordingly, step S230 specifically includes:
[0136] Step S231: Control the movement of the self-moving robot based on the corrected current detection results.
[0137] like Figure 11 As shown, in the control method for a self-moving robot according to the sixth embodiment, step S222 includes:
[0138] Step S2221: When the current detection result indicates that a cliff exists in the preset area, obtain the historical detection results of the preset area;
[0139] It should be understood that if there is no cliff in the preset area according to the historical detection results, it is likely that the downward-looking sensor is abnormal or some characteristic scene appears. In this case, it is more accurate to combine the first judgment result.
[0140] Step S2222: If the historical detection results are inconsistent with the current detection results, the current detection results are corrected according to the first judgment result.
[0141] It should be understood that this explanation uses a robot vacuum cleaner cleaning a room as an example, but it is not limited to robot vacuum cleaners. Suppose that the historical detection results show that there is no cliff in the room, but the robot vacuum cleaner's current detection results indicate that there is a cliff. In this case, the current detection results need to be corrected based on the first judgment result (the result detected by the line LiDAR sensor). If the first judgment result is that there is no cliff, then it is considered that there is no cliff in this area.
[0142] like Figure 12 As shown, in the seventh embodiment of the control method for a self-moving robot, step S222 includes:
[0143] Step S2223: When the current detection result indicates that there is a cliff in the preset area, control the self-moving robot to avoid it and continue moving;
[0144] It should be understood that, assuming the self-moving robot is moving forward and there is a cliff in a predetermined area in its direction of movement, the self-moving robot will avoid the cliff, usually by moving backward. Alternatively, if the self-moving robot is moving backward and there is a cliff in a predetermined area in its direction of retreat, the self-moving robot will avoid the cliff, usually by moving forward.
[0145] Step S2224: After the self-moving robot avoids and continues to move for a preset time, obtain the second detection result of the downward-looking sensor after the preset time;
[0146] Step S2225: If the second detection result still indicates that there is a cliff in the preset area, the current detection result is corrected according to the first judgment result.
[0147] It should be understood that if the downward-looking sensor is continuously triggered after the self-moving robot avoids a preset time, and the downward-looking sensor still detects the existence of a cliff, then the situation can usually be considered as an abnormality of the downward-looking sensor. In this case, the current detection result needs to be corrected according to the first judgment result.
[0148] To achieve the above objectives, the present invention also provides a device for detecting step height, such as... Figure 13 As shown, the device for detecting the step height includes:
[0149] The first acquisition unit 301 is configured to acquire a point cloud dataset of a preset area, wherein the point cloud dataset includes at least two point cloud subsets.
[0150] Specifically, such as Figure 1As shown, assuming the obstacle is in front of the robot vacuum's travel direction, the robot continuously scans the front to acquire information about the obstacle, including a point cloud dataset of a preset area. The point cloud data in this dataset can be acquired by a line LiDAR sensor or generated by other sensors; no specific limitation is made here. In this embodiment, the point cloud data is acquired by a line LiDAR sensor. Alternatively, it can be assumed that the obstacle is behind the robot vacuum's travel direction, and the robot continuously scans the back side to acquire information about the obstacle during its travel.
[0151] Linear LiDAR sensors can be installed at the front of the robot vacuum cleaner, allowing it to scan for obstacles while moving forward. Alternatively, they can be installed on the back of the robot vacuum cleaner, opposite to its forward movement, enabling it to detect obstacles behind it while moving forward or backward.
[0152] The point cloud data in each subset of the point cloud is continuous, with Figure 4 and Figure 5 For example, please refer to [link / reference]. Figure 4 and Figure 5 The point cloud dataset comprises multiple point cloud subsets {A, B}. Subset A includes point cloud data {a1, a2, ..., a30}, where the point cloud data in subset A is continuous, meaning a1, a2, ..., a30 are consecutive point cloud data without breaks. Subset B includes point cloud data {b1, b2, ..., b15}, where b1, b2, ..., b15 are consecutive point cloud data without breaks. Any two point cloud subsets in the dataset can be located at the same height or at different heights; no specific restrictions are imposed here.
[0153] In addition, the height mentioned in this embodiment refers to the height in the direction of gravity, that is, the height perpendicular to the ground, which can also be called vertical height.
[0154] The first determining unit 302 is configured to determine two points or two lines that are not at the same height based on the two point cloud subsets when the point cloud data of two point cloud subsets are discontinuous and not at the same height.
[0155] It should be understood that in a point cloud dataset within a preset region, if the point cloud data of two point cloud subsets are not continuous, that is, the point cloud data of the two point cloud subsets are disconnected from each other at their edges; and the point cloud data of the two point cloud subsets are located at different heights, that is, not on the same plane.
[0156] Taking a step as an example, a step includes a first plane near or where the robot vacuum cleaner is located, a second plane parallel or approximately parallel to the first plane, and a step surface connecting the first and second planes. Assuming the preset area is a step, the point cloud subset in the point cloud dataset of the preset area can be either a first point cloud subset consisting of point cloud data located on the first plane, or a second point cloud subset consisting of point cloud data located on the second plane. The first and second point cloud subsets are not at the same height.
[0157] by Figure 4 and Figure 5 For example, the point cloud dataset includes point cloud subset A and point cloud subset B. The point cloud data {a1, a2, ..., a30} in point cloud subset A are all located in the first plane, and the point cloud data {b1, b2, ..., b15} in point cloud dataset A are all located in the second plane. Point cloud subset A and point cloud subset B are disconnected and discontinuous at the edge points a1 and b1.
[0158] Based on the two point cloud subsets, determine two points or two lines that are not at the same height. Please refer to [link / reference]. Figure 4 This can involve extracting any point from a subset A of the point cloud and any point from a subset B of the point cloud, i.e., selecting any point from {a1, a2, ..., a30} and any point from {b1, b2, ..., b15}. The combinations can be varied. For example, it could be selecting a1 from subset A and b1 from subset B, or a2 from subset A and b3 from subset B, and so on. Further examples are not provided here. Alternatively, subsets A and B can be fitted to form two lines, and the height difference between these two lines can be calculated.
[0159] The first calculation unit 303 is configured to calculate the height difference between the two points or two lines along the height direction as the first height of the target step.
[0160] It should be understood that calculating the height difference between the two points or two line segments along the height direction means calculating the vertical height difference between the two points or two lines.
[0161] by Figure 4 For example, Figure 4 The diagram illustrates the calculation of the height difference h1 between point cloud subsets a1 in subset A and b1 in subset B. Figure 5 For example, Figure 5The diagram illustrates fitting point cloud subsets A and B into two line segments, and then calculating the height difference h2 between the two fitted line segments. Since there may be an error between the point cloud data acquired by the line lidar sensor, for example, a 5mm error in the spacing between two adjacent point cloud data points, fitting the point cloud data from the subsets into lines and then calculating the height difference between the two fitted lines can compensate for the spacing error between adjacent point cloud data points, making the calculation results more accurate.
[0162] This invention acquires a point cloud dataset of a preset area, which includes at least two point cloud subsets. The point cloud data in each subset is continuous. When the point cloud data of two subsets are discontinuous and not at the same height, two points or two lines at different heights are identified based on the two subsets. The height difference between the two points or two lines along the height direction is calculated as the first height of the target step. In this way, the existence of the preset area can be determined in advance by the first height of the target step to determine whether there is a cliff and whether it is possible to continue. This reduces the risk of the self-moving robot falling and avoids the situation in the prior art where the detection of step height by the self-moving robot mainly relies on the downward-looking sensor under the robot body. However, the downward-looking sensor usually needs part of the robot body to cross the step to be triggered, which is prone to misjudgment.
[0163] To achieve the above objectives, the present invention also provides a control device for a self-moving robot, the control device comprising:
[0164] The first detection unit 401 is configured to detect the first height of a preset area according to the step height detection method;
[0165] The first judgment unit 402 is configured to determine whether there is a cliff in the preset area based on the first height as a first judgment result;
[0166] It should be understood that if a step is insurmountable, meaning that one cannot climb back up after falling down the step, or cannot climb from the lower plane of the step to the higher plane, then the step is called a cliff. A cliff can also be defined as a step with an inclination angle greater than 45° and a height difference greater than 2cm (in other embodiments, it can also be determined according to the size of the rotating wheels of the self-moving robot). Since there are many reasons why the self-moving robot cannot climb from the lower plane of the step to the higher plane, such as the degree of moisture of the ground, the coefficient of friction, etc., the definition of a cliff can also be defined according to the specific application environment, and no specific restrictions are made here.
[0167] In this embodiment, since the operating environment of the self-moving robot is usually constant, it can be defined by a first height. For example, if the first height is greater than a threshold, it is considered a cliff. The threshold can also be set based on factors such as the size of the self-moving robot's rotating wheels and the operating environment.
[0168] The first control unit 403 is configured to control the movement of the self-moving robot based on a first judgment result.
[0169] It should be understood that if the first judgment result indicates that the obstacle is a cliff, then the self-moving robot needs to be controlled to avoid it, such as by moving backward; if the first judgment result indicates that the obstacle is not a cliff, then the self-moving robot needs to move along the original activity route.
[0170] To achieve the above objectives, the present invention also provides a robot, such as... Figure 15 As shown, the self-moving robot includes at least one processor 501; and a memory 502 communicatively connected to the at least one processor 501; wherein the memory 502 stores instructions executable by the at least one processor 501, the instructions being executed by the at least one processor 501 to enable the at least one processor 501 to execute the step height detection method of the first to eighth embodiments described above, and / or the control method of the self-moving robot described above.
[0171] The memory 502 and processor 501 are connected via a bus, which can include any number of interconnecting buses and bridges. The bus connects various circuits of one or more processors 501 and memory 502 together. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 501 is transmitted over a wireless medium via an antenna, which further receives data and transmits it to processor 501.
[0172] Processor 501 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 502 can be used to store data used by processor 501 during operation.
[0173] To achieve the above objectives, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for detecting step height and / or the above-described method for controlling a self-moving robot.
[0174] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0175] Obviously, the embodiments described above are merely some, not all, embodiments of the present invention. Based on the embodiments of the present invention, those skilled in the art can make other variations or modifications without creative effort, and all such variations should fall within the scope of protection of the present invention.
Claims
1. A cliff detection method, applied to a self-moving robot, characterized in that, include: The linear lidar sensor on the self-mobile robot is controlled to continuously scan a preset area to obtain a point cloud dataset of the preset area. The point cloud dataset includes at least two point cloud subsets, and the point cloud data in each point cloud subset is in a continuous state. When the point cloud data of two subsets of point clouds are not continuous and not at the same height, determine two points or two lines that are not at the same height based on the two subsets of point clouds. Calculate the first height of the target step along the height direction based on two points or two lines that are not at the same height. Based on the first height and the preset height threshold, determine whether there is a cliff in the preset area.
2. The cliff detection method as described in claim 1, characterized in that, The step of determining whether a cliff exists in the preset area based on the first height and a preset height threshold includes: When the first height of the target step is greater than a preset height threshold, it is determined that a cliff exists in the preset area; When the first height of the target step is less than or equal to a preset height threshold, it is determined that there is no cliff in the preset area; The above judgment result is set as the first judgment result.
3. The cliff detection method as described in claim 2, characterized in that, After determining whether a cliff exists in the preset area, the method further includes: The robot controls its downward-facing sensor to probe the preset area and obtains the current detection result of the downward-facing sensor; the current detection result includes whether there is a cliff in the preset area or not. When the current detection result indicates that there is a cliff in the preset area, the current detection result is corrected according to the first judgment result.
4. The cliff detection method as described in claim 3, characterized in that, When the current detection result indicates the presence of a cliff in a preset area, the current detection result is corrected based on the first judgment result, including: Detect whether the body of the self-moving robot is tilted up, and detect whether the detection distance of the downward-looking sensor has increased; When the robot's body is detected to be tilted up and the detection distance of the downward-looking sensor increases, and the current detection result indicates that there is a cliff in the preset area, the current detection result is corrected according to the first judgment result.
5. The cliff detection method as described in claim 3 or 4, characterized in that, The step of correcting the current detection result based on the first judgment result includes: When the first judgment result is that there is no cliff in the preset area, while the current detection result is that there is a cliff in the preset area, the current detection result is corrected to the premise that there is no cliff in the preset area. When the first determination result is that there is a cliff in the preset area, and the current detection result is that there is a cliff in the preset area, it is determined that the current detection result is that there is a cliff in the preset area.
6. The cliff detection method as described in claim 3, characterized in that, When the current detection result indicates the presence of a cliff in a preset area, the current detection result is corrected based on the first judgment result, including: When the current detection result indicates that a cliff exists in the preset area, the historical detection results of the preset area are obtained; If the historical detection results are inconsistent with the current detection results, the current detection results shall be corrected according to the first judgment result.
7. The cliff detection method as described in claim 6, characterized in that, If the historical detection results are inconsistent with the current detection results, the current detection results are corrected according to the first judgment result, including: If the historical detection result indicates that there is no cliff in the preset area, then it is determined that the historical detection result is inconsistent with the current detection result; If the historical detection results are inconsistent with the current detection results, the current detection results shall be corrected according to the first judgment result.
8. The cliff detection method as described in claim 3, characterized in that, When the current detection result indicates the presence of a cliff in a preset area, the current detection result is corrected based on the first judgment result, including: When the current detection result indicates that there is a cliff in the preset area, the self-moving robot is controlled to avoid the cliff and continue moving. After the self-moving robot avoids the obstacle and continues to move for a preset time, the second detection result of the downward-looking sensor after the preset time is obtained; If the second detection result still indicates that there is a cliff in the preset area, the current detection result is corrected according to the first judgment result.
9. The cliff detection method as described in claim 8, characterized in that, If the second detection result still indicates that a cliff exists in the preset area, the current detection result is corrected based on the first judgment result, including: If the second detection result still indicates that there is a cliff in the preset area, the downward-looking sensor is determined to be abnormal. When the downward-looking sensor malfunctions, the current detection result is corrected based on the first judgment result.
10. A cliff detection device, applied to a self-moving robot, characterized in that, include: The first acquisition unit is configured to control the line lidar sensor on the self-mobile robot to continuously scan a preset area and acquire a point cloud dataset of the preset area. The point cloud dataset includes at least two point cloud subsets, and the point cloud data in each point cloud subset is in a continuous state. The first determining unit is configured to determine two points or two lines that are not at the same height based on the two point cloud subsets when the point cloud data of two point cloud subsets are not continuous and are not at the same height. The first calculation unit is configured to calculate the first height of the target step along the height direction based on two points or two lines that are not at the same height. The first judgment unit is configured to determine whether there is a cliff in the preset area based on the first height and a preset height threshold.
11. A self-moving robot, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the cliff detection method as described in any one of claims 1 to 9.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the cliff detection method according to any one of claims 1 to 9.