Robot escape method
By judging the reasons for the failure of robot path planning and implementing different escape plans according to different reasons, the problems of missing sweeping and repeated sweeping caused by failure of robot path planning are solved, and the cleaning efficiency is improved.
Patent Information
- Application Number
- CN202311246734.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-03-25
AI Technical Summary
When the path planning fails, the robot may cause the original target area to miss or repeated cleaning, reducing the cleaning efficiency.
By determining the area of the robot's starting point connecting area and the end point connecting area, we judge the reasons for the failure of the path planning, and implement different escape plans based on different reasons, including driving along the wall and deleting collision obstacle points.
It improves the passage efficiency of the robot when path planning fails, reduces the situation of missing sweeping and repeated sweeping, thereby improving sweeping efficiency.
Smart Images

Figure CN119679330A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of robot path planning, and specifically relates to a method for a robot to escape from trouble. Background Art
[0002] When cleaning, a robot (such as a sweeping robot) needs to plan a path from the starting point to the target point on the grid map. The starting point can be considered as the starting point of the robot's cleaning task, and the target point can be considered as the end point of the robot's cleaning task. Path planning means that the robot starts from the starting point and traverses the passable grid points on the grid map in sequence, avoiding obstacles. In this process, the traversed grid points will not be traversed repeatedly. If the target point is traversed, the path planning is considered successful. If there are no untraversed passable points around the current grid point where the robot is located, and the robot has not reached the target point at this time, the robot's path planning is considered to have failed. Planning failure means that the starting point and the target point are completely blocked by obstacles and cannot be passed.
[0003] When the robot's path planning fails, if the robot directly changes the target point, it may cause the original target point area to be missed; if it ignores the obstacles and directly starts the trial and continues planning, it may cause the robot to repeatedly clean the trapped area, reducing the cleaning efficiency. Summary of the invention
[0004] The present application provides a method for a robot to escape from an obstacle, so as to solve at least one of the above-mentioned technical problems.
[0005] The technical solution adopted in this application is:
[0006] A method for escaping a robot, comprising:
[0007] When the robot fails to plan a path from the starting point to the target point, determining a starting point connected area and a terminal connected area of the robot, wherein the starting point connected area includes corresponding points having connectivity with the starting point, and the terminal connected area includes corresponding points having connectivity with the target point;
[0008] Determining the reason for the failure of the robot path planning according to the area of the starting point connected area and / or the area of the end point connected area, wherein the reason includes that the robot is in a first trapped state and that the robot is in a second trapped state;
[0009] If the reason is that the robot is in a first trapped state, executing a first escape plan;
[0010] If the reason is that the robot is in the second trapped state, a second escape plan is executed.
[0011] In a possible implementation of the present application, the reason for the failure of the robot path planning is determined according to the area of the starting point connected area and / or the area of the end point connected area, including:
[0012] Obtaining a grid map of the robot's current working environment;
[0013] Determine the number of starting grid points corresponding to the starting point connected area and / or the number of ending point grid points corresponding to the ending point connected area and / or the number of passable grid points in the grid map according to the grid map;
[0014] The reason for the failure of the robot path planning is determined according to the number of starting grid points and / or the number of ending grid points and / or the number of traversable grid points.
[0015] In a possible implementation of the present application, determining the reason for the failure of the robot path planning according to the number of grid points at the starting point and / or the number of grid points at the end point and / or the number of passable grid points includes:
[0016] Determine whether the number of grid points at the starting point is less than a preset grid point threshold;
[0017] If yes, it is determined that the reason for the failure of the robot path planning is that the robot is in a first trapped state;
[0018] If not, the reason for the failure of the robot path planning is determined according to the number of grid points at the starting point, the number of grid points at the end point, and the number of passable grid points.
[0019] In a possible implementation of the present application, before determining the cause of the robot path planning failure according to the number of starting grid points and / or the number of end grid points and / or the number of passable grid points, the method further includes:
[0020] Obtaining the position origin of the robot, where the position origin is the starting point of the historical movement trajectory of the robot;
[0021] Determine whether the position origin of the robot exists in the starting point connected area.
[0022] In a possible implementation of the present application, determining the reason for the failure of the robot path planning according to the number of grid points at the starting point and / or the number of grid points at the end point and / or the number of passable grid points includes:
[0023] If the position origin of the robot exists in the starting point connected area, the reason for the failure of the robot path planning is determined according to the size relationship between the number of starting point grid points and the number of passable grid points;
[0024] If the position origin of the robot does not exist in the starting point connected area, the reason for the failure of the robot path planning is determined according to the size relationship between the number of grid points at the starting point and the number of grid points at the end point.
[0025] In a possible implementation of the present application, the reason for the failure of the robot path planning is determined according to the size relationship between the number of starting grid points and the number of passable grid points, including:
[0026] If the number of grid points at the starting point is less than 1 / 2 of the number of grid points at the passable point, the reason for the failure of the robot path planning is determined according to the size relationship between the number of grid points at the starting point and the number of grid points at the end point;
[0027] If the number of starting grid points is greater than or equal to 1 / 2 of the number of passable grid points, it is determined that the reason for the failure of the robot path planning is that the robot is in the second trapped state.
[0028] In a possible implementation of the present application, the reason for the failure of the robot path planning is determined according to the size relationship between the number of grid points at the starting point and the number of grid points at the end point, including:
[0029] If the number of grid points at the starting point is less than the number of grid points at the end point, it is determined that the reason for the failure of the robot path planning is that the robot is in a first trapped state;
[0030] Otherwise, it is determined that the reason for the failure of the robot path planning is that the robot is in the second trapped state.
[0031] In a possible implementation of the present application, executing the first escape plan includes:
[0032] Control the robot to follow the continuous semicircular arc trajectory to follow the edge of the starting point connected area, and perform obstacle detection in real time during the following process;
[0033] When the robot detects a laser obstacle within a preset range, the arc radius of the continuous semicircular arc trajectory is a first radius;
[0034] When the robot does not detect a laser obstacle within a preset range, the arc radius of the continuous semicircular arc trajectory is a second radius; wherein the second radius is smaller than the first radius, and the laser obstacle is an obstacle detected by the robot through laser.
[0035] In a possible implementation of the present application, it also includes:
[0036] During the robot's edge-moving process, path planning is performed toward the target point at preset time intervals;
[0037] If the robot fails to plan successfully within a preset time period and / or the robot travels a preset number of laps within the starting point connected area, the target point is updated and a path from the starting point to the new target point is planned.
[0038] In a possible implementation of the present application, executing the second escape plan includes:
[0039] Deleting corresponding collision obstacle points adjacent to the starting point connected area, wherein the collision obstacle points are obtained by the robot through collision marking;
[0040] Re-plan the path to the target point, and if the planning fails, change the target point.
[0041] Due to the adoption of the above technical solution, the beneficial effects achieved by this application are as follows:
[0042] 1. When the robot fails to plan a path from the starting point to the target point, it will determine whether the reason for the failure of the robot's path planning is that the robot is in the first trapped state or the second trapped state based on the relationship between the number of grid points connected to the starting point on the grid map, the number of grid points connected to the target point / end point, and the number of passable grid points on the grid map, so as to distinguish the reasons for the failure of the robot's path planning.
[0043] 2. When the reason for the failure of the robot's path planning is that the robot is in the first trapped state, execute the first escape plan. When the reason for the failure of the robot's path planning is that the robot is in the second trapped state, execute the second escape plan. According to the different reasons for the failure of the robot's path planning, select different escape plans to increase the possibility of the robot's successful escape, improve the robot's travel efficiency when the path planning fails, and thus improve the robot's cleaning efficiency.
[0044] 3. When the robot is in the first trapped state, the robot moves along the wall along the trapped obstacle in a continuous semicircular trajectory, and detects in real time whether there is a laser obstacle within a preset range during the driving process. If a laser obstacle is detected, the robot moves in a continuous semicircular trajectory according to a first radius; if no laser obstacle is detected, the robot moves in a continuous semicircular trajectory according to a second radius smaller than the first radius, so that the robot moves closer to the obstacle, so as to break through the gap between the obstacles and increase the success rate of escaping from the trapped area.
[0045] 4. When the robot is in the second trapped state, delete the collision obstacle points stored in the robot. The collision obstacle points here are different from the aforementioned laser obstacle points. The collision obstacle points are obstacle points marked by the robot's collision, while the laser obstacle points are obstacle points detected and marked by the robot's laser radar. After deleting the collision obstacle points, the robot will try to re-plan the path to the target point to increase the possibility of passage when planning fails and increase the success rate of escaping.
[0046] 5. If the robot still cannot successfully realize the planned path to the target point after executing the first escape plan or the second escape plan, the robot will change the target point and plan the path to the new target point. After the robot reaches the new target point, it will continue to plan the path from the new target point to the original target point, thereby avoiding missing the original target point area and increasing the possibility of the robot passing to the original target point. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0048] Figure 1 A flow chart of a robot escape method provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of a robot trapped scenario provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of another robot trapped scenario provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of a robot's trajectory along a wall provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of a first escape plan provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of a second escape plan provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to more clearly illustrate the overall concept of the present application, a detailed description is given below in an illustrative manner in conjunction with the accompanying drawings.
[0055] In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present application is not limited to the specific embodiments disclosed below.
[0056] In addition, in the description of the present application, it should be understood that the terms "top", "bottom", "inside", "outside", "axial", "radial", "circumferential", etc., indicating orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0057] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or a communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0058] In the present application, unless otherwise clearly specified and limited, the first feature "above" or "below" the second feature may be that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. In the description of this specification, the description with reference to the terms "implementation method", "example", "one embodiment", "example" or "specific example" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in an appropriate manner in any one or more embodiments or examples.
[0059] An embodiment of the present application provides a method for a robot to escape from an trapped state. When the robot fails to plan a path from a starting point to a target point on a grid map, the reasons for the path planning failure are classified and analyzed, and different escape plans are selected according to different reasons, thereby improving the robot's travel efficiency when trapped and thus improving the robot's cleaning efficiency.
[0060] The technical solutions in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0061] Figure 1 A flowchart of a robot escape method provided in an embodiment of the present application. Figure 1As shown, the robot escape method proposed in the embodiment of the present application at least includes the following execution steps:
[0062] Step 101: When the robot fails to plan a path from a starting point to a target point, determine a starting point connected area and an end point connected area of the robot.
[0063] The robot background will store a grid map of the current working environment. When the robot performs a cleaning task, the starting point and end point of the cleaning task will be marked on the grid map. The starting point can be understood as the starting point of the path planning, and the end point can be understood as the target point of the path planning. Path planning can be understood as the robot starting from the starting point and constantly searching for passable grid points on the grid map to move forward until it reaches the target point, generating a driving path from the starting point to the target point.
[0064] When the robot is planning a path from the starting point to the target point, if the neighboring grid points of the current grid point of the robot have been driven through and the target point has not been found, it is considered that the path planning has failed.
[0065] Figure 2 A schematic diagram of a robot trapped scenario provided in an embodiment of the present application, Figure 2 What is displayed is the grid map of the robot's current working environment. On the grid map, a square represents a grid point, point A represents the starting point, point B represents the target point, white grids represent grid points that have not been traversed by the robot, gray grids represent grid points that have been traversed by the robot and are passable, and black grids represent grid points that have been traversed by the robot but are not passable. The traversal here refers to the process in which the robot attempts to move forward through the grid point. After a grid point is traversed by the robot, it can be determined whether the grid point is a passable grid point or an inpassable grid point, that is, an obstacle point.
[0066] Further, in Figure 2 In the example, the starting point A is surrounded by traversable grid points, but there is a circle of obstacle points outside the traversable grid points, that is, the starting point A is surrounded and trapped by obstacle points, and there are no untraversed traversable grid points around the starting point A. At this time, it is considered that the robot's path planning from the starting point A to the target point B has failed.
[0067] When the robot path planning fails, the embodiment of the present application will first determine the starting point connected area and the terminal connected area of the robot. The so-called starting point connected area refers to the area composed of passable grid points traversed by the robot in the process of driving from the starting point on the grid map to the target point. These passable grid points are connected on the grid map, and the starting point can be reached from any passable grid point, that is, they have connectivity with the starting point, so the area formed is called the starting point connected area, and the terminal connected area refers to the area composed of passable grid points traversed by the robot in the process of driving from the target point to the starting point in the reverse direction. These passable grid points here are also connected on the grid map, and the target point can be reached from any passable grid point, that is, they have connectivity with the target point, so the area formed is called the terminal connected area.
[0068] The process of determining the starting point connected area is equivalent to determining the grid points that are connected to the starting point on the grid map, and the process of determining the end point connected area is equivalent to determining the grid points that are connected to the target point on the grid map.
[0069] Step 102: Determine the reason for the failure of the robot path planning according to the area of the starting point connected area and / or the area of the end point connected area.
[0070] After determining the starting point connected area and the end point connected area on the grid map corresponding to the current working environment of the robot, the reason for the failure of the robot path planning can be determined according to the area of the starting point connected area and / or the area of the end point connected area. In one example of the present application, the reason for the failure of the robot path planning includes the robot being in a first trapped state and the robot being in a second trapped state.
[0071] In a possible implementation of the embodiment of the present application, the area of the starting point connected region is represented by the number of grid points included in the starting point connected region, and the area of the terminal connected region is represented by the number of grid points included in the terminal connected region. Thus, the cause of the failure of the robot path planning can be determined based on the area of the starting point connected region and / or the area of the terminal connected region. The cause of the failure of the robot path planning can be determined by the number of starting point grid points corresponding to the starting point connected region and / or the number of terminal grid points corresponding to the terminal connected region and / or the number of traversable grid points on the grid map. It should be noted that the number of traversable grid points on the grid map includes not only the number of traversable grid points traversed by the robot, but also the number of grid points that have not been traversed by the robot, that is, Figure 2This is because the grid map represents the current working environment of the robot. In the working environment of the robot, most areas are passable areas, and only a small part of the area is occupied by obstacles and is inaccessible. Therefore, the grid points on the grid map that have not been traversed by the robot are considered to be passable grid points.
[0072] Therefore, determining the cause of the robot path failure can be achieved through the following process:
[0073] First, determine whether the number of grid points at the starting point is less than the preset grid point threshold. It should be noted that the preset grid point threshold here is related to the area of each grid on the grid map. In this way, by determining the size relationship between the number of grid points at the starting point and the preset grid point threshold, the size relationship between the area of the connected area at the starting point and the area corresponding to the preset grid point threshold can be determined. If the area of the connected area at the starting point is smaller than the area corresponding to the preset grid point threshold, it is considered that the area of the map that the robot has traveled through when starting path planning at the starting point is small. At this time, it is considered that the reason for the failure of the robot's path planning is that the robot is in the first trapped state.
[0074] That is, when the number of grid points at the starting point is less than the preset grid point threshold, it is considered that the reason for the failure of the robot path planning is that the robot is in the first trapped state.
[0075] Secondly, when the number of grid points at the starting point is greater than or equal to the preset grid point threshold, that is, when the robot starts path planning from the starting point, the area of the map area traveled is larger than the area corresponding to the preset grid point threshold, the reason for the failure of the robot's path planning may be that the robot is in the first trapped state or the second trapped state. At this time, further judgment is needed.
[0076] Specifically, the position origin of the robot on the grid map is introduced, and the position relationship between the position origin and the starting point connected area is judged to further judge the cause of the failure of the robot path planning. It should be noted that the position origin here is the starting point of the historical movement trajectory of the robot, that is, the position point on the grid map when the robot has not yet started to perform the cleaning task. In an example of the present application, the position origin may or may not coincide with the starting point of the aforementioned path planning. In order to judge the cause of the failure of the robot path planning, it is considered in the embodiment of the present application that the position origin of the aforementioned robot does not coincide with the starting point of the path planning.
[0077] Furthermore, when the robot's position origin exists in the starting connected area, the target point of the robot's cleaning task may be isolated. At this time, the reason for the failure of the robot's path planning may be that the robot is in the second trapped state. Therefore, the judgment is made by comparing the size relationship between the number of starting grid points and half of the number of passable grid points.
[0078] If the number of starting grid points is less than half of the number of passable grid points, it is considered that the area of the map area that the robot has traveled through when planning the path from the starting point accounts for a small proportion of the area of the entire grid map. At this time, the cause of the failure of the robot's path planning cannot be easily determined as the robot being in the second trapped state. Instead, the cause of the failure of the robot's path planning is determined by comparing the size relationship between the number of grid points at the end point and the number of grid points at the starting point. Specifically, if the number of starting grid points is less than the number of grid points at the end point, it is considered that the area of the robot's starting point connected area is less than the area of the terminal connected area. At this time, the cause of the robot's path planning failure is determined to be the robot being in the first trapped state; if the number of starting grid points is greater than or equal to the number of terminal grid points, it is considered that the area of the robot's starting point connected area is greater than or equal to the area of the terminal connected area. At this time, the cause of the robot's path planning failure is determined to be the robot being in the second trapped state.
[0079] If the number of grid points at the starting point is greater than or equal to half of the number of passable grid points, it is considered that the area of the map area that the robot has traveled through when planning the path from the starting point accounts for a large proportion of the area of the entire grid map. At this time, the cause of the robot's path planning failure can be directly determined as the robot being in the second trapped state.
[0080] Furthermore, if the robot's position origin does not exist in the starting point connected area, the robot's position origin is no longer concerned. Instead, the cause of the robot's path planning failure is determined directly by comparing the size relationship between the starting point grid point number and the end point grid point number. Specifically, if the starting point grid point number is less than the end point grid point number, then the cause of the robot's path planning failure is determined to be that the robot is in the first trapped state; otherwise, the cause of the robot's path planning failure is determined to be that the robot is in the second trapped state.
[0081] At this point, the cause of the robot's path planning failure has been determined.
[0082] In order to explain more clearly the process of determining the cause of the robot path planning failure, the present application embodiment further provides the following supplementary description:
[0083] Figure 3 A schematic diagram of another robot trapped scenario provided in an embodiment of the present application, in Figure 3In the grid map shown, point A is the starting point of the robot path planning, point B is the target point of the robot path planning, the origin is the robot's position origin, the black grid is the inaccessible grid point, that is, the obstacle point, and the white grid and the gray grid are the accessible grid points.
[0084] exist Figure 3 In the figure, the starting point connected area is the area composed of the passable grid points around the starting point A, and the boundary of the area is the obstacle point connected with the starting point A. The terminal connected area is the area composed of the passable grid points around the target point B, and the boundary of the area is the obstacle point connected with the target point B. Therefore, the number of starting grid points corresponding to the starting point connected area is the number of passable grid points around the starting point A, denoted by N, and the number of terminal grid points corresponding to the terminal connected area is the number of passable grid points around the target point B, denoted by M.
[0085] Therefore, in the above process of judging the cause of the robot path planning failure, comparing the size relationship between the number of grid points at the starting point and the number of grid points at the end point is to compare the size relationship between N and M, and Figure 3 It can be clearly seen that N is smaller than M, so, Figure 3 The corresponding reason for the failure of the robot path planning is that the robot is in the first trapped state.
[0086] Step 103: If the reason for the failure of path planning is that the robot is in the first trapped state, execute the first escape plan.
[0087] From the above analysis process, it can be seen that in the embodiment of the present application, the reasons for the failure of the robot path planning are divided into two categories, one is that the robot is in the first trapped state, and the other is that the robot is in the second trapped state. In an example of the present application, the first trapped state is the starting point trapped state. The so-called starting point trapped state refers to the starting point of the robot performing the cleaning task being surrounded by obstacles (such as Figure 2 The starting point A shown is surrounded by obstacle points), and the second trapped state is the end point trapped state. The so-called end point trapped state means that the target point of the robot performing the cleaning task is surrounded by obstacles.
[0088] In a possible implementation of the embodiment of the present application, if the reason for the failure of the robot path planning is that the robot is in the first trapped state, that is, in the starting point trapped state, executing the first escape plan can be to control the robot to enter the wall driving mode to break through the obstacle encirclement, as follows:
[0089] The robot is controlled to move forward along the encircled obstacle points on the grid map in a continuous semicircular trajectory, that is, entering the wall driving mode. The reason for driving in a continuous semicircular trajectory here is that, compared with the robot driving on a straight trajectory, the semicircular trajectory can make the robot closer to the obstacle points, making it easier to find passable grid points between the obstacle points to break through the encirclement, thereby increasing the success rate of the robot escaping from the trapped area.
[0090] Furthermore, while the robot is traveling on a continuous semicircular arc trajectory, laser obstacle detection is performed within a preset range of the robot. Here, the laser obstacle refers to an obstacle that the robot can detect through its laser radar. If the robot does not detect a laser obstacle within the preset range, the radius of the robot's continuous semicircular arc trajectory is reduced, so that the robot is closer to the obstacle point than the previous semicircular arc trajectory, thereby making it easier for the robot to cross the gap between the obstacle points. In an example of the present application, the aforementioned preset range can be a body range of the robot on one side close to the obstacle point.
[0091] Figure 4 A schematic diagram of a robot moving along a wall provided in an embodiment of the present application, such as Figure 4 As shown in the figure, the black vertical line on the right is the wall formed by the obstacle points on the grid map, the black semicircular arc track is the wall track with a normal radius, and the gray semicircular arc track is the wall track with a smaller turning radius. When the robot moves forward along the black semicircular arc track, if no laser obstacle is detected within the range of one fuselage on the right, it will adjust to move forward along the gray semicircular arc track to achieve a smaller turning radius and get closer to the obstacle point.
[0092] Furthermore, while the robot is traveling in a continuous semicircular trajectory, it will also attempt to re-plan the path to the target point at preset time intervals. The preset time here can be set to 2s. This is also a necessary condition for breaking through the obstacle encirclement mentioned above. Only by continuously attempting to plan the path to the target point can it be possible to detect and cross the gap between obstacle points.
[0093] Figure 5 A schematic diagram of a first escape plan provided in an embodiment of the present application, such as Figure 5 As shown, the area of the starting point connected area corresponding to the starting point A is smaller than the area of the end point connected area corresponding to the target point B. At this time, it is considered that the reason for the failure of the robot path planning is that the robot is in the first trapped state, that is, the robot is in the starting point trapped state, and the first escape plan is executed. At this time, the robot enters the wall driving model according to the gray curve in order to find the gap between the black obstacle points and successfully break through the trapped area.
[0094] In one example of the present application, a to-be-cleaned set is provided in the robot, and the to-be-cleaned set is used to store the target points to be cleaned by the robot. If the robot fails to successfully plan a path to the target point within a certain period of time, for example, within 5 minutes, and / or the robot has driven along the obstacle point in the starting point connected area for multiple laps, for example, 5 laps, and has not driven out of the encirclement of the obstacle point, then it means that the robot has failed in path planning to the target point. At this time, the target point will be deleted from the to-be-cleaned set, and one of the other target points in the to-be-cleaned set will be used as a new target point for path planning. If the robot successfully plans the path to the new target point, then the path will be re-planned to the deleted target point with the new target point as the starting point. If the planning is successful, the previously deleted target point will be added back to the to-be-cleaned set to avoid missing the target point. If the path planning to the new target point also fails, the new target point will be deleted from the set to be cleaned, and one of the remaining target points will be re-determined as the new target point to continue path planning. In this process, if all the target points in the set to be cleaned are deleted, that is, the set to be cleaned is empty, it means that the robot cannot drive out of the connected area from the starting point, and the robot will sound an on-site alarm.
[0095] Step 104: If the reason for the failure of the path planning is that the robot is in the second trapped state, execute the second escape plan.
[0096] In a possible implementation of the embodiment of the present application, if the reason for the failure of the robot path planning is that the robot is in the second trapped state, that is, in the terminal trapped state, the second escape plan may be to delete the collision obstacle point and retry, as follows:
[0097] The robot deletes the obstacle points marked due to collision that are adjacent to the connected area of the starting point on the grid map, and then re-tests the target point, that is, re-plans the path. During the planning process, the robot will re-mark the collision obstacle points when a collision occurs. When the robot still cannot reach the target point after multiple collisions, the target point is replaced and the path is planned to the new target point. After the robot reaches the new target point, it re-plans the path to the original target with the new target point as the starting point to avoid missing the original target point.
[0098] Furthermore, if the robot still fails to plan the path from the new target point to the original target point, it will continue to change the target point and re-plan the path to the original target point. It should be noted that the original target point here also refers to the target point that the robot did not successfully plan at the beginning, rather than the new target point that has been replaced. If the target point is changed multiple times and the path planning fails, the original target point is abandoned and the user is prompted with a target point error on the robot's corresponding client.
[0099] Figure 6 This is a schematic diagram of the second escape plan provided in the embodiment of the present application. Figure 6 As described above, the area of the starting point connected area corresponding to the starting point A is larger than the area of the terminal connected area corresponding to the target point B. At this time, it is considered that the reason for the failure of the robot path planning is that the robot is in the second trapped state, that is, the robot is in the terminal trapped state, and the second escape plan is executed. At this time, the robot deletes the 4 obstacle points adjacent to the starting point connected area, and then re-plans the path to the target point B.
[0100] In a possible implementation of the embodiment of the present application, the following are respectively constructed: Figure 5 The starting point is trapped in the scene shown and Figure 6 In the scenario of being trapped at the end point shown, if the robot's escape actions and paths in the scenario of being trapped at the starting point are different from those in the scenario of being trapped at the end point, and when being trapped at the starting point, the robot prioritizes escape and drives along the obstacle points to break through the gaps between the obstacle points, and when being trapped at the end point, the robot deletes the collision obstacle points and attempts to re-plan the path to the target point, then this scheme is deemed to have been applied and is considered to be an infringement.
[0101] Anything not described in this application can be achieved by adopting or drawing on existing technologies.
[0102] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0103] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for escaping a robot, characterized in that: The method comprises: When the robot fails to plan a path from the starting point to the target point, determining a starting point connected area and a terminal connected area of the robot, wherein the starting point connected area includes corresponding points having connectivity with the starting point, and the terminal connected area includes corresponding points having connectivity with the target point; Determining the reason for the failure of the robot path planning according to the area of the starting point connected area and / or the area of the end point connected area, wherein the reason includes that the robot is in a first trapped state and that the robot is in a second trapped state; If the reason is that the robot is in a first trapped state, executing a first escape plan; If the reason is that the robot is in the second trapped state, a second escape plan is executed.
2. A robot escape method according to claim 1, characterized in that: The reason for the failure of the robot path planning determined according to the area of the starting point connected area and / or the area of the end point connected area includes: Obtaining a grid map of the robot's current working environment; Determine the number of starting grid points corresponding to the starting point connected area and / or the number of ending point grid points corresponding to the ending point connected area and / or the number of passable grid points in the grid map according to the grid map; The reason for the failure of the robot path planning is determined according to the number of starting grid points and / or the number of ending grid points and / or the number of traversable grid points.
3. A robot escape method according to claim 2, characterized in that: Determining the reason for the failure of the robot path planning according to the number of grid points at the starting point and / or the number of grid points at the end point and / or the number of passable grid points includes: Determine whether the number of grid points at the starting point is less than a preset grid point threshold; If yes, it is determined that the reason for the failure of the robot path planning is that the robot is in a first trapped state; If not, the reason for the failure of the robot path planning is determined according to the number of grid points at the starting point, the number of grid points at the end point, and the number of passable grid points.
4. A robot escape method according to claim 2, characterized in that: Before determining the cause of the robot path planning failure according to the number of grid points at the starting point and / or the number of grid points at the end point and / or the number of traversable grid points, the method further includes: Obtaining the position origin of the robot, where the position origin is the starting point of the historical movement trajectory of the robot; Determine whether the position origin of the robot exists in the starting point connected area.
5. A robot escape method according to claim 4, characterized in that: Determining the reason for the failure of the robot path planning according to the number of grid points at the starting point and / or the number of grid points at the end point and / or the number of passable grid points includes: If the position origin of the robot exists in the starting point connected area, the reason for the failure of the robot path planning is determined according to the size relationship between the number of starting point grid points and the number of passable grid points; If the position origin of the robot does not exist in the starting point connected area, the reason for the failure of the robot path planning is determined according to the size relationship between the number of grid points at the starting point and the number of grid points at the end point.
6. A robot escape method according to claim 5, characterized in that: The reason for determining the failure of the robot path planning according to the size relationship between the number of grid points at the starting point and the number of grid points that can be passed includes: If the number of grid points at the starting point is less than 1 / 2 of the number of grid points at the passable point, the reason for the failure of the robot path planning is determined according to the size relationship between the number of grid points at the starting point and the number of grid points at the end point; If the number of starting grid points is greater than or equal to 1 / 2 of the number of passable grid points, it is determined that the reason for the failure of the robot path planning is that the robot is in the second trapped state.
7. A robot escape method according to claim 5 or 6, characterized in that: The reason for determining the failure of the robot path planning according to the size relationship between the number of grid points at the starting point and the number of grid points at the end point includes: If the number of grid points at the starting point is less than the number of grid points at the end point, it is determined that the reason for the failure of the robot path planning is that the robot is in a first trapped state; Otherwise, it is determined that the reason for the failure of the robot path planning is that the robot is in the second trapped state.
8. A robot escape method according to claim 1, characterized in that: The implementation of the first escape plan includes: Controlling the robot to follow the continuous semicircular arc trajectory to follow the edge of the starting point connected area, and performing obstacle detection in real time during the following process; When the robot detects a laser obstacle within a preset range, the arc radius of the continuous semicircular arc trajectory is a first radius; When the robot does not detect a laser obstacle within a preset range, the arc radius of the continuous semicircular arc trajectory is a second radius; wherein the second radius is smaller than the first radius, and the laser obstacle is an obstacle detected by the robot through laser.
9. A robot escape method according to claim 8, characterized in that: The method further comprises: During the robot's edge-moving process, path planning is performed toward the target point at a preset time interval; If the robot fails to plan successfully within a preset time period and / or the robot travels a preset number of laps within the starting point connected area, the target point is updated and a path from the starting point to the new target point is planned.
10. A robot escape method according to claim 1, characterized in that: The implementation of the second escape plan includes: Deleting corresponding collision obstacle points adjacent to the starting point connected area, wherein the collision obstacle points are obtained by the robot through collision marking; Re-plan the path to the target point. If the planning fails, change the target point.