Robot obstacle avoidance method and cleaning robot
By using a multi-sensor fusion method, the cleaning robot uses the first and second sensors to acquire lateral perception data, determine the reference distance, and control the robot to move around obstacles. This solves the problem of easy collisions when cleaning robots avoid obstacles in the existing technology, and improves the reliability and accuracy of obstacle avoidance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANKER INNOVATIONS TECH CO LTD
- Filing Date
- 2025-01-24
- Publication Date
- 2026-07-24
Smart Images

Figure CN122450122A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a robot obstacle avoidance method and a cleaning robot. Background Technology
[0002] With the advancement of science and technology, robots are being used more and more widely in people's daily lives and production.
[0003] Taking cleaning robots as an example, in related technologies, cleaning robots typically use planar lidar for environmental perception to control the cleaning robot to avoid obstacles.
[0004] However, in related technologies, cleaning robots are prone to collisions during obstacle avoidance, which reduces the reliability of obstacle avoidance. Summary of the Invention
[0005] Therefore, it is necessary to provide a robot obstacle avoidance method and a cleaning robot to address the aforementioned technical problems.
[0006] Firstly, this application provides a robot obstacle avoidance method, the method comprising:
[0007] When the cleaning robot is in the obstacle avoidance area, the robot's driving direction is adjusted and lateral perception data based on the first and second sensors on the robot is acquired. The first sensor is used for horizontal scanning to acquire first perception data of the reference horizontal plane. The second sensor is used for vertical scanning to acquire second perception data of the cleaning robot's lateral movement.
[0008] The reference distance between the cleaning robot and obstacles is determined based on lateral perception data;
[0009] The cleaning robot is controlled to navigate around obstacles based on a reference distance.
[0010] In one embodiment, the method further includes:
[0011] Acquire forward perception data based on the first sensor and the third sensor on the cleaning robot; the third sensor is used for lateral ground scanning to collect perception data of the cleaning robot's forward movement.
[0012] The distance between the cleaning robot and obstacles is determined based on positive perception data;
[0013] The area where the cleaning robot is located is determined based on the distance between the cleaning robot and the obstacle.
[0014] In one embodiment, determining the area where the cleaning robot is located based on the distance between the cleaning robot and the obstacle includes:
[0015] If the distance between the cleaning robot and an obstacle is less than a preset safe distance, the cleaning robot is determined to be in the obstacle avoidance zone.
[0016] In one embodiment, determining a reference distance between the cleaning robot and an obstacle based on lateral perception data includes:
[0017] If the first sensing data is not included in the lateral sensing data, or if the distance corresponding to the first sensing data is greater than the preset safe distance, the reference distance is determined based on the second sensing data in the lateral sensing data.
[0018] If the lateral perception data includes the first perception data, and the distance corresponding to the first perception data is less than or equal to a preset safe distance, the width of the obstacle is determined based on the first perception data, and a reference distance is determined based on the width of the obstacle and the lateral perception data.
[0019] In one embodiment, determining the reference distance based on second sensing data in the lateral sensing data includes:
[0020] Based on the height information in the second sensing data, the second sensing data is divided into height regions to obtain at least one set of sub-sensing data for the corresponding height region.
[0021] Determine the sub-sensing data for the lowest altitude region from at least one set of sub-sensing data;
[0022] The reference distance is determined based on the sub-sensing data of the lowest altitude region.
[0023] In one embodiment, determining a reference distance based on the width of the obstacle and lateral sensing data includes:
[0024] If the width of the obstacle is less than or equal to the preset width, the reference distance is determined based on the first perception data;
[0025] When the width of the obstacle is greater than the preset width, the second sensing data is divided into height regions based on the height information of the second sensing data to obtain at least one set of sub-sensing data for the corresponding height region, and a reference distance is determined based on the first sensing data and at least one set of sub-sensing data.
[0026] In one embodiment, determining a reference distance based on first sensing data and at least one set of sub-sensing data includes:
[0027] Determine the sub-sensing data for the highest altitude region from at least one set of sub-sensing data;
[0028] The reference distance is determined based on the distance corresponding to the first sensing data and the distance corresponding to the sub-sensing data of the highest altitude region.
[0029] In one embodiment, determining a reference distance based on the distance corresponding to the first sensing data and the distance corresponding to the sub-sensing data of the highest altitude region includes:
[0030] If the distance corresponding to the first sensing data is less than the distance corresponding to the sub-sensing data of the highest altitude region, the reference distance is determined based on the first sensing data.
[0031] If the distance corresponding to the first sensing data is greater than or equal to the distance corresponding to the sub-sensing data of the highest altitude region, the reference distance is determined based on the sub-sensing data of the highest altitude region.
[0032] In one embodiment, controlling the cleaning robot to navigate around an obstacle based on a reference distance includes:
[0033] Obtain the distance error between the reference distance and the target distance along the obstacle;
[0034] The cleaning robot is controlled to navigate around obstacles based on distance error.
[0035] In one embodiment, controlling the cleaning robot to navigate around an obstacle based on a distance error includes:
[0036] The first velocity component of the cleaning robot in the forward direction is determined based on the distance error;
[0037] The second velocity component of the cleaning robot pointing towards the obstacle is determined using a proportional-integral-derivative control algorithm based on the distance error.
[0038] The cleaning robot is controlled to move around the obstacle based on a first velocity component and a second velocity component.
[0039] In one embodiment, determining the first velocity component of the cleaning robot in the forward direction based on the distance error includes:
[0040] If the distance error falls within a preset error range, the first velocity component is determined to be the preset maximum velocity.
[0041] If the distance error is not within the preset error range and the reference distance is greater than the target obstacle distance, the first velocity component is determined to be the preset maximum velocity.
[0042] If the distance error is not within the preset error range and the reference distance is less than the target obstacle distance, the first velocity component is determined based on the distance error, the preset maximum speed, and the target obstacle distance to control the cleaning robot to decelerate.
[0043] Secondly, this application also provides a cleaning robot, including a robot body and a first sensor, a second sensor and a third sensor disposed on the robot body. The robot body includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the steps of any of the above-mentioned robot obstacle avoidance methods.
[0044] In one embodiment, the first sensor is located at the top center of the robot body; the second sensor is located at the side of the robot body; and the third sensor is located at the front end of the robot body.
[0045] In the aforementioned obstacle avoidance method and cleaning robot, when the cleaning robot is in the obstacle avoidance area, the robot's driving direction is adjusted and lateral perception data obtained from the first and second sensors on the cleaning robot is acquired. The reference distance between the cleaning robot and the obstacle is determined based on the lateral perception data, and the cleaning robot is controlled to move around the obstacle based on the reference distance. The first sensor is used for horizontal scanning to acquire first perception data of the reference horizontal plane; the second sensor is used for vertical scanning to acquire second perception data of the cleaning robot's lateral direction. In this method, horizontal scanning using the first sensor and vertical scanning using the second sensor not only expands the scanning space but also accurately reflects the surface / boundary features of the obstacle based on the second perception data. Determining the reference distance between the cleaning robot and the obstacle based on the lateral perception data from the first and second sensors is adaptable to obstacles with different surface / boundary features, thereby reducing the probability of collision between the cleaning robot and the obstacle and improving the reliability of obstacle avoidance. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the cleaning robot in one embodiment;
[0047] Figure 2 This is a flowchart illustrating a robot obstacle avoidance method in one embodiment;
[0048] Figure 3 This is a schematic diagram of the cleaning robot in another embodiment;
[0049] Figure 4 This is a schematic diagram illustrating the process of determining the area where the cleaning robot is located in one embodiment.
[0050] Figure 5 This is a schematic diagram illustrating the distribution of different areas between the cleaning robot and obstacles in one embodiment;
[0051] Figure 6 This is a flowchart illustrating the process of determining a reference distance in one embodiment;
[0052] Figure 7 This is a flowchart illustrating the process of determining a reference distance in another embodiment;
[0053] Figure 8 This is a schematic diagram showing the distribution of regions at different heights along the longitudinal scanning direction in one embodiment;
[0054] Figure 9 This is a flowchart illustrating the process of determining a reference distance in another embodiment;
[0055] Figure 10 This is a flowchart illustrating the process of determining a reference distance in another embodiment;
[0056] Figure 11 This is a flowchart illustrating the process of determining a reference distance in another embodiment;
[0057] Figure 12 This is a schematic diagram illustrating the process of controlling a cleaning robot to move around an obstacle in one embodiment;
[0058] Figure 13 This is a schematic diagram of a cleaning robot navigating around an obstacle in one embodiment;
[0059] Figure 14 This is a schematic diagram illustrating the process of controlling a cleaning robot to move around an obstacle in another embodiment;
[0060] Figure 15 This is a schematic diagram illustrating the process of controlling a cleaning robot to move around an obstacle in another embodiment;
[0061] Figure 16 This is a flowchart illustrating a robot obstacle avoidance method in another embodiment;
[0062] Figure 17 This is a schematic diagram illustrating the process of controlling a cleaning robot to move around an obstacle in another embodiment;
[0063] Figure 18 This is a structural block diagram of a robot obstacle avoidance device in one embodiment. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0065] The robot obstacle avoidance method provided in this application embodiment can be applied to, for example, Figure 1 The cleaning robot shown includes a robot body 101, and a first sensor 102 and a second sensor 103 disposed on the robot body 101.
[0066] The first sensor 102 is used for horizontal scanning to collect first sensing data of a reference horizontal plane; the second sensor 103 is used for vertical scanning to collect second sensing data of the cleaning robot's lateral direction. The reference horizontal plane is a horizontal plane with the same height as the first sensor 102.
[0067] It should be noted that the first sensor 102 has a longer detection range and can be used for obstacle perception over a wide area, providing global environmental information and suitable for detecting obstacles at long distances and at heights. The second sensor 103 has a shorter detection range and can detect the height distribution of obstacles and identify the surface / boundary features of obstacles (such as protrusions, depressions, etc.). For example, the first sensor 102 is a planar lidar and the second sensor 103 is a line lidar.
[0068] The aforementioned cleaning robots include, but are not limited to, different types of cleaning robots such as sweeping robots, mopping robots, and floor scrubbing robots. These cleaning robots may also include various types of sensors, such as time-of-flight (TOF) sensors, infrared sensors, other types of lidar, or image acquisition devices.
[0069] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0070] In one embodiment, such as Figure 2 As shown, a robot obstacle avoidance method is provided, which is applied to... Figure 1 Taking a cleaning robot as an example, the process includes the following steps:
[0071] S210. When the cleaning robot is in the obstacle avoidance area, adjust the driving direction of the cleaning robot and acquire lateral perception data based on the first and second sensors on the cleaning robot; the first sensor is used for horizontal scanning to collect first perception data of the reference horizontal plane; the second sensor is used for vertical scanning to collect second perception data of the cleaning robot's lateral direction.
[0072] The obstacle avoidance zone refers to the area where the cleaning robot needs to avoid obstacles while navigating, typically the area close to obstacles. For example, the obstacle avoidance zone is the area within a preset safe distance from obstacles. Lateral perception data refers to perception data from the sides of the robot.
[0073] Optionally, the second sensor is located on the side of the robot body. The cleaning robot can acquire forward perception data in the direction of travel and determine whether it is in the obstacle avoidance area based on the forward perception data. If it is in the obstacle avoidance area, the cleaning robot adjusts its travel direction so that the scanning direction of the second sensor is towards the obstacle, and obtains lateral perception data by sensing the obstacle through the first and second sensors.
[0074] For example, the first sensor is located at the top center of the robot body. The first perception data collected can include not only perception data from the sides of the robot body, but also perception data from the front of the robot body, i.e., forward perception data. The cleaning robot can perceive the environment through the first sensor, collect forward perception data, and determine the distance between the cleaning robot and obstacles based on the forward perception data. If the distance is less than a preset safety distance, the cleaning robot is determined to be in the obstacle avoidance zone. Conversely, if the distance is greater than or equal to the preset safety distance, the cleaning robot is determined to be outside the obstacle avoidance zone.
[0075] S220. Determine the reference distance between the cleaning robot and the obstacle based on the lateral perception data.
[0076] The reference distance is used to characterize the distance between the cleaning robot and the obstacle. For example, the distance between the cleaning robot and the obstacle is the distance between the position of the sensing sensor on the cleaning robot and the surface / boundary of the obstacle.
[0077] Optionally, after the cleaning robot obtains lateral perception data based on the first and second sensors, it can determine the distance between the cleaning robot and the obstacle based on the lateral perception data, and use the distance between the cleaning robot and the obstacle as a reference distance.
[0078] For example, the first sensor is a planar LiDAR, and the second sensor is a line LiDAR. The resulting lateral perception data is point cloud data, where the X-axis coordinate in the three-dimensional coordinate system of the point cloud data represents the distance between the cleaning robot and the obstacle. The cleaning robot can determine the minimum X-axis coordinate value based on the coordinates of the point cloud data and use this minimum X-axis coordinate value as the distance between the cleaning robot and the obstacle.
[0079] S230: Control the cleaning robot to move around obstacles based on the reference distance.
[0080] Optionally, after obtaining the reference distance, the cleaning robot can control itself to continue moving to reach the target distance, and control the distance between itself and the obstacle to maintain the target distance while driving, so as to achieve driving around the obstacle.
[0081] In this embodiment, when the cleaning robot is in an obstacle avoidance zone, the robot's driving direction is adjusted and lateral perception data obtained from the first and second sensors on the robot is acquired. The reference distance between the cleaning robot and the obstacle is determined based on this lateral perception data, thereby controlling the robot to move around the obstacle. The first sensor is used for horizontal scanning to acquire first perception data of the reference horizontal plane; the second sensor is used for vertical scanning to acquire second lateral perception data of the cleaning robot. In this method, horizontal scanning using the first sensor and vertical scanning using the second sensor not only expands the scanning space but also accurately reflects the surface / boundary features of the obstacle based on the second perception data. Determining the reference distance between the cleaning robot and the obstacle based on the lateral perception data from the first and second sensors is adaptable to obstacles with different surface / boundary features, thereby reducing the probability of collision between the cleaning robot and the obstacle and improving the reliability of obstacle avoidance.
[0082] The cleaning robot also includes a third sensor located at the front end of the robot body. For example... Figure 3 As shown, the third sensor 104 can collect forward sensing data together with the first sensor 102.
[0083] The third sensor 104 is used for lateral ground scanning to collect perception data of the cleaning robot's forward movement. The forward perception data is the perception data in front of the robot body, and the front of the robot body is the direction that matches the forward movement of the cleaning robot.
[0084] It should be noted that the third sensor 104 has a relatively short detection range and a small detection area, making it suitable for detecting obstacles at close range and at low levels. For example, the third sensor 104 is a line lidar.
[0085] When the cleaning robot also includes a third sensor, the above method further includes determining the area where the cleaning robot is located based on positive perception data obtained from the first and third sensors. In one embodiment, such as Figure 4 As shown, the above method also includes:
[0086] S410. Acquire forward perception data based on the first sensor and the third sensor on the cleaning robot; the third sensor is used for lateral ground scanning to collect perception data of the cleaning robot's forward movement.
[0087] Optionally, the cleaning robot can perceive the environment through the first and third sensors and collect positive perception data.
[0088] S420. Determine the distance between the cleaning robot and the obstacle based on the forward perception data.
[0089] Optionally, after obtaining positive perception data based on the first and third sensors, the cleaning robot can analyze and process the positive perception data to determine the distance between the cleaning robot and the obstacle.
[0090] For example, when the first and third sensors are cameras, the obtained forward perception data is an image. The cleaning robot can identify obstacles in the image using its onboard detection model and convert the position coordinates of the obstacles in the image to the global coordinate system using a pre-calibrated transformation relationship to obtain the distance between the cleaning robot and the obstacle. When the first sensor is a planar LiDAR and the third sensor is a line LiDAR, the obtained forward perception data is point cloud data. The cleaning robot can determine the distance between the cleaning robot and the obstacle based on the X-axis coordinates of the point cloud data, such as taking the average X-axis coordinates of the point cloud data as the distance between the cleaning robot and the obstacle.
[0091] It should be noted that, since the sensing coverage of the first sensor and the third sensor are different, there may be cases in the positive sensing data obtained based on the first sensor and the third sensor that do not contain sensing data collected by the first sensor or the third sensor.
[0092] S430. Determine the area where the cleaning robot is located based on the distance between the cleaning robot and the obstacle.
[0093] Optionally, after obtaining the distance between the cleaning robot and the obstacle, the cleaning robot can determine the area corresponding to the current distance between the cleaning robot and the obstacle based on the preset correspondence between different areas and distance ranges, and use this area as the area where the cleaning robot is located.
[0094] For example, such as Figure 5 As shown, the different areas include a free zone, a deceleration zone, and an obstacle avoidance zone. The preset correspondence between the different zones and distance ranges is as follows: the distance range corresponding to the free zone is d > dfree; the distance range corresponding to the deceleration zone is dsafe ≤ d ≤ dfree; and the distance range corresponding to the obstacle avoidance zone is d < dfree, where d represents the distance between the cleaning robot and the obstacle.
[0095] In an optional embodiment, if the distance between the cleaning robot and an obstacle is less than a preset safe distance, the cleaning robot is determined to be in an obstacle avoidance zone.
[0096] It should be noted that when the cleaning robot is in a free area, it can control its normal movement, such as traveling at its maximum speed Vmax. When the cleaning robot is in a deceleration area, it can control its deceleration, such as controlling its deceleration from Vmax according to the distance ratio. The closer it is to an obstacle, the lower its speed, until it reaches the obstacle avoidance area and its speed is reduced to 0.
[0097] In this embodiment, forward perception data obtained from a first sensor and a third sensor on the cleaning robot is acquired. The distance between the cleaning robot and obstacles is determined based on the forward perception data, and the area where the cleaning robot is located is determined based on the distance between the cleaning robot and obstacles. The third sensor is used for lateral ground scanning. In the above method, the first sensor performs lateral horizontal scanning to detect higher obstacles in the distance, and the third sensor performs lateral ground scanning to detect lower obstacles nearby, thereby improving the comprehensiveness of detection and reducing the obstacle missed detection rate.
[0098] Similar to forward sensing data, because the sensing coverage of the first and second sensors is different, the lateral sensing data obtained based on the first and second sensors may contain sensing data that was not collected by the first sensor, or sensing data that was not collected by the second sensor. Therefore, in one embodiment, such as... Figure 6 As shown, S220 above, determining the reference distance between the cleaning robot and the obstacle based on lateral perception data, includes:
[0099] S610. If the first sensing data is not included in the lateral sensing data, or if the distance corresponding to the first sensing data is greater than the preset safe distance, the reference distance shall be determined based on the second sensing data in the lateral sensing data.
[0100] The distance corresponding to the first perception data is the distance between the cleaning robot and the obstacle, determined based on the first perception data. The preset safety distance is used to determine whether the cleaning robot is in the obstacle avoidance zone.
[0101] For example, the first sensing data is point cloud data, and the cleaning robot can obtain the average X-axis coordinate of the point cloud data as the distance between the cleaning robot and the obstacle.
[0102] It should be noted that when the cleaning robot is in the obstacle avoidance zone, and the lateral perception data does not include the first perception data, it indicates that the obstacle is low, below the detection height of the first sensor, and is not detected by the first sensor but is detected by the second sensor. Even when the cleaning robot is in the obstacle avoidance zone, the lateral perception data includes the first perception data, but the distance corresponding to the first perception data is greater than the preset safety distance. This indicates the presence of multiple obstacles, including obstacles that are far from the cleaning robot and obstacles that are close to the cleaning robot, or obstacles whose surfaces are uneven, exhibiting a low-convex shape where the lower part is relatively higher than the higher part.
[0103] Optionally, if the cleaning robot determines that the lateral sensing data does not include the first sensing data, or that the distance corresponding to the first sensing data is greater than a preset safe distance, then it uses the second sensing data in the lateral sensing data to determine the reference distance.
[0104] For example, the cleaning robot can acquire the distance corresponding to the second perception data, that is, determine the distance between the cleaning robot and the obstacle based on the second perception data, as a reference distance.
[0105] S620. If the lateral perception data includes first perception data and the distance corresponding to the first perception data is less than or equal to a preset safe distance, determine the width of the obstacle based on the first perception data, and determine a reference distance based on the width of the obstacle and the lateral perception data.
[0106] The width of the obstacle represents its size in the horizontal direction. A first sensor is used for horizontal scanning, and the width of the obstacle can be determined based on the first sensing data collected by the first sensor. For example, the first sensing data is point cloud data. In the three-dimensional coordinate system of the point cloud data, the Z-axis coordinate represents the position of the obstacle in the horizontal direction. The cleaning robot can obtain the difference between the maximum and minimum Z-axis coordinate values of the point cloud data as the width of the obstacle.
[0107] It should be noted that the cleaning robot is in the obstacle avoidance zone, and the lateral perception data includes the first perception data. The distance corresponding to the first perception data is less than or equal to the preset safe distance, indicating that the obstacle is high and close to the cleaning robot.
[0108] Optionally, if the cleaning robot determines that the lateral perception data includes the first perception data and the distance corresponding to the first perception data is less than or equal to a preset safe distance, then the robot determines the width of the obstacle based on the first perception data in the lateral perception data, so as to determine the reference distance together with the width of the obstacle and the lateral perception data.
[0109] In this embodiment, when the lateral sensing data does not include the first sensing data, or the distance corresponding to the first sensing data is greater than a preset safety distance, a reference distance is determined based on the second sensing data in the lateral sensing data. When the lateral sensing data includes the first sensing data, and the distance corresponding to the first sensing data is less than or equal to the preset safety distance, the width of the obstacle is determined based on the first sensing data, and the reference distance is determined based on the width of the obstacle and the lateral sensing data. The first sensing data is the sensing data collected by the first sensor, and the second sensing data is the sensing data collected by the second sensor. In the above method, the reference distance is determined in a corresponding manner based on the different sensing data included in the lateral sensing data, which is adapted to the actual state of the obstacle in the environment, improving the matching degree between the determined reference distance and the actual state of the obstacle, thereby improving the obstacle avoidance accuracy of the cleaning robot.
[0110] The second sensor is used for longitudinal scanning, and can accordingly obtain second sensing data including height information. Therefore, in one embodiment, such as Figure 7 As shown, determining the reference distance based on the second sensing data in the lateral sensing data in S610 above includes:
[0111] S710. Divide the second sensing data into height regions based on the height information in the second sensing data to obtain at least one set of sub-sensing data for the corresponding height region.
[0112] Different altitude regions correspond to different altitude ranges. For example, such as... Figure 8 As shown, different height regions include a low-segment region, a middle-segment region, and a high-segment region. The low-segment region corresponds to the height range [h0, h1), the middle-segment region corresponds to the height range [h1, h2), and the high-segment region corresponds to the height range [h2, h3]. h0 is the lower limit height of the longitudinal scan of the second sensor, and h3 is the upper limit height of the longitudinal scan of the second sensor.
[0113] Optionally, the cleaning robot divides the second sensing data into height regions according to the height information in the second sensing data and the correspondence between the preset height range and the height region, so as to divide the second sensing data into at least one height region, and the sensing data belonging to the same height region are regarded as a group of sub-sensing data, so as to obtain at least one group of sub-sensing data corresponding to the height region.
[0114] For example, the second sensing data is point cloud data. In the three-dimensional coordinate system of the point cloud data, the Y-axis coordinate represents the height of the obstacle. The height information in the second sensing data includes the height of each point in the point cloud data, that is, the Y-axis coordinate of each point. The cleaning robot can match the Y-axis coordinate of each point in the point cloud data with the height range of each height region to classify the point into the height region corresponding to its height range. For example, the cleaning robot can divide the point cloud data D into point cloud data D_low corresponding to the low segment region, point cloud data D_mid corresponding to the middle segment region, and point cloud data D_high corresponding to the high segment region based on the point cloud data D.
[0115] It should be noted that the actual state of obstacles in the environment varies greatly. They may be high or low, hollow in the middle or suspended at the bottom, etc. Therefore, the second perception data may be divided into a set of sub-perception data, corresponding to the low-segment, middle-segment, or high-segment regions. Alternatively, the second perception data may be divided into two sets of sub-perception data, corresponding to any two sets in the low-segment, middle-segment, or high-segment regions. It may also be divided into three sets of sub-perception data, corresponding to the low-segment, middle-segment, and high-segment regions, respectively.
[0116] S720. Determine the sub-sensing data of the lowest height region from at least one set of sub-sensing data.
[0117] Optionally, after the cleaning robot divides the second sensing data into at least one set of sub-sensing data based on the height information of the second sensing data, it can compare the height regions of each sub-sensing data and determine the sub-sensing data of the lowest height region. If a set of sub-sensing data is obtained, the cleaning robot will use that sub-sensing data as the sub-sensing data of the lowest height region.
[0118] S730: Determine the reference distance based on sub-sensing data of the lowest altitude region.
[0119] Optionally, after obtaining the sub-sensing data of the lowest height area, the cleaning robot can obtain the distance corresponding to the sub-sensing data of the lowest height area as a reference distance.
[0120] In this embodiment, the second sensing data is divided into height regions based on the height information in the second sensing data to obtain at least one set of sub-sensing data corresponding to the height region. The sub-sensing data of the lowest height region is determined from the at least one set of sub-sensing data, and a reference distance is determined based on the sub-sensing data of the lowest height region. In the above method, the reference distance is determined based on the sub-sensing data of the lowest height region, which realizes the targeted determination of the reference distance for low-level obstacles, improves the adaptability of the determined reference distance to low-level obstacles, and reduces collisions to improve driving safety.
[0121] The width of the obstacle varies, and therefore the method for determining the reference distance also differs. In one embodiment, such as... Figure 9 As shown, determining the reference distance based on the obstacle's width and lateral perception data in S620 includes:
[0122] S910. When the width of the obstacle is less than or equal to the preset width, determine the reference distance based on the first perception data.
[0123] Among them, an obstacle with a width less than or equal to a preset width indicates that the obstacle is thin and occupies little space. It may be a linear object in the environment, such as a table leg or a chair leg.
[0124] Optionally, after obtaining the width of the obstacle based on the first perception data, the cleaning robot can compare the width with a preset width, and if the width of the obstacle is less than or equal to the preset width, determine a reference distance based on the first perception data in the lateral perception data.
[0125] For example, the cleaning robot can obtain the distance corresponding to the first perception data as a reference distance.
[0126] S920. When the width of the obstacle is greater than the preset width, the second sensing data is divided into height regions according to the height information of the second sensing data to obtain at least one set of sub-sensing data for the corresponding height region, and a reference distance is determined according to the first sensing data and at least one set of sub-sensing data.
[0127] Among them, an obstacle with a width greater than the preset width indicates that the obstacle is wider and occupies more space. It may be a surface object in the environment, such as a wall, cabinet, etc.
[0128] Optionally, after the cleaning machine obtains the width of the obstacle based on the first sensing data, it can divide the second sensing data into height regions according to the height information of the second sensing data to obtain at least one set of sub-sensing data for the corresponding height region, and determine the reference distance based on the first sensing data and at least one set of sub-sensing data.
[0129] It should be noted that the process of dividing the second sensing data into at least one set of sub-sensing data can be found in the detailed description related to S710 in the foregoing embodiments, and will not be repeated here.
[0130] For example, the cleaning robot can determine a candidate obstacle distance based on the first perception data and a candidate obstacle distance based on a set of sub-perception data, so as to determine one of the multiple candidate obstacle distances as a reference distance, such as selecting the maximum / minimum candidate obstacle distance as the reference distance, in order to reduce the probability of collision between the cleaning robot and the obstacle.
[0131] In this embodiment, when the width of the obstacle is less than or equal to a preset width, a reference distance is determined based on the first sensing data; when the width of the obstacle is greater than the preset width, the second sensing data is divided into height regions based on the height information of the second sensing data to obtain at least one set of sub-sensing data for the corresponding height region, and the reference distance is determined based on the first sensing data and at least one set of sub-sensing data. In the above method, multi-dimensional obstacle state information including width and height is obtained through multi-sensor fusion, further refining the way of determining the reference distance for obstacles of different widths, improving the matching degree between the determined reference distance and the actual state of the obstacle, and correspondingly improving the obstacle avoidance accuracy of the cleaning robot.
[0132] For obstacles at height, in one embodiment, such as Figure 10 As shown, determining the reference distance based on the first sensing data and at least one set of sub-sensing data in S920 includes:
[0133] S1010. Determine the sub-sensing data of the highest altitude region from at least one set of sub-sensing data.
[0134] Optionally, after the cleaning robot divides the second sensing data into at least one set of sub-sensing data based on the height information of the second sensing data, it can compare the height regions of each sub-sensing data and determine the sub-sensing data of the highest height region. If a set of sub-sensing data is obtained, the cleaning robot will use that sub-sensing data as the sub-sensing data of the highest height region.
[0135] S1020. Determine the reference distance based on the distance corresponding to the first sensing data and the distance corresponding to the sub-sensing data of the highest height region.
[0136] Optionally, the cleaning robot can acquire the distance corresponding to the first sensing data as a candidate distance, and acquire the distance corresponding to the sub-sensing data of the highest height area as a candidate distance, and select one of the two candidate distances as a reference distance, such as selecting the maximum / minimum candidate distance as the reference distance.
[0137] The relationship between the distance corresponding to the first sensing data and the distance corresponding to the sub-sensing data of the highest height region can be used to reflect the flatness of the obstacle surface / boundary. Therefore, in one embodiment, such as Figure 11 As shown, the above-mentioned S1020, determining the reference distance based on the distance corresponding to the first sensing data and the distance corresponding to the sub-sensing data of the highest height region, includes:
[0138] S1110. If the distance corresponding to the first sensing data is less than the distance corresponding to the sub-sensing data of the highest height region, determine the reference distance based on the first sensing data.
[0139] Among them, the distance corresponding to the first perception data is less than the distance corresponding to the sub-perception data of the highest height region, which indicates that the surface of the obstacle is uneven and has a high-convex shape with the high point protruding relative to the low point.
[0140] Optionally, the cleaning robot can compare the distance corresponding to the first sensing data with the distance corresponding to the sub-sensing data of the highest height area, so that if the distance corresponding to the first sensing data is less than the distance corresponding to the sub-sensing data of the highest height area, a reference distance can be determined based on the first sensing data, such as using the distance corresponding to the first sensing data as the reference distance.
[0141] S1120. If the distance corresponding to the first sensing data is greater than or equal to the distance corresponding to the sub-sensing data of the highest altitude region, a reference distance is determined based on the sub-sensing data of the highest altitude region.
[0142] Among them, the distance corresponding to the first sensing data is greater than or equal to the distance corresponding to the sub-sensing data of the highest height region. When it is greater, it indicates that the surface of the obstacle is uneven, showing a high-low shape with the high point being relatively concave. When it is equal, it indicates that the surface of the obstacle is flat.
[0143] Optionally, the cleaning robot can compare the distance corresponding to the first sensing data with the distance corresponding to the sub-sensing data of the highest height region. If the distance corresponding to the first sensing data is greater than or equal to the distance corresponding to the sub-sensing data of the highest height region, a reference distance can be determined based on the sub-sensing data of the highest height region, such as using the distance corresponding to the sub-sensing data of the highest height region as the reference distance.
[0144] In this embodiment, sub-sensing data of the highest height region is determined from at least one set of sub-sensing data. A reference distance is then determined based on the distance corresponding to the first sensing data and the distance corresponding to the sub-sensing data of the highest height region. Specifically, if the distance corresponding to the first sensing data is less than the distance corresponding to the sub-sensing data of the highest height region, the reference distance is determined based on the first sensing data. If the distance corresponding to the first sensing data is greater than or equal to the distance corresponding to the sub-sensing data of the highest height region, the reference distance is determined based on the sub-sensing data of the highest height region. This method achieves targeted determination of reference distances for high-altitude obstacles, improving the adaptability of the determined reference distance to high-altitude obstacles, thereby reducing collisions and improving driving safety.
[0145] To improve obstacle-following accuracy, in one embodiment, such as Figure 12 As shown, the above-mentioned S230, controlling the cleaning robot to move around the obstacle according to the reference distance, includes:
[0146] S1210. Obtain the distance error between the reference distance and the target distance along the obstacle.
[0147] Optionally, the cleaning robot can enter the obstacle avoidance area and continue driving after adjusting its direction to continuously collect lateral perception data and obtain a reference distance. The cleaning robot can read the pre-stored target obstacle distance and obtain the distance error between the reference distance and the target obstacle distance at the current moment.
[0148] For example, a cleaning robot may use a reference distance. Subtract the distance along the obstacle from the target The distance error e is obtained.
[0149]
[0150] S1220: Control the cleaning robot to move around obstacles based on distance error.
[0151] It should be noted that the reference distance will change as the cleaning robot moves, and the distance error will also change accordingly.
[0152] Optionally, the cleaning robot can determine the driving direction that makes the distance error approach 0 based on the distance error at the current moment during the driving process, and control itself to drive in that driving direction at the next moment, thereby controlling the cleaning robot to drive around the obstacle.
[0153] For example, such as Figure 13 As shown, the cleaning robot dynamically adjusts its direction towards the direction where the distance error tends to 0 based on the real-time distance error. That is, it maintains the distance between the cleaning robot and the obstacle as the target obstacle distance S, which is determined based on the side perception data, so that the cleaning robot can drive around the obstacle.
[0154] In this embodiment, the distance error between the reference distance and the target obstacle distance is obtained to control the cleaning robot to move around the obstacle. In the above method, the change in distance error can accurately reflect the change in the obstacle surface / boundary. By controlling the cleaning robot to move around the obstacle through the distance error, the movement of the cleaning robot can be adapted to the change in the obstacle surface / boundary, thereby improving the obstacle-following accuracy and cleaning coverage of the cleaning robot.
[0155] Controlling a cleaning robot to navigate around an obstacle requires determining a first velocity component in the forward direction and a second velocity component pointing towards the obstacle. Based on this, in one embodiment, such as... Figure 14 As shown, the above-mentioned S1220, controlling the cleaning robot to move around the obstacle based on the distance error, includes:
[0156] S1410. Determine the first velocity component of the cleaning robot in the forward direction based on the distance error.
[0157] The first velocity component varies with the distance error.
[0158] Optionally, the cleaning robot can compare the absolute value of the distance error at the current moment with a preset threshold to determine the first velocity component of the cleaning robot in the forward direction based on the comparison result. If the distance error is greater than or equal to the preset threshold, the cleaning robot can use the first velocity value as the first velocity component; if the distance threshold is less than the preset threshold, the cleaning robot can use a second velocity value as the first velocity component; the second velocity value is greater than the first velocity value.
[0159] For example, the cleaning robot may also use the reference distance to subtract the target obstacle distance to obtain the distance error, and use a first speed value as the first speed component when the distance error is negative; use a second speed value as the first speed component when the distance error is positive or 0; the second speed value is greater than the first speed value.
[0160] S1420. Based on the distance error, the proportional-integral-derivative control algorithm is used to determine the second velocity component of the cleaning robot pointing towards the obstacle.
[0161] Optionally, the cleaning robot can use a preset proportional-integral-derivative control algorithm to determine the second velocity component of the cleaning robot pointing towards the obstacle based on the distance error at the current moment.
[0162] For example, the proportional-integral-differential (PID) control algorithm satisfies the following formula:
[0163]
[0164] in, This represents the second velocity component, also known as the angular velocity of the cleaning robot. This indicates the distance error. Indicates proportional gain, used for adjustment and The relationship. This represents the integral gain, used to eliminate long-term bias. This represents the differential gain, used to suppress rapid changes.
[0165] S1430: Control the cleaning robot to move according to the first velocity component and the second velocity component to move around the obstacle.
[0166] Optionally, after obtaining the first velocity component and the second velocity component, the cleaning robot can control itself to use the first velocity component in the forward direction and the second velocity component in the direction it is pointing toward the obstacle, so as to travel around the obstacle at the combined speed of the first velocity component and the second velocity component.
[0167] In this embodiment, the first velocity component of the cleaning robot in the forward direction is determined based on the distance error, and the second velocity component of the cleaning robot pointing towards the obstacle is determined based on the distance error using a proportional-integral-derivative control algorithm. The cleaning robot is then controlled to move according to the first and second velocity components to circumnavigate the obstacle. In the above method, the first velocity component of the cleaning robot in the forward direction and the second velocity component pointing towards the obstacle are determined by the distance error, thereby accurately controlling the cleaning robot to circumnavigate the obstacle, realizing the smooth following of the cleaning robot to the obstacle, and improving the stability of obstacle avoidance driving.
[0168] To improve driving safety and cleaning efficiency, in one embodiment, such as Figure 15 As shown, S1420 above, determining the first velocity component of the cleaning robot in the forward direction based on the distance error, includes:
[0169] S1510. If the distance error falls within the preset error range, determine the first velocity component as the preset maximum value.
[0170] Among them, the distance error is within the preset error range, indicating that the cleaning robot has not deviated significantly from the target obstacle distance, and should travel at a higher speed to improve cleaning efficiency.
[0171] Optionally, after obtaining the distance error at the current moment, the cleaning robot can match the absolute value of the distance error with a preset error range, and if the distance error falls within the preset error range, determine the first velocity component as the preset maximum value.
[0172] S1520. If the distance error is not within the preset error range and the reference distance is greater than the target distance along the obstacle, determine the first velocity component as the preset maximum velocity.
[0173] Among them, if the distance error is not within the preset error range and the reference distance is greater than the target obstacle distance, it indicates that the cleaning robot deviates significantly from the target obstacle distance and is far from the obstacle. In this case, a higher speed should be used to improve obstacle accuracy and cleaning efficiency.
[0174] Optionally, after obtaining the distance error at the current moment, the cleaning robot can match the absolute value of the distance error with a preset error range, and if the distance error does not fall within the preset error range, it can further compare the reference distance with the target obstacle distance. If the reference distance is greater than the target obstacle distance, the first velocity component is determined to be the preset maximum velocity.
[0175] S1530. When the distance error is not within the preset error range and the reference distance is less than the target obstacle distance, a first velocity component is determined based on the distance error, the preset maximum speed and the target obstacle distance to control the cleaning robot to decelerate.
[0176] Among them, if the distance error is not within the preset error range and the reference distance is less than the target obstacle distance, it indicates that the cleaning robot deviates significantly from the target obstacle distance and is far from the obstacle. Therefore, it should travel at a lower speed to improve driving safety.
[0177] Optionally, after obtaining the distance error at the current moment, the cleaning robot can match the absolute value of the distance error with a preset error range. If the distance error does not fall within the preset error range, it can further compare the reference distance with the target obstacle distance. If the reference distance is less than the target obstacle distance, it can reduce the first velocity component. The first velocity component can be determined based on the distance error, the preset maximum speed, and the target obstacle distance to control the cleaning robot to decelerate.
[0178] For example, the first velocity component can be determined using the following formula:
[0179]
[0180] in, This represents the first velocity component, also known as the linear velocity of the cleaning robot. This indicates the preset maximum speed. This represents the maximum distance error, which is the distance from the target along the obstacle.
[0181] In this embodiment, when the distance error falls within a preset error range, the first velocity component is determined as a preset maximum velocity; when the distance error does not fall within the preset error range and the reference distance is greater than the target obstacle distance, the first velocity component is determined as a preset maximum velocity; when the distance error does not fall within the preset error range and the reference distance is less than the target obstacle distance, the first velocity component is determined based on the distance error, the preset maximum velocity, and the target obstacle distance to control the cleaning robot to decelerate. In the above method, different first velocity components are used for different positional relationships of the cleaning robot relative to the obstacle, with the maximum velocity used in some cases and deceleration in others, thereby improving both driving safety and cleaning efficiency.
[0182] To facilitate understanding by those skilled in the art, the robot obstacle avoidance method provided in this application is described in detail below, such as... Figure 16 As shown, the method may include:
[0183] S1601. Acquire forward perception data based on the first and third sensors on the cleaning robot; the first sensor is used for horizontal scanning to acquire first perception data of the reference horizontal plane; the third sensor is used for horizontal scanning of the ground to collect second perception data of the cleaning robot's forward direction of travel.
[0184] S1602. Determine the distance between the cleaning robot and the obstacle based on the forward perception data;
[0185] S1603. Determine the area where the cleaning robot is located based on the distance between the cleaning robot and the obstacle;
[0186] S1604. When the cleaning robot is in the obstacle avoidance area, adjust the driving direction of the cleaning robot and acquire lateral perception data based on the first and second sensors on the cleaning robot; the second sensor is used for longitudinal scanning to collect lateral perception data of the cleaning robot.
[0187] S1605. If the first sensing data is not included in the lateral sensing data, or if the distance corresponding to the first sensing data is greater than the preset safe distance, the second sensing data is divided into height regions according to the height information in the second sensing data in the lateral sensing data, so as to obtain at least one set of sub-sensing data corresponding to the height region.
[0188] S1606. Determine the sub-sensing data of the lowest altitude region from at least one set of sub-sensing data;
[0189] S1607. Determine the reference distance between the cleaning robot and the obstacle based on the sub-sensing data of the lowest height area;
[0190] S1608. When the lateral perception data includes the first perception data and the distance corresponding to the first perception data is less than or equal to the preset safe distance, the width of the obstacle is determined based on the first perception data.
[0191] S1609. When the width of the obstacle is less than or equal to the preset width, a reference distance is determined based on the first perception data.
[0192] S1610. When the width of the obstacle is greater than the preset width, the second sensing data is divided into height regions according to the height information of the second sensing data to obtain at least one set of sub-sensing data for the corresponding height region.
[0193] S1611. Determine the sub-sensing data of the highest altitude region from at least one set of sub-sensing data;
[0194] S1612. If the distance corresponding to the first sensing data is less than the distance corresponding to the sub-sensing data of the highest height region, a reference distance is determined based on the first sensing data.
[0195] S1613. If the distance corresponding to the first sensing data is greater than or equal to the distance corresponding to the sub-sensing data of the highest height region, a reference distance is determined based on the sub-sensing data of the highest height region.
[0196] S1614. Control the cleaning robot to move around the obstacle based on the reference distance.
[0197] like Figure 17 As shown, S1614 above, controlling the cleaning robot to move around the obstacle according to the reference distance, includes:
[0198] S1701. Obtain the distance error between the reference distance and the target distance along the obstacle;
[0199] S1702. If the distance error falls within the preset error range, determine the first velocity component as the preset maximum velocity.
[0200] S1703. When the distance error is not within the preset error range and the reference distance is greater than the target distance along the obstacle, the first velocity component is determined to be the preset maximum velocity.
[0201] S1704. When the distance error is not within the preset error range and the reference distance is less than the target obstacle distance, determine the first velocity component based on the distance error, the preset maximum speed and the target obstacle distance to control the cleaning robot to decelerate.
[0202] S1705. Based on the distance error, the proportional-integral-derivative control algorithm is used to determine the second velocity component of the cleaning robot pointing towards the obstacle.
[0203] S1706. Control the cleaning robot to move according to the first velocity component and the second velocity component to move around the obstacle.
[0204] It should be noted that the descriptions of S1601-S1614 and S1701-S1706 above can be found in the relevant descriptions in the above embodiments, and their effects are similar. Therefore, they will not be repeated here.
[0205] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0206] Based on the same inventive concept, this application also provides a robot obstacle avoidance device for implementing the robot obstacle avoidance method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more robot obstacle avoidance device embodiments provided below can be found in the limitations of the robot obstacle avoidance method described above, and will not be repeated here.
[0207] In one embodiment, such as Figure 18 As shown, a robot obstacle avoidance device is provided, including: a data acquisition module 1801, a distance determination module 1802, and an obstacle avoidance driving module 1803, wherein:
[0208] The data acquisition module 1801 is used to adjust the driving direction of the cleaning robot and acquire lateral perception data based on the first and second sensors on the cleaning robot when the cleaning robot is in the obstacle avoidance area; the first sensor is used for horizontal scanning to collect first perception data of the reference horizontal plane; the second sensor is used for vertical scanning to collect second perception data of the cleaning robot's lateral direction.
[0209] The distance determination module 1802 is used to determine the reference distance between the cleaning robot and the obstacle based on the lateral perception data;
[0210] The obstacle avoidance driving module 1803 is used to control the cleaning robot to drive around obstacles based on a reference distance.
[0211] The modules in the aforementioned robot obstacle avoidance device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0212] In one embodiment, this application also provides a cleaning robot, such as Figure 3As shown, the robot body 101 includes a first sensor 102, a second sensor 103, and a third sensor 104 disposed on the robot body 101. The robot body 101 includes a processor and a memory. The memory stores a computer program. When the processor executes the computer program, it implements the steps of any of the above-mentioned robot obstacle avoidance methods.
[0213] In one embodiment, the first sensor 102 is located at the top center of the robot body; the second sensor 103 is located at the side of the robot body; and the third sensor 104 is located at the front end of the robot body 101.
[0214] The first sensor 102 is used for horizontal scanning to collect first perception data of a reference horizontal plane; the second sensor 103 is used for vertical scanning to collect second perception data of the cleaning robot's lateral direction. The reference horizontal plane is a horizontal plane set at the same height as the first sensor 102; the third sensor 104 is used for horizontal scanning of the ground to collect perception data of the cleaning robot's forward direction of travel.
[0215] It should be noted that the first sensor 102 has a longer detection range and can be used for large-scale obstacle perception, providing global environmental information. It is suitable for detecting obstacles at long distances and at higher levels. The second sensor 103 has a shorter detection range and can detect the height distribution of obstacles and identify their surface / boundary features (such as protrusions, depressions, etc.). The third sensor 104 has a shorter detection range and a smaller detection area, suitable for detecting obstacles at close range and at lower levels. For example, the first sensor 102 is a planar lidar, while the second sensor 103 and the third sensor 104 are line lidars.
[0216] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs any of the above-described robot obstacle avoidance steps.
[0217] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs any of the above-described robot obstacle avoidance steps.
[0218] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0219] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0220] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A robot obstacle avoidance method, characterized in that, The method includes: When the cleaning robot is in an obstacle avoidance area, the robot's travel direction is adjusted and lateral perception data based on the first and second sensors on the robot is acquired. The first sensor is used for horizontal scanning to acquire first perception data of a reference horizontal plane. The second sensor is used for vertical scanning to acquire second perception data of the cleaning robot's lateral movement. The reference distance between the cleaning robot and the obstacle is determined based on the lateral perception data. The cleaning robot is controlled to move around the obstacle based on the reference distance.
2. The method according to claim 1, characterized in that, The method further includes: The robot acquires forward perception data based on the first sensor and the third sensor on the cleaning robot; the third sensor is used for lateral ground scanning to collect perception data in the forward direction of the cleaning robot's movement. The distance between the cleaning robot and the obstacle is determined based on the positive perception data; The area where the cleaning robot is located is determined based on the distance between the cleaning robot and the obstacle.
3. The method according to claim 2, characterized in that, Determining the area where the cleaning robot is located based on the distance between the cleaning robot and the obstacle includes: If the distance between the cleaning robot and the obstacle is less than a preset safe distance, the cleaning robot is determined to be in the obstacle avoidance zone.
4. The method according to any one of claims 1-3, characterized in that, Determining the reference distance between the cleaning robot and the obstacle based on the lateral perception data includes: If the lateral sensing data does not include the first sensing data, or if the distance corresponding to the first sensing data is greater than the preset safe distance, the reference distance is determined based on the second sensing data in the lateral sensing data. If the lateral perception data includes the first perception data, and the distance corresponding to the first perception data is less than or equal to the preset safety distance, the width of the obstacle is determined based on the first perception data, and the reference distance is determined based on the width of the obstacle and the lateral perception data.
5. The method according to claim 4, characterized in that, Determining the reference distance based on the second sensing data in the lateral sensing data includes: Based on the height information in the second sensing data, the second sensing data is divided into height regions to obtain at least one set of sub-sensing data for the corresponding height region; Determine the sub-sensing data of the lowest height region from the at least one set of sub-sensing data; The reference distance is determined based on the sub-sensing data of the lowest altitude region.
6. The method according to claim 4, characterized in that, Determining the reference distance based on the width of the obstacle and the lateral sensing data includes: If the width of the obstacle is less than or equal to the preset width, the reference distance is determined based on the first sensing data; When the width of the obstacle is greater than the preset width, the second sensing data is divided into height regions according to the height information of the second sensing data to obtain at least one set of sub-sensing data for the corresponding height region, and the reference distance is determined according to the first sensing data and the at least one set of sub-sensing data.
7. The method according to claim 6, characterized in that, Determining the reference distance based on the first sensing data and the at least one set of sub-sensing data includes: Determine the sub-sensing data of the highest altitude region from the at least one set of sub-sensing data; The reference distance is determined based on the distance corresponding to the first sensing data and the distance corresponding to the sub-sensing data of the highest altitude region.
8. The method according to claim 7, characterized in that, Determining the reference distance based on the distance corresponding to the first sensing data and the distance corresponding to the sub-sensing data of the highest altitude region includes: If the distance corresponding to the first sensing data is less than the distance corresponding to the sub-sensing data of the highest height region, the reference distance is determined based on the first sensing data. If the distance corresponding to the first sensing data is greater than or equal to the distance corresponding to the sub-sensing data of the highest altitude region, the reference distance is determined based on the sub-sensing data of the highest altitude region.
9. The method according to any one of claims 1-3, characterized in that, The step of controlling the cleaning robot to move around the obstacle based on the reference distance includes: Obtain the distance error between the reference distance and the target distance along the obstacle; The cleaning robot is controlled to navigate around the obstacle based on the distance error.
10. The method according to claim 9, characterized in that, The step of controlling the cleaning robot to move around the obstacle based on the distance error includes: The first velocity component of the cleaning robot in the forward positive direction is determined based on the distance error; Based on the distance error, a proportional-integral-derivative (PI-DI) control algorithm is used to determine the second velocity component of the cleaning robot pointing towards the obstacle. The cleaning robot is controlled to travel around the obstacle based on the first speed component and the second speed component.
11. The method according to claim 10, characterized in that, Determining the first velocity component of the cleaning robot in the forward direction based on the distance error includes: If the distance error falls within a preset error range, the first velocity component is determined to be a preset maximum velocity. If the distance error is not within the preset error range and the reference distance is greater than the target obstacle distance, the first velocity component is determined to be the preset maximum velocity. If the distance error is not within the preset error range and the reference distance is less than the target obstacle distance, the first velocity component is determined based on the distance error, the preset maximum speed, and the target obstacle distance to control the cleaning robot to decelerate.
12. A cleaning robot, characterized in that, The method includes a robot body and a first sensor, a second sensor, and a third sensor disposed on the robot body. The robot body includes a processor and a memory, the memory storing a computer program. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
13. The cleaning robot according to claim 12, characterized in that, The first sensor is located at the top center of the robot body; the second sensor is located on the side of the robot body; and the third sensor is located at the front end of the robot body.