Robot contour-based global planning method and system, medium
By setting fatal obstacles in the static layer, the problem of being stuck on the contour due to the contour in the robot's global path planning is solved, realizing safe and efficient path replanning and avoiding computational power consumption and contour limitations.
Patent Information
- Application Number
- CN202310048653.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-31
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-01-31
AI Technical Summary
Existing global path planning for robots is prone to failure when encountering robot contour problems. Existing solutions either limit robot shape design or consume high computing power.
By acquiring the path points of the robot's first intrusion and exit from the obstacle, the jamming point is calculated, and a fatal obstacle is set in the static layer along the vertical direction of the jamming point to prevent the robot from passing through the jamming point and replan the path.
It effectively eliminates the problem of being stuck on the outline, reduces computing power consumption, improves the safe passage capability of the robot's autonomous driving, and does not restrict the robot's outline design.
Smart Images

Figure CN115951684B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot path planning technology, specifically to a global planning method and system based on robot contours, and a medium thereof. Background Technology
[0002] Currently, robot path planning is mainly divided into two parts: global planning and local planning. The basic principle of global planning is to use a specific algorithm (such as Dijkstra's algorithm, A*, D*, etc.) to find the shortest path from the starting point to the target point on the main cost map. The main cost map consists of three layers: the static layer, the obstacle layer, and the expansion layer. The static layer is a grid map obtained in advance through a mapping algorithm. It reflects the environment at the time of mapping and is used to avoid stationary obstacles (such as walls, furniture, etc.). The obstacle layer is a grid map formed by rasterizing the point cloud data acquired by the robot's built-in sensors according to certain rules. It reflects the obstacles monitored by the robot's sensors in real time and is used to avoid moving obstacles or obstacles added to the original map. The expansion layer processes the grid maps of the static layer and the obstacle layer, enabling the robot to make correct global plans. The working principle of the expansion layer is roughly as follows: first, the main map is cleared; then, the static layer map is updated onto the main map using a full overwrite method; finally, the obstacle layer is updated onto the main map using a maximum value overwrite method. Maximum value coverage involves comparing the cost of corresponding grid cells on the main map and the obstacle layer map, and then updating the main map with the maximum value. After these two updates, a cost map that accurately reflects both static and dynamic obstacles is obtained. However, this map cannot be directly used for path planning because all path planning algorithms seek the shortest path, i.e., the path with the lowest cost. This means that direct planning would result in a path that hugs the wall too closely, making navigation impossible. Therefore, an expansion layer is needed to modify the map. The expansion layer uses three parameters to modify the cost map: 1. Robot width r; 2. Expansion radius R; 3. Cost reduction parameter S. First, the default cost of a deadly obstacle grid on the map is 254. If the distance *d* between the nearest deadly obstacle and the grid is within the range (0, r], the expansion layer updates its cost to 253. If the distance *d* between the nearest deadly obstacle and the grid is within the range (r, R], the expansion layer updates its cost to int(253*exp(-S*(dr))). This function monotonically decreases within the range (r, R), with a maximum value of 252 and a minimum value of int(253*exp(-S*(Rr))). If the distance *d* between the nearest deadly obstacle and the grid is greater than R, the expansion layer updates its cost to 0. Then, by constraining the planning algorithm, the planned path cannot pass through grids with a cost of 253 or higher, thus preventing the global path from hitting walls. However, this method can only plan a suitable path in ideal conditions. In special cases (such as a square robot outline or a global outline set by the robot that is smaller than the actual outline), a suitable global path may not be planned, causing the robot to oscillate in narrow areas or planning to fail.
[0003] Currently, indoor service robots primarily address this issue by making the robot body circular and setting its global outline to be equal to or slightly larger than the actual outline to circumvent such problems. However, this method restricts the robot's shape. Another approach involves first planning a global path, then mapping the robot's outline onto this path. If the robot's outline intrudes into a fatal obstacle at some point on the path, constraints are added at that point, and the path is replanned. This approach has a relatively high computational cost.
[0004] It is evident that existing methods for robot global path planning, such as using robot shape settings to avoid planning failures due to robot contour issues (i.e., contour-bound problems), impose limitations on the robot's shape design. Furthermore, adding constraints by incorporating the contour requires significant computational power. Therefore, there is an urgent need for a method that can better address planning failures caused by robot contour issues. Summary of the Invention
[0005] In view of the above problems, this application provides a global planning method, system and medium based on robot contours, which can solve the global planning card contour problem safely, efficiently and with low cost.
[0006] To achieve the above objectives, the inventors provide a global planning method based on robot contours, comprising:
[0007] If a robot gets stuck in the obstacle, the robot outline is brought into the global path to obtain the front path point when the robot first enters the obstacle and the back path point when it exits the obstacle.
[0008] Based on the average of the previous path points and the subsequent path points, calculate and obtain the checkpoints in the global path;
[0009] In the static layer, lethal obstacles are placed in a direction perpendicular to the direction of the checkpoint, so that the robot cannot pass through the checkpoint after the global path is triggered.
[0010] Unlike existing technologies, the above-mentioned solution obtains the first bottleneck point in the global path based on the robot's actual contour when a contour jam occurs. Then, based on this bottleneck point, a fatal obstacle is placed in the static layer along a direction perpendicular to the direction of the bottleneck point. This prevents the robot from passing through the bottleneck point after the global path is triggered, allowing it to replan a more reasonable global path and thus escape the predicament of contour jamming causing planning failure. Therefore, the implementation of this solution no longer restricts the robot's contour design; and it only executes when a contour jam occurs, significantly reducing computational power consumption compared to checking the contour at every path point during each global planning process. Furthermore, it greatly improves the robot's safe autonomous driving capability.
[0011] In some embodiments, setting a lethal obstacle in the static layer along a direction perpendicular to the direction of the checkpoint includes:
[0012] For each grid on a straight line passing through the checkpoint and perpendicular to the direction of the checkpoint, obtain the fatal obstacle grid corresponding to the fatal obstacle that exists only in the obstacle layer within its preset range;
[0013] In the static layer, the grid corresponding to the checkpoint, each grid, and the deadly obstacle grid are set as deadly obstacles.
[0014] In some embodiments, setting a lethal obstacle in the static layer along a direction perpendicular to the direction of the checkpoint includes:
[0015] Obtain the fatal obstacle grid corresponding to the fatal obstacles that exist only in the obstacle layer within a preset range on both sides of the checkpoint as the center point and the direction of the checkpoint as the center line, and the connecting grid that connects the fatal obstacle grids on both sides of the preset range via the checkpoint;
[0016] In the static layer, the connection grid and the fatal obstacle grid are set as fatal obstacles.
[0017] In some embodiments, setting a lethal obstacle in the static layer along a direction perpendicular to the direction of the checkpoint includes:
[0018] Create an array of checkpoints and add the checkpoints to the array;
[0019] On both sides of the checkpoint, coordinate points are added at equal intervals outward from the checkpoint in a direction perpendicular to the direction of the checkpoint;
[0020] After adding a coordinate point, within a preset range centered on the grid corresponding to the added coordinate point,
[0021] If a fatal obstacle exists in the corresponding static layer, the process of adding coordinate points on the current side ends; if no coordinate points are added on the other side, then coordinate points are added on the other side.
[0022] If there are no fatal obstacles in either the corresponding static layer or the obstacle layer, the newly added coordinate point is added to the checkpoint array; it is then determined whether the straight-line distance between the added coordinate point and the checkpoint is greater than a preset distance. If so, the addition of coordinate points on the current side ends; if no coordinate points are added on the other side, then coordinate points are added on the other side.
[0023] If there are no fatal obstacles in the corresponding static layer but there are fatal obstacles in the corresponding obstacle layer, then the extended process is executed; it is determined whether the straight-line distance between the added coordinate point and the checkpoint is greater than the preset distance. If so, the addition of coordinate points on the current side ends; if no coordinate points are added on the other side, then coordinate points are added on the other side.
[0024] In the static layer, the grid corresponding to each coordinate point in the checkpoint array is set as a fatal obstacle;
[0025] The extended process includes:
[0026] The deadly obstacles are removed from the obstacle layer, and the coordinates of the deadly obstacles are added to the checkpoint array;
[0027] Within a preset range centered on the grid corresponding to the fatal obstacle.
[0028] If a fatal obstacle exists in the corresponding static layer, the expansion process ends.
[0029] If there are no fatal obstacles in either the corresponding static layer or the obstacle layer, then the expansion process ends.
[0030] If there are no fatal obstacles in the corresponding static layer but there are fatal obstacles in the corresponding obstacle layer, then return to the step of removing the fatal obstacles in the obstacle layer.
[0031] In some embodiments, the method further includes:
[0032] If the proportion of the fatal obstacle coordinates in the corresponding obstacle layer in the checkpoint array disappearing in the latest obstacle layer exceeds a preset threshold, then in the static layer, the grid corresponding to each coordinate point in the checkpoint array is set as a safe area.
[0033] In some embodiments, the occurrence of a card outline includes:
[0034] If the number of failures in local planning exceeds a preset number within a unit of time, and the similarity between the current global path and the previous global path exceeds a preset ratio, then it is determined that a "stuck outline" situation has occurred.
[0035] In some embodiments, the method further includes:
[0036] Record the time when the deadly obstacle was set up;
[0037] If the time interval between the stated time and the current time exceeds a preset duration, the setting is cleared in the static layer.
[0038] The above embodiments provide multiple feasible methods to prevent the robot from passing through the checkpoints after triggering the global path, allowing users to flexibly choose the appropriate method to meet the needs of different specific application scenarios. Furthermore, a mechanism is in place to promptly remove specially designed fatal obstacles after a certain period or based on the real-time obstacle layer situation, restoring the actual obstacle situation and avoiding any impact on subsequent path planning.
[0039] To achieve the above objectives, the inventors also provide a global planning system based on robot contours, comprising:
[0040] The acquisition module is used to bring the robot outline into the global path if a stuck outline situation occurs, and to acquire the front path point corresponding to the first time the robot outline enters the obstacle, and the back path point corresponding to the first time it exits the obstacle.
[0041] The calculation module is used to calculate and obtain the checkpoints in the global path based on the average of the previous path points and the subsequent path points;
[0042] The module is configured to set up a fatal obstacle in the static layer along a direction perpendicular to the direction of the checkpoint, so that the robot cannot pass through the checkpoint after the global path is triggered.
[0043] In some embodiments, the setting module is specifically used to: obtain, for each grid that passes through the checkpoint and is perpendicular to the direction of the checkpoint, the fatal obstacle grid corresponding to the fatal obstacle that exists only in the obstacle layer within its preset range; and in the static layer, set the grid corresponding to the checkpoint, each grid and the fatal obstacle grid as fatal obstacles.
[0044] To achieve the above objectives, the inventors also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is capable of implementing the aforementioned global planning method based on robot contours.
[0045] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description
[0046] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of this application and other related content, and should not be considered as limitations on this application.
[0047] In the accompanying drawings of the instruction manual:
[0048] Figure 1 This is a diagram illustrating the principle of value retrieval for raster maps.
[0049] Figure 2 This is a diagram illustrating a situation where the robot gets stuck on a contour.
[0050] Figure 3 This is a schematic diagram illustrating how the robot escapes the contraption trap situation after applying the global planning method based on robot contours of the present invention.
[0051] Figure 4 A flowchart illustrating a global planning method based on robot contours is provided as an example. Figure 1 ;
[0052] Figure 5 A flowchart illustrating a global planning method based on robot contours is provided as an example. Figure 2 ;
[0053] Figure 6 This is a schematic diagram illustrating the overall process of a global planning method based on robot contours, as shown in the embodiment.
[0054] Figure 7 for Figure 6 A flowchart illustrating the extended process invoked in the middle;
[0055] Figure 8 for Figure 7 A flowchart illustrating the update process invoked in the middle;
[0056] Figure 9 This is a schematic diagram illustrating the virtual functional modules of a global planning system based on robot contours, as shown in the embodiment.
[0057] Figure 10 Here is a concrete example of a global planning method based on robot contours. Figure 1 ;
[0058] Figure 11 Here is a concrete example of a global planning method based on robot contours. Figure 2 . Detailed Implementation
[0059] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.
[0060] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.
[0061] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit this application.
[0062] In the description of this application, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" logical relationship.
[0063] In this application, terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy or order relationship between these entities or operations.
[0064] Unless otherwise specified, the use of terms such as “comprising,” “including,” “having,” or other similar expressions in this application is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.
[0065] Similar to the understanding in the Examination Guidelines, in this application, expressions such as "greater than," "less than," and "exceeding" are understood to exclude the stated number; expressions such as "above," "below," and "within" are understood to include the stated number. Furthermore, in the description of the embodiments in this application, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times," unless otherwise explicitly specified.
[0066] In the description of the embodiments of this application, the space-related expressions used, such as "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "vertical," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," indicate the orientation or positional relationship based on the orientation or positional relationship shown in the specific embodiments or drawings. They are only for the purpose of describing the specific embodiments of this application or for the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0067] Unless otherwise expressly specified or limited, the terms "installation," "connection," "linking," "fixing," and "setting," as used in the description of the embodiments of this application, should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two components or the interaction between two components. For those skilled in the art to which this application pertains, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0068] Please see Figure 1 , Figure 1 This is a diagram illustrating the principle of value retrieval for a raster map.
[0069] Fatal obstacle: The grid value is 254. The obstacle coincides with the center of the robot. At this time, the robot will inevitably collide with the obstacle.
[0070] Inscribed obstacle: The grid value is 253. The obstacle is located inside the inscribed circle of the robot's outline. In this case, the robot will inevitably collide with the obstacle.
[0071] Externally tangent obstacle: The grid value is 252 to 128. The obstacle is located within the tangent circle of the robot's outline. At this time, the robot and the obstacle are in critical contact, but a collision may not necessarily occur.
[0072] Non-free space: Grid value 128-0, area near obstacles. Once the robot enters this area, there is a high probability of collision. It is a danger warning zone and the robot should try to avoid entering it.
[0073] Free area: Grid value is 0. There are no obstacles here, and the robot can pass through freely.
[0074] Unknown area: Grid value 255. It has not yet been determined whether there are any obstacles that the robot can go to continue mapping.
[0075] Please see Figure 2 and Figure 3 , Figure 2 This is a diagram illustrating a situation where the robot gets stuck on a contour. Figure 3 This diagram illustrates how the robot escapes the contour-stuck situation after applying the global planning method based on robot contours according to the present invention. It is known that the footprint (i.e., the collision box, which can be understood as the robot's perceived contour) used in global planning is smaller than the footprint used in local planning. Corresponding to... Figure 2 and Figure 3 In the diagram, the largest box represents the obstacle corresponding to the main map; the second largest box represents the footprint used by the robot during local planning; and the smallest box represents the footprint used by the robot during global planning.
[0076] Therefore, in Figure 2 In the scenario, during global planning, the robot assumes it can pass through the small opening below based on the smallest bounding box, thus continuously planning a straight global path. However, during local planning, the robot assumes it cannot pass through the small opening based on the second largest bounding box, leading to local planning failure and triggering global planning. But because global planning assumes it can pass through, it still plans a global path through the small opening below. This cycle continues indefinitely, a situation known as being stuck on the outline.
[0077] After applying the robot contour-based global planning method of this invention, the exact location of the robot at the moment of the first collision, i.e., the jamming point, will be found in the global path based on the robot's actual contour. Then, a fatal obstacle will be set at the corresponding position of the jamming point in the static layer, so that after triggering the global path, a global planning result indicating that the robot cannot pass through the jamming point will be obtained. For easier understanding, please refer to... Figure 3 Simply put, the midpoint of the small opening is the bottleneck. Therefore, this invention will set a fatal obstacle in the static layer corresponding to the position of the small opening to "seal" the small opening, so that after triggering global planning, a more reasonable global path will be planned to go through the upper large opening.
[0078] It is evident that this invention not only effectively eliminates the problem of being stuck on a contour, but also processes the robot based on its actual contour, thus not restricting the robot's contour design. Furthermore, it only executes when a contour is stuck, which greatly reduces the computational power required compared to checking the contour at every path point during each global planning process. Moreover, it effectively avoids scraping and improves the robot's safe passage capability for autonomous driving.
[0079] The technical solution provided by the present invention will now be described in detail with reference to specific embodiments.
[0080] Please see Figure 4 , Figure 4 A flowchart illustrating a global planning method based on robot contours is provided as an example. Figure 1 .like Figure 2 As shown, this embodiment of the invention provides a global planning method based on robot contours, which includes at least the following steps:
[0081] S1: If a robot outline gets stuck, bring the robot outline into the global path and obtain the front path point when the robot outline first enters the obstacle, and the back path point when it exits the obstacle.
[0082] Optionally, if the number of local planning failures triggered per unit time exceeds a preset number, and the similarity between the current global path and the previous global path exceeds a preset ratio, then a "stuck contour" situation is determined to have occurred. The preset ratio can be 80%-100%, preferably 90%.
[0083] S2: Based on the average of the previous path points and the subsequent path points, calculate and obtain the checkpoints in the global path; the checkpoints are the exact locations of the robot contour check obstacles.
[0084] Here, based on the average of the previous path point and the next path point, the checkpoints in the global path are calculated. The calculation is based on the average of the indices (which can be understood as serial numbers) of the previous and next path points, and then the checkpoints are retrieved on the global path using this average index.
[0085] S3: In the static layer, a fatal obstacle is placed along a direction perpendicular to the direction of the checkpoint, so that the robot cannot pass through the checkpoint after the global path is triggered. The direction of the checkpoint is calculated using the coordinates of the preceding and following path points in the global path.
[0086] This embodiment only activates the inspection logic when a contour jamming occurs, and only acquires the path points at the first obstacle intrusion and exit. Therefore, compared to existing technologies that check the contour cost at every path point during each global planning step, resulting in high computational power consumption, this embodiment requires significantly less computational power. Furthermore, since this embodiment incorporates the robot's actual contour for calculation, there are no longer restrictions on the robot's contour design. Finally, because it efficiently overcomes contour jamming and avoids scraping caused by unsuitable global planning, it improves the robot's safe autonomous driving capability.
[0087] Optionally, step S3 of this embodiment has at least two feasible implementation methods:
[0088] In some specific embodiments, step S3 specifically includes:
[0089] S3-1: For each grid on a straight line passing through the checkpoint and perpendicular to the direction of the checkpoint, obtain the fatal obstacle grid corresponding to the fatal obstacle that exists only in the obstacle layer within its preset range;
[0090] In other words, for each grid cell on the aforementioned straight line, each time, taking one grid cell as the center, obtain the grid cell corresponding to the fatal obstacle that exists only in the obstacle layer within its specified range (e.g., within a 3*3 grid cell range). This grid cell is named the fatal obstacle grid. Here, a fatal obstacle that exists only in the obstacle layer refers to a situation where there is no fatal obstacle in the corresponding static layer but a fatal obstacle exists in the corresponding obstacle layer; correspondingly, the fatal obstacle grid referred to in this step specifically refers to a grid cell where there is no fatal obstacle in the corresponding static layer but a fatal obstacle exists in the corresponding obstacle layer.
[0091] S3-2: In the static layer, the grid corresponding to the checkpoint, each grid, and the deadly obstacle grid are set as deadly obstacles.
[0092] It can be understood that the fatal obstacle grid obtained in the previous step is essentially extracted from the grids corresponding to fatal obstacles that only exist in the obstacle layer around the jam point, based on the jam point location. Correspondingly, setting these grids as fatal obstacles in this step essentially means setting the currently detected fatal obstacles around the jam point (the obstacle layer corresponds to newly appearing obstacles) into the static layer, treating them as fixed fatal obstacles. Here, updating the grid corresponding to the jam point, each grid on the straight line, and the aforementioned fatal obstacle grid together into the static layer is equivalent to setting a group of fatal obstacles at the jam point location. This group of fatal obstacles will cause the robot to be determined as unable to pass and need to detour when global planning is triggered. In this way, when a jamming situation occurs, the results of global planning and local planning can be consistent, i.e., both will result in an inability to pass, thus escaping the jamming dilemma and replanning a new path.
[0093] Specifically, the positions of the aforementioned group of deadly obstacles are set based on the location of the obstacle points, that is, based on the actual outline of the robot. Therefore, the implementation of this invention is not limited to the actual outline of the robot, but can adapt to the actual outline of the robot, accurately "building" virtual deadly obstacles at the locations where the robot may scrape, prompting the robot to avoid them and make alternative plans.
[0094] In some other specific embodiments, step S3 specifically includes:
[0095] SS3-1: Obtain the fatal obstacle grid corresponding to the fatal obstacle that exists only in the obstacle layer within a preset range on both sides of the checkpoint as the center point and the direction of the checkpoint as the center line, and the connecting grid that connects the fatal obstacle grids on both sides of the preset range via the checkpoint;
[0096] This can be simply understood as planning a mirror image of the center line, centered on the checkpoint. For example, this area might consist of a 9x4 grid, with the center line occupying one row and each side occupying a 5x4 grid. Correspondingly, the extracted lethal obstacle grid refers to the grid corresponding to a lethal obstacle that exists only within the obstacle layer within the 9x4 grid; the connecting grid refers to the grid corresponding to the straight line connecting the nearest lethal obstacle grid in the two 5x4 grids passing through the checkpoint. Figure 10 That is, L0, L1 and L10 in the figure.
[0097] SS3-2: In the static layer, set the connection grid and the fatal obstacle grid as fatal obstacles.
[0098] Here, consistent with the previous specific implementation, the fatal obstacles updated to the static layer through this step are also derived from the robot's actual outline. They are used to trigger global planning and determine that the robot cannot pass through the stuck position and needs to detour in order to get rid of the stuck outline situation.
[0099] Although the two specific implementation methods described above use different technical means to obtain the fatal obstacles updated to the static layer, they can achieve the same effect, and will not be elaborated here.
[0100] Please see Figure 5 , Figure 5 A flowchart illustrating a global planning method based on robot contours is provided as an example. Figure 2 This embodiment specifically describes... Figure 4 The steps of step S3 are expanded in detail based on the previous embodiment. For example... Figure 5 As shown, in this embodiment, step S3 specifically includes the following steps:
[0101] S301: Create a checkpoint array and add the coordinates of the checkpoints to the checkpoint array;
[0102] S302: On both sides of the checkpoint, add coordinate points at equal intervals outwards from the checkpoint in a direction perpendicular to the checkpoint's orientation. This is done starting from one side and then moving to the other. Each side is added sequentially from the checkpoint outwards. The interval can be 0.05-0.1m, preferably 0.08m, to achieve the densest arrangement of lethal obstacles using the fewest points when finally set in the static layer.
[0103] S303: After each coordinate point is added, the following judgment is performed on the preset range (e.g., within a 3*3 grid) divided by the grid corresponding to the added coordinate point:
[0104] S304: If there is a fatal obstacle in the corresponding static layer within the preset range, then stop adding coordinate points on the current side; determine whether the other side has been added. If the other side has not been added, then add coordinate points on the other side; if the other side has been added, then execute S307.
[0105] S305: If there are no fatal obstacles in the corresponding static layer and obstacle layer within the preset range, add the currently added coordinate point to the checkpoint array; then determine whether the straight-line distance between the currently added coordinate point and the checkpoint is greater than the preset distance. If so, stop adding coordinate points on the current side. If no coordinate point is added on the other side, add a coordinate point on the other side. If a coordinate point has been added on the other side, execute S307. If the distance is not greater than the preset distance, add the next coordinate point on that side. Here, the preset distance setting is used to limit the length of the added coordinate points on both sides.
[0106] S306: If there are no fatal obstacles in the corresponding static layer within the preset range, but there are fatal obstacles in the corresponding obstacle layer, then execute the extended process; determine whether the straight-line distance between the currently added coordinate point and the checkpoint is greater than the preset distance. If so, end the addition of coordinate points on the current side. If no coordinate points have been added on the other side, add coordinate points on the other side. If a coordinate point has been added on the other side, execute step S307. If the distance is not greater than the preset distance, add the next coordinate point on that side.
[0107] The extended process includes:
[0108] S306-1: Clear the aforementioned fatal obstacle from the obstacle layer and add the coordinates of the fatal obstacle to the checkpoint array; here, the purpose of clearing the fatal obstacle from the obstacle layer is to prevent the expansion process from infinitely looping based on the same fatal obstacle from the obstacle layer. It is understandable that because the fatal obstacle is cleared from the obstacle layer in the first step of each expansion process, the fatal obstacle expanded each time the expansion process is executed is different.
[0109] S306-2: Within a preset range (e.g., a 3x3 grid range) centered on the grid corresponding to the fatal obstacle,
[0110] If there is a fatal obstacle in the corresponding static layer, the expansion process ends and returns to S306 to continue executing the following steps (i.e., determining the straight-line distance between the currently added coordinate point and the checkpoint...).
[0111] If there are no fatal obstacles in either the corresponding static layer or the obstacle layer, the expansion process ends and returns to S306 to continue executing the subsequent steps;
[0112] If there are no fatal obstacles in the corresponding static layer but there are fatal obstacles in the corresponding obstacle layer, then return to step S306-1. That is, return to step S306-1 for fatal obstacles in the obstacle layer confirmed in this step.
[0113] After performing steps S304 to S306 above for each added coordinate point, perform step S307 below;
[0114] S307: In the static layer, the grid corresponding to each coordinate point in the checkpoint array is set as a lethal obstacle. In other words, the coordinate points to be fixed as lethal obstacles in the static layer are stored uniformly through the checkpoint array for effective management.
[0115] Please see Figures 6 to 8 ,in, Figure 6 This is a schematic diagram illustrating the overall process of a global planning method based on robot contours, as shown in the embodiment. Figure 7 for Figure 6 A flowchart illustrating the extended process invoked in the middle; Figure 8 for Figure 7 A flowchart illustrating the update process invoked in the middle.
[0116] Below, please combine Figures 6 to 8 Understand the robot contour-based global planning method provided in this embodiment. The method includes the following steps:
[0117] 1. If the number of local planning failures exceeds the threshold within a unit of time, a similarity judgment is triggered between the current global path and the previous global path (i.e., the reserved global path). If there is no previous global path, the current global path is recorded. If the current global path and the previous global path are detected to be similar, the process jumps to step 2. If they are not similar, the number of failures is cleared.
[0118] 2. Introduce the robot contour into each point of the global path and check the maximum cost within the contour. When the maximum cost value first appears to be -1 (the contour intrudes into the obstacle), mark the point as front_point. When the maximum cost value first changes from -1 to 253 (the contour exits the obstacle), mark the point as behind_point. Calculate the average of the front and back points to obtain the exact location where the contour blocks the obstacle, and record it as stuck_point, which is the blocking point in the aforementioned embodiment.
[0119] 3. Create an array, denoted as `stuck_point_list`, and add `stuck_point` to the array. Calculate the orientation of `stuck_point` using the coordinates of its predecessor and successor. In a direction perpendicular to the orientation, add points at equal intervals from `stuck_point` to both sides. Starting from one side, add points one by one and check the cost value of the grid corresponding to the currently added point on each layer of the cost map. If there are fatal obstacles of the static layer within a 3x3 grid around the grid, stop adding points on that side. If there are no fatal obstacles of the static layer within a 3x3 grid around the grid, but there are fatal obstacles of the obstacle layer, jump to step 4. If there are no fatal obstacles of the obstacle layer or the static layer within a 3x3 grid around the grid, record the point in `stuck_point_list`, continue adding the next point and return to the "check" process, until the distance between the last point added on that side and `stuck_point` meets the preset value.
[0120] 4. extendObstacle(): Sets the value of a deadly obstacle in the obstacle layer to 0 and records its coordinates to the stuck_point_list. At the same time, it explores whether there are any deadly obstacles in the static layer within a 3*3 grid around the coordinates. If there are, the recursive branch ends. If not, it explores whether there are any deadly obstacles within a 3*3 grid around the coordinates. If there are, it recursively executes step 4 at that point. If not, the recursive branch ends.
[0121] 5. Update the coordinates of all points in the stuck_point_list to 254 on the static layer, and record the time.
[0122] 6. After the main map layer is updated, global planning will be triggered. Fatal obstacles added to the static layer will help the global planner avoid areas with outline card obstacles.
[0123] 7. updatePointList(): When the time exceeds the threshold, update the coordinates of all points in the stuck_point_list to 0 on the static layer; if local planning fails, the above operation will also be performed; if the number of times step 5 is executed exceeds the threshold, the stuck_point_list with the longest execution time will also be cleared; if it is detected that more than 80% of the fatal obstacle points in the stuck_point_list on the obstacle layer have been cleared, the stuck_point_list clearing operation will also be performed.
[0124] This enables the robot to avoid obstacles on the outline card.
[0125] Please see Figure 10 and Figure 11 , Figure 10 and Figure 11 These are specific examples of a global planning method based on robot contours. Figure 1 and examples Figure 2 As a specific example of the above embodiments, assume that... Figure 10 and Figure 11 All maps contain raster maps with a 14x8 grid as the primary cost map. Grids marked "SO" contain deadly obstacles in both the corresponding static and obstacle layers; grids marked "O" contain deadly obstacles in the corresponding obstacle layer. A blank checkpoint array `spl` is created; and "L0" in the map is confirmed to be a checkpoint in the global path.
[0126] First, refer to Figure 10 Add checkpoint L0 to the checkpoint array spl; then, along the direction perpendicular to L0 (upward in the diagram), i.e., the row of grid cells containing L0, starting from L0, add coordinate points to the left first, resulting in L1. Alternatively, you can add coordinate points to the right first; using L1 as the center, check if "SO" exists within the surrounding 3x3 grid cells. If not, check if "O" exists. If it does, add L1 to the checkpoint array spl; then, check each grid cell within the 3x3 grid cell range centered on L1, assuming we start from the top-left grid cell within the range... Figure 11Starting with L2, add L2 to the checkpoint array spl. Check if there is a "SO" within the 3x3 grid area centered on L2. Since it doesn't exist, continue checking if there is an "O". If it does, clear the "O" grid, i.e., L3, from the obstacle layer. Then check the 3x3 grid area centered on L3. Since there is no "SO", but there is an "O" grid, add the found "O" grid L4 to the checkpoint array spl. Continue checking if there is a "SO" within the 3x3 grid area centered on L4. It doesn't exist, but there is an "O" grid L5, so add L5 to the checkpoint array spl. Check if there is a "SO" within the 3x3 grid area surrounding L5. If it does, return to the previous level to check the 3x3 grid area surrounding L4. Since the previous check was performed on the obstacle layer when finding L3, L4, and L5, this check is repeated. The corresponding clearing was performed, so only the "O" grid L6 was found. L6 was added to the checkpoint array spl. Then, the 3x3 grid around L6 was checked to see if "SO" existed. If it did, the process returned to the previous level and checked the 3x3 grid around L4. Since the 3x3 grid around L4 had been fully explored, the exploration of the area around L4 ended, and the process returned to the previous level and checked the 3x3 grid around L3. Grid L7 was found, and L7 was added to the checkpoint array spl. The grid around L7 was checked, and "SO" did not exist. Grid L8, which was "O", was found, and L8 was added to the checkpoint array spl. The grid around L8 was checked, and "SO" existed. The process returned to the previous level and checked the 3x3 grid around L7, and L9 was found. Following this pattern, we will obtain the checkpoint array spl: L0, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12, L13, L14, L15, L16, L17, L18.
[0127] Please see Figure 9 , Figure 9 This is a schematic diagram illustrating the virtual functional modules of a global planning system based on robot contours, as shown in the embodiment. Figure 9 As shown, this embodiment provides a global planning system 900 based on robot contours, based on the above embodiments, including:
[0128] The acquisition module 10 is used to bring the robot outline into the global path if a stuck outline situation occurs, and to acquire the front path point corresponding to the first time the robot outline enters the obstacle, and the back path point corresponding to the first time it exits the obstacle.
[0129] Calculation module 20 is used to calculate and obtain the checkpoints in the global path based on the average of the previous path points and the subsequent path points;
[0130] Setting module 30 is used to set a fatal obstacle in the static layer along a direction perpendicular to the direction of the checkpoint, so that the robot cannot pass through the checkpoint after the global path is triggered.
[0131] In some specific embodiments, the setting module 30 is specifically used to: obtain, for each grid that passes through the checkpoint and is perpendicular to the direction of the checkpoint, the fatal obstacle grid corresponding to the fatal obstacle that exists only in the obstacle layer within its preset range; and in the static layer, set the grid corresponding to the checkpoint, each grid and the fatal obstacle grid as fatal obstacles.
[0132] The setting module 30 is specifically used to: obtain the fatal obstacle grid corresponding to fatal obstacles that exist only in the obstacle layer within a preset range on both sides of the checkpoint as the center point and the direction of the checkpoint as the center line, and the connecting grid connecting the fatal obstacle grids on both sides of the preset range via the checkpoint; and in the static layer, set the connecting grid and the fatal obstacle grid as fatal obstacles.
[0133] In some specific embodiments, the setting module 30 is specifically used for:
[0134] Create an array of checkpoints and add the checkpoints to the array;
[0135] On both sides of the checkpoint, coordinate points are added at equal intervals outward from the checkpoint in a direction perpendicular to the direction of the checkpoint;
[0136] After adding a coordinate point, within a preset range centered on the grid corresponding to the added coordinate point,
[0137] If a fatal obstacle exists in the corresponding static layer, the process of adding coordinate points on the current side ends; if no coordinate points are added on the other side, then coordinate points are added on the other side.
[0138] If there are no fatal obstacles in either the corresponding static layer or the obstacle layer, the newly added coordinate point is added to the checkpoint array; it is then determined whether the straight-line distance between the added coordinate point and the checkpoint is greater than a preset distance. If so, the addition of coordinate points on the current side ends; if no coordinate points are added on the other side, then coordinate points are added on the other side.
[0139] If there are no fatal obstacles in the corresponding static layer but there are fatal obstacles in the corresponding obstacle layer, then the extended process is executed; it is determined whether the straight-line distance between the added coordinate point and the checkpoint is greater than the preset distance. If so, the addition of coordinate points on the current side ends; if no coordinate points are added on the other side, then coordinate points are added on the other side.
[0140] In the static layer, the grid corresponding to each coordinate point in the checkpoint array is set as a fatal obstacle;
[0141] The extended process includes:
[0142] The deadly obstacles are removed from the obstacle layer, and the coordinates of the deadly obstacles are added to the checkpoint array;
[0143] Within a preset range centered on the grid corresponding to the fatal obstacle.
[0144] If a fatal obstacle exists in the corresponding static layer, the expansion process ends.
[0145] If there are no fatal obstacles in either the corresponding static layer or the obstacle layer, then the expansion process ends.
[0146] If there are no fatal obstacles in the corresponding static layer but there are fatal obstacles in the corresponding obstacle layer, then return to the step of removing the fatal obstacles in the obstacle layer.
[0147] In some specific embodiments, the setting module 30 is further configured to: if the proportion of the disappearance of the coordinates of the fatal obstacles in the corresponding obstacle layer in the checkpoint array in the latest obstacle layer exceeds a preset threshold, then in the static layer, set the grid corresponding to each coordinate point in the checkpoint array as a safe area.
[0148] In some specific embodiments, the setting module 30 is also used to record the time when the fatal obstacle is set; when the time interval between the time and the current time exceeds a preset duration, the setting is cleared in the static layer.
[0149] This invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the program can implement the global planning method based on robot contours described in any of the above embodiments. The steps included in the method are described in the above embodiments and will not be repeated here.
[0150] In summary, the global planning method, system, and medium based on robot contours provided by this invention have at least the following advantages:
[0151] Advantage 1: There are no restrictions on the robot's outline;
[0152] Advantage 2: It solves the problem of high computing power consumption caused by checking the contour cost of the path in every global planning. The checking logic is only started when the number of local planning failures exceeds the threshold within a certain period of time, which greatly reduces the computing power requirement.
[0153] Advantage 3: Improves the robot's safe passage capability during autonomous driving (avoiding scrapes caused by inappropriate global planning).
[0154] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.
Claims
1. A robot contour based global planning method, characterized in that, The method comprises the following steps: If a card contour occurs, the robot contour is brought into a global path, a front path point corresponding to the first time the robot contour invades an obstacle is obtained, and a rear path point corresponding to the time the robot exits the obstacle is obtained; A stuck point in the global path is calculated according to the average of the front path point and the rear path point; In a static layer, a fatal obstacle is arranged along a direction perpendicular to the direction of the stuck point, so that the robot cannot pass through the stuck point after triggering the global path; The method comprises the following steps: A stuck point array is created, and the stuck point is added to the stuck point array; On both sides of the stuck point, coordinate points are added at equal intervals along a direction perpendicular to the direction of the stuck point; After adding a coordinate point, in a preset range centered on the grid corresponding to the added coordinate point, If there is a fatal obstacle corresponding to the static layer, the coordinate point adding on the current side is ended; if the other side is not added, the coordinate point adding on the other side is started; If there is no fatal obstacle corresponding to the static layer and the obstacle layer, the added coordinate point is added to the stuck point array; it is judged whether the straight-line distance between the added coordinate point and the stuck point is greater than a preset distance; if yes, the coordinate point adding on the current side is ended; if the other side is not added, the coordinate point adding on the other side is started; If there is no fatal obstacle corresponding to the static layer but there is a fatal obstacle corresponding to the obstacle layer, an expansion process is performed; it is judged whether the straight-line distance between the added coordinate point and the stuck point is greater than a preset distance; if yes, the coordinate point adding on the current side is ended; if the other side is not added, the coordinate point adding on the other side is started; In the static layer, the grids corresponding to the coordinate points in the stuck point array are set as fatal obstacles.
2. A robot contour based global planning method as claimed in claim 1, wherein, The method comprises the following steps: For each grid on a straight line passing through the stuck point and perpendicular to the direction of the stuck point, a fatal obstacle grid corresponding to a fatal obstacle existing only in the obstacle layer in a preset range of the grid is obtained; In the static layer, the grid corresponding to the stuck point, the grids and the fatal obstacle grid are set as fatal obstacles.
3. A robot contour based global planning method as claimed in claim 1, wherein, The method comprises the following steps: A fatal obstacle grid corresponding to a fatal obstacle existing only in the obstacle layer in a preset range on both sides of the stuck point with the stuck point as a center point and the direction of the stuck point as a center line is obtained, and a connection grid connecting the fatal obstacle grids in the preset ranges on the two sides via the stuck point is obtained; In the static layer, the connection grid and the fatal obstacle grid are set as fatal obstacles.
4. A robot contour based global planning method as claimed in claim 1, wherein, The expansion process comprises the following steps: The fatal obstacle is removed in the obstacle layer, and a coordinate point corresponding to the fatal obstacle is added to the stuck point array; In a preset range centered on the grid corresponding to the fatal obstacle, If there is a fatal obstacle corresponding to the static layer, the expansion process is ended; If there is no fatal obstacle corresponding to the static layer and the obstacle layer, the expansion process is ended; If there is no fatal obstacle in the corresponding static layer but there is a fatal obstacle in the corresponding obstacle layer, the fatal obstacle is removed in the obstacle layer.
5. A robot contour based global planning method as claimed in claim 4, wherein, The method further comprises: If the proportion of the disappearance of the fatal obstacle corresponding to the coordinate point in the obstacle layer in the latest obstacle layer exceeds a preset threshold, the grid corresponding to each coordinate point in the card point array is set as a safe area in the static layer.
6. A robot contour based global planning method as claimed in claim 1, wherein, If the card contour condition occurs, the method further comprises: If the number of failures of triggering local planning in a unit time exceeds a preset number, and the similarity between the current global path and the last global path exceeds a preset proportion, it is determined that the card contour condition occurs.
7. A robot contour based global planning method as claimed in claim 1, wherein, The method further comprises: Recording the time when the fatal obstacle is set; When the time interval between the time and the current time exceeds a preset time length, the fatal obstacle is removed in the static layer.
8. A robot contour-based global planning system, characterized by, The method further comprises: An acquisition module is configured to, if the card contour condition occurs, bring the robot contour into the global path, acquire a front path point corresponding to the first time when the robot contour invades the obstacle, and acquire a rear path point corresponding to the time when the robot contour exits the obstacle. A calculation module is configured to calculate a card point in the global path according to the mean value of the front path point and the rear path point. A setting module is configured to set a fatal obstacle in the static layer along a direction perpendicular to the direction of the card point, so that the robot cannot pass through the card point after the global path is triggered.
9. A robot contour-based global planning system as claimed in claim 8, characterized in that, The setting module is specifically configured to: acquire a fatal obstacle grid corresponding to a fatal obstacle existing only in the obstacle layer in a preset range of each grid passing through the card point and in a direction perpendicular to the direction of the card point; and set the grid corresponding to the card point, the grids, and the fatal obstacle grid as a fatal obstacle in the static layer.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program, when executed by a processor, can implement the global planning method based on the robot contour according to any one of claims 1 to 7. The program, when executed by a processor, can implement the global planning method based on the robot contour according to any one of claims 1 to 7.
Citation Information
Patent Citations
Robot path planning method and device in indoor dynamic environment and robot
CN106774347A
Method and device for costmap updating, robot and storage medium
CN111469127A