Sweeping machine control method and device and sweeping machine

By identifying the target obstacle point set through obstacle maps and emergency points, and separating and fitting straight lines, the problem of robot vacuums misjudging angular obstacles is solved, resulting in a more accurate cleaning path and reducing missed areas and collisions.

CN118902337BActive Publication Date: 2025-11-07HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410953976.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2025-11-07
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

Existing robotic vacuum cleaners are prone to misjudging the outline of obstacles with sharp edges, leading to missed areas or collisions with obstacles.

Method used

The target obstacle point set is determined by the obstacle map and emergency points. The obstacle point sets located on both sides of the emergency points are separated and straight lines are fitted to them respectively. If the difference in the slope of the straight lines is greater than the threshold, it is determined as the target straight line. The sweeper is controlled to rotate in the direction pointed by the target straight line for cleaning.

Benefits of technology

It improves the accuracy of obstacle contour extraction and reduces missed scans and obstacle collisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118902337B_ABST
    Figure CN118902337B_ABST
Patent Text Reader

Abstract

The application provides a sweeping machine control method and device and a sweeping machine. The application performs straight line fitting on a first point set located on one side of a first emergency point and a second point set located on the other side of the first emergency point. If the first point set can be successfully fitted into a first straight line and the second point set can be successfully fitted into a second straight line, and the slope difference between the first straight line and the second straight line is large, it indicates that the obstacle contour needs to be described by different straight lines on both sides, thereby improving the extraction accuracy of the obstacle contour line. Further, the first straight line or the second straight line is determined as a target straight line. If the rotation angle of the sweeping machine from the current travel direction to the direction pointed by the target straight line is within the allowable rotation angle range, the sweeping machine is controlled to rotate to the first target travel direction, i.e. the direction pointed by the target straight line, thereby reducing the situation of missing sweeping or collision with the obstacle.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent robots, in particular to a robot vacuum cleaner control method and device. BACKGROUND

[0002] The current edge cleaning method of the robot vacuum cleaner mainly aligns the moving direction of the robot vacuum cleaner with the profile line of the obstacle or the tangent direction of the profile line of the obstacle. However, the current extraction method of the obstacle profile line may misjudge the complex shape or structure of the obstacle, especially when the edge of the obstacle has an angle, the obstacle profile with the angle may be simplified as a straight line, so that the obstacle profile line is not accurately determined, and then in the process of cleaning according to the simplified obstacle profile line, the situation of missing cleaning or collision with the obstacle may occur. SUMMARY

[0003] Therefore, the present application provides a robot vacuum cleaner control method and device to reduce the situation of missing cleaning or collision with the obstacle.

[0004] The technical scheme provided by the present application is as follows:

[0005] According to the embodiment of the first aspect of the present application, a robot vacuum cleaner control method is provided, which is applied to a robot vacuum cleaner, and the method comprises:

[0006] determining a target obstacle point set according to the obtained obstacle map and the obtained first emergency point, the target obstacle point set comprising a plurality of obstacle points in the moving direction of the robot vacuum cleaner, and the distance between the first emergency point and the robot vacuum cleaner being less than or equal to a first threshold value;

[0007] determining a first point set and a second point set from the target obstacle point set, the first point set comprising obstacle points on one side of the first emergency point, and the second point set comprising obstacle points on the other side of the first emergency point;

[0008] if a first straight line is successfully fitted according to the first point set, and a second straight line is successfully fitted according to the second point set, then in the case that the absolute value of the difference between the slope of the first straight line and the slope of the second straight line is greater than a second threshold value, the first straight line or the second straight line is determined as a target straight line;

[0009] if the first rotation angle is within the configured angle range, then the direction pointed by the target straight line is determined as the first target moving direction of the robot vacuum cleaner, wherein the first rotation angle is the angle between the current moving direction of the robot vacuum cleaner and the direction pointed by the target straight line;

[0010] controlling the robot vacuum cleaner to rotate to the first target moving direction.

[0011] Optionally, the determining the target obstacle point set according to the obtained obstacle map and the obtained first emergency point comprises:

[0012] taking the obtained first emergency point as a reference point, determining a target obstacle point adjacent to the reference point and having a distance less than or equal to a third threshold from the reference point based on the obstacle map, taking the target obstacle point as a reference point, returning to perform the step of determining a target obstacle point adjacent to the reference point and having a distance less than or equal to the third threshold from the reference point in the obstacle map until there is no target obstacle point having a distance less than or equal to the third threshold from the reference point, or the number of determined target obstacle points reaches a fourth threshold; wherein the first emergency point is determined according to the current pose of the sweeping robot and the obstacle map;

[0013] determining the first emergency point and a set of all target obstacle points as the target obstacle point set.

[0014] Optionally, before the determining the first point set and the second point set from the target obstacle point set, the method further comprises:

[0015] fitting a reference straight line according to the target obstacle point set;

[0016] if the fitting of the reference straight line is successful, then performing the step of determining the first point set and the second point set from the target obstacle point set;

[0017] The method further comprises:

[0018] if the fitting of the first straight line according to the first point set fails and / or the fitting of the second straight line according to the second point set fails, or the absolute value of the difference between the slope of the first straight line and the slope of the second straight line is less than or equal to a second threshold, then determining the reference straight line as a target straight line.

[0019] Optionally, in the case where the fitting of the reference straight line fails, or the first rotation angle is not within the configured angle range, the method further comprises:

[0020] if the vertical distance between the sweeping robot and the obtained target wall line is less than a fifth threshold, then determining the direction pointed by the target wall line as a first target travel direction;

[0021] wherein the target wall line is determined based on point cloud data collected by a laser radar sensor deployed above the sweeping robot.

[0022] Optionally, the method for determining the target wall line comprises:

[0023] Determine a straight line segment set according to point cloud data collected by the laser radar sensor, the point cloud data comprising a plurality of position points, the straight line segment set comprising at least one straight line segment, a length of each straight line segment being greater than or equal to a sixth threshold value, and a distance between two adjacent position points on each straight line segment being less than or equal to a seventh threshold value;

[0024] For each straight line segment, if a second rotation angle is within a configured angle range, the straight line segment is determined as a candidate wall line; wherein the second rotation angle is an angle between a current travel direction of the robot and a direction in which the straight line segment points.

[0025] A candidate wall line closest to the robot in a vertical distance is determined as a target wall line.

[0026] Optionally, the method further comprises:

[0027] If the vertical distance between the robot and the target wall line is greater than or equal to a fifth threshold value, a normal direction of a line direction between the center of the robot and the first emergency point is determined.

[0028] The first target travel direction is determined based on the normal direction.

[0029] Optionally, before determining a target obstacle point set according to the obtained obstacle map and the obtained first emergency point, the method further comprises:

[0030] A first emergency point is determined according to a current pose of the robot and the obstacle map.

[0031] Determine a straight line segment set according to point cloud data collected by the laser radar sensor, the point cloud data comprising a plurality of position points, the straight line segment set comprising at least one straight line segment, a length of each straight line segment being greater than or equal to a sixth threshold value, and a distance between two adjacent position points on each straight line segment being less than or equal to a seventh threshold value;

[0032] For each straight line segment, if a second rotation angle is within a configured angle range, the straight line segment is determined as a candidate wall line; wherein the second rotation angle is an angle between a current travel direction of the robot and a direction in which the straight line segment points.

[0033] A candidate wall line closest to the robot in a vertical distance is determined as a target wall line.

[0034] The method further comprises:

[0035] If a line segment set is not determined according to the point cloud data collected by the laser radar sensor, or a candidate wall line is not determined from the line segment set, the step of determining a target obstacle point set according to the obtained obstacle map and the obtained first emergency point is performed;

[0036] In a case where the target wall line is determined, if it is determined that the vertical distance between the sweeper and the target wall line is less than an eighth threshold value, a direction pointed by the target wall line is determined as a first target travel direction;

[0037] In a case where the target wall line is determined, if it is determined that the vertical distance between the sweeper and the target wall line is greater than or equal to the eighth threshold value, the step of determining a target obstacle point set according to the obtained obstacle map and the obtained first emergency point is performed.

[0038] Optionally, after the sweeper is controlled to rotate to the first target travel direction, the method further includes:

[0039] If a second emergency point is determined according to the current pose of the sweeper and the obtained obstacle map, a second target travel direction of the sweeper is determined according to the second emergency point, and the sweeper is controlled to rotate to the second target travel direction, until a second emergency point is not determined according to the current pose of the sweeper and the obtained obstacle map after the sweeper is rotated, or the sweeper continuously rotates for a preset number of times without traveling.

[0040] According to an embodiment of the second aspect of the present application, a sweeper control device is provided, applied to a sweeper, and the device includes:

[0041] A determination unit is configured to determine a target obstacle point set according to an obtained obstacle map and an obtained first emergency point, the target obstacle point set including a plurality of obstacle points in a movement direction of the sweeper, and the distance between the first emergency point and the sweeper being less than or equal to a first threshold value;

[0042] A first point set and a second point set are determined from the target obstacle point set, the first point set including obstacle points on one side of the first emergency point, and the second point set including obstacle points on the other side of the first emergency point;

[0043] A fitting unit is configured to, if a first straight line is successfully fitted according to the first point set, and a second straight line is successfully fitted according to the second point set, determine the first straight line or the second straight line as a target straight line in a case where the absolute value of the difference between the slope of the first straight line and the slope of the second straight line is greater than a second threshold value.

[0044] The control unit is configured to determine a direction in which the target straight line points to as a first target moving direction of the robot cleaner if a first rotation angle is within a configured angle range, wherein the first rotation angle is an angle between a current moving direction of the robot cleaner and the direction in which the target straight line points to, and control the robot cleaner to rotate to the first target moving direction.

[0045] Optionally, the determination unit is specifically configured to:

[0046] determine a target obstacle point adjacent to the reference point and having a distance less than or equal to a third threshold value from the reference point based on the obstacle map, take the target obstacle point as the reference point, and return to execute the step of determining a target obstacle point adjacent to the reference point and having a distance less than or equal to the third threshold value from the reference point in the obstacle map until there is no target obstacle point having a distance less than or equal to the third threshold value from the reference point, or the number of determined target obstacle points reaches a fourth threshold value, wherein the first emergency point is determined according to a current pose of the robot cleaner and the obstacle map;

[0047] determine the first emergency point and a set of all target obstacle points as a target obstacle point set.

[0048] Optionally, before determining the first point set and the second point set from the target obstacle point set, the determination unit is further configured to:

[0049] fit a reference straight line according to the target obstacle point set;

[0050] if the fitting of the reference straight line is successful, execute the step of determining the first point set and the second point set from the target obstacle point set;

[0051] if fitting a first straight line according to the first point set fails and / or fitting a second straight line according to the second point set fails, or an absolute value of a difference between a slope of the first straight line and a slope of the second straight line is less than or equal to a second threshold value, determine the reference straight line as a target straight line;

[0052] Optionally, if the fitting of the reference straight line fails, or the first rotation angle is not within the configured angle range, the control unit is specifically configured to:

[0053] if a perpendicular distance between the robot cleaner and an obtained target wall line is less than a fifth threshold value, determine a direction in which the target wall line points to as a first target moving direction;

[0054] wherein the target wall line is determined based on point cloud data collected by a laser radar sensor arranged above the robot cleaner.

[0055] Optionally, the method for determining the target wall line comprises:

[0056] determining a set of straight line segments according to the point cloud data collected by the laser radar sensor, the point cloud data comprising a plurality of position points, the set of straight line segments comprising at least one straight line segment, a length of each straight line segment being greater than or equal to a sixth threshold value, and a distance between two adjacent position points on each straight line segment being less than or equal to a seventh threshold value;

[0057] for each straight line segment, if a second rotation angle is within a configured angle range, determining the straight line segment as a candidate wall line, wherein the second rotation angle is an angle between a current travel direction of the robot and a direction in which the straight line segment points;

[0058] determining a candidate wall line closest to the robot in a vertical distance as the target wall line.

[0059] Optionally, the control unit is further configured to:

[0060] if the vertical distance between the robot and the target wall line is greater than or equal to a fifth threshold value, determining a normal direction of a line direction between the center of the robot and the first emergency point;

[0061] determining the first target travel direction based on the normal direction.

[0062] Optionally, before determining the target obstacle point set according to the obtained obstacle map and the obtained first emergency point, the determination unit is further configured to:

[0063] determining a first emergency point according to a current pose of the robot and the obstacle map;

[0064] determining a set of straight line segments according to the point cloud data collected by the laser radar sensor, the point cloud data comprising a plurality of position points, the set of straight line segments comprising at least one straight line segment, a length of each straight line segment being greater than or equal to a sixth threshold value, and a distance between two adjacent position points on each straight line segment being less than or equal to a seventh threshold value;

[0065] for each straight line segment, if a second rotation angle is within a configured angle range, determining the straight line segment as a candidate wall line, wherein the second rotation angle is an angle between a current travel direction of the robot and a direction in which the straight line segment points;

[0066] determining a candidate wall line closest to the robot in a vertical distance as the target wall line.

[0067] If the straight line segment set is not determined according to the point cloud data collected by the laser radar sensor, or the candidate wall line is not determined from the straight line segment set, the step of determining the target obstacle point set according to the obtained obstacle map and the obtained first emergency point is performed.

[0068] In a case where the target wall line is determined, if it is determined that the vertical distance between the sweeper and the target wall line is less than an eighth threshold value, a direction pointed by the target wall line is determined as a first target travel direction.

[0069] In a case where the target wall line is determined, if it is determined that the vertical distance between the sweeper and the target wall line is greater than or equal to the eighth threshold value, the step of determining the target obstacle point set according to the obtained obstacle map and the obtained first emergency point is performed.

[0070] Optionally, after the sweeper is controlled to rotate to the first target travel direction, the control unit is further configured to:

[0071] If a second emergency point is determined according to the current pose of the sweeper and the obtained obstacle map, a second target travel direction of the sweeper is determined according to the second emergency point, so as to control the sweeper to rotate to the second target travel direction, until a second emergency point is not determined according to the current pose of the sweeper and the obtained obstacle map after the sweeper completes the rotation, or the sweeper continuously rotates for a preset number of times without traveling.

[0072] According to the embodiment of the third aspect of the present application, a sweeper is provided, comprising:

[0073] a controller configured to perform the method according to the first aspect;

[0074] a heterogeneous sensor configured to collect data of a target scene, wherein the heterogeneous sensor comprises at least one of a laser radar sensor disposed above the sweeper, a line laser sensor disposed in front of the sweeper, and a distance sensor disposed on a side of the sweeper.

[0075] According to the above technical solution, the target obstacle point set is determined by the obtained obstacle map and the obtained first emergency point, the first point set located on one side of the first emergency point and the second point set located on the other side of the first emergency point are determined in the target obstacle point set, and the first point set and the second point set are respectively subjected to straight line fitting, which is equivalent to fitting the obstacle contour lines on both sides of the emergency point respectively. If the first point set can be successfully fitted into a first straight line and the second point set can be successfully fitted into a second straight line, and the slope difference between the first straight line and the second straight line is large, it indicates that the obstacle is an obstacle with corners, and the obstacle contour needs to be described by different straight lines on both sides, thereby improving the extraction accuracy of the obstacle contour line. Further, the first straight line or the second straight line is determined as a target straight line, if the rotation angle of the sweeper from the current advancing direction to the direction pointed by the target straight line is within the allowable rotation angle range, the direction pointed by the target straight line is determined as the first target advancing direction, after the first target advancing direction is determined, the sweeper is controlled to rotate to the first target advancing direction, so as to control the sweeper to clean along the obstacle contour, thereby reducing the situation that the sweeper misses cleaning or collides with the obstacle. BRIEF DESCRIPTION OF DRAWINGS

[0076] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.

[0077] Figure 1 A flow chart of a sweeper control method provided for an embodiment of the present application is shown in the figure;

[0078] Figure 2 A schematic diagram of the installation position of a sweeper and a heterogeneous sensor provided for an embodiment of the present application is shown in the figure;

[0079] Figure 3 A schematic diagram of contour line fitting provided for an embodiment of the present application is shown in the figure;

[0080] Figure 4 A schematic diagram of region division of a sweeper provided for an embodiment of the present application is shown in the figure;

[0081] Figure 5 A schematic diagram of straight line segment extraction of a target wall line provided for an embodiment of the present application is shown in the figure;

[0082] Figure 6 A schematic diagram of rotation angle calculation for small and medium size radius objects provided for an embodiment of the present application is shown in the figure;

[0083] Figure 7 A flow chart of a sweeper control method provided for an embodiment of the present application is shown in the figure;

[0084] Figure 8 A schematic diagram of the structure of an electronic device provided for an embodiment of the present application is shown in the figure;

[0085] Figure 9 A structure diagram of a sweeping machine control device is provided in the embodiments of the present application. DETAILED DESCRIPTION

[0086] In order to enable a person skilled in the art to better understand the technical solutions provided by the embodiments of the present application, and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more apparent and easy to understand, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the drawings.

[0087] Reference is made to Figure 1 , Figure 1 A flow chart of a sweeping machine control method is provided in the embodiments of the present application, and the method comprises the following steps.

[0088] In step 101, a target obstacle point set is determined according to an obtained obstacle map and an obtained first emergency point.

[0089] The target obstacle point set comprises a plurality of obstacle points in the moving direction of the sweeping machine, and the distance between the first emergency point and the sweeping machine is less than or equal to a first threshold value.

[0090] In the embodiments, the determined target obstacle point set comprises a plurality of obstacle points in the moving direction of the sweeping machine, and the first emergency point can be one of the plurality of obstacle points, which is the obstacle point closest to the sweeping machine and having a distance less than or equal to the first threshold value from the sweeping machine. The method can be applied to a controller in the sweeping machine.

[0091] In the embodiments, the method for obtaining the emergency point can be:

[0092] In the process of the sweeping machine moving, if it is determined according to the current pose of the sweeping machine and the obtained obstacle map that the sweeping machine will collide with any obstacle if it continues to move in the current moving direction, and the distance between the obstacle point closest to the sweeping machine among the obstacle points included in the obstacle and the sweeping machine is less than or equal to the first threshold value, then the obstacle point closest to the sweeping machine is determined as the emergency point.

[0093] In other words, in the embodiments, the emergency point is the collision point at which the sweeping machine collides with the obstacle within a preset distance if it continues to move in the current moving direction.

[0094] As an embodiment, the method for determining the target obstacle point set according to the obtained obstacle map and the obtained first emergency point can comprise:

[0095] The first emergency point obtained is taken as a reference point, target obstacle points adjacent to the reference point and having a distance less than or equal to a third threshold value from the reference point are determined based on the obstacle map, the target obstacle points are taken as the reference points, the step of determining the target obstacle points adjacent to the reference point and having a distance less than or equal to the third threshold value from the reference point in the obstacle map is returned to be executed until there is no target obstacle point having a distance less than or equal to the third threshold value from the reference point, or the number of the target obstacle points determined reaches a fourth threshold value; wherein the first emergency point is determined according to the current pose of the sweeping robot and the obstacle map;

[0096] The first emergency point and the set of all target obstacle points are determined as a target obstacle point set.

[0097] In the embodiment, the obstacle map can be constructed according to data collected by a plurality of heterogeneous sensors deployed on the sweeping robot. For example, the heterogeneous sensors can include a lidar sensor, a line laser sensor, and a distance sensor.

[0098] The following will be described in combination with Figure 2 A sweeping robot according to the embodiment is briefly introduced.

[0099] Please refer to Figure 2 , Figure 2 A sweeping robot and a detection sensor installation position diagram provided for the embodiment are shown.

[0100] As shown in Figure 2 , three heterogeneous sensors are deployed on the sweeping robot, which are a lidar sensor deployed above the sweeping robot, a line laser sensor deployed in front of the sweeping robot, and a distance sensor deployed on the side of the sweeping robot.

[0101] In the embodiment, the distance sensor is deployed on the right side of the sweeping robot, and the sweeping robot can clean along the edge of the target scene through the right side. It can be easily understood that if the distance sensor is deployed on the left side of the sweeping robot, the sweeping robot can clean along the edge of the target scene through the left side. The present application does not limit this.

[0102] In the embodiment, the distance sensor can be a position sensitive detector (PSD sensor) or a time of flight sensor (TOF sensor), which is used to determine the distance between the sensor and the obstacle in the target scene. The present application does not limit this.

[0103] In the embodiment, the effective detection distance of the laser radar sensor is far, and the detection distance of the line laser sensor and the distance sensor is relatively short, which can only detect the obstacles in a short distance range. The line laser sensor is used to detect the distance of the obstacles in a fan-shaped plane, and the distance sensor is usually used to detect the distance of the obstacles on the emission point.

[0104] In the embodiment, the process of constructing the obstacle map by the heterogeneous sensors is a common method in the related art, which will not be described herein.

[0105] So far, the description of the sweeping robot and the installation position of the heterogeneous sensors is ended. Figure 2

[0106] In the embodiment, after the obstacle map is constructed by the data collected by the heterogeneous sensors deployed on the sweeping robot, the first emergency point can be determined according to the current pose of the sweeping robot and the obstacle map. The method for determining the first emergency point has been described in detail above, which will not be described herein.

[0107] After the first emergency point is determined, the target obstacle point set can be determined based on the first emergency point and the obstacle map. Specifically, in the embodiment, the adjacent points are diffused to the left and right directions of the sweeping robot with a certain threshold distance ε1(third threshold) centered on the first emergency point, until the distance between the two adjacent points in the left and right directions exceeds the third threshold ε1 or the number of extracted points exceeds the fourth threshold τ1. The set of the emergency point and the diffused adjacent points is determined as the target obstacle point set.

[0108] So far, the description of step 101 is ended, and step 102 is executed.

[0109] Step 102, determining the first point set and the second point set from the target obstacle point set.

[0110] The first point set includes the obstacle points on one side of the emergency point, and the second point set includes the obstacle points on the other side of the emergency point.

[0111] In the embodiment, after the target obstacle point set is determined by step 101, the first point set corresponding to the obstacle points on one side of the emergency point and the second point set corresponding to the obstacle points on the other side of the emergency point can be determined from the target obstacle point set.

[0112] So far, the description of step 102 is ended, and step 103 is executed.

[0113] ​If the first straight line is fitted according to the first point set and the second straight line is fitted according to the second point set, and the absolute value of the difference between the slope of the first straight line and the slope of the second straight line is greater than the second threshold value, the first straight line or the second straight line is determined as the target straight line.

[0114] In this embodiment, after the first point set and the second point set are determined from the target obstacle point set through step 102, the obstacle points included in the first point set are subjected to straight line fitting, and the obstacle points included in the second point set are subjected to straight line fitting, which is equivalent to extracting the obstacle contour lines on both sides of the emergency point, i.e., the collision point where the robot cleaner continues to move in the current moving direction and collides with the obstacle.

[0115] In this embodiment, if the obstacle points included in the first point set are successfully fitted as the first straight line, and the obstacle points included in the second point set are successfully fitted as the second straight line, it is further determined whether the absolute value of the difference between the slope of the first straight line and the slope of the second straight line is greater than a preset second threshold value.

[0116] In this embodiment, if the absolute value of the difference between the slope of the first straight line and the slope of the second straight line is greater than the second threshold value, it indicates that the difference between the slopes of the first straight line and the second straight line is large, and the trends of the obstacle contour lines corresponding to the first straight line and the second straight line are also completely different, indicating that the obstacle has an edge near the emergency point. At this time, the first straight line or the second straight line can be determined as the target straight line according to the cleaning mode of the robot cleaner (cleaning along the right edge or cleaning along the left edge).

[0117] For example, if the robot cleaner is in the mode of cleaning along the right edge, the straight line fitted by the point set on the left side of the emergency point, such as the first straight line, can be taken as the target straight line. If the robot cleaner is in the mode of cleaning along the left edge, the straight line fitted by the point set on the right side of the emergency point, such as the second straight line, can be taken as the target straight line, which is not limited in the present application.

[0118] The following will be described in combination with Figure 3 The process of contour line fitting is briefly described.

[0119] Please refer to Figure 3 , Figure 3 the contour line fitting schematic diagram provided by the embodiments of the present application.

[0120] As shown in Figure 3 , the obstacle in the figure is an obstacle with an edge. If the contour line of the obstacle is fitted according to the contour line fitting method in the related art, all the obstacle points included in the determined obstacle point set (i.e., the plurality of obstacle points in the figure) are subjected to one-time overall straight line fitting, and the fitted straight line is the overall fitting straight line in the figure.

[0121] In the related art, the overall fitting straight line is directly determined as the contour line of the obstacle, and then the robot cleaner is controlled to rotate in the direction indicated by the overall fitting straight line and to perform further cleaning. It can be predicted that the robot cleaner rotates in the direction indicated by the overall fitting straight line and performs further cleaning, which actually ignores the actual shape of the obstacle, and thus a situation of missing cleaning the parts on both sides of the corner of the obstacle occurs in the cleaning process.

[0122] According to the method provided in the embodiments of the present application, after the emergency point (i.e., the point on the obstacle closest to the robot cleaner) is determined, the target obstacle point set is determined according to the emergency point, the target obstacle point set is divided into a first point set located on the left side of the emergency point and a second point set located on the right side of the emergency point, and straight line fitting is respectively performed on the first point set and the second point set.

[0123] If the absolute value of the slope difference between the first straight line fitted according to the first point set and the second straight line fitted according to the second point set is greater than the second threshold value, it indicates that the obstacle contour lines on the left and right sides of the emergency point are quite different, and cannot be simply fitted by one straight line, but need to be respectively fitted for the obstacle contours on the left and right sides of the emergency point, the first straight line corresponds to the obstacle contour on the left side of the emergency point, and the second straight line corresponds to the obstacle contour on the right side of the emergency point.

[0124] After the obstacle contour is determined, since Figure 3 The robot cleaner in the formula (1) is a robot cleaner that cleans along the right side of the target scene, so at this time, the contour line on the left side of the emergency point, i.e., the first straight line, can be selected as the target straight line.

[0125] Thus far, the description of the contour line fitting schematic diagram in the formula (1) is ended. Figure 3

[0126] In the present embodiment, before the first point set and the second point set are determined from the target obstacle point set in the formula (1), the robot cleaner control method can further include:

[0127] Fitting a reference straight line according to the target obstacle point set;

[0128] In the case where the reference straight line fitting is successful, the step of determining the first point set and the second point set from the target obstacle point set is performed;

[0129] If the first straight line fails to be fitted according to the first point set and / or the second straight line fails to be fitted according to the second point set, or the absolute value of the difference between the slope of the first straight line and the slope of the second straight line is less than or equal to the second threshold value, the reference straight line is determined as the target straight line.

[0130] ​In this embodiment, after determining the target obstacle point set, a reference straight line can be fitted based on all the obstacle points included in the target obstacle point set, that is, a relatively rough obstacle outline can be fitted by fitting all the obstacle points included in the target obstacle point set.

[0131] If the reference line fitting is successful, the next step is to determine the first point set and the second point set from the target obstacle point set, and then fit the obstacle contours on the left and right sides of the emergency point respectively.

[0132] If fitting fails at least one of the first and second straight lines, for example, if the number of obstacle points included in at least one point set in the first and second point sets is less than the preset threshold τ2, then fitting at least one of the first and second straight lines cannot be successful. In this case, a reference straight line can be used as the target straight line.

[0133] If both the first and second lines are successfully fitted, but the absolute value of the slope difference between the first and second lines is less than or equal to the second threshold, it indicates that the outlines of the obstacles on both sides of the emergency point are basically consistent. In this case, the reference line that uses more obstacle points for fitting can be used as the target line.

[0134] In this embodiment, the method for performing linear fitting can be the least squares method, and this application does not limit this method.

[0135] This concludes the description of step 103. We will now proceed to step 104.

[0136] Step 104: If the first rotation angle is within the configured angle range, then the direction in which the target line points is determined as the first target travel direction of the sweeper.

[0137] The first rotation angle is the angle between the current direction of the sweeper's movement and the direction the target line is pointing.

[0138] In this embodiment, different areas along the sweeper's travel direction can be predefined, such as dividing the area along the sweeper's travel direction into a left area, a middle area, and a right area, and presetting the minimum rotation angle R that the sweeper can rotate in each area. min and maximum angle R max That is, the configured angle range is [R min R max The configured angle range is determined based on the area where the emergency point is located.

[0139] The following is based on Figure 4 This section provides a brief introduction to the method of dividing the area along the direction of the sweeper's movement.

[0140] Please refer to Figure 4 ,Figure 4 This is a diagram showing the area division for the robot vacuum cleaner.

[0141] like Figure 4 As shown, the robot vacuum cleaner's current direction of travel is pre-divided into three areas: the left side, the right side, and the middle area. Each area is pre-configured with a corresponding angle range; for example, the middle area is configured with the minimum angle R that the robot vacuum cleaner can rotate at. min It is 60°, and the maximum angle is R. max If the angle is 120°, then when the emergency point is in the middle area, the configured angle range is [60°, 120°].

[0142] This concludes the discussion on... Figure 4 Description of the zoning diagram for the sweeping machine.

[0143] In this embodiment, after determining the target straight line through step 103, it can be determined whether the first rotation angle of the sweeping machine from the current direction of travel to the direction pointed to by the target straight line is within the configured angle range; if so, it indicates that the sweeping machine can rotate to the direction pointed to by the target straight line, and at this time the direction pointed to by the target straight line can be determined as the first target direction of travel of the sweeping machine.

[0144] In this embodiment, if the reference line fitting fails, or if the first rotation angle is not within the configured angle range, the method further includes:

[0145] If the vertical distance between the sweeping robot and the target wall line is less than the fifth threshold, then the direction in which the target wall line points is determined as the first target travel direction;

[0146] The target wall line is determined based on point cloud data collected by the lidar sensor deployed above the robot vacuum cleaner.

[0147] In this embodiment, if the reference line fitting fails, or if the first rotation angle of the sweeping robot from the current direction of travel to the direction pointed to by the target line is not within the configured angle range, it indicates that the obstacle outline has not been determined, or the determined obstacle outline is abnormal (e.g., the obstacle is in a suspended position).

[0148] At this point, the first target direction of the sweeper can be determined based on the relationship between the sweeper and the target wall line.

[0149] Specifically, methods for determining the target wall line may include:

[0150] Determine a straight line segment set according to point cloud data collected by a laser radar sensor, the point cloud data including a plurality of position points, the straight line segment set including at least one straight line segment, a length of each straight line segment being greater than or equal to a sixth threshold value, and a distance between two adjacent position points on each straight line segment being less than or equal to a seventh threshold value;

[0151] For each straight line segment, if the second rotation angle is within the configured angle range, the straight line segment is determined as a candidate wall line; wherein the second rotation angle is an angle between a current travel direction of the robot cleaner and a direction in which the straight line segment points;

[0152] The candidate wall line closest to the robot cleaner in the vertical distance is determined as the target wall line.

[0153] In the embodiment, laser radar detection data in a period of time can be collected by a deployed Slam module in the robot cleaner, and straight line segment fitting is performed on the collected data to obtain a straight line segment set, wherein a length of each straight line segment in the straight line segment set is required to be not less than L, and a distance between two adjacent points on the straight line segment is required to be not more than ε2. Further, a second rotation angle required for the robot cleaner to align (rotate to a direction in which the straight line segment points) the straight line segment included in the straight line segment set is determined from the straight line segment set to be within the configured rotation angle range, and the straight line segment is taken as a candidate wall line. The candidate wall line closest to the robot cleaner in the vertical distance is determined as the target wall line.

[0154] The following will be described in combination with Figure 5 The extraction of the target wall line is briefly introduced.

[0155] Please refer to Figure 5 , Figure 5 The schematic diagram of the extraction of the target wall line by the straight line segment provided in the embodiment of the application.

[0156] As Figure 5 shown, the points in the figure are position points included in the point cloud data collected by the laser radar, and a straight line segment set is fitted according to the position points. After the robot cleaner determines the emergency point, the configured angle range is determined.

[0157] For each straight line segment in the straight line segment set, it is determined whether a second rotation angle required for the robot cleaner to align with the straight line segment is within the configured rotation angle range, and if so, the straight line segment is taken as a candidate wall line. The wall line closest to the robot cleaner in the vertical distance among the candidate wall lines is finally selected as the target wall line.

[0158] Thus far, the description of the extraction method of the target wall line in the embodiment is ended. Figure 5

[0159] ​After the target wall line is determined, if the vertical distance between the sweeping machine and the target wall line is less than a fifth threshold, it indicates that the distance between the sweeping machine and the target wall line is very close, and there is no other obstacle between the sweeping machine and the target wall line, and thus the direction of the target wall line can be determined as the first target advancing direction.

[0160] As an embodiment, the method can further include:

[0161] If the vertical distance between the sweeping machine and the target wall line is greater than or equal to the fifth threshold, a normal direction of the line connecting the center of the sweeping robot and the first emergency point is determined.

[0162] The first target advancing direction is determined based on the normal direction.

[0163] In this embodiment, if the vertical distance between the sweeping machine and the target wall line is greater than or equal to the fifth threshold, it indicates that there is still another obstacle between the sweeping machine and the target wall line, and the contour line of the obstacle has not been extracted, which indicates that the obstacle is a small or medium size radius object that is not easy to extract the contour line, such as a table leg or a chair leg.

[0164] At this time, the normal direction of the line connecting the center of the sweeping robot and the emergency point can be determined, and the first target advancing direction is determined based on the normal direction.

[0165] In this embodiment, the first target advancing direction can be the normal direction or a direction offset based on the normal direction, and the present application does not limit this.

[0166] The following will be described in combination with Figure 6 The rotation angle calculation method of the small or medium size radius object will be briefly introduced.

[0167] Please refer to Figure 6 , Figure 6 The rotation angle calculation diagram of the small or medium size radius object provided by the present embodiment is shown.

[0168] As Figure 6 shown, in the case where it is determined that the vertical distance between the sweeping machine and the target wall line is greater than or equal to the fifth threshold, i.e., there is still another obstacle between the sweeping machine and the target wall line, but the contour line of the obstacle has not been extracted, it indicates that the obstacle can be a small or medium size radius object that is difficult to extract the contour line, and thus the normal direction of the line connecting the center of the sweeping machine and the emergency point can be directly determined as the target advancing direction to prevent the sweeping machine from colliding with the emergency point again after rotating and moving forward.

[0169] Thus far, the description of Figure 6 the rotation angle calculation method of the small or medium size radius object is ended.

[0170] So far, the description of step 104 ends, and step 105 is performed next.

[0171] Step 105: Control the robot cleaner to rotate to the first target moving direction.

[0172] In this embodiment, after determining the first target moving direction, the robot cleaner can be further controlled to rotate to the first target moving direction.

[0173] As an embodiment, after controlling the robot cleaner to rotate to the first target moving direction, the method can further include:

[0174] If a second emergency point is determined according to the current pose of the robot cleaner and the obtained obstacle map, a second target moving direction of the robot cleaner is determined according to the second emergency point, and the robot cleaner is controlled to rotate to the second target moving direction until a second emergency point is not determined according to the current pose of the robot cleaner and the obtained obstacle map after the robot cleaner completes the rotation, or the robot cleaner continuously rotates for a preset number of times without moving.

[0175] In this embodiment, after controlling the robot cleaner to complete a rotation, a second emergency point can be determined again according to the current pose of the robot cleaner and the obstacle map. If a second emergency point is determined, a second target moving direction of the robot cleaner is determined according to the second emergency point, and the robot cleaner is controlled to rotate to the second target moving direction until a second emergency point is not determined after the rotation is completed, or the robot cleaner rotates for a preset number of times (such as 3 times) without moving.

[0176] In this embodiment, the second emergency point refers to a new emergency point different from the first emergency point. After determining the second emergency point, a second target moving direction of the robot cleaner can be determined according to the second emergency point according to the above-mentioned robot cleaner control method to control the robot cleaner to rotate to the second target moving direction. The second target moving direction refers to the target moving direction corresponding to the second emergency point. After controlling the robot cleaner to rotate to the second target moving direction, a new second emergency point can be determined again according to the current position of the robot cleaner and the obstacle map until a second emergency point is not determined after the rotation is completed, or the robot cleaner rotates for a preset number of times (such as 3 times) without moving.

[0177] In this embodiment, the method for determining the second emergency point is exactly the same as the method for determining the first emergency point, which has been described in detail above and will not be repeated here.

[0178] In this embodiment, the method of continuous iterative adjustment can achieve accurate obstacle avoidance during the edge cleaning process of the robot cleaner, ensure safety and reliability, and improve the smoothness of the movement of the robot cleaner during the cleaning process. Generally speaking, in most complex home environments, the number of continuous rotations of the robot cleaner will not exceed 3 times.

[0179] Finally, the PID algorithm can be used to control the forward movement of the robot cleaner and keep a certain distance from the obstacle until a new emergency point is determined or the edge cleaning task is terminated.

[0180] In this embodiment, the process of using the PID algorithm to control the forward movement of the robot cleaner is a common method in related technologies, which will not be described here.

[0181] Thus far, the description of step 105 is complete.

[0182] In this embodiment, before determining the target obstacle point set according to the obtained obstacle map, the method further includes:

[0183] determining a first emergency point according to the current pose of the robot cleaner and the obstacle map;

[0184] determining a straight line segment set from the point cloud data collected by the laser radar sensor, the point cloud data including a plurality of position points, the straight line segment set including at least one straight line segment, the length of each straight line segment being greater than or equal to a sixth threshold value, and the distance between any two adjacent position points on each straight line segment being less than or equal to a seventh threshold value;

[0185] for each straight line segment, if the second rotation angle is within the configured angle range, the straight line segment is determined as a candidate wall line; wherein the second rotation angle is the angle between the current travel direction of the robot cleaner and the direction in which the straight line segment points;

[0186] determining the candidate wall line closest to the robot cleaner in the vertical distance as the target wall line;

[0187] The method can further include:

[0188] if no straight line segment set is determined from the point cloud data collected by the laser radar sensor, or no candidate wall line is determined from the straight line segment set, then the step of determining the target obstacle point set according to the obtained obstacle map is performed;

[0189] in the case of determining the target wall line, if it is determined that the vertical distance between the robot cleaner and the target wall line is less than an eighth threshold value, then the direction in which the target wall line points is determined as the first target travel direction;

[0190] in the case of determining the target wall line, if it is determined that the vertical distance between the robot cleaner and the target wall line is greater than or equal to the eighth threshold value, then the step of determining the target obstacle point set according to the obtained obstacle map is performed.

[0191] In this embodiment, before step 101 is performed, a first emergency point can be determined according to the current pose of the robot cleaner and the obstacle map.

[0192] Further, a straight line segment set is determined according to the point cloud data collected by the laser radar sensor, and a straight line segment in the straight line segment set that meets the configured angle range requirement and has the shortest perpendicular distance to the robot cleaner is determined as the target wall line.

[0193] The process of determining the target wall line has been described above and will not be repeated here.

[0194] In this embodiment, in a case where the straight line segment set is not determined according to the point cloud data collected by the laser radar sensor, or the candidate wall line is not determined from the straight line segment set, it indicates that there is an obstacle blocking the current travel direction of the robot cleaner, and the process of step 101, i.e., the process of detecting the obstacle contour line, can be performed.

[0195] In this embodiment, in a case where the target wall line is determined, if it is determined that the perpendicular distance between the robot cleaner and the target wall line is less than the eighth threshold value, it indicates that the distance between the robot cleaner and the target wall line is very small, and it is considered that there is no obstacle between the robot cleaner and the target wall line, and the direction in which the target wall line points can be directly determined as the first target travel direction.

[0196] In this embodiment, in a case where the target wall line is determined, if it is determined that the perpendicular distance between the robot cleaner and the target wall line is greater than or equal to the eighth threshold value, it indicates that the distance between the robot cleaner and the target wall line is large, and there can be an obstacle between the robot cleaner and the target wall line, and the process of step 101, i.e., the process of detecting the obstacle contour, is performed.

[0197] Thus far, the description of the process of the robot cleaner control method in the first aspect of the present application ends. Figure 1

[0198] The present application determines the target obstacle point set according to the obtained obstacle map, determines a first point set located on one side of the first emergency point and a second point set located on the other side of the first emergency point in the target obstacle point set, and performs straight line fitting on the first point set and the second point set, which is equivalent to fitting the obstacle contour lines on the two sides of the emergency point. If the first point set can be successfully fitted into a first straight line and the second point set can be successfully fitted into a second straight line, and the slope difference between the first straight line and the second straight line is large, it indicates that the obstacle is an obstacle with corners, and the obstacle contour needs to be described by two different straight lines, which improves the extraction accuracy of the obstacle contour line. Further, the first straight line or the second straight line is determined as the target straight line, if the rotation angle of the robot cleaner from the current travel direction to the direction in which the target straight line points is within the allowed rotation angle range, the direction in which the target straight line points is determined as the first target travel direction, and after the first target travel direction is determined, the robot cleaner is controlled to rotate to the first target travel direction, so as to control the robot cleaner to clean along the obstacle contour, which reduces the situation that the robot cleaner misses cleaning or collides with the obstacle. ​

[0199] The application fuses the detection information of heterogeneous sensors to construct a real-time obstacle map, and constructs a Slam module to collect laser radar detection information alone to assist in controlling the edge cleaning motion of the sweeper.

[0200] Further, the application also proposes a method of controlling the sweeper to rotate and then detect an emergency point, and iteratively adjusting the rotation angle of the sweeper, which can help the sweeper better and faster achieve accurate obstacle avoidance in the edge cleaning process, and improve the motion fluency in the edge cleaning task of the sweeper.

[0201] The following describes the sweeper control method according to Figure 7 The overall flowchart of the sweeper control method provided herein describes the sweeper control method in the embodiments of the application.

[0202] Please refer to Figure 7 , Figure 7 The overall flowchart of the sweeper control method provided herein describes the sweeper control method in the embodiments of the application.

[0203] As Figure 7 shown, in this embodiment, after the first emergency point is determined and the configured rotation angle range is determined according to the preset area where the first emergency point is located, laser radar detection data is obtained by the Slam module to determine the target wall line.

[0204] The position points included in the point cloud data obtained according to the laser radar detection data are straight line segment sets, if the straight line segment set fitting is successful, and there is a straight line segment that meets the configured rotation angle requirement, the straight line segment closest to the sweeper in the straight line segment that meets the rotation angle is taken as the target wall line.

[0205] It is further determined whether the distance between the sweeper and the target wall line is less than a preset threshold 1, if it is less than the preset threshold 1, it indicates that there is no obstacle between the sweeper and the target wall line, at this time, the direction pointed by the target wall line can be directly taken as the first target advancing direction (alignment direction), and the sweeper is controlled to rotate.

[0206] If the straight line segment set fitting is not successful, or there is no straight line segment that meets the rotation angle requirement, or the distance between the sweeper and the target wall line is greater than or equal to the preset threshold 1, the target obstacle point set is obtained according to the obstacle map and the emergency point to determine the contour line of the obstacle.

[0207] Among them, the process of determining the obstacle contour line based on the target obstacle point set has been described in detail above, and will not be repeated here.

[0208] If the obstacle contour line can be extracted according to the target obstacle point set, and the contour line meets the rotation angle requirement, the direction pointed by the contour line is taken as the first target advancing direction, and the sweeper is controlled to rotate.

[0209] If the obstacle contour line is not extracted according to the target obstacle point set, or the extracted contour line does not meet the rotation angle requirement, it is determined whether the distance between the robot and the target wall line is less than a preset threshold 2, where the preset threshold 2 is greater than the preset threshold 1.

[0210] If it is less than, it indicates that there is no obstacle between the robot and the wall line, and at this time, the direction pointed by the target wall line is directly taken as the first target travel direction, and the robot is controlled to rotate.

[0211] If it is greater than or equal to, the first target travel direction is determined according to the normal direction of the line connecting the emergency point and the center position of the robot, and the robot is controlled to rotate.

[0212] After the robot is controlled to rotate, it can be further detected whether a second emergency point can be determined according to the current pose of the robot and the obtained obstacle map. If the second emergency point is detected, and it is determined that the number of continuous rotations of the robot without traveling does not reach a preset number, the second target travel direction of the robot is determined according to the second emergency point. If the second emergency point is not detected, or it is determined that the number of continuous rotations of the robot without traveling reaches the preset number, the robot is controlled to clean according to the PID algorithm.

[0213] Thus far, the description of the overall flowchart of the robot control method in Figure 7 is completed.

[0214] Please refer to Figure 8 , Figure 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course can also include other hardware required by the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs, and at the logical level forms a terminal interaction device. Of course, in addition to the software implementation, the present application does not exclude other implementation manners, such as logic devices or a combination of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logical unit, but can also be hardware or a logic device.

[0215] Please refer to Figure 9 , Figure 9 is a schematic structural diagram of a robot control device according to an embodiment of the present application, which is applied to a robot. As shown in Figure 9 , the robot control device can include a determination unit 901, a fitting unit 902, and a control unit 903. Specifically, the device includes:

[0216] The determining unit 901 is configured to determine a target obstacle point set according to the obtained obstacle map and a first emergency point, the target obstacle point set including a plurality of obstacle points in a moving direction of the sweeping robot, and the first emergency point being less than or equal to a first threshold value from the sweeping robot;

[0217] The determining unit 901 is configured to determine a first point set and a second point set from the target obstacle point set, the first point set including obstacle points on one side of the first emergency point, and the second point set including obstacle points on the other side of the first emergency point;

[0218] The fitting unit 902 is configured to, if a first straight line is successfully fitted according to the first point set and a second straight line is successfully fitted according to the second point set, determine the first straight line or the second straight line as a target straight line if an absolute value of a difference between a slope of the first straight line and a slope of the second straight line is greater than a second threshold value;

[0219] The control unit 903 is configured to, if a first rotation angle is within a configured angle range, determine a direction in which the target straight line points as a first target moving direction of the sweeping robot, wherein the first rotation angle is an angle between a current moving direction of the sweeping robot and the direction in which the target straight line points, and control the sweeping robot to rotate to the first target moving direction.

[0220] Optionally, the determining unit 901 is specifically configured to:

[0221] The determining unit 901 is configured to determine a target obstacle point set according to the obtained obstacle map and a first emergency point, the target obstacle point set including a plurality of obstacle points in a moving direction of the sweeping robot, and the first emergency point being less than or equal to a first threshold value from the sweeping robot;

[0222] The determining unit 901 is configured to determine a target obstacle point set according to the obtained obstacle map and a first emergency point, the target obstacle point set including a plurality of obstacle points in a moving direction of the sweeping robot, and the first emergency point being less than or equal to a first threshold value from the sweeping robot;

[0223] Optionally, before the determining unit 901 determines the first point set and the second point set from the target obstacle point set, the determining unit 901 is further configured to:

[0224] The determining unit 901 is configured to determine a target obstacle point set according to the obtained obstacle map and a first emergency point, the target obstacle point set including a plurality of obstacle points in a moving direction of the sweeping robot, and the first emergency point being less than or equal to a first threshold value from the sweeping robot;

[0225] In a case where the reference straight line is successfully fitted, the determining unit 901 is configured to perform the step of determining the first point set and the second point set from the target obstacle point set;

[0226] If the first straight line fails to be fitted according to the first point set and / or the second straight line fails to be fitted according to the second point set, or the absolute value of the difference between the slope of the first straight line and the slope of the second straight line is less than or equal to a second threshold value, the reference straight line is determined as the target straight line;

[0227] Optionally, in the case that the reference straight line fitting fails, or the first rotation angle is not within the configured angle range, the control unit 903 is specifically configured to:

[0228] If the vertical distance between the sweeping robot and the obtained target wall line is less than a fifth threshold value, the direction pointed by the target wall line is determined as the first target advancing direction;

[0229] The target wall line is determined based on point cloud data collected by a laser radar sensor arranged above the sweeping robot.

[0230] Optionally, the method for determining the target wall line comprises:

[0231] A straight line segment set is determined according to the point cloud data collected by the laser radar sensor, the point cloud data comprising a plurality of position points, the straight line segment set comprising at least one straight line segment, the length of each straight line segment being greater than or equal to a sixth threshold value, and the distance between any two adjacent position points on each straight line segment being less than or equal to a seventh threshold value;

[0232] For each straight line segment, if the second rotation angle is within the configured angle range, the straight line segment is determined as a candidate wall line; wherein the second rotation angle is the angle between the current advancing direction of the sweeping robot and the direction pointed by the straight line segment.

[0233] The candidate wall line closest to the sweeping robot in the vertical direction is determined as the target wall line.

[0234] Optionally, the control unit 903 is further configured to:

[0235] If the vertical distance between the sweeping robot and the target wall line is greater than or equal to the fifth threshold value, the normal direction of the line connecting the center of the sweeping robot and the first emergency point is determined;

[0236] The first target advancing direction is determined based on the normal direction.

[0237] Optionally, before the target obstacle point set is determined according to the obtained obstacle map and the obtained first emergency point, the determination unit 901 is further configured to:

[0238] The first emergency point is determined according to the current pose of the sweeping robot and the obstacle map.

[0239] Determine a straight line segment set according to the point cloud data collected by the laser radar sensor, the point cloud data comprising a plurality of position points, the straight line segment set comprising at least one straight line segment, a length of each straight line segment being greater than or equal to a sixth threshold value, and a distance between two adjacent position points on each straight line segment being less than or equal to a seventh threshold value;

[0240] For each straight line segment, if the second rotation angle is within the configured angle range, the straight line segment is determined as a candidate wall line; wherein the second rotation angle is an angle between a current travel direction of the robot cleaner and a direction in which the straight line segment points;

[0241] The candidate wall line closest to the robot cleaner in the vertical distance is determined as a target wall line;

[0242] If no straight line segment set is determined according to the point cloud data collected by the laser radar sensor, or no candidate wall line is determined from the straight line segment set, the step of determining a target obstacle point set according to the obtained obstacle map and the obtained first emergency point is performed;

[0243] In the case where the target wall line is determined, if it is determined that the vertical distance between the robot cleaner and the target wall line is less than an eighth threshold value, a direction in which the target wall line points is determined as a first target travel direction;

[0244] In the case where the target wall line is determined, if it is determined that the vertical distance between the robot cleaner and the target wall line is greater than or equal to the eighth threshold value, the step of determining a target obstacle point set according to the obtained obstacle map and the obtained first emergency point is performed.

[0245] Optionally, after the robot cleaner is controlled to rotate to the first target travel direction, the control unit 903 is further configured to:

[0246] If a second emergency point is determined according to the current pose of the robot cleaner and the obtained obstacle map, a second target travel direction of the robot cleaner is determined according to the second emergency point, so as to control the robot cleaner to rotate to the second target travel direction, until the second emergency point is not determined according to the current pose of the robot cleaner and the obtained obstacle map after the robot cleaner completes the rotation, or the robot cleaner continuously rotates for a preset number of times without traveling.

[0247] Thus far, the description of the robot cleaner control device in the method is completed. Figure 9

[0248] Correspondingly, in the embodiment, the application also provides a computer readable storage medium, and the computer readable storage medium stores a plurality of computer instructions, and the computer instructions can implement the method disclosed in the above examples of the application when executed.

[0249] ​Exemplarily, the computer readable storage medium described above can be any electronic, magnetic, optical, or other physical storage apparatus, and can contain or store information such as executable instructions, data, and the like. For example, the computer readable storage medium can be a RAM (Random Access Memory), a volatile memory, a non-volatile memory, a flash memory, a storage drive (such as a hard drive), a solid state drive, any type of storage disk (such as an optical disk, a DVD, and the like), or similar storage medium, or a combination thereof.

[0250] The preferred embodiments of the present application have been described above with the aid of a number of drawings. These embodiments are illustrative only, and there can be other embodiments which do not depart from the spirit and essence of the application. It should be understood that various modifications and changes can be aimed at generalizing the concepts of the application and can be executed by those skilled in the art. Any modification, equivalent replacement, improvement, and the like within the spirit and principle of the present application shall be included in the scope of the present application.

Claims

1. A sweeper control method, characterized in that, The method is applied to a sweeping robot, and comprises the following steps: determining a target obstacle point set according to an obtained obstacle map and a first emergency point, the target obstacle point set comprising a plurality of obstacle points in a moving direction of the sweeping robot, the first emergency point being an obstacle point closest to the sweeping robot and having a distance less than or equal to a first threshold value from the sweeping robot; determining a first point set and a second point set from the target obstacle point set, the first point set comprising obstacle points on one side of the first emergency point, and the second point set comprising obstacle points on the other side of the first emergency point; if a first straight line is successfully fitted according to the first point set and a second straight line is successfully fitted according to the second point set, determining the first straight line or the second straight line as a target straight line if an absolute value of a difference between a slope of the first straight line and a slope of the second straight line is greater than a second threshold value; if a first rotation angle is within a configured angle range, determining a direction in which the target straight line points as a first target moving direction of the sweeping robot, wherein the first rotation angle is an angle between a current moving direction of the sweeping robot and the direction in which the target straight line points; controlling the sweeping robot to rotate to the first target moving direction.

2. The method of claim 1, wherein, The step of determining the target obstacle point set according to the obtained obstacle map and the first emergency point comprises the following steps: taking the obtained first emergency point as a reference point, determining a target obstacle point adjacent to the reference point and having a distance less than or equal to a third threshold value from the reference point based on the obstacle map, taking the target obstacle point as a new reference point, returning to the step of determining a target obstacle point adjacent to the reference point and having a distance less than or equal to the third threshold value from the reference point in the obstacle map until there is no target obstacle point having a distance less than or equal to the third threshold value from the reference point, or the number of determined target obstacle points reaches a fourth threshold value, wherein the first emergency point is determined according to a current pose of the sweeping robot and the obstacle map; determining a set of the first emergency point and all target obstacle points as the target obstacle point set.

3. The method of claim 1, wherein, Before the step of determining the first point set and the second point set from the target obstacle point set, the method further comprises the following steps: fitting a reference straight line according to the target obstacle point set; if the fitting of the reference straight line is successful, performing the step of determining the first point set and the second point set from the target obstacle point set; The method further comprises the following steps: if the fitting of the first straight line according to the first point set fails and / or the fitting of the second straight line according to the second point set fails, or an absolute value of a difference between the slope of the first straight line and the slope of the second straight line is less than or equal to the second threshold value, determining the reference straight line as the target straight line.

4. The method of claim 3, wherein, In the case that the fitting of the reference straight line fails or the first rotation angle is not within the configured angle range, the method further comprises the following steps: if a perpendicular distance between the sweeping robot and an obtained target wall line is less than a fifth threshold value, determining a direction in which the target wall line points as the first target moving direction. The target wall line is determined based on point cloud data collected by a laser radar sensor arranged above the sweeping machine.

5. The method of claim 4, wherein, The method for determining the target wall line comprises: A set of straight line segments is determined based on the point cloud data collected by the laser radar sensor, the point cloud data comprising a plurality of position points, the set of straight line segments comprising at least one straight line segment, each straight line segment having a length greater than or equal to a sixth threshold value and a distance between two adjacent position points on each straight line segment being less than or equal to a seventh threshold value; For each straight line segment, if a second rotation angle is within a configured angle range, the straight line segment is determined as a candidate wall line, wherein the second rotation angle is an angle between a current travel direction of the sweeping machine and a direction in which the straight line segment points; A candidate wall line closest to the sweeping machine in a vertical distance is determined as the target wall line.

6. The method of claim 4, wherein, The method further comprises: If a vertical distance between the sweeping machine and the target wall line is greater than or equal to a fifth threshold value, a normal direction of a line direction connecting a center of the sweeping machine and the first emergency point is determined; The first target travel direction is determined based on the normal direction.

7. The method of claim 1, wherein, Before determining a target obstacle point set based on an obtained obstacle map and an obtained first emergency point, the method further comprises: A first emergency point is determined based on a current pose of the sweeping machine and the obstacle map; A set of straight line segments is determined based on point cloud data collected by a laser radar sensor arranged above the sweeping machine, the point cloud data comprising a plurality of position points, the set of straight line segments comprising at least one straight line segment, each straight line segment having a length greater than or equal to a sixth threshold value and a distance between two adjacent position points on each straight line segment being less than or equal to a seventh threshold value; For each straight line segment, if a second rotation angle is within a configured angle range, the straight line segment is determined as a candidate wall line, wherein the second rotation angle is an angle between a current travel direction of the sweeping machine and a direction in which the straight line segment points; A candidate wall line closest to the sweeping machine in a vertical distance is determined as the target wall line. The method further comprises: If no set of straight line segments is determined based on the point cloud data collected by the laser radar sensor, or no candidate wall line is determined from the set of straight line segments, the step of determining a target obstacle point set based on an obtained obstacle map and an obtained first emergency point is performed; In a case where the target wall line is determined, if it is determined that a vertical distance between the sweeping machine and the target wall line is less than an eighth threshold value, a direction in which the target wall line points is determined as the first target travel direction; In a case where the target wall line is determined, if it is determined that the vertical distance between the sweeping machine and the target wall line is greater than or equal to the eighth threshold value, the step of determining a target obstacle point set based on an obtained obstacle map and an obtained first emergency point is performed.

8. The method of claim 1, wherein, After the sweeping machine is controlled to rotate to the first target travel direction, the method further comprises: If a second emergency point is determined according to the current pose of the sweeping machine and the obtained obstacle map, a second target travel direction of the sweeping machine is determined according to the second emergency point, so as to control the sweeping machine to rotate to the second target travel direction, until a second emergency point is not determined according to the current pose of the sweeping machine and the obtained obstacle map after the sweeping machine completes the rotation, or the sweeping machine continuously rotates for a preset number of times without traveling.

9. A control device for a robot vacuum cleaner, characterized in that The device is applied to a sweeping machine and comprises: A determination unit is configured to determine a target obstacle point set according to an obtained obstacle map and an obtained first emergency point, the target obstacle point set comprising a plurality of obstacle points in a movement direction of the sweeping machine, and the first emergency point being an obstacle point closest to the sweeping machine and having a distance less than or equal to a first threshold value from the sweeping machine; A first point set and a second point set are determined from the target obstacle point set, the first point set comprising obstacle points on one side of the first emergency point, and the second point set comprising obstacle points on the other side of the first emergency point; A fitting unit is configured to, if a first straight line is successfully fitted according to the first point set and a second straight line is successfully fitted according to the second point set, determine the first straight line or the second straight line as a target straight line if an absolute value of a difference between a slope of the first straight line and a slope of the second straight line is greater than a second threshold value; A control unit is configured to, if a first rotation angle is within a configured angle range, determine a direction in which the target straight line points as a first target travel direction of the sweeping machine, wherein the first rotation angle is an angle between a current travel direction of the sweeping machine and the direction in which the target straight line points, and control the sweeping machine to rotate to the first target travel direction.

10. A robot vacuum cleaner characterised in that, The device comprises: A controller is configured to perform the method according to any one of claims 1 to 8; Heterogeneous sensors are configured to collect data of a target scene, wherein the heterogeneous sensors comprise at least one of a laser radar sensor arranged above the sweeping machine and a line laser sensor arranged in front of the sweeping machine; A distance sensor is arranged on a side of the sweeping machine.

Citation Information

Patent Citations

  • Sweeper control method and device, electronic equipment and medium

    CN118236003A

  • D-shaped robot turning control method based on obstacle contour

    WO2024146311A1