Path planning method, robot and computer readable storage medium

By integrating local cost maps with quad-tree maps to update the constitutive value of the target area, the problem of low efficiency of robot path planning is solved and efficient and safe path planning is achieved.

CN120445239APending Publication Date: 2025-08-08GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410131485.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-30
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the prior art, robot path planning efficiency is low, especially in complex environments, resulting in reduced operational efficiency.

Method used

The method of fusion of quad-tree map and local cost map is used to determine the target area in the quad-tree map that overlaps with the local cost map, and update its generation value to generate the target path.

Benefits of technology

It improves the robustness and security of path planning, reduces the number of search grids, improves the efficiency of path planning, and thus improves the operation efficiency of robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120445239A_ABST
    Figure CN120445239A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of robots, in particular to a path planning method, a robot and a computer readable storage medium. The method comprises the steps of obtaining a fusion map and a quadtree map, determining a target area overlapped with a local cost map in the quadtree map, updating the cost value of the target area according to the fusion map to obtain an updated quadtree map, and generating a target path according to the updated quadtree map. According to the embodiment of the invention, the quadtree map can be locally updated according to the local cost map in the global re-planning mode, so that the real-time environment data of the local cost map can be integrated into the quadtree map, and the robustness and safety of path planning can be improved. Meanwhile, the grids of the quadtree map are relatively large, so that the number of the grids of the quadtree map is less than that of the grids of the global cost map, and the path can be efficiently planned based on the updated quadtree map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of robotics technology, and in particular to a path planning method, a robot, and a computer-readable storage medium. Background Art

[0002] The robot provided by the related art can fuse real-time environmental data into a global cost map to obtain a fused map, and then perform a global replanning operation based on the fused map to plan a path. However, the global cost map or fused map provided by the related art is a grid map, which is composed of multiple grids of the same size. Due to the small size of the grid, the grid map contains a large number of grids. When the robot performs path planning, it needs to continuously search for smaller grids on the grid map. This path planning method is time-consuming and has low path planning efficiency, which can easily reduce the robot's operating efficiency. Summary of the Invention

[0003] One purpose of the embodiments of the present application is to provide a path planning method, a robot, and a computer-readable storage medium to solve the technical problem of low path planning efficiency in related technologies.

[0004] An embodiment of the present application provides a path planning method, applied to an electronic device, comprising: obtaining a fused map and a quadtree map, wherein the fused map is a map obtained by fusing a local cost map detected by the electronic device with a global cost map; determining a target area in the quadtree map that overlaps with the local cost map; updating a cost value of the target area according to the fused map to obtain an updated quadtree map; and generating a target path according to the updated quadtree map.

[0005] Optionally, the quadtree map is configured with a plurality of nodes distributed at different levels, and determining the target area in the quadtree map that overlaps with the local cost map includes: determining a positional dependency relationship between the target node and the local cost map, the target node being a node in the quadtree map, and determining the target area based on the positional dependency relationship. This embodiment can sequentially use each node of the quadtree map as a target node, compare the target node with the local cost map to determine the positional dependency relationship, and then determine the target area based on the positional dependency relationship. This method is relatively efficient and can accurately and reliably extract the target area mapped from the local cost map to the quadtree map.

[0006] Optionally, the position dependency relationship includes a position inclusion relationship and a position non-inclusion relationship, the local cost map includes a plurality of grids, and determining the position dependency relationship between the target node and the local cost map includes:

[0007] Determine whether the position of a reference grid falls within the target node, where the reference grid is one of the multiple grids in the local cost map. If so, determine that the positional subordination is a positional inclusion relationship; if not, determine that the positional subordination is a positional non-inclusion relationship. This embodiment uses an iterative recursive approach to sequentially select each grid in the local cost map as a reference grid, and determine the positional subordination based on the position of the reference grid and the position of the target node. Therefore, this embodiment can determine the positional subordination from a more subtle dimension based on a small area of a grid, which is conducive to reliably and accurately determining the positional subordination relationship between the target node and the local cost map.

[0008] Optionally, the position subordination relationship includes a position inclusion relationship and a position non-inclusion relationship, and determining the target area based on the position subordination relationship includes: if the position subordination relationship is a position inclusion relationship, determining the target area based on the attributes of the target node; if the position subordination relationship is a position non-inclusion relationship, ending the inspection operation on the target node.

[0009] Optionally, determining the target area according to the attribute of the target node includes:

[0010] If the attribute of the target node is a mixed node attribute, obtaining a child set of the target node, the child set of the target node including multiple child nodes divided from the target node, selecting a child node from the child set of the target node as a new target node, and returning to the step of determining a positional dependency relationship between the target node and the local cost map;

[0011] If the attribute of the target node is an idle leaf node attribute, determine whether the target node contains the obstacle area mapped from the local cost map to the quadtree map, obtain a judgment result, and determine the target area based on the judgment result.

[0012] This embodiment analyzes the attributes of the target node and matches the corresponding analysis process to the different attributes of the target node, which is conducive to accurately and reliably finding overlapping leaf nodes. Therefore, the area composed of multiple overlapping leaf nodes can be used as the target area, which is conducive to the subsequent steps to reliably and accurately update the cost value of the target area, thereby obtaining a reliably and accurately updated quadtree map.

[0013] Optionally, the judgment result includes a result containing an obstacle and a result not containing an obstacle. The judgment of whether the target node contains an obstacle area mapped from the local cost map to the quadtree map includes: determining whether the obstacle area of the local cost map is mapped to the target node; if so, generating a result containing an obstacle; if not, generating a result not containing an obstacle.

[0014] Optionally, the target area includes a plurality of overlapping leaf nodes, the judgment result includes a result of including an obstacle and a result of not including an obstacle, and determining the target area according to the judgment result includes:

[0015] If the judgment result is that an obstacle is included, a child set belonging to the target node is created, the child set including multiple child nodes divided from the target node, a child node is selected from the child set as the new target node, and the process returns to the step of determining the positional affiliation between the target node and the local cost map. If the judgment result is that an obstacle is not included, the target node is determined to be an overlapping leaf node. After fusing the local cost maps, this embodiment can continuously search for new target nodes that both overlap with the local cost map and are leaf nodes when the target node changes from an idle leaf node to a mixed one. This facilitates the subsequent steps to reliably and accurately update the cost value of the target area, thereby obtaining a reliably and accurately updated quadtree map.

[0016] Optionally, the target area includes multiple overlapping leaf nodes, and updating the cost value of the target area according to the fused map to obtain an updated quadtree map includes: determining the cost value of the overlapping leaf node in the fused map, and updating the cost value of the overlapping leaf node in the quadtree map in the target area of the quadtree map according to the cost value of the overlapping leaf node in the fused map to obtain an updated quadtree map.

[0017] Optionally, after completing the path planning operation, the method further includes: restoring the updated quadtree map back to the original quadtree map. This embodiment can restore the updated quadtree map back to the original quadtree map to facilitate the electronic device to subsequently perform global planning or global replanning normally.

[0018] In a second aspect, an embodiment of the present application provides a robot comprising a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the robot implements the above-mentioned path planning method.

[0019] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the above-mentioned path planning method.

[0020] The embodiments of the present application can achieve the following technical effects: In the path planning method provided in the embodiments of the present application, a fused map and a quadtree map are obtained. The fused map is a map obtained by fusing the local cost map detected by the electronic device with the global cost map. The target area in the quadtree map that overlaps with the local cost map is determined. The cost value of the target area is updated according to the fused map to obtain an updated quadtree map. The target path is generated according to the updated quadtree map. In the global replanning mode, the present embodiment can locally update the quadtree map based on the local cost map, thereby integrating the real-time environmental data of the local cost map into the quadtree map, which is conducive to improving the robustness and security of path planning. At the same time, because the grid of the quadtree map is relatively large, the number of grids in the quadtree map is relatively small compared to the number of grids in the global cost map. When planning a path based on the updated quadtree map, the number of excessive grids searched is relatively reduced, which can improve the efficiency of path planning and thus improve the operating efficiency of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] Figure 1 Schematic diagram of the first planning path provided for related technologies;

[0023] Figure 2 A schematic diagram of the second planning path provided for related technologies;

[0024] Figure 3 Schematic diagram of the third planning path provided for related technologies;

[0025] Figure 4 A schematic diagram of a flow chart of a path planning method provided in an embodiment of the present application;

[0026] Figure 5 A schematic diagram of a grid map provided in an embodiment of the present application;

[0027] Figure 6a A schematic diagram of mixed nodes appearing when a quadtree map in an original state is changed to an updated quadtree map provided in an embodiment of the present application;

[0028] Figure 6b A schematic diagram of a quadtree map restored to its original state from an updated quadtree map provided in an embodiment of the present application;

[0029] Figure 7 A simulation diagram of the quadtree map in its original state provided in an embodiment of the present application;

[0030] Figure 8 A simulation diagram of the updated quadtree map provided in an embodiment of the present application;

[0031] Figure 9 and Figure 10 Schematic diagrams of the process of generating a quadtree map by using a quadtree segmentation method according to an embodiment of the present application;

[0032] Figure 11 A schematic diagram of the structure of a path planning device provided in an embodiment of the present application;

[0033] Figure 12 A schematic structural diagram of a robot provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0035] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other and are all within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish between the same items or similar items with basically the same functions and effects.

[0036] In a related technique, a path can be planned based on a global costmap without requiring information from a local costmap. Figure 1 , the related technology provides a starting point 11 and an end point 12, and plans a path 14 on a global cost map 13 according to the starting point 11 and the end point 12. Figure 1 The provided method and related technologies can easily and successfully plan a path in a non-complex environment, but are not easy to successfully plan a path in a complex environment.

[0037] In another related technology, the related technology constructs a quadtree map based on the global cost map, and then plans the path based on the quadtree map. Although the related technology can plan the path quickly and efficiently based on the quadtree map, the related technology still has problems with Figure 1 The problems with the method shown will not be discussed here.

[0038] In another related technology, the related technology does not need all the information provided by the global cost map. It only needs to combine real-time environmental data and local static maps to generate a local cost map and plan the path based on the local cost map. The local cost map provided by the related technology can quickly plan the path in some scenarios, but it cannot effectively plan the obstacle avoidance path in some complex environments. Figure 2 , the relevant technology provides a starting point 21 and an end point 22, and plans a path 24 on the global cost map 23 based on the starting point 21 and the end point 22. However, the path 24 cannot effectively avoid the obstacle 25, resulting in the robot being unable to effectively reach the end point 22 when walking along the path 24. This can be regarded as a path planning failure.

[0039] In another related technology, in the global replanning mode, the global cost map can be fused with real-time environment data to obtain a fused map, and the path can be planned based on the fused map. The fused map provided by the related technology can help the robot plan a more reliable path, and the success rate of the planned path is relatively high. Figure 3 , the related technology plans a path 32 on the fused map 31, although Figure 3 and Figure 2 The starting point and the end point are the same, but the path 32 and the path 24 are different. The robot can reach the end point 22 safely and reliably by following the path 32. Figure 3 The disadvantage is that the fused map is a raster map, and the robot needs to spend a lot of computing power and time to successfully plan a path. This planning method is not very efficient.

[0040] This embodiment of the present application integrates and updates the real-time environmental data carried by a local cost map into a quadtree map, enabling electronic devices to efficiently plan highly robust and secure paths within the updated quadtree map. Furthermore, this embodiment of the present application only updates the costs of target areas within the quadtree map that overlap with the local cost map, eliminating the need for a global update of the quadtree map, thus improving update efficiency.

[0041] Since the grids of the quadtree map are relatively large, the number of grids in the quadtree map is relatively less than the number of grids in the global cost map. When planning a path based on the updated quadtree map, this embodiment will relatively reduce the number of excessive grids searched, thereby improving the efficiency of path planning and further improving the operating efficiency of the electronic device.

[0042] After the current path planning operation is completed, the embodiment of the present application restores the updated quadtree map to the original quadtree map to facilitate the electronic device to perform global planning or global replanning normally afterwards.

[0043] The present application provides a path planning method, which is applied to an electronic device, which can be a robot, a computer device, a server, a desktop computer, a tablet computer, or an embedded device with a logic operation function. Figure 4 , the path planning method includes the following steps:

[0044] S41: Obtain the fusion map and the quadtree map.

[0045] In this step, the fused map is a map obtained by fusing the local cost map detected by the electronic device with the global cost map. The quadtree map is a map obtained by partitioning the global cost map using a quadtree. The quadtree map is in its original state. The quadtree map includes multiple idle leaf nodes, which are leaf nodes that are idle. It is understood that the sizes of the multiple idle leaf nodes can be the same or different.

[0046] Each leaf node contains at least one grid, and the states of all grids contained in the leaf node are the same. The grid states include idle state, occupied state, and unknown state. The idle state is a state without obstacles, the occupied state is a state occupied by obstacles, and the unknown state is a state of an area not detected by the electronic device. When the grid state is idle, the grid is an idle grid. When the grid state is occupied, the grid is an occupied grid. When the grid state is unknown, the grid is an unknown grid.

[0047] See also Figure 5 ,like Figure 5 As shown, idle grids are represented by white, occupied grids are represented by black, and unknown grids are represented by gray.

[0048] The quadtree map is configured with multiple nodes, each of which may include one grid or more than two grids. As previously mentioned, since the states of all grids contained in a leaf node are the same, this embodiment may define a leaf node as: when the states of all grids within the node are the same, the node is a leaf node.

[0049] Leaf nodes include idle leaf nodes, occupied leaf nodes and unknown leaf nodes. Idle leaf nodes are leaf nodes where all grids are in idle state. Occupied leaf nodes are leaf nodes where all grids are in occupied state. Unknown leaf nodes are leaf nodes where all grids are in unknown state. In some embodiments, this embodiment may use different cost values to represent idle state, occupied state and unknown state respectively. For example, 0 represents the cost value of an idle grid, 254 represents the cost value of an occupied grid, and 255 represents the cost value of an unknown grid. Therefore, the cost value of the grids contained in the idle leaf nodes is 0, the cost value of the grids contained in the occupied leaf nodes is 254, and the cost value of the grids contained in the unknown leaf nodes is 255.

[0050] S42: Determine a target area in the quadtree map that overlaps with the local cost map.

[0051] In this step, the target region is the region in the quadtree map that overlaps with the local cost map. It is understandable that the target region can be a connected region, or the target region can be composed of multiple separate connected regions.

[0052] In some embodiments, the present embodiment may map the local costmap to a quadtree map to determine the target area. In some embodiments, the present embodiment may select a reference position in the local costmap and compare the reference position with each node of the quadtree map one by one to determine the target area.

[0053] S43: Update the cost value of the target area according to the fused map to obtain an updated quadtree map.

[0054] In this step, the updated quadtree map is a quadtree map obtained by updating the cost value of the target area on the quadtree map in the original state.

[0055] It is understandable that after the local cost map is fused with the global cost map, the cost value of the corresponding grid in the fused map may or may not change. If the cost value of a grid in the fused map changes, the changed cost value of the grid is the maximum cost value between the cost value of the local cost map and the cost value of the global cost map. This means that when the quadtree map is fused with the local cost map, the original cost value of the idle leaf node in the updated quadtree map will undergo the following two changes:

[0056] 1. The idle leaf nodes of the original quadtree map are still idle leaf nodes in the updated quadtree map. However, the idle leaf nodes are no longer equal to the original cost value, but will continue to increase based on the original cost value.

[0057] 2. The idle leaf nodes of the original quadtree map have occupied grids in the updated quadtree map, so that the idle leaf nodes are no longer idle leaf nodes, but become hybrid nodes. A hybrid node is a node that contains at least two grid states. For example, the root node Root of the quadtree map contains idle grids and occupied grids, so the root node Root is a hybrid node.

[0058] S44: Generate a target path according to the updated quadtree map.

[0059] In this step, the present embodiment plans the target path based on the updated quadtree map according to a preset path planning algorithm. The preset path planning algorithm may be an A* algorithm or a Dijkstra algorithm.

[0060] In global replanning mode, this embodiment can locally update the quadtree map based on the local cost map, thereby integrating the real-time environmental data of the local cost map into the quadtree map, which helps improve the robustness and safety of path planning. Furthermore, because the grid cells of the quadtree map are relatively large, the number of grid cells in the quadtree map is relatively small compared to the global cost map. When planning a path based on the updated quadtree map, this embodiment relatively reduces the number of excessive grid cells that need to be searched, thereby improving path planning efficiency and, in turn, the operating efficiency of the electronic device.

[0061] In some embodiments, a quadtree map is configured with multiple nodes distributed at different levels. For example, in this embodiment, the entire quadtree map is used as the root node Root, and then the root node Root is divided into four child nodes according to the quadtree segmentation method. The four child nodes are node 1, node 2, node 3, and node 4. Node 1 is then divided into four child nodes according to the quadtree segmentation method. The four child nodes are node 11, node 12, node 13, and node 14. Among them, the root node Root is the node of the upper level of node 1, node 2, node 3, and node 4, and node 1 is node 11, node 12, node 13, and node 14. And so on, which will not be repeated here.

[0062] Determining the target area in the quadtree map that overlaps with the local cost map includes the following steps:

[0063] S421: Determine the positional dependency relationship between the target node and the local cost map, where the target node is a node in the quadtree map.

[0064] S422: Determine the target area according to the positional dependency relationship.

[0065] In S421, this embodiment can determine the target node among multiple nodes of the quadtree map according to a preset hierarchical distribution order, for example, first taking the root node Root of the highest level as the target node, and then taking the node 1 of the next level as another target node, and then taking the node 11 of the next level as another target node, and so on.

[0066] The positional dependency is used to characterize the dependency between the position of the local cost map in the quadtree map and the target position when the target cost map is mapped to the quadtree map. The positional dependency includes a positional inclusion relationship and a positional non-inclusion relationship. The positional inclusion relationship is the relationship in which the position of the local cost map in the quadtree map overlaps with the target position, that is, when the positional dependency relationship between the target node and the local cost map is a positional inclusion relationship, the target node overlaps with the local cost map mapped in the quadtree map. The positional non-inclusion relationship is the relationship in which the position of the local cost map in the quadtree map does not overlap with the target position, that is, when the positional dependency relationship between the target node and the local cost map is a positional non-inclusion relationship, the target node does not overlap with the local cost map mapped in the quadtree map.

[0067] In S422, this embodiment can sequentially use each node of the quadtree map as a target node, compare the target node with the local cost map to determine the positional affiliation, and then determine the target area based on the positional affiliation. This method is relatively efficient and can accurately and reliably extract the target area mapped from the local cost map to the quadtree map.

[0068] In some embodiments, the position dependency relationship includes a position inclusion relationship and a position non-inclusion relationship, the local cost map includes multiple grids, and determining the position dependency relationship between the target node and the local cost map includes the following steps:

[0069] S4211: Determine whether the position of the reference grid falls within the target node, where the reference grid is one of the multiple grids in the local cost map.

[0070] S4212: If yes, determine that the positional subordination relationship is a positional inclusion relationship.

[0071] S4213: If not, determine that the positional affiliation is a positional non-inclusion relationship.

[0072] In S4211, in this embodiment, a grid can be sequentially selected as a reference grid on the local cost map. The quadtree map is configured with a coordinate system. In this embodiment, it is determined whether the abscissa of the reference grid is greater than or equal to the abscissa of the target node and less than the sum of the abscissa of the target node and the width of the target node, and whether the ordinate of the reference grid is greater than or equal to the ordinate of the target node and less than the sum of the ordinate of the target node and the height of the target node. If so, it is determined that the position of the reference grid falls within the target node; if not, it is determined that the position of the reference grid does not fall within the target node.

[0073] For example, the following formula is used to determine whether the reference grid falls within the target node. The formula is as follows: If p.x >= node.x and p.x < node.x + node.w and p.y >= node.y and p.y < node.y + node.w, it means that the reference grid is within the target node; otherwise, it means that the reference grid is not within the target node. Here, p.x is the abscissa of the reference grid p, node.x is the abscissa of the target node, node.w is the width of the target node, p.y is the ordinate of the reference grid p, and node.y is the ordinate of the target node.

[0074] In S4212, since the position of the reference grid falls within the target node, it indicates that the target node overlaps with the local cost map. Therefore, in this embodiment, it is determined that the position subordination relationship between the target node and the local cost map is a position inclusion relationship. Since the position of the reference grid does not fall within the target node, it indicates that the target node does not overlap with the local cost map. Therefore, in this embodiment, it is determined that the position subordination relationship between the target node and the local cost map is a position non - inclusion relationship.

[0075] In this embodiment, an iterative and recursive method is adopted to sequentially select each grid of the local cost map as a reference grid, and the position subordination relationship is determined according to the position of the reference grid and the position of the target node. Therefore, this embodiment can determine the position subordination relationship from a more subtle dimension based on a small - area grid, which is beneficial to reliably and accurately determining the position subordination relationship between the target node and the local cost map.

[0076] In some embodiments, the position subordination relationship includes a position inclusion relationship and a position non - inclusion relationship. Determining the target area according to the position subordination relationship includes the following steps: If the position subordination relationship is a position inclusion relationship, the target area is determined according to the attributes of the target node; if the position subordination relationship is a position non - inclusion relationship, the inspection operation on the target node is ended.

[0077] The target region includes multiple overlapping leaf nodes. Overlapping leaf nodes are leaf nodes that are part of the target region. Overlapping leaf nodes can be idle leaf nodes or occupied leaf nodes. For example, the target region includes idle cells with a cost of 0 or 100, or the target region includes occupied cells with a cost of 254.

[0078] In some embodiments, determining the target area according to the attributes of the target node includes the following steps:

[0079] S4221: If the attribute of the target node is a mixed node attribute, obtain the child set of the target node, the child set of the target node includes multiple child nodes divided from the target node, select a child node in the child set of the target node as the new target node, and return to step S421.

[0080] S4222: If the attribute of the target node is an idle leaf node attribute, determine whether the target node contains an obstacle area mapped from the local cost map to the quadtree map, obtain a determination result, and determine the target area based on the determination result.

[0081] In S4221, the hybrid node attribute is used to characterize that the node is a hybrid node. When the target node is a hybrid node, since the target node is a node of the quadtree map, the area of the target node is relatively large. Part of the target node may overlap with the obstacle area in the local cost map, and another part of the target node may not overlap with the obstacle area in the local cost map. This embodiment needs to continue to traverse the partial area overlapping with the obstacle area in the local cost map on the target node. Therefore, this embodiment needs to check the child set of the target node. If there is a child node in the child set of the target node that is a hybrid node, the child set of the child node continues to be checked.

[0082] In S4222, the free leaf node attribute is used to characterize a node as a free leaf node. When the target node is a free leaf node, it indicates that the free leaf node will not be further split in the original quadtree map. However, since the local cost map has been fused to the original quadtree map, the original free leaf node is prone to the two changes mentioned above. For example, when the target node is a free leaf node in the original quadtree map, after the fusion operation, the target node remains a free leaf node, but the original cost value of the target node increases. When the target node is a free leaf node in the original quadtree map, after the fusion operation, the obstacle area of the local cost map is partially mapped to the target node, causing the target node to change from a free leaf node to a hybrid node. Therefore, this embodiment needs to determine whether the target node contains the obstacle area mapped to the quadtree map by the local cost map, obtain a judgment result, and determine the target area based on the judgment result.

[0083] It is understood that in some embodiments, if the target node's attribute is a leaf node occupancy attribute, this embodiment does not require updating the target node's cost value. The leaf node occupancy attribute is used to indicate that the node is a leaf node occupancy. When the target node is a leaf node occupancy attribute, even if the local cost map is merged into the original quadtree map, the target node's leaf node occupancy attribute does not change. Therefore, this embodiment does not require updating the target node's cost value.

[0084] This embodiment analyzes the attributes of the target node and matches the corresponding analysis process to the different attributes of the target node, which is conducive to accurately and reliably finding overlapping leaf nodes. Therefore, the area composed of multiple overlapping leaf nodes can be used as the target area, which is conducive to the subsequent steps to reliably and accurately update the cost value of the target area, thereby obtaining a reliably and accurately updated quadtree map.

[0085] In some embodiments, the judgment result includes a result including an obstacle and a result not including an obstacle. The result including an obstacle is used to represent that the obstacle area of the local cost map is mapped to the target node, and the result not including an obstacle is used to represent that the obstacle area of the local cost map is not mapped to the target node.

[0086] Determine whether the target node contains the obstacle area mapped to the quadtree map by the local cost map, and obtain the judgment result including the following steps: determine whether the obstacle area of the local cost map is mapped to the target node, if so, generate a result containing obstacles, if not, generate a result not containing obstacles.

[0087] Determining the target area based on the judgment results includes the following steps:

[0088] S42221: If the result of the judgment is that an obstacle is included, a child set belonging to the target node is created, the child set includes multiple child nodes divided from the target node, a child node is selected from the child set as the new target node, and the process returns to step S421.

[0089] S42222: If the judgment result is that the obstacle result is not included, the target node is determined to be an overlapping leaf node.

[0090] In S42221, if the judgment result is that the obstacle result is included, since the target node is an idle leaf node in the original quadtree map, but in the fusion operation, the obstacle area of the local cost map is mapped to the target node, so the target node becomes a hybrid node. This embodiment needs to create a child set belonging to the target node, and the child set includes multiple child nodes divided from the target node. A child node is selected from the child set as the new target node, and then returns to step S421 to find the overlapping leaf nodes.

[0091] In S42222, if the judgment result is that it does not contain an obstacle result, it means that the target node overlaps with the local cost map and is a leaf node. Therefore, this embodiment can use such target nodes as overlapping leaf nodes, and each overlapping leaf node forms a target area.

[0092] After fusing the local cost maps, this embodiment can continuously find new target nodes that overlap with the local cost map and are leaf nodes when the target node changes from an idle leaf node to a mixed one. This is beneficial for subsequent steps to reliably and accurately update the cost value of the target area, thereby obtaining a reliably and accurately updated quadtree map.

[0093] In some embodiments, updating the cost value of the target area according to the fused map to obtain an updated quadtree map includes the following steps:

[0094] S431: Determine the cost value of the overlapping leaf nodes in the fused map;

[0095] S432: updating the cost values of the overlapping leaf nodes in the quadtree map in the target area of the quadtree map according to the cost values of the overlapping leaf nodes in the fused map to obtain an updated quadtree map.

[0096] In S431, in some embodiments, the cost value of the overlapping leaf node in the fused map is the cost value of the grid covered by the overlapping leaf node in the fused map. In some embodiments, the cost value of the overlapping leaf node in the fused map is the average cost value of the grid covered by the overlapping leaf node in the fused map.

[0097] In S432, this embodiment replaces the cost values of overlapping leaf nodes in the fused map with their cost values in the quadtree map in the target area of the quadtree map, thereby obtaining an updated quadtree map. This embodiment can locally update the cost values of the quadtree map based on the fused map, which is a relatively fast update method.

[0098] In order to elaborate on the process of updating the original state of the quadtree map, this embodiment combines Figure 6a This is elaborated in detail as follows:

[0099] See also Figure 6a The original quadtree map is used as the root node Root. This embodiment performs a quadtree split on the root node Root to obtain nodes A, B, C, and D. The root node Root, node A, and node B are all mixed nodes, node C is an occupied leaf node, and node D is an idle leaf node. This embodiment further splits the mixed nodes, where node A can be split into nodes E, F, G, and H, and node B can be split into nodes I, J, K, and L.

[0100] After the local cost map is fused into the original quadtree map, this embodiment needs to update the cost values of the target area in the quadtree map that overlaps with the local cost map. Referring to Figure 6, after fusion, nodes E, F, G, I, and L are all leaf nodes and overlap with the local cost map. Therefore, this embodiment needs to recalculate the cost values of nodes E, F, G, I, and L based on the fused map. In addition, node D changes from an idle leaf node to a hybrid node. This embodiment needs to further split node D to obtain nodes M, N, O, and P. Since nodes M, N, O, and P are all leaf nodes and overlap with the local cost map, this embodiment needs to recalculate the cost values of nodes M, N, O, and P based on the fused map.

[0101] In some embodiments, generating a target path based on the updated quadtree map includes the following steps: determining a starting point and a target point, and generating the target path on the updated quadtree map based on a preset path planning algorithm, the starting point and the target point.

[0102] According to a preset path planning algorithm, a starting point and a target point, generating a target path on an updated quadtree map includes the following steps: performing multiple potential field expansion operations on the updated quadtree map to obtain multiple path points, the previous potential field expansion operation includes at least one neighbor node adjacent to the central node, determining that the neighbor node that meets the preset constraint conditions is the central node of the next potential field expansion operation, the central node of the first potential field expansion operation is the starting point, and one of the neighbor nodes of the last potential field expansion operation is the target point, the central node and at least one of the neighbor nodes are both idle leaf nodes, and generating a target path according to the starting point, multiple path points and the target point.

[0103] After completing the path planning operation, the method further includes restoring the updated quadtree map back to its original state. The restoration operation is the reverse process of the update operation. This embodiment can restore the updated quadtree map back to its original state to facilitate subsequent global planning or global replanning by the electronic device.

[0104] In some embodiments, restoring the updated quadtree map back to the original quadtree map includes the following steps: determining candidate areas in the updated quadtree map that overlap with the local cost map, and restoring the cost values of the candidate areas back to the original cost values according to the global cost map to obtain the quadtree map in the original state.

[0105] The updated quadtree map is configured with multiple nodes distributed according to different levels. Determining the candidate area in the updated quadtree map that overlaps with the local cost map includes the following steps: determining a positional affiliation between the candidate node and the local cost map, and determining the candidate area based on the positional affiliation, where the candidate node is a node in the updated quadtree map.

[0106] Determining the positional subordination relationship between the candidate node and the local cost map includes the following steps: judging whether the position of the reference grid falls within the candidate node, where the reference grid is one of the multiple grids of the local cost map; if so, determining that the positional subordination relationship is a positional inclusion relationship; if not, determining that the positional subordination relationship is a positional non-inclusion relationship.

[0107] Determining the candidate area according to the positional subordination relationship includes: if the positional subordination relationship is a positional inclusion relationship, determining the candidate area according to the attributes of the candidate node; if the positional subordination relationship is a positional non-inclusion relationship, ending the checking operation on the candidate node.

[0108] Restoring the cost value of the candidate region back to the original cost value based on the global cost map includes the following steps:

[0109] If the attribute of the candidate node is a mixed node attribute, obtain the child set of the candidate node, the child set of the candidate node includes multiple child nodes divided by the candidate node, select a child node from the child set of the candidate node as a new candidate node, and return to the step of determining the positional dependency relationship between the candidate node and the local cost map.

[0110] If the attribute of the candidate node is an idle leaf node attribute and there is no child set under the candidate node, the cost value of the candidate node is restored to the original cost value according to the global cost map.

[0111] If the attribute of the candidate node is an idle leaf node attribute and there is a child set under the candidate node, the child set of the candidate node is deleted.

[0112] This embodiment can accurately and reliably restore the updated quadtree map to the original quadtree map according to the attributes of the candidate nodes.

[0113] In order to elaborate on the process of restoring the updated quadtree map, this embodiment combines Figure 6b This is elaborated in detail as follows:

[0114] See also Figure 6b The updated quadtree map is used as the root node Root. Since the root node Root is a mixed node, this embodiment selects the child set of the root node Root. The child set of the root node Root includes node A, node B, node C, and node D.

[0115] In this embodiment, node A is a candidate node, node A is a hybrid node, and this embodiment continues to select the child set of node A, which includes node E, node F, node G, and node H.

[0116] When nodes E, F, and G are all candidate nodes in order, and all have the idle leaf node attribute and no child set, the costs of nodes E, F, and G are restored to their original costs based on the global cost map. The same operation is performed on node B's children, nodes I and L, and is not repeated here.

[0117] When node D is taken as a candidate node, since node D is an idle leaf node in the original quadtree map and node D has child nodes M, N, O and P, this embodiment deletes the child nodes M, N, O and P of node D.

[0118] After the above operations, this embodiment can restore the updated quadtree map back to the quadtree map in its original state.

[0119] In order to elaborate on the process of updating and restoring the quadtree map, this embodiment combines Figure 7 and Figure 8 This is elaborated in detail as follows:

[0120] When obstacles appear in the local costmap that do not exist in the global costmap, see Figure 7 The obstacles 71, 72 and 73 are shown in the quadtree map as Figure 7 As shown. Figure 7 As shown, before the quadtree map is updated, the idle leaf nodes corresponding to the positions of obstacles 71, 72 and 73 are not further split, and the cost values of the nodes corresponding to the positions of obstacles 71, 72 and 73 are not updated.

[0121] See also Figure 8 , this embodiment integrates the local cost map into the quadtree map and needs to update the cost value. Therefore, according to the methods provided in the above embodiments, the idle leaf nodes corresponding to the positions of obstacles 71, 72 and 73 will be further divided, such as Figure 8 As shown in the figure, the originally larger idle leaf node is occupied by an obstacle. In order to update the cost value, this embodiment further divides the originally larger idle leaf node, thereby obtaining the following: Figure 8 As shown in the updated quadtree map, this embodiment can plan a path with high robustness and high security based on the updated quadtree map.

[0122] Similarly, this embodiment adopts the reduction method provided by each of the above embodiments to Figure 8 The updated quadtree map shown is restored back to Figure 7 The quadtree map in its original state is shown.

[0123] In some embodiments, obtaining a quadtree map includes the following steps: obtaining a global cost map, the global cost map is configured with a root node, setting the root node as the current expansion node, determining whether the current expansion node is a leaf node, if not, dividing the area corresponding to the current expansion node into multiple child nodes according to the quadtree splitting method, and setting each child node as the current expansion node, returning to the step of determining whether the current expansion node is a leaf node, if so, selecting another node as the current expansion node, and returning to the step of determining whether the current expansion node is a leaf node.

[0124] Setting the root node as the current expansion node includes configuring expansion level information and root location information for the root node. Configuring the expansion level information for the root node includes initializing the expansion level information to 0, adding the expansion level information to the natural number 1, and obtaining the expansion level information for the root node. The quadtree map is configured with a coordinate system, and configuring the root location information for the root node includes setting the origin of the coordinate system as the root location information for the root node.

[0125] For example, initialize the root node of the quadtree map as root_. Define the root node of the quadtree as root_. Define the extended level information node_id and initialize the extended level information node_id to 0. Set the id_ of root_ to node_id, and then add node_id to the natural number 1 to obtain the extended level information of the root node. The extended level information node_id is a global variable. The x_ and y_ coordinates of root_ are taken as 0, the width w_ of the root node is 2^level, and root_ is represented as the current extended node. Here, level is the number of layers of the quadtree map, and the value of level is: 2^level >= max_size and 2^(level - 1) < max_size, where max_size is the maximum value of the width and height of the global cost map.

[0126] Please refer to Figure 9 , the global cost map is configured with the root node Root, and in this embodiment, the root node Root is set as the current extended node. Since the current extended node is a mixed node, a mixed node is a node that contains at least two grid states. For example, the root node Root contains free grids and occupied grids.

[0127] Please refer to Figure 9 , in this embodiment, the area corresponding to the root node Root (the current extended node) is divided into 4 child nodes according to the quadtree splitting method. The 4 child nodes are node A, node B, node C, and node D respectively. Node A and node B are both mixed nodes, node C is an occupied leaf node, that is, all the grids contained in node C are occupied grids, and node D is a free leaf node, that is, all the grids contained in node D are free grids. Since node C and node D are both leaf nodes, in this embodiment, node C or node D will not be further split according to the quadtree splitting method.

[0128] In this embodiment, node A and node B are sequentially used as the current extended nodes. For each current extended node, this embodiment needs to return the step of judging whether the current extended node is a leaf node.

[0129] Please refer to Figure 9 , taking node A as an example, since node A is a mixed node, that is, node A is not a leaf node, in this embodiment, the area corresponding to node A (the current extended node) is divided into 4 child nodes according to the quadtree splitting method. The 4 child nodes are node E, node F, node G, and node H respectively. Node E, node F, and node G are all free leaf nodes, and node H is an occupied leaf node. Since node E, node F, node G, and node H are all leaf nodes, in this embodiment, node E, node F, node G, and node H will not be further split according to the quadtree splitting method.

[0130] Similarly, taking node B as an example, since node B is a mixed node, that is, node B is not a leaf node, this embodiment divides the area corresponding to node B (the current expansion node) into 4 child nodes according to the quadtree segmentation method. The 4 child nodes are node I, node J, node K and node L. Node I and node L are both idle leaf nodes, node J is an occupied leaf node, and node K is a mixed node. Since node I, node J and node L are all leaf nodes, this embodiment will not continue to segment nodes I, node J and node L according to the quadtree segmentation method. However, node K is a mixed node, and this embodiment also needs to use the quadtree segmentation method to segment the area corresponding to node K into 4 child nodes, which will not be repeated here.

[0131] See also Figure 10 In general, the root node Root can be divided into node A, node B, node C and node D according to the quadtree partitioning method. Then node A and node B are mixed nodes, and node C and node D are leaf nodes. Therefore, node A can be divided into node E, node F, node G and node H according to the quadtree partitioning method, and node B can be divided into node I, node J, node K and node L according to the quadtree partitioning method.

[0132] After dividing the area corresponding to the current expansion node into a plurality of child nodes in a quadtree partitioning manner, the method further includes: configuring child position information and child level information for each child node.

[0133] Configuring child position information for each child node includes: calculating the child position information of the child node according to the position of the child node within the current expanded node. Configuring child level information for each child node includes: adding a natural number 1 to the current expanded level information to obtain the child level information.

[0134] For example, this embodiment defines the following variables:

[0135] Id_: used to describe the id of each node.

[0136] x_: represents the x coordinate of the lower left corner of each node in the global cost map.

[0137] y_: represents the y coordinate of the lower left corner of each node in the global cost map.

[0138] w_: represents the width of each node.

[0139] nw_: indicates the child node at the bottom left of the current expansion node. Figure 9 In the figure, the lower left child node nw_ is node C.

[0140] ne_: indicates the child node at the bottom right of the current expanded node. Figure 9 In the figure, the lower right child node ne_ is node D.

[0141] sw_: indicates the child node on the upper left of the current expanded node. Figure 9 In the figure, the upper left child node sw_ is node A.

[0142] se_: represents the child node to the upper right of the current expanded node. Figure 9 In the figure, the upper right child node se_ is node B.

[0143] The id_ of the lower left child node nw_ is assigned to the child's node_id, which is then incremented by 1. The child's position information is as follows: the x_ of the lower left child node nw_ is assigned to the x_ of the current expanded node, the y_ is assigned to the y_ of the current expanded node, and the width w_ is assigned to the w_ / 2 of the current expanded node.

[0144] The id_ of the child node ne_ in the lower right corner is assigned the node_id of the child, which is then incremented by 1. The child's position information is as follows: the x_ of the child node ne_ in the lower right corner is assigned the value of the current expanded node's x_ + the current expanded node's w_ / 2, the y_ is assigned the value of the current expanded node's y_, and the width w_ is assigned half of the current expanded node's w_.

[0145] The id_ of the top-left child node sw_ is assigned the node_id of the child hierarchy, and then the node_id of the child hierarchy is incremented by 1. The child's position information is: the x_ of the top-left child node sw_ is assigned the x_ of the current expanded node, the y_ is assigned the y_ of the current expanded node + the w_ / 2 of the current node, and the width w_ is assigned half of the w_ of the current expanded node.

[0146] The id_ of the top-right child node se_ is assigned the node_id of the child hierarchy, and then the node_id of the child hierarchy is incremented by 1. The child's position information is: the x_ of the top-right child node se_ is assigned the value of the current node's x_ + the current expanded node's w_ / 2, the y_ is assigned the value of the current node's y_ + the current node's w_ / 2, and the width w_ is assigned half of the current expanded node's w_.

[0147] In some embodiments, in order to facilitate determination of the neighbor set of each target idle leaf node, this embodiment constructs a sibling set of each child node in advance, where the sibling set includes the child node and multiple sibling nodes at the same level as the child node.

[0148] This embodiment defines the variable Brothers_. For the lower-left child node nw_, this embodiment stores the id_ of the lower-left child node nw_, the lower-right child node ne_, the upper-left child node sw_, and the upper-right child node se_ in the variable Brothers_ of the lower-left child node nw_. Similarly, for the lower-right child node ne_, this embodiment stores the id_ of the lower-right child node ne_, the lower-left child node nw_, the upper-left child node sw_, and the upper-right child node se_ in the variable Brothers_ of the lower-right child node ne_. This process is deduced and will not be further elaborated here.

[0149] This embodiment decomposes all nodes in the quadtree map in the above manner until there are no more decomposable nodes in the entire quadtree map, and the construction of the quadtree map is completed.

[0150] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of this application, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, or may be executed interchangeably, etc.

[0151] As another aspect of the present invention, an embodiment of the present invention provides a path planning device. The path planning device may be a software module comprising a plurality of instructions stored in a memory, which a processor may access and execute to implement the path planning methods described in the various embodiments above.

[0152] In some embodiments, the path planning device can also be constructed from hardware devices. For example, the path planning device can be constructed from one or more chips, and the chips can work in coordination with each other to complete the path planning methods described in the above embodiments. For another example, the path planning device can also be constructed from various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0153] See also Figure 11 The path planning device 130 includes a map acquisition module 131 , an overlap determination module 132 , a map update module 133 and a path planning module 134 .

[0154] The map acquisition module 131 is used to obtain a fused map and a quadtree map. The fused map is a map obtained by fusing the local cost map detected by the electronic device with the global cost map. The overlap determination module 132 is used to determine the target area in the quadtree map that overlaps with the local cost map. The map update module 133 is used to update the cost value of the target area based on the fused map, thereby obtaining an updated quadtree map. The path planning module 134 is used to generate a target path based on the updated quadtree map.

[0155] In some embodiments, the quadtree map is configured with multiple nodes distributed at different levels, and the overlap determination module 132 is specifically used to: determine the positional subordination relationship between the target node and the local cost map, the target node is a node in the quadtree map, and the target area is determined based on the positional subordination relationship.

[0156] In some embodiments, the positional dependency includes a positional inclusion relationship and a positional non-inclusion relationship, the local cost map includes multiple grids, and the overlap determination module 132 is specifically used to determine whether the position of the reference grid falls within the target node, the reference grid being one of the multiple grids in the local cost map; if so, the positional dependency is determined to be a positional inclusion relationship; if not, the positional dependency is determined to be a positional non-inclusion relationship.

[0157] In some embodiments, the positional subordination relationship includes a positional inclusion relationship and a positional non-inclusion relationship. The overlap determination module 132 is specifically used to: if the positional subordination relationship is a positional inclusion relationship, determine the target area according to the attributes of the target node; if the positional subordination relationship is a positional non-inclusion relationship, end the inspection operation on the target node.

[0158] In some embodiments, the target area includes multiple overlapping leaf nodes, and the overlap determination module 132 is specifically used to: if the attribute of the target node is a mixed node attribute, obtain the child set of the target node, the child set of the target node includes multiple child nodes divided by the target node, select a child node in the child set of the target node as the new target node, return to determine the positional subordination relationship between the target node and the local cost map, if the attribute of the target node is an idle leaf node attribute, determine whether the target node contains an obstacle area mapped from the local cost map to the quadtree map, obtain a judgment result, and determine the target area based on the judgment result. If the attribute of the target node is an occupied leaf node attribute, determine that the target node is an overlapping leaf node.

[0159] In some embodiments, the judgment result includes a result including an obstacle and a result not including an obstacle. The overlap determination module 132 is specifically used to: determine whether the obstacle area of the local cost map is mapped to the target node. If so, generate a result including an obstacle; if not, generate a result not including an obstacle.

[0160] In some embodiments, the judgment result includes a result that includes an obstacle and a result that does not include an obstacle. The overlap determination module 132 is specifically used to: if the judgment result is a result that includes an obstacle, create a child set belonging to the target node, the child set includes multiple child nodes divided from the target node, select a child node in the child set as a new target node, and return to determine the positional subordination relationship between the target node and the local cost map; if the judgment result is a result that does not include an obstacle, determine that the target node is an overlapping leaf node.

[0161] In some embodiments, the target area includes multiple overlapping leaf nodes, and the map update module 133 is specifically used to: determine the cost value of the overlapping leaf nodes in the fused map, and update the cost value of the overlapping leaf nodes in the quadtree map in the target area of the quadtree map according to the cost value of the overlapping leaf nodes in the fused map to obtain an updated quadtree map.

[0162] In some embodiments, after completing the path planning operation, please continue to refer to Figure 11 The path planning device 130 further includes a map restoration module 135, which is used to restore the updated quadtree map back to the original quadtree map.

[0163] It should be noted that the above-mentioned path planning device can execute the path planning method provided in the embodiment of this application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiment of the path planning device, please refer to the path planning method provided in the embodiment of this application.

[0164] See also Figure 12 , Figure 12 Schematic diagram of a robot structure provided in an embodiment of the present application. The robot 140 includes one or more processors 141 and a memory 142. The memory 142 is connected to the one or more processors 141, for example, via a bus.

[0165] The processor 141 is configured to support the robot in executing the corresponding functions of the method in the above method embodiment. The processor can be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0166] Memory 142 is used to store program code, etc. Memory can include volatile memory (VM), such as random access memory (RAM); non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the aforementioned types of memory.

[0167] Memory 142 can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as the program instructions / modules corresponding to the path planning method in the embodiments of the present application. The processor executes the non-volatile software programs, instructions, and modules stored in the memory to perform various functional applications and data processing of the path planning method and path planning device, thereby implementing the functions of the path planning method and the various modules or units of the path planning device provided in the above-mentioned method embodiments.

[0168] The memory 142 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data generated based on the use of the route planning device. In some embodiments, the memory may optionally include a remote memory located relative to the processor, and such remote memory may be connected to the route planning device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0169] The one or more modules are stored in the memory, and when executed by the one or more processors, the path planning method in any of the above method embodiments is executed, for example, the method steps described in the above method embodiments are executed to realize the functions of the modules described in the above device embodiments.

[0170] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method as described in the above embodiment.

[0171] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0172] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A path planning method, applied to an electronic device, characterized in that: include: Acquire a fused map and a quadtree map, wherein the fused map is a map obtained by fusing a local cost map detected by the electronic device with a global cost map; Determining a target area in the quadtree map that overlaps with the local cost map; updating the cost value of the target area according to the fused map to obtain an updated quadtree map; A target path is generated according to the updated quadtree map.

2. The method according to claim 1, characterized in that The quadtree map is configured with a plurality of nodes distributed according to different levels, and determining the target area in the quadtree map that overlaps with the local cost map includes: Determining a positional dependency relationship between a target node and the local cost map, the target node being a node in the quadtree map; A target area is determined according to the position dependency.

3. The method according to claim 2, characterized in that The position dependency relationship includes a position inclusion relationship and a position non-inclusion relationship, the local cost map includes a plurality of grids, and determining the position dependency relationship between the target node and the local cost map includes: Determine whether a position of a reference grid falls within the target node, the reference grid being one of the plurality of grids in the local cost map; If so, determining that the position affiliation relationship is a position inclusion relationship; If not, it is determined that the position affiliation is a position non-inclusion relationship.

4. The method according to claim 2, characterized in that The position dependency relationship includes a position inclusion relationship and a position non-inclusion relationship, and determining the target area according to the position dependency relationship includes: If the positional affiliation is a positional inclusion relationship, determining the target area according to the attributes of the target node; If the position affiliation is a position non-inclusion relationship, the checking operation on the target node is terminated.

5. The method according to claim 4, characterized in that The determining of the target area according to the attribute of the target node includes: If the attribute of the target node is a mixed node attribute, obtaining a child set of the target node, the child set of the target node including multiple child nodes divided from the target node, selecting a child node from the child set of the target node as a new target node, and returning to the step of determining a positional dependency relationship between the target node and the local cost map; If the attribute of the target node is an idle leaf node attribute, determine whether the target node contains the obstacle area mapped from the local cost map to the quadtree map, obtain a judgment result, and determine the target area based on the judgment result.

6. The method according to claim 5, characterized in that The judgment result includes a result of including obstacles and a result of not including obstacles. The judgment of whether the target node includes an obstacle area mapped from the local cost map to the quadtree map includes: Determining whether the obstacle area of the local cost map is mapped to the target node; If so, generate a result including obstacles; If not, a result without obstacles is generated.

7. The method according to claim 5, characterized in that The target area includes a plurality of overlapping leaf nodes, the judgment result includes a result of including an obstacle and a result of not including an obstacle, and determining the target area according to the judgment result includes: If the judgment result is that an obstacle is included, a child set belonging to the target node is created, the child set including multiple child nodes divided from the target node, a child node is selected from the child set as a new target node, and the process returns to the step of determining the positional dependency relationship between the target node and the local cost map; If the judgment result is that no obstacle is included, the target node is determined to be an overlapping leaf node.

8. The method according to claim 1, characterized in that The target area includes a plurality of overlapping leaf nodes, and updating the cost value of the target area according to the fused map to obtain an updated quadtree map includes: Determine the cost value of the overlapping leaf nodes in the fused map; According to the cost values of the overlapping leaf nodes in the fused map, the cost values of the overlapping leaf nodes in the quadtree map are updated in the target area of the quadtree map to obtain an updated quadtree map.

9. The method according to any one of claims 1 to 8, characterized in that After the path planning operation is completed, the method further includes: restoring the updated quadtree map back to the quadtree map in the original state.

10. A robot, characterized in that: The robot comprises a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the robot implements the path planning method according to any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the path planning method according to any one of claims 1 to 9.