Cleaning robot detrapping method and cleaning robot
By constructing a local map and updating the global map to generate a fusion map, the cleaning robot can automatically plan an escape path and escape. This solves the problem of the cleaning robot being trapped under the hollow obstacle at the bottom, achieving intelligent escape and normal task execution.
Patent Information
- Application Number
- CN202411384533.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
AI Technical Summary
When a cleaning robot encounters a hollowed-out obstacle at the bottom, it is easy to drill into the hollowed-out area and get trapped, resulting in the inability to perform tasks normally.
By constructing a local map and obtaining the historical movement path, the global map is updated to generate a fusion map, an escape path is planned based on the fusion map, and the cleaning robot is controlled to walk along the escape path to escape from difficulty.
The cleaning robot is automatically planned for the trapped path in the state of being trapped, intelligently escapes, without manual intervention to ensure that the cleaning robot can reliably separate from the trapped area.
Smart Images

Figure CN119326341A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of cleaning robots, and in particular to a method for escaping a cleaning robot and a cleaning robot. Background Art
[0002] When the cleaning robot encounters an obstacle during movement, it will avoid the obstacle. However, when the cleaning robot encounters an obstacle with a hollow bottom, especially when the bottom height of such an obstacle is close to the height of the cleaning robot, the cleaning robot is likely to drill into the bottom of such an obstacle and get stuck at the bottom of such an obstacle, causing the cleaning robot to be unable to perform its tasks normally. Summary of the invention
[0003] One purpose of the embodiments of the present application is to provide a method for a cleaning robot to escape from trouble and a cleaning robot, so as to solve the technical problem that the cleaning robots in the related art cannot escape from trouble reliably.
[0004] In a first aspect, an embodiment of the present application provides a method for escaping a cleaning robot, comprising:
[0005] In response to the cleaning robot being in a trapped state, constructing a local map;
[0006] Obtaining a historical moving path and a global map of the cleaning robot before it enters a trapped state;
[0007] Update the global map according to the local map and the historical movement path to obtain a fused map;
[0008] Planning an escape route based on the fused map;
[0009] The cleaning robot is controlled to walk along the escape path.
[0010] Optionally, in response to the cleaning robot being in a trapped state, constructing a local map includes:
[0011] Acquiring trapped detection data, where the trapped detection data is used to reflect the state of the cleaning robot;
[0012] Detecting whether the cleaning robot is in a trapped state according to the trapped detection data;
[0013] If the cleaning robot is in a trapped state, a local map is constructed.
[0014] Optionally, obtaining trapped detection data includes:
[0015] Obtaining the number of navigation failures, where the number of navigation failures is trapped detection data, and the number of navigation failures is the number of failures of the cleaning robot to perform navigation operations; or,
[0016] Obtaining a navigation failure time, wherein the navigation failure time is trapped detection data, and the navigation failure time is a failure time when the cleaning robot performs a navigation operation; or,
[0017] The position points at a target distance from the cleaning robot are traversed on the global map, and the position information of all the position points constitutes contour data, and the contour data is trapped detection data.
[0018] Optionally, the global map is a grid map, the position points are represented by grids, and the obtaining of contour data of a target distance from the cleaning robot includes:
[0019] Searching for a grid at a target distance from the cleaning robot on the global map as a target grid;
[0020] The position information of each target grid is combined to obtain contour data.
[0021] Optionally, the trapped detection data includes contour data, and detecting whether the cleaning robot is in a trapped state according to the trapped detection data includes:
[0022] Detecting whether there is a gap in the contour boundary corresponding to the contour data;
[0023] If so, determining the size of the gap and the passage size of the cleaning robot, and detecting whether the cleaning robot is in a trapped state according to the size of the gap and the passage size;
[0024] If not, it is determined that the cleaning robot is in a trapped state.
[0025] Optionally, before detecting whether there is a gap area at the contour boundary corresponding to the contour data, the method further includes:
[0026] Obtaining the number of navigation failures, and if the number of navigation failures is greater than or equal to a preset number threshold, entering the step of detecting whether there is a gap in the contour boundary corresponding to the contour data; or,
[0027] The navigation failure time is obtained. If the navigation failure time is greater than or equal to a preset time threshold, the step of detecting whether there is a gap in the contour boundary corresponding to the contour data is entered.
[0028] Optionally, constructing the local map includes:
[0029] determining a current machine position of the cleaning robot;
[0030] Acquire environmental detection data, where the environmental detection data is data obtained by the cleaning robot detecting the surrounding environment at the current machine position;
[0031] A local map is generated according to the environmental detection data, and the current machine position is located at a center point of the local map.
[0032] Optionally, obtaining a historical moving path of the cleaning robot before entering the trapped state includes:
[0033] determining a current machine position of the cleaning robot;
[0034] Finding a target area on the global map according to the current machine position, wherein the current machine position is located at the center of the target area;
[0035] Find out the historical waypoints in the target area;
[0036] The historical path points are combined in sequence to obtain a historical moving path.
[0037] Optionally, the global map and the local map are both grid maps, the historical movement path includes at least one historical path point, and updating the global map according to the local map and the historical movement path to obtain a fused map includes:
[0038] Updating the grid state of the global grid to the grid state of the local grid to obtain an updated global map, wherein the global grid is a grid in the global map, the local grid is a grid in the local map, and the position of the global grid in the global map is consistent with the position of the local grid in the local map;
[0039] Determining, in the updated global map, a grid corresponding to the location point of the historical path point as a grid to be processed;
[0040] The grid state of each of the to-be-processed grids is set to a passable state to obtain a fused map.
[0041] In a second aspect, an embodiment of the present application provides a cleaning robot, comprising a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the cleaning robot implements the above-mentioned method.
[0042] The embodiments of the present application can achieve the following technical effects: when the cleaning robot enters a trapped state, the embodiments of the present application can automatically plan an escape path and escape intelligently without human help, and the embodiments of the present application use local maps and historical movement paths to update the global map to obtain a fused map, wherein the positions passed by the historical movement paths in the global map themselves belong to the positions that the cleaning robot normally travels. Therefore, the fused map can reliably plan path information for the cleaning robot to escape from the trapped area. Based on the fused map, the embodiments of the present application can plan a reliable escape path to help the cleaning robot achieve the purpose of escaping. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 A schematic diagram of a cleaning robot carrying a laser radar to perform long-distance scanning of an obstacle with a hollow bottom provided in an embodiment of the present application;
[0045] Figure 2 A schematic diagram of a cleaning robot carrying a laser radar to scan an obstacle with a hollow bottom at close range provided in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of a cleaning robot provided in an embodiment of the present application scanning within an obstacle with a hollow bottom;
[0047] Figure 4 A schematic diagram of a scenario in which a cleaning robot provided in an embodiment of the present application is trapped in an obstacle with a hollow bottom;
[0048] Figure 5 A schematic diagram of a flow chart of a method for escaping a cleaning robot provided in an embodiment of the present application;
[0049] Figure 6 A schematic diagram of extracting contour data provided in an embodiment of the present application, wherein the contour data is composed of obstacle grids;
[0050] Figure 7 A schematic diagram of extracting contour data provided in an embodiment of the present application, wherein the contour data is composed of obstacle grids and passable grids;
[0051] Figure 8 A schematic diagram of a cleaning robot provided in an embodiment of the present application scanning a hollow area;
[0052] Fig. 9 A schematic diagram of a local map scanned by a cleaning robot provided in an embodiment of the present application;
[0053] Fig.10 A schematic diagram of a cleaning robot provided in an embodiment of the present application entering an obstacle with a hollow bottom based on a historical moving path;
[0054] Fig.11 A schematic diagram of a cleaning robot entering an obstacle with a hollow bottom based on a historical moving path using a grid map provided in an embodiment of the present application;
[0055] Fig.12 A schematic diagram of updating a global map using a local map and a historical movement path provided in an embodiment of the present application;
[0056] Fig.13 A schematic diagram of the structure of an escape device for a cleaning robot provided in an embodiment of the present application;
[0057] Fig.14 A schematic diagram of the structure of a cleaning robot provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0059] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.
[0060] The cleaning robot is equipped with a sensor module that can detect the surrounding environment and obtain environmental detection data. When the cleaning robot detects that there is an obstacle in front of it based on the environmental detection data, the cleaning robot adopts an obstacle avoidance strategy to avoid the obstacle and prevent the cleaning robot from colliding with the obstacle. When the cleaning robot detects that there is no obstacle in front of it based on the environmental detection data, the cleaning robot walks according to the established walking strategy.
[0061] The sensor module includes a laser radar and / or a camera. Usually, the laser radar is installed horizontally on the top of the cleaning robot, and the laser radar can emit laser lines to scan obstacles in front. In order to ensure that the laser radar can scan obstacles higher than the cleaning robot, the elevation angle of the laser head of the laser radar is set in the range of 0 to 2 degrees. Therefore, the elevation angle of the laser line emitted by the laser radar to the horizontal plane is in the range of 0 to 2 degrees. In this way, the laser line emitted by the laser radar can hit obstacles higher than the cleaning robot, so that the laser radar can detect obstacles higher than the cleaning robot.
[0062] See also Figure 1 , the cleaning robot 10 carries the laser radar 20 to move, and the laser radar 20 obliquely emits a laser line 21. The laser radar 20 detects the surrounding environment and obtains laser radar data. The cleaning robot performs a map update operation based on the laser radar data collected by the laser radar 20 to mark the detected obstacles on the map.
[0063] The embodiment of the present application constructs a map using a probabilistic grid update method. The probability of the grid corresponding to the position hit by the laser line is increased. When the probability of the grid is greater than a first preset probability threshold (such as 0.9), the grid is determined to be an obstacle grid, that is, the position corresponding to the grid is the position occupied by the obstacle. The probability of the grid corresponding to the position not hit by the laser line or the position passed by the laser line is reduced. When the probability of the grid is less than a second preset probability threshold (such as 0.49), the grid is determined to be a passable grid, that is, the position corresponding to the grid is not occupied by an obstacle.
[0064] The embodiment of the present application updates the map according to a predetermined map update frequency. For example, the condition of the map update frequency is as follows: when the cleaning robot walks 0.2 m and rotates 50 degrees, the map is updated once based on the laser radar data detected each time.
[0065] like Figure 1 As shown, although the obstacle 22 is a hollow obstacle at the bottom, the distance between the laser radar 20 and the obstacle 22 is relatively far, and the laser line 21 can hit the obstacle 22. Through multiple map update operations, the cleaning robot 10 can eventually mark the obstacle 22 on the map.
[0066] When the distance between the laser radar 20 and the obstacle 22 is relatively close, for example, see Figure 2 When the cleaning robot 10 cleans along a wall or an edge, the laser line 21 easily passes through the hollow area of the obstacle 22, causing the cleaning robot 10 to believe that there is no obstacle within the safe distance ahead. Moreover, due to the frequency of map updates, the cleaning robot 10 easily drills into the hollow area of the obstacle 22.
[0067] When the cleaning robot 10 mistakenly enters the hollow area of the obstacle 22, the cleaning robot 10 detects it through the laser radar 20. At this time, the laser line of the laser radar 20 can hit the bottom surface of the obstacle 22. For example, please refer to Figure 3 The body height of the cleaning robot 10 is 9.5 cm, the equipment height of the laser radar 20 is 7.8 cm, the elevation angle is 1.5 degrees, and the height of the hollow area of the obstacle 22 is 11.7 cm.
[0068] To detect the obstacle 22, the laser line needs to be able to hit the bottom surface of the obstacle 22. The height difference between the bottom surface of the obstacle 22 and the laser radar is Δh = 11.7-7.8 = 3.9 cm. Based on the trigonometric formula, the distance d = 3.9 / tan(1.5) ≈ 1.5 m is obtained. Therefore, the cleaning robot can detect the obstacle 22 in the hollow area at a position of 1.5 meters.
[0069] Generally, the width of objects such as beds, sofas, coffee tables or cabinets in the room is likely to be greater than 1.5m, so the cleaning robot provided in the embodiment of the present application can still detect the obstacle 22 in the hollow area. When the cleaning robot detects the obstacle 22 in the hollow area, the cleaning robot needs to execute the obstacle avoidance strategy, but the height of the hollow area of the obstacle 22 or the bottom surface height of the obstacle 22 is close to the body height of the cleaning robot 10, resulting in the cleaning robot 10 being trapped in the hollow area of the obstacle 22.
[0070] See also Figure 4 , the cleaning robot 10 is trapped at the bottom of the obstacle 22 and cannot navigate out of the bottom of the obstacle 22. In the related art, when the cleaning robot 10 is trapped in the hollow area of the obstacle 22, after multiple navigation failures, the cleaning robot 10 sends navigation abnormality information to the mobile terminal or voice broadcasts navigation abnormality information, and the user moves the cleaning robot 10 out of the hollow area of the obstacle 22. This method has a low escape efficiency. When the cleaning robot 10 enters a trapped state, the embodiment of the present application can automatically plan an escape path and escape intelligently without manual help.
[0071] The following is an embodiment of the present application that provides a method for a cleaning robot to escape from a difficult situation. Figure 5 The cleaning robot's escape method includes the following steps S51 to S55.
[0072] The embodiment of the present application executes step S51, and in response to the cleaning robot being in a trapped state, a local map is constructed. The trapped state is a state in which the cleaning robot cannot navigate to a predetermined navigation point or target point, the navigation point is a location point set by the cleaning robot according to a real-time navigation strategy, and the target point is the end point of the task performed by the cleaning robot. The local map is a map detected by the cleaning robot in real time.
[0073] In response to the cleaning robot being in a trapped state, constructing a local map includes the following steps: obtaining trapped detection data, the trapped detection data is used to reflect the state of the cleaning robot, detecting whether the cleaning robot is in a trapped state according to the trapped detection data, if the cleaning robot is in a trapped state, constructing a local map, if the cleaning robot is in a normal state, returning to the step of obtaining trapped detection data.
[0074] There are many ways to express trapped detection data.
[0075] In some embodiments, obtaining trapped detection data includes the following steps: obtaining the number of navigation failures, the number of navigation failures being the trapped detection data, and the number of navigation failures being the number of failures of the cleaning robot to perform navigation operations.
[0076] Obtaining the number of navigation failures includes the following steps: obtaining the number of collisions of the cleaning robot, where the number of collisions is the number of navigation failures, or obtaining the number of times the cleaning robot performs navigation operations within the same area.
[0077] In some embodiments, obtaining trapped detection data includes the following steps: obtaining navigation failure time, where the navigation failure time is trapped detection data, and the navigation failure time is the failure time of the cleaning robot to perform a navigation operation.
[0078] Obtaining the navigation failure time includes the following steps: determining the first time point when the cleaning robot fails to navigate to the navigation point or the target point for the first time, obtaining the current time point of the cleaning robot, and subtracting the first time point from the current time point to obtain the navigation failure time.
[0079] In some embodiments, obtaining trapped detection data includes the following steps: traversing position points at a target distance from the cleaning robot on a global map, and the position information of all position points constitutes contour data, and the contour data is the trapped detection data.
[0080] The global map is a holistic map of the indoor space constructed in advance by the cleaning robot. In some embodiments, the global map is stored locally on the cleaning robot. In some embodiments, the global map is stored on a cloud server, and the cleaning robot can request the cloud server to return the global map. In some embodiments, the global map is stored on a storage device, such as a USB flash drive. When the storage device is inserted into the cleaning robot, the cleaning robot reads the global map from the storage device.
[0081] The target distance is customized by the designer based on engineering experience. For example, usually indoors, the maximum length of an obstacle with a hollow bottom is 2m and the maximum width is 2m. Therefore, the embodiment of the present application is centered on the cleaning robot and sets the target distance to 2m.
[0082] It is understandable that the embodiment of the present application may also set the target distance to 3m or 4m, etc. However, the maximum width of the obstacle with a hollow bottom is 2m, and the purpose of the embodiment of the present application is to navigate away from the bottom of the obstacle. If the embodiment of the present application obtains position points exceeding 2m as contour data, since the position points exceeding 2m are outside the bottom of the obstacle, for the purpose of detecting whether the contour boundary corresponding to the contour data constitutes a closed area in the subsequent steps, even if a gap is detected in the contour boundary beyond 2m, this information is not helpful for determining whether the cleaning robot is in a closed area defined by the boundary of the obstacle. Moreover, the larger the target distance, the larger the number of position points obtained by the embodiment of the present application, the larger the contour data, and the cleaning robot needs to consume relatively more computing power for processing. The embodiment of the present application sets the target distance to the maximum width of the obstacle with a hollow bottom, which can reduce the processing of the amount of data and improve the efficiency of getting out of trouble.
[0083] The global map is a grid map, and the position points are represented by grids. Obtaining contour data of a target distance from the cleaning robot includes the following steps: searching for a grid of a target distance from the cleaning robot on the global map as a target grid, combining the position information of each target grid, and obtaining contour data.
[0084] See also Figure 6 , the global map 60 marks the obstacle 22, wherein the boundary of the obstacle 22 is composed of a plurality of obstacle grids, such as Figure 6 The light grey grid is an obstacle grid. The embodiment of the present application takes the current machine position of the cleaning robot 10 as the center and searches for the target grid at a target distance of 2m. Figure 6 As shown, the black grids are all target grids, and the contour data consists of the position information of all black grids.
[0085] It is understandable that if the obstacle 22 itself has a gap, such as a doorway, the contour data can include not only the obstacle grid but also the passable grid. Figure 7 Target grid 1 to target grid 5 are all passable grids and are part of the contour data.
[0086] The trapped detection data includes contour data. Detecting whether the cleaning robot is in a trapped state based on the trapped detection data includes the following steps: detecting whether there is a gap area on the contour boundary corresponding to the contour data; if so, determining the size of the gap and the passing size of the cleaning robot; detecting whether the cleaning robot is in a trapped state based on the size of the gap and the passing size; if not, determining that the cleaning robot is in a trapped state.
[0087] The contour boundary is the boundary formed by each target grid in the contour data, and the gap is the area composed of passable grids in the contour boundary. Figure 7 , target grid 1 to target grid 5 form a gap.
[0088] Detecting whether there is a gap in the contour boundary corresponding to the contour data includes the following steps: determining a grid as an initial grid in the contour data, starting from the initial grid, sequentially obtaining reference grids in a to-be-traversed state according to a target traversal direction, judging whether the reference grid is a passable grid, if it is a passable grid, putting the passable grid into a preset queue, if it is not a passable grid, judging whether the preset queue is an empty queue, if it is an empty queue, judging whether the reference grid is an end grid of the contour boundary, if it is the end grid of the contour boundary, terminating the traversal operation, if it is not the end grid of the contour boundary, setting the traversal state of the reference grid to a traversed state, returning to the step of sequentially obtaining reference grids in a to-be-traversed state according to the target traversal direction, if it is not an empty queue, determining the gap according to the passable grids in the preset queue.
[0089] Determining the size of the gap includes the following steps: calculating the distance between any two passable grids in the preset queue, and finding the maximum distance among various distances as the size of the gap.
[0090] The passage size of the cleaning robot can be saved in advance locally on the cleaning robot, and the passage size can be a width of 7 grids, etc.
[0091] Detecting whether the cleaning robot is in a trapped state based on the size of the gap and the passing size includes the following steps: judging whether the size of the gap is less than or equal to the passing size; if the size of the gap is less than or equal to the passing size, determining that the cleaning robot is in a trapped state; if the size of the gap is greater than the passing size, determining that the cleaning robot is in a normal state.
[0092] When the size of the gap is less than or equal to the pass size, it means that the area where the cleaning robot is trapped is equivalent to a closed area, and the cleaning robot is trapped in the closed area. Therefore, the embodiment of the present application needs to set the cleaning robot to enter a trapped state in order to trigger the cleaning robot to perform an escape operation. When the size of the gap is larger than the pass size, it means that the area where the cleaning robot is trapped is equivalent to an open area, and the cleaning robot can navigate out of such an area. Therefore, the embodiment of the present application does not need to set the cleaning robot to enter a trapped state.
[0093] Some obstacles are marked as closed areas on the global map. When such obstacles are hollowed out at the bottom, and the height of the hollowed-out area is higher than the height of the cleaning robot, the cleaning robot may be easily triggered into a trapped state by mistake after entering the hollowed-out area of such obstacles. In order to avoid the cleaning robot being mistakenly triggered into a trapped state, before detecting whether there is a gap area in the contour boundary corresponding to the contour data, in some embodiments, the method further includes: obtaining the number of navigation failures, and if the number of navigation failures is greater than or equal to a preset number threshold, then entering the step of detecting whether there is a gap in the contour boundary corresponding to the contour data, and if the number of navigation failures is less than the preset number threshold, then determining that the cleaning robot is in a normal state. The preset number threshold is customized by the designer based on engineering experience, for example, the preset number threshold is 3 times or 4 times.
[0094] In some embodiments, the method further includes: obtaining a navigation failure time, if the navigation failure time is greater than or equal to a preset time threshold, then entering the step of detecting whether there is a gap in the contour boundary corresponding to the contour data, if the navigation failure time is less than the preset time threshold, then determining that the cleaning robot is in a normal state. The preset time threshold is customized by the designer based on engineering experience, for example, the preset time threshold is 1 minute or 5 minutes.
[0095] When the number of navigation failures is greater than or equal to a preset number threshold, and / or the navigation failure time is greater than or equal to a preset time threshold, it indicates that the cleaning robot is in a trapped state with a high probability. In order to further determine whether the cleaning robot is in a trapped state, the embodiment of the present application then enters the step of detecting whether there is a gap in the contour boundary corresponding to the contour data, so as to detect whether the cleaning robot is in a closed area. This approach can doubly determine whether the cleaning robot is in a trapped state, thereby being able to reliably and accurately trigger the cleaning robot to perform an escape operation, thereby avoiding the problem of erroneously performing an escape operation and reducing the operating efficiency of the cleaning robot.
[0096] As mentioned above, after the cleaning robot enters the trapped state, it starts to build a local map. Building a local map includes the following steps: determining the current machine position of the cleaning robot, obtaining environmental detection data, which is the data obtained by the cleaning robot detecting the surrounding environment at the current machine position, generating a local map based on the environmental detection data, and the current machine position is located at the center point of the local map.
[0097] The cleaning robot can determine the current machine position of the cleaning robot based on the SLAM (Simultaneous Localization and Mapping) algorithm and the global map.
[0098] The cleaning robot is equipped with a camera and / or a laser radar, and the environmental detection data includes environmental image data and / or laser radar data. The cleaning robot photographs the surrounding environment through the camera to obtain environmental image data. The cleaning robot emits a laser beam to the surrounding environment through the laser radar to obtain the laser radar data.
[0099] The area of the local map is equal to the preset occupied area, which is the maximum area of the hollow bottom obstacle, such as the maximum size of the hollow bottom obstacle such as bed, sofa, coffee table, cabinet, etc. is 2m*2m. In order to reduce the amount of data processing, the embodiment of the present application only needs to extract 2m*2m of detection data to generate the local map, without too much data to generate the local map.
[0100] In some embodiments, the environmental detection data includes location information of multiple location points, and generating a local map based on the environmental detection data includes the following steps: taking the current machine position of the cleaning robot as the center point, determining the location points within a specified distance range from the center point based on the environmental detection data as target location points, recording the location information of all target location points, obtaining local data, and generating a local map based on the local data.
[0101] In some embodiments, generating a local map based on environmental detection data includes the following steps: generating a detection map based on the environmental detection data, taking the current machine position of the cleaning robot as the center point, and eliminating position points in the detection map whose distance from the center point is outside a specified distance range to obtain a local map.
[0102] See also Figure 8 The obstacle with a hollow bottom is presented on the global map by line segments 81, 82 and 83. The cleaning robot 10 mistakenly enters the hollow area of the obstacle through line segment 82. The cleaning robot 10 uses the current machine position as the origin, controls the laser radar to detect the surrounding environment, and obtains the laser radar data.
[0103] See also Fig. 9, the cleaning robot constructs a 2m*2m local map 91 based on the laser radar data, in which, due to the fact that the obstacle area is close to the laser radar and some areas are hollow areas, some areas of the obstacle are not scanned by the laser radar. Therefore, in the local map 91, the dotted line segments 92 and 93 represent areas where there are no obstacles. At this time, the embodiment of the present application abandons the update method of the global map and is based on the rotation angle of the cleaning robot. When the cleaning robot rotates 30 degrees, the local map is updated once. When the laser radar scans an obstacle, the grid value of the position hit by the laser line is set to 0.9, and the grid value of the grid passed by the line connecting the current machine position of the cleaning robot and the position hit by the laser line is set to 0.49.
[0104] The embodiment of the present application executes step S52 to obtain the historical movement path and global map of the cleaning robot before it enters the trapped state.
[0105] The historical movement path is the path that the cleaning robot moved before entering the trapped state, wherein the historical movement path is composed of multiple historical path points in sequence. Obtaining the historical movement path of the cleaning robot before entering the trapped state includes the following steps: determining the current machine position of the cleaning robot, finding the target area on the global map according to the current machine position, the current machine position is located at the center point of the target area, finding the historical path points in the target area, and combining the historical path points in sequence to obtain the historical movement path.
[0106] See also Fig.10 , the cleaning robot 10 enters the obstacle 22 with a hollow bottom along the historical moving path 101. Fig.11 , the grids that the historical moving path 101 passes through are grids K1 to K14 respectively, wherein grids K1 to K14 are all historical path points respectively.
[0107] The embodiment of the present application executes step S53 to update the global map according to the local map and the historical movement path to obtain a fused map.
[0108] Updating the global map according to the local map and the historical moving path to obtain a fused map includes the following steps: updating the grid state of the global grid to the grid state of the local grid to obtain an updated global map, wherein the global grid is a grid in the global map, the local grid is a grid in the local map, the position of the global grid in the global map is consistent with the position of the local grid in the local map, and the updated global map is updated using the historical moving path to obtain a fused map.
[0109] It is understandable that the embodiment of the present application does not need to use the historical moving path to update the updated global map, and can directly plan the escape path based on the updated global map. Although the embodiment of the present application can update the global map based on the local map, the obstacle grids of the hollowed-out area in the global map can be refreshed into passable grids, and based on the extra passable grids after the refresh, a theoretical escape path that can enable the cleaning robot to escape can be planned, but considering that the hollow height of the hollowed-out area is almost the same as the height of the cleaning robot, the reliability of the planned escape path is not strong, and it is not easy for the cleaning robot to truly escape based on this type of escape path.
[0110] However, the historical movement path represents that the cleaning robot can smoothly enter the hollow area, which also means that the cleaning robot can smoothly leave the hollow area. Therefore, the embodiment of the present application uses the historical movement path to update the updated global map on the updated global map. This can ensure that the fused map can provide the cleaning robot with a more reliable passable grid in the hollow area. Such a reliable passable grid represents that the cleaning robot can reliably leave the hollow area.
[0111] The historical moving path includes at least one historical path point. The updated global map is updated using the historical moving path to obtain a fused map, including the following steps: determining the grid corresponding to the location point of the historical path point in the updated global map as the grid to be processed, setting the grid state of each grid to be processed to a passable state, and obtaining a fused map. Fig.12 After the cleaning robot 10 merges the local map 91 and the historical moving path 101 into the global map 60 , a gap 121 is opened in the line segment 82 of the local map 91 by the historical moving path 101 .
[0112] The embodiment of the present application executes step S54 to plan an escape path based on the fused map. Planning an escape path based on the fused map includes the following steps: determining the current machine position of the cleaning robot, obtaining the navigation position of the navigation point or the target point, and planning an escape path on the fused map based on the current machine position and the navigation position.
[0113] The embodiment of the present application executes step S55 to control the cleaning robot to walk along the escape path. When the cleaning robot enters a trapped state, the embodiment of the present application can automatically plan an escape path and escape intelligently without human help. In addition, the embodiment of the present application uses the local map and the historical movement path to update the global map to obtain a fused map, wherein the position passed by the historical movement path in the global map itself belongs to the position where the cleaning robot normally travels. Therefore, the fused map can reliably plan the path information for the cleaning robot to escape from the trapped area. Based on the fused map, the embodiment of the present application can plan a reliable escape path to help the cleaning robot achieve the purpose of escaping.
[0114] In some embodiments, after the cleaning robot performs a preset number of escape operations, when the cleaning robot detects that the preset number of times is greater than a preset number threshold, it generates trapped information, and the presentation method of the trapped information includes voice broadcast method, flashing method or SMS push method.
[0115] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present application, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.
[0116] As another aspect of the embodiments of the present application, the embodiments of the present application provide a cleaning robot escape device, wherein the cleaning robot escape device may be a software module, the software module includes a number of instructions stored in a memory, the processor may access the memory, call the instructions for execution, and complete the cleaning robot escape method described in each of the above embodiments.
[0117] In some embodiments, the cleaning robot's escape device can also be constructed by hardware devices. For example, the cleaning robot's escape device can be constructed by one or more chips, and the chips can work in coordination with each other to complete the cleaning robot's escape method described in the above embodiments. For another example, the cleaning robot's escape device can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machi ne) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0118] See also Fig.13The cleaning robot's escape device 130 includes a map construction module 131, a path map acquisition module 132, a map fusion module 133, a path planning module 134 and a machine escape module 135. The map construction module 131 is used to construct a local map in response to the cleaning robot being in a trapped state. The path map acquisition module 132 is used to obtain the historical movement path and the global map before the cleaning robot enters the trapped state. The map fusion module 133 is used to update the global map according to the local map and the historical movement path to obtain a fused map. The path planning module 134 is used to plan an escape path based on the fused map. The machine escape module 135 is used to control the cleaning robot to walk along the escape path.
[0119] When the cleaning robot enters a trapped state, the embodiment of the present application can automatically plan an escape path and escape intelligently without human help. In addition, the embodiment of the present application uses the local map and the historical movement path to update the global map to obtain a fused map, wherein the positions passed by the historical movement path in the global map themselves belong to the positions that the cleaning robot normally travels. Therefore, the fused map can reliably plan path information for the cleaning robot to escape from the trapped area. Based on the fused map, the embodiment of the present application can plan a reliable escape path to help the cleaning robot achieve the purpose of escaping.
[0120] In some embodiments, the map construction module 131 is specifically used to: obtain trapped detection data, the trapped detection data is used to reflect the state of the cleaning robot, detect whether the cleaning robot is in a trapped state according to the trapped detection data, and if the cleaning robot is in a trapped state, construct a local map.
[0121] In some embodiments, the map construction module 131 is specifically used to: obtain the number of navigation failures, which is the trapped detection data, and the number of navigation failures is the number of failures of the cleaning robot to perform navigation operations; or, obtain the navigation failure time, which is the trapped detection data, and the navigation failure time is the failure time of the cleaning robot to perform navigation operations; or, traverse the position points on the global map that are a target distance away from the cleaning robot, and the position information of all the position points constitute contour data, and the contour data is the trapped detection data.
[0122] In some embodiments, the global map is a grid map, the location points are represented by grids, and the map construction module 131 is specifically used to: search for a grid at a target distance from the cleaning robot on the global map as a target grid, combine the location information of each target grid, and obtain contour data.
[0123] In some embodiments, the trapped detection data includes contour data, and the map construction module 131 is specifically used to: detect whether there is a gap in the contour boundary corresponding to the contour data; if so, determine the size of the gap and the passing size of the cleaning robot; detect whether the cleaning robot is in a trapped state based on the size of the gap and the passing size; if not, determine that the cleaning robot is in a trapped state.
[0124] In some embodiments, before detecting whether there is a gap area in the contour boundary corresponding to the contour data, the map construction module 131 is specifically used to: obtain the number of navigation failures, and if the number of navigation failures is greater than or equal to a preset number threshold, detect whether there is a gap in the contour boundary corresponding to the contour data; or, obtain the navigation failure time, and if the navigation failure time is greater than or equal to a preset time threshold, detect whether there is a gap in the contour boundary corresponding to the contour data.
[0125] In some embodiments, the map construction module 131 is specifically used to: determine the current machine position of the cleaning robot, obtain environmental detection data, the environmental detection data is the data obtained by the cleaning robot when detecting the surrounding environment at the current machine position, generate a local map based on the environmental detection data, and the current machine position is located at the center point of the local map.
[0126] In some embodiments, the path map acquisition module 132 is specifically used to: determine the current machine position of the cleaning robot, find the target area on the global map based on the current machine position, the current machine position is located at the center point of the target area, find the historical path points within the target area, and combine each of the historical path points in sequence to obtain the historical movement path.
[0127] In some embodiments, the global map and the local map are both grid maps, and the path map acquisition module 132 is specifically used to: update the grid state of the global grid to the grid state of the local grid to obtain an updated global map, wherein the global grid is a grid in the global map, the local grid is a grid in the local map, the position of the global grid in the global map is consistent with the position of the local grid in the local map, and the updated global map is updated using the historical moving path to obtain a fused map.
[0128] In some embodiments, the historical movement path includes at least one historical path point, and the path map acquisition module 132 is specifically used to: determine the grid corresponding to the position point of the historical path point in the updated global map as the grid to be processed, set the grid state of each of the grids to be processed to a passable state, and obtain a fused map.
[0129] In some embodiments, the path planning module 134 is specifically used to: determine the current machine position of the cleaning robot, obtain the navigation position of the navigation point, and plan an escape path on the fused map based on the current machine position and the navigation position.
[0130] It should be noted that the cleaning robot's escape device can execute the cleaning robot's escape method provided in the embodiments of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiments of the cleaning robot's escape device, please refer to the cleaning robot's escape method provided in the embodiments of the present application.
[0131] See also Fig.14 , Fig.14 A schematic diagram of the structure of a cleaning robot provided in an embodiment of the present application. The cleaning robot 140 includes one or more processors 141 and a memory 142. The memory 142 is connected to the one or more processors 141, for example, connected to the processor 141 via a bus.
[0132] The processor 141 is configured to support the cleaning robot to perform the corresponding functions in the method in the above method embodiment. The processor can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field programmable gate array (FPGA), a general array logic (GAL) or any combination thereof.
[0133] The memory 142 is used to store program codes, etc. The memory may include a volatile memory (VM), such as a random access memory (RAM); the memory may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory may also include a combination of the above types of memory.
[0134] The memory 142 may be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the computer device method in the embodiment of the present application. The processor executes various functional applications and data processing of the computer device method and computer device device by running the non-volatile software programs, instructions and modules stored in the memory, that is, realizing the functions of the computer device method and various modules or units of the computer device device provided in the above method embodiment.
[0135] The memory 142 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0136] The one or more modules are stored in the memory, and when executed by the one or more processors, the computer device method in any of the above method embodiments is executed, for example, the method steps described in the above method embodiments are executed to realize the functions of the modules described in the above device embodiments.
[0137] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the above embodiment.
[0138] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0139] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for escaping a cleaning robot, characterized in that: include: In response to the cleaning robot being in a trapped state, constructing a local map; Obtaining a historical moving path and a global map of the cleaning robot before it enters a trapped state; Update the global map according to the local map and the historical movement path to obtain a fused map; Planning an escape route based on the fused map; The cleaning robot is controlled to walk along the escape path.
2. The method for escaping from a predicament according to claim 1, characterized in that: In response to the cleaning robot being in a trapped state, constructing a local map includes: Acquiring trapped detection data, where the trapped detection data is used to reflect the state of the cleaning robot; Detecting whether the cleaning robot is in a trapped state according to the trapped detection data; If the cleaning robot is in a trapped state, a local map is constructed.
3. The method for escaping from a predicament according to claim 2, characterized in that: Obtaining trapped detection data includes: Obtaining the number of navigation failures, where the number of navigation failures is trapped detection data, and the number of navigation failures is the number of failures of the cleaning robot to perform navigation operations; or, Obtaining a navigation failure time, wherein the navigation failure time is trapped detection data, and the navigation failure time is a failure time when the cleaning robot performs a navigation operation; or, The position points at a target distance from the cleaning robot are traversed on the global map, and the position information of all the position points constitutes contour data, and the contour data is trapped detection data.
4. The method for escaping from a difficult situation according to claim 3, characterized in that: The global map is a grid map, the position points are represented by grids, and the obtaining of contour data of the target distance from the cleaning robot includes: Searching for a grid at a target distance from the cleaning robot on the global map as a target grid; The position information of each target grid is combined to obtain contour data.
5. The method for escaping from a difficult situation according to claim 2, characterized in that: The trapped detection data includes contour data, and detecting whether the cleaning robot is in a trapped state according to the trapped detection data includes: Detecting whether there is a gap in the contour boundary corresponding to the contour data; If so, determining the size of the gap and the passage size of the cleaning robot, and detecting whether the cleaning robot is in a trapped state according to the size of the gap and the passage size; If not, it is determined that the cleaning robot is in a trapped state.
6. The method for escaping from a difficult situation according to claim 5, characterized in that: Before detecting whether there is a gap area at the contour boundary corresponding to the contour data, the method further includes: Obtaining the number of navigation failures, and if the number of navigation failures is greater than or equal to a preset number threshold, entering the step of detecting whether there is a gap in the contour boundary corresponding to the contour data; or, The navigation failure time is obtained. If the navigation failure time is greater than or equal to a preset time threshold, the step of detecting whether there is a gap in the contour boundary corresponding to the contour data is entered.
7. The method for escaping from a difficult situation according to claim 1, characterized in that: The construction of the local map comprises: determining a current machine position of the cleaning robot; Acquire environmental detection data, where the environmental detection data is data obtained by the cleaning robot detecting the surrounding environment at the current machine position; A local map is generated according to the environmental detection data, and the current machine position is located at a center point of the local map.
8. The method for escaping from a difficult situation according to any one of claims 1 to 7, characterized in that: The obtaining of the historical moving path of the cleaning robot before entering the trapped state comprises: determining a current machine position of the cleaning robot; Finding a target area on the global map according to the current machine position, wherein the current machine position is located at the center of the target area; Find out the historical waypoints in the target area; The historical path points are combined in sequence to obtain a historical moving path.
9. The method for escaping from a difficult situation according to any one of claims 1 to 7, characterized in that: The global map and the local map are both grid maps, the historical movement path includes at least one historical path point, and the global map is updated according to the local map and the historical movement path to obtain a fused map, including: Updating the grid state of the global grid to the grid state of the local grid to obtain an updated global map, wherein the global grid is a grid in the global map, the local grid is a grid in the local map, and the position of the global grid in the global map is consistent with the position of the local grid in the local map; Determining, in the updated global map, a grid corresponding to the location point of the historical path point as a grid to be processed; The grid state of each of the to-be-processed grids is set to a passable state to obtain a fused map.
10. A cleaning robot, characterized in that: It comprises a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the cleaning robot implements the method described in any one of claims 1-9.