Path planning method based on quadtree map and robot
Through the method of quad-tree map and neighbor collection, the problem of low path planning efficiency of large-area raster maps is solved, and efficient path planning and robot operation efficiency are achieved.
Patent Information
- Application Number
- CN202410131362.8
- 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
The path planning method based on grid maps in the prior art is inefficient on large-area maps, resulting in a decrease in robot operation efficiency.
The path planning is performed using a quad-tree map. By obtaining the free leaf nodes and their neighbor collections in the quad-tree map, the offline path planning algorithm is used such as the A* algorithm or the Digestella algorithm to reduce the number of search grids.
It improves path planning efficiency, enhances the robot's operating efficiency, and meets the needs of offline path planning.
Smart Images

Figure CN120445237A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of path planning technology, and in particular to a path planning method and robot based on a quadtree map. Background Art
[0002] Robots provided by related technologies typically perform path planning and navigation based on a grid map, where the grid map consists of multiple grids of the same size. The robot can perform path planning on the grid map using a related path planning algorithm. However, when the grid map is large, the grid size is small and the number of grids contained in the grid map is very large. Therefore, the robot needs to continuously search for smaller grids on the grid map when planning its path. This path planning method is time-consuming and inefficient, 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 and robot based on a quadtree map to solve the technical problem of low path planning efficiency in related technologies.
[0004] In a first aspect, an embodiment of the present application provides a path planning method based on a quadtree map, comprising:
[0005] Obtain a quadtree map, wherein the quadtree map includes multiple idle leaf nodes, the idle leaf nodes are leaf nodes in an idle state, each of the leaf nodes includes at least one grid, and the states of all grids contained in the leaf node are the same. Determine a neighbor set of each target idle leaf node according to the quadtree map, the target idle leaf node is an idle leaf node among the multiple idle leaf nodes, and plan a path according to the neighbor set and a preset path planning algorithm.
[0006] Optionally, the quadtree map is configured with a plurality of nodes distributed according to different hierarchies, the neighbor set includes at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node, and determining the neighbor set of each target idle leaf node according to the quadtree map includes:
[0007] Determining a target node from among the multiple nodes of the quadtree map according to a preset hierarchical distribution order, wherein the target node is configured with a target sibling set and a target child set, wherein the target sibling set includes the target node and multiple sibling nodes at the same level as the target node, and the target child set includes multiple child nodes divided from the target node;
[0008] At least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node is determined according to the attributes of the brother node and the attributes of the child node.
[0009] Optionally, determining, based on the attributes of the sibling node and the attributes of the child node, at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node includes:
[0010] According to the attributes of the brother node, among the multiple nodes subordinate to the brother node and the brother node, traverse the node that satisfies the neighbor relationship with the child node and has the attribute of an idle leaf attribute as the target idle leaf node;
[0011] According to the attributes of the child node, among the multiple nodes subordinate to the child node and the child node, the nodes that satisfy the neighbor relationship with the target idle leaf node and have the idle leaf attribute are traversed as neighbor idle leaf nodes.
[0012] Optionally, according to the attribute of the brother node, traversing, among the multiple nodes subordinate to the brother node and the brother node, a node that satisfies a neighbor relationship with the child node and has an attribute of an idle leaf as a target idle leaf node includes:
[0013] Set the brother node as the first current node;
[0014] Determine whether the attribute of the first current node is an idle leaf attribute;
[0015] If the attribute of the first current node is an idle leaf attribute, and the distance between the first current node and the child node satisfies a neighbor relationship, determining that the first current node is a target idle leaf node;
[0016] If the attribute of the first current node is not an idle leaf attribute, determine the child set subordinate to the first current node, the child set of the first current node includes multiple child nodes divided from the first current node, select any child node in the child set of the first current node as the first current node, and return to the step of determining whether the attribute of the first current node is an idle leaf attribute.
[0017] Optionally, according to the attribute of the child node, traversing the nodes that satisfy a neighbor relationship with the target idle leaf node and have an idle leaf attribute as neighbor idle leaf nodes among multiple nodes subordinate to the child node and the child node includes:
[0018] Set the child node of the target node as the second current node;
[0019] Determine whether the attribute of the second current node is an idle leaf attribute;
[0020] If the attribute of the second current node is an idle leaf attribute, and the distance between the second current node and the target idle leaf node satisfies a neighbor relationship, determining that the second current node is a neighbor idle leaf node;
[0021] If the attribute of the second current node is not an idle leaf attribute, determine the child set subordinate to the second current node, select any child node from the child set of the second current node as the second current node, and return to the step of determining whether the attribute of the second current node is an idle leaf attribute.
[0022] Optionally, the quadtree map is configured with a coordinate system;
[0023] If the horizontal center distance between the two nodes in the x-axis direction of the coordinate system is less than or equal to half of the total width of the two nodes, and the vertical center distance between the two nodes in the y-axis direction of the coordinate system is less than or equal to half of the total height of the two nodes, then the two nodes satisfy a neighbor relationship.
[0024] Optionally, before determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node, the method further includes:
[0025] Determine whether the brother node and the child node meet the neighbor trigger condition;
[0026] If so, proceed to the step of determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node;
[0027] If not satisfied, stop the operation.
[0028] Optionally, the determining whether the brother node and the child node meet a neighbor trigger condition includes:
[0029] Determine whether the level of the brother node is greater than the level of the child node;
[0030] If it is greater than, it is determined that the brother node and the child node meet the neighbor trigger condition;
[0031] If not, it is determined that the brother node and the child node do not meet the neighbor trigger condition.
[0032] Optionally, the method further includes:
[0033] When it is detected that each node in the quadtree map is configured with a corresponding neighbor set, the sibling set of each node in the quadtree map is deleted. Since the sibling nodes of the sibling set are used to obtain the neighbor set of each idle leaf node, once the neighbor set of each idle leaf node is determined, in order to save memory, this embodiment can delete the sibling set of each node.
[0034] Optionally, planning a path according to the neighbor set and a preset path planning algorithm includes:
[0035] Get the starting point and target point;
[0036] A potential field expansion operation is performed starting from the neighbor set of the starting point according to a preset path planning algorithm to expand to the target point to obtain a path.
[0037] Optionally, obtaining a quadtree map includes:
[0038] Obtaining an original map, wherein the original map is configured with a root node;
[0039] Set the root node as the current expansion node;
[0040] Determine whether the current expansion node is a leaf node;
[0041] If not, then divide the area corresponding to the current expansion node into multiple child nodes according to the quadtree partitioning method, and set each child node as the current expansion node, and return to the step of determining whether the current expansion node is a leaf node;
[0042] If so, another node is selected as the current expansion node, and the process returns to the step of determining whether the current expansion node is a leaf node.
[0043] 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 method.
[0044] In a third aspect, an embodiment of the present application 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 processor, the processor executes the above method.
[0045] The embodiments of the present application can achieve the following technical effects: In the path planning method based on the quadtree map provided in the embodiments of the present application, a quadtree map is obtained, wherein the quadtree map includes a plurality of idle leaf nodes, the idle leaf nodes are leaf nodes in an idle state, each leaf node includes at least one grid, and the states of all grids contained in the leaf node are the same. The neighbor set of each idle leaf node is determined according to the quadtree map, and the path is planned according to the neighbor set and the preset path planning algorithm. This embodiment can determine the neighbor set of each idle leaf node in advance. Therefore, this embodiment can plan the path offline without the need to try out suitable neighbor nodes online in real time to search for the path, which is conducive to meeting the needs of offline path planning. Since the grids of the quadtree map are relatively large, the number of grids of the quadtree map will be relatively less than the number of grids of the original map. This embodiment will relatively reduce the number of excessive grids to be searched when planning the path, thereby improving the efficiency of path planning and thereby improving the operating efficiency of the robot. In addition, the quadtree map is a variant map relative to the original map. This embodiment, based on the variant quadtree map, can also perform path planning using the neighbor set of each idle leaf node, thereby ensuring that the path planning operation can proceed smoothly. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] 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.
[0047] Figure 1 A schematic diagram of a flow chart of a path planning method based on a quadtree map provided in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of a grid map provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of a route planned using a grid map provided by relevant technologies;
[0050] Figure 4 A schematic diagram of a route planned using a quadtree map according to an embodiment of the present application;
[0051] Figure 5a 、 Figure 5b 、 Figure 5c and Figure 5d Schematic diagrams of the process of generating a quadtree map by using a quadtree segmentation method according to an embodiment of the present application;
[0052] Figure 6A schematic diagram of the structure of a path planning device based on a quadtree map provided in an embodiment of the present application;
[0053] Figure 7 A schematic structural diagram of a robot provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] 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.
[0055] 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.
[0056] Related technologies use grid maps for path planning, where the grid map consists of multiple grids of the same size. When the grid map is large, the grid size is small and the number of grids contained in the grid map is very large. When the robot plans the path, it needs to continuously search for smaller grids on the grid map. This path planning method is time-consuming and inefficient.
[0057] The embodiment of the present application can generate a quadtree map based on the grid map. The size of each node of the quadtree map will be larger than the grid size of the grid map. Then, a neighbor set is found based on the quadtree map. The idle leaf nodes in the neighbor set satisfy the neighbor relationship. Finally, based on the A* algorithm or the Dijkstra algorithm, the constructed neighbor set is used to plan the path offline, which can improve the efficiency of path planning.
[0058] The present application embodiment provides a path planning method based on a quadtree map. Figure 1 ,The path planning method based on quadtree map includes the following steps:
[0059] S11: Get the quadtree map.
[0060] In this step, the quadtree map is a map obtained by dividing the original map into a quadtree. The quadtree map includes a plurality of idle leaf nodes, where the idle leaf nodes are leaf nodes in an idle state. It is understood that the sizes of the plurality of idle leaf nodes may be the same or different.
[0061] Each leaf node contains at least one grid, and all grids contained in a leaf node have the same state. Grid states include idle, occupied, and unknown. Idle is when there are no obstacles occupying it, occupied is when there are obstacles occupying it, and unknown is when the robot has not yet detected an area. When a grid is idle, it is considered an idle grid. When it is occupied, it is considered an occupied grid. When it is unknown, it is considered an unknown grid.
[0062] See also Figure 2 ,like Figure 2 As shown, idle grids are represented by white, occupied grids are represented by black, and unknown grids are represented by gray.
[0063] The quadtree map is configured with multiple nodes, each of which may include one grid or more than two grids. As mentioned above, 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 in the node are the same, the node is a leaf node.
[0064] 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.
[0065] S12: Determine a neighbor set of each target idle leaf node according to the quadtree map, where the target idle leaf node is an idle leaf node among the multiple idle leaf nodes.
[0066] In this step, the neighbor set is the set of neighbor idle leaf nodes adjacent to the target idle leaf node, and the neighbor idle leaf node is the idle leaf node adjacent to the target idle leaf node. In this embodiment, in the process of determining the neighbor set, any idle leaf node in the quadtree map can be selected as the target idle leaf node, and the neighbor set is further searched based on the target idle leaf node.
[0067] S13: Plan a path based on the neighbor set and a preset path planning algorithm.
[0068] In this step, the preset path planning algorithm may be an A* algorithm or a Dijkstra algorithm. Planning a path based on the neighbor set and the preset path planning algorithm includes obtaining a starting point and a target point, and performing a potential field expansion operation from the neighbor set of the starting point to the target point according to the preset path planning algorithm to obtain a path.
[0069] According to a preset path planning algorithm, a potential field expansion operation is performed starting from the neighbor set of the starting point to expand to the target point, and the path obtained includes: performing multiple potential field expansion operations between the starting point and the target point according to the preset path planning algorithm to obtain multiple path points, and generating a path based on the starting point, multiple path points and the target point, wherein the last potential field expansion operation includes determining, among at least one neighbor node adjacent to the central node, a neighbor node that meets the minimum cost condition as 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, and the central node and at least one neighbor node are both idle leaf nodes.
[0070] See also Figure 3 ,Related technology plans a path 33 on an original map 30 according to a given starting point 31 and a target point 32.
[0071] See also Figure 4 In this embodiment, a path 33 is planned on the quadtree map 40 according to a given starting point 31 and a target point 32. Since the grids of the quadtree map are relatively large, relatively speaking, the number of grids of the quadtree map will be less than the number of grids of the original map. In this embodiment, the number of excessive grids to be searched will be relatively reduced when planning the path, thereby improving the efficiency of path planning and further improving the operating efficiency of the robot. In addition, the quadtree map is a variant map relative to the original map. Based on the variant quadtree map, this embodiment can also use the neighbor set of each idle leaf node for path planning, thereby ensuring that the path planning operation can proceed smoothly. In addition, this embodiment can determine the neighbor set of each idle leaf node in advance. Therefore, this embodiment can plan the path offline without the need to try out suitable neighbor nodes online in real time to search for the path, which is conducive to meeting the needs of offline path planning.
[0072] In some embodiments, obtaining a quadtree map includes the following steps: obtaining an original map, where the original 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, splitting 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, then 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.
[0073] Setting the root node as the current expansion node includes: configuring expansion level information and root position information for the root node. Configuring 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 to obtain the expansion level information of the root node. The quadtree map is configured with a coordinate system. Configuring root position information for the root node includes: taking the origin of the coordinate system as the root position information of the root node.
[0074] For example, initialize the root node of the quadtree map as root_. Define the root node of the quadtree as root_. Define the expansion level information node_id and initialize the expansion level information node_id to 0. Set the id_ of root_ as node_id, and then add node_id to the natural number 1 to obtain the expansion level information of the root node. The expansion level information node_id is a global variable. Take the x_ and y_ coordinates of root_ as 0, the width w_ of the root node is 2^level, and represent root_ as the current expansion 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 original map.
[0075] Please refer to Figure 5a , the original map is configured with a root node Root, and in this embodiment, the root node Root is set as the current expansion node. Since the current expansion 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.
[0076] Please refer to Figure 5bIn this embodiment, the area corresponding to the root node Root (the current expansion node) is divided into four child nodes according to the quadtree partitioning method. The four child nodes are node A, node B, node C, and node D. Node A and node B are both mixed nodes. Node C is an occupied leaf node, meaning that all the grids contained in node C are occupied grids. Node D is an idle leaf node, meaning that all the grids contained in node D are idle grids. Since both node C and node D are leaf nodes, this embodiment does not further partition node C or node D according to the quadtree partitioning method.
[0077] This embodiment sequentially uses node A and node B as current expansion nodes. For each current expansion node, this embodiment needs to return to the step of determining whether the current expansion node is a leaf node.
[0078] See also Figure 5c Taking node A as an example, since node A is a mixed node, that is, node A is not a leaf node, this embodiment divides the area corresponding to node A (the current expanded node) into four child nodes according to the quadtree partitioning method. The four child nodes are node E, node F, node G, and node H. Nodes E, node F, and node G are all idle leaf nodes, and node H is an occupied leaf node. Since nodes E, node F, node G, and node H are all leaf nodes, this embodiment does not continue to partition nodes E, node F, node G, and node H according to the quadtree partitioning method.
[0079] 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.
[0080] See also Figure 5d 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.
[0081] 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.
[0082] 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.
[0083] For example, this embodiment defines the following variables:
[0084] Id_: used to describe the id of each node.
[0085] x_: represents the x coordinate of the lower left corner of each node in the original map.
[0086] y_: represents the y coordinate of the lower left corner of each node in the original map.
[0087] w_: represents the width of each node.
[0088] nw_: indicates the child node at the bottom left of the current expansion node. Figure 5b In the figure, the lower left child node nw_ is node C.
[0089] ne_: indicates the child node at the bottom right of the current expanded node. Figure 5b In the figure, the lower right child node ne_ is node D.
[0090] sw_: indicates the child node on the upper left of the current expanded node. Figure 5b In the figure, the upper left child node sw_ is node A.
[0091] se_: represents the child node to the upper right of the current expanded node. Figure 5b In the figure, the upper right child node se_ is node B.
[0092] 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.
[0093] 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_.
[0094] 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.
[0095] 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_.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] In some embodiments, the path planning method based on the quadtree map further includes: detecting whether a node in the quadtree map is an occupied leaf node or an unknown leaf node, and deleting the occupied leaf node or the unknown leaf node. For example, if the lower left child node nw_ is a leaf node and is not an idle leaf node, it means that the lower left child node nw_ is an occupied leaf node or an unknown leaf node. Since the lower left child node nw_ is not helpful for path planning, this embodiment can delete the lower left child node nw_ to avoid memory usage, thereby improving path planning efficiency.
[0100] In some embodiments, a quadtree map is configured with a plurality of nodes distributed in different hierarchies, and a neighbor set includes at least one neighbor idle leaf node that satisfies a neighbor relationship with a target idle leaf node. The target idle leaf node is an idle leaf node selected during the process of determining the neighbor set, and the neighbor idle leaf node is an idle leaf node that satisfies a neighbor relationship with the target idle leaf node.
[0101] For example, please combine Figure 5c , node E, node F, node G and node H are adjacent, among which node E, node F and node G are all idle leaf nodes, and node H is an occupied leaf node. When this embodiment selects node E as the target idle leaf node, node F and node G respectively satisfy the neighbor relationship with node E, therefore, the neighbor set of node E includes node F and node G, that is, node F and node G are both neighbor idle leaf nodes of node E. When this embodiment selects node F as the target idle leaf node, node E, node G and node I respectively satisfy the neighbor relationship with node F, therefore, the neighbor set of node F includes node E, node G and node I. When this embodiment selects node L as the target idle leaf node, node D and node I respectively satisfy the neighbor relationship with node F, therefore, the neighbor set of node F includes node D and node I.
[0102] Determining the neighbor set of each target idle leaf node according to the quadtree map includes: determining the target node among multiple nodes of the quadtree map according to a preset hierarchical distribution order, the target node is configured with a target sibling set and a target child set, the target sibling set includes the target node and multiple sibling nodes at the same level as the target node, the target child set includes multiple child nodes divided from the target node, and according to the attributes of the sibling nodes and the attributes of the child nodes, determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node.
[0103] Before determining at least one neighboring idle leaf node that satisfies a neighbor relationship with the target idle leaf node, this embodiment determines whether the target node's sibling set is an empty set. If the target node's sibling set is an empty set, a child node is selected from the target child set of the subordinate target node as the new target node, and the process proceeds to the step of determining at least one neighboring idle leaf node that satisfies a neighbor relationship with the target idle leaf node. If the target node's sibling set is not an empty set, the process proceeds directly to the step of determining at least one neighboring idle leaf node that satisfies a neighbor relationship with the target idle leaf node.
[0104] For example, please combine Figure 5c In this embodiment, the root node root_ of the quadtree map is used as the target node according to the preset hierarchical distribution order. Since the sibling set of the root node root_ is an empty set, a child node is selected from the child set (A, B, C, D) of the subordinate root node root_ as the new target node. In this embodiment, a neighbor set search operation is performed on each child node. For example, this embodiment selects child node A, child node B, child node C, and child node D as the new target node in sequence.
[0105] When the target node is node A, the target sibling set of node A is (B, C, D), where for node A, sibling nodes B, C, and D all belong to the same level as node A. This embodiment performs a neighbor set search operation on each sibling node (represented by node i). For example, this embodiment selects sibling node B, C, and D in sequence to perform a neighbor set search operation. Through multiple recursions, the neighbor set of all idle leaf nodes in the quadtree map is eventually obtained.
[0106] When the target node is node A, the target child set of node A is (E, F, G, H). Child nodes E, F, G, and H all belong to the same level. This embodiment will perform a neighbor set search operation on each child node (represented by node j). For example, this embodiment will sequentially select child nodes E, F, G, and H to perform a neighbor set search operation. Through multiple recursions, the neighbor sets of all idle leaf nodes in the quadtree map will eventually be obtained.
[0107] This embodiment determines at least one neighboring idle leaf node that satisfies a neighbor relationship with the target idle leaf node based on the attributes of node i and node j. The attributes of a node are used to indicate whether the node is a leaf node or a hybrid node.
[0108] In some embodiments, before determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node, the method also includes: judging whether the brother node and the child node meet the neighbor trigger condition; if so, entering the step of determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node; if not, stopping the operation.
[0109] In some embodiments, determining whether a sibling node and a child node satisfy a neighbor trigger condition includes: determining whether the level of the child node is smaller than the level of the sibling node; if not, determining that the sibling node and the child node satisfy the neighbor trigger condition; if so, determining that the sibling node and the child node do not satisfy the neighbor trigger condition. Thus, in the process of determining the neighbor set, this embodiment only considers nodes with a level greater than that of the target node to perform a neighbor set search operation, thereby improving computational efficiency.
[0110] In some embodiments, based on the attributes of the sibling node and the attributes of the child node, determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node includes the following steps: based on the attributes of the sibling node, among multiple nodes and sibling nodes of the subordinate sibling node, traversing the nodes that satisfy the neighbor relationship with the child node and have the idle leaf attribute as the target idle leaf node; based on the attributes of the child node, among multiple nodes and child nodes of the subordinate child node, traversing the nodes that satisfy the neighbor relationship with the target idle leaf node and have the idle attribute as the leaf attribute as the neighbor idle leaf node.
[0111] Please combine Figure 5c , the target node is node A, node A's sibling node B (or sibling node C or sibling node D) is node i, and node A's child node F (or child node E or child node G or child node H) is node j. The nodes subordinate to node i include node I, node J, node K, node L, node i (itself), node x, etc., where node x is a node further divided by any node among node I, node J, node K, and node L according to the quadtree splitting method. For example, node K is a mixed node, so node K can be divided into node K1, node K2, node K3, and node K4. Therefore, node x is node K1, node K2, node K3, and node K4, and nodes K1, node K2, node K3, and node K4 are also subordinate to node i.
[0112] For node A, node j (i.e., node F) is a child node and a leaf node, and node I is a subordinate node of node i (i.e., sibling node B). Node j and node I have a neighbor relationship, so node I is the target idle leaf node.
[0113] When node I is the target idle leaf node, this embodiment searches for neighbor idle leaf nodes in the nodes in subordinate node j and in node j. When node j is child node E or child node G, although both child node E and child node G are leaf nodes (i.e., child node E has no child node belonging to child node E, and child node G has no child node belonging to child node G), neither child node E nor child node G meets the neighbor relationship with node I. Therefore, child node E and child node G are not neighbor idle leaf nodes.
[0114] When node j is child node F, child node F is a leaf node (that is, child node F has no child node belonging to child node F), and child node F and node I satisfy the neighbor relationship, therefore, child node F is a neighbor idle leaf node.
[0115] When node j is child node F, child node F is a leaf node (that is, child node F has no child node belonging to child node F), and child node F and node I satisfy the neighbor relationship, therefore, child node F is a neighbor idle leaf node.
[0116] When node j is a child node H, the child node H is an occupied leaf node. Therefore, the child node H is not a neighbor idle leaf node.
[0117] In some embodiments, based on the attributes of the brother node, among the multiple nodes and brother nodes of the subordinate brother node, traversing the nodes that satisfy the neighbor relationship with the child node and have the attribute of the free leaf attribute as the target free leaf node includes: setting the brother node as the first current node, judging whether the attribute of the first current node is the free leaf attribute, if the attribute of the first current node is the free leaf attribute, and the distance between the first current node and the child node satisfies the neighbor relationship, then determining the first current node as the target free leaf node, if the attribute of the first current node is the free leaf attribute, then determining the child set of the subordinate first current node, the child set of the first current node includes multiple child nodes divided by the first current node, selecting any child node in the child set of the first current node as the first current node, and returning to the step of judging whether the attribute of the first current node is the free leaf attribute.
[0118] For example, this embodiment sets node i as the first current node and determines whether node i is an idle leaf node. If node i is an idle leaf node and the distance between node i and the child nodes of the target child set satisfies a neighbor relationship, node i is determined to be the target idle leaf node. If node i is not an idle leaf node, the child set of node i is determined, and a child node from the child set of node i is selected as the first current node. The process then returns to the step of determining whether the attribute of the first current node is an idle leaf attribute.
[0119] In some embodiments, based on the attributes of the child node, among the multiple nodes and child nodes of the subordinate child node, traversing the nodes that satisfy the neighbor relationship with the target idle leaf node and whose attributes are idle leaf attributes as neighbor idle leaf nodes includes: setting the child node of the target node as the second current node, judging whether the attribute of the second current node is the idle leaf attribute, if the attribute of the second current node is the idle leaf attribute, and the distance between the second current node and the target idle leaf node satisfies the neighbor relationship, then determining that the second current node is the neighbor idle leaf node, if the attribute of the second current node is not the idle leaf attribute, then determining the child set of the subordinate second current node, randomly selecting one child node in the child set of the second current node as the second current node, and returning to the step of judging whether the attribute of the second current node is the idle leaf attribute.
[0120] For example, after finding the target idle leaf node, this embodiment sets node j as the second current node and determines whether node j is an idle leaf node. If node j is an idle leaf node and the distance between node j and the target idle leaf node satisfies the neighbor relationship, node j is determined to be a neighbor idle leaf node. If node j is not the target idle leaf node, the child set of node j is determined, and a child node from the child set of node j is selected as the second current node. The process then returns to the step of determining whether the attribute of the second current node is an idle leaf attribute.
[0121] If both node i and node j are idle leaf nodes and satisfy the neighbor relationship, then node j is added to the neighbor set of node i, and node i is added to the neighbor set of node j. This embodiment can eventually obtain the neighbor set of any idle leaf node in the quadtree map through the above recursive iterative operation.
[0122] In some embodiments, the quadtree map is configured with a coordinate system. If the horizontal center distance of two nodes in the x-axis direction of the coordinate system is less than or equal to half of the total width of the two nodes, and the vertical center distance of the two nodes in the y-axis direction of the coordinate system is less than or equal to half of the total height of the two nodes, then the two nodes satisfy a neighbor relationship.
[0123] The horizontal center distance is the difference between the horizontal coordinate of the center point of one node and the horizontal coordinate of the center point of the other node, and the vertical center distance is the difference between the vertical coordinate of the center point of one node and the vertical coordinate of the center point of the other node.
[0124] The total width of two nodes is the sum of the width of one node and the width of the other node, and the total height of two nodes is the sum of the height of one node and the height of the other node.
[0125] For example, define variables dis1 and dis2. Variable dis1 represents half the sum of the widths of nodes i and j, and variable dis2 represents half the sum of the heights of nodes i and j. Calculate the horizontal center distance x_dis and the vertical center distance y_dis between nodes i and j. If x_dis <= dis1 and y_dis <= dis2, then nodes i and j are considered neighbors. Because the formula for determining whether two nodes are neighbors is relatively simple, this embodiment provides a faster and more efficient method for determining whether two nodes are neighbors.
[0126] In some embodiments, the method also includes: when detecting that each node in the quadtree map is configured with a corresponding neighbor set, deleting the sibling set of each node in the quadtree map. As mentioned above, since the role of the sibling nodes of the sibling set is to obtain the neighbor set of each idle leaf node, when the neighbor set of each idle leaf node is determined, in order to save memory, this embodiment can delete the sibling set of each node.
[0127] For example, this embodiment uses the root node of the quadtree map as the current node and determines whether the sibling set of the current node is an empty set. If the sibling set of the current node is an empty set (indicating that the current node is the root node), then for all the child nodes of the current node, any child node is taken as the current node. If the sibling set of the current node is not an empty set, the sibling set of the current node is deleted, and for all the child nodes of the current node, any node is taken as the current node, and the process returns to the step of determining whether the sibling set of the current node is an empty set.
[0128] In general, since the grids of the quadtree map are relatively large, the number of grids in the quadtree map is relatively small compared to the number of grids in the original map. This embodiment can relatively reduce the number of excessive grids searched when planning a path, thereby improving the efficiency of path planning and thus improving the operating efficiency of the robot. In addition, the quadtree map is a variant map relative to the original map. Based on the variant quadtree map, this embodiment can also use the neighbor set of each idle leaf node for path planning, thereby ensuring that the path planning operation can proceed smoothly. In addition, this embodiment can determine the neighbor set of each idle leaf node in advance. Therefore, this embodiment can plan the path offline without the need to try out suitable neighbor nodes online in real time to search for the path, which is conducive to meeting the needs of offline path planning. In addition, the calculation speed of constructing the quadtree map in this embodiment is faster than that of conventional technologies, consumes less memory, and can be applied to low-cost service robot computing platforms.
[0129] 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.
[0130] As another aspect of the present invention, an embodiment of the present invention provides a path planning device based on a quadtree map. The path planning device based on a quadtree map can be a software module comprising a plurality of instructions stored in a memory. A processor can access the memory and call the instructions for execution to complete the path planning method based on a quadtree map described in each of the above embodiments.
[0131] In some embodiments, the path planning device based on the quadtree map can also be constructed by hardware devices. For example, the path planning device based on the quadtree map can be constructed by one or more chips, and the chips can work in coordination with each other to complete the path planning method based on the quadtree map described in the above embodiments. For another example, the path planning device based on the quadtree map can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0132] The path planning device 600 based on a quadtree map includes a map acquisition module 61 , a neighbor determination module 62 and a path planning module 63 .
[0133] The map acquisition module 61 is used to acquire a quadtree map, wherein the quadtree map includes multiple idle leaf nodes. Idle leaf nodes are leaf nodes in an idle state. Each leaf node includes at least one grid, and the states of all grids contained in the leaf node are the same. The neighbor determination module 62 is used to determine the neighbor set of each target idle leaf node based on the quadtree map. The target idle leaf node is an idle leaf node among the multiple idle leaf nodes. The path planning module 63 is used to plan a path based on the neighbor set and a preset path planning algorithm.
[0134] This embodiment can plan paths offline without the need for real-time online exploration of suitable neighbor nodes to search for paths, which helps meet the needs of offline path planning. Since the grids of the quadtree map are relatively large, the number of grids in the quadtree map is relatively small compared to the number of grids in the original map. This embodiment can relatively reduce the number of excessive grids searched when planning a path, thereby improving the efficiency of path planning and, in turn, the operating efficiency of the robot. In addition, the quadtree map is a variant map relative to the original map. Based on the variant quadtree map, this embodiment can also use the neighbor set of each idle leaf node for path planning, thereby ensuring that the path planning operation can proceed smoothly.
[0135] In some embodiments, the quadtree map is configured with multiple nodes distributed according to different levels, and the neighbor set includes at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node. The neighbor determination module 62 is specifically used to: determine the target node among the multiple nodes of the quadtree map according to a preset hierarchical distribution order, and the target node is configured with a target sibling set and a target child set. The target sibling set includes the target node and multiple sibling nodes at the same level as the target node, and the target child set includes multiple child nodes divided from the target node. According to the attributes of the sibling node and the attributes of the child node, at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node is determined.
[0136] In some embodiments, the neighbor determination module 62 is also specifically used to: according to the attributes of the brother node, among the multiple nodes subordinate to the brother node and the brother node, traverse the nodes that satisfy the neighbor relationship with the child node and have the attribute of the idle leaf attribute as the target idle leaf node; according to the attributes of the child node, among the multiple nodes subordinate to the child node and the child node, traverse the nodes that satisfy the neighbor relationship with the target idle leaf node and have the attribute of the idle leaf attribute as the neighbor idle leaf node.
[0137] In some embodiments, the neighbor determination module 62 is also specifically used to: set the brother node as the first current node, determine whether the attribute of the first current node is an idle leaf attribute, if the attribute of the first current node is an idle leaf attribute, and the distance between the first current node and the child node satisfies the neighbor relationship, then determine the first current node as the target idle leaf node, if the attribute of the first current node is not an idle leaf attribute, then determine the child set subordinate to the first current node, the child set of the first current node includes multiple child nodes divided from the first current node, select any child node in the child set of the first current node as the first current node, and determine whether the attribute of the first current node is an idle leaf attribute.
[0138] In some embodiments, the neighbor determination module 62 is also specifically used to: set the child node of the target node as the second current node, determine whether the attribute of the second current node is an idle leaf attribute, if the attribute of the second current node is an idle leaf attribute, and the distance between the second current node and the target idle leaf node satisfies the neighbor relationship, then determine that the second current node is a neighbor idle leaf node, if the attribute of the second current node is not an idle leaf attribute, then determine the child set subordinate to the second current node, select any child node in the child set of the second current node as the second current node, and determine whether the attribute of the second current node is an idle leaf attribute.
[0139] In some embodiments, the quadtree map is configured with a coordinate system. If the horizontal center distance between two nodes in the x-axis direction of the coordinate system is less than or equal to half of the total width of the two nodes, and the vertical center distance between the two nodes in the y-axis direction of the coordinate system is less than or equal to half of the total height of the two nodes, then the two nodes satisfy a neighbor relationship.
[0140] In some embodiments, before determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node, the neighbor determination module 62 is also specifically used to: determine whether the brother node and the child node meet the neighbor trigger condition; if so, enter the step of determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node; if not, stop the operation.
[0141] In some embodiments, the neighbor determination module 62 is also specifically used to: determine whether the level of the brother node is greater than the level of the child node; if so, determine that the brother node and the child node meet the neighbor trigger condition; if not, determine that the brother node and the child node do not meet the neighbor trigger condition.
[0142] In some embodiments, the neighbor determination module 62 is further specifically configured to: upon detecting that each node in the quadtree map is configured with a corresponding neighbor set, delete the sibling set of each node in the quadtree map.
[0143] In some embodiments, the path planning module 63 is specifically used to: obtain a starting point and a target point, and perform a potential field expansion operation starting from a neighbor set of the starting point according to a preset path planning algorithm to expand to the target point to obtain a path.
[0144] In some embodiments, the map acquisition module 61 is specifically used to: obtain an original map, the original map is configured with a root node, set the root node as the current expansion node, determine whether the current expansion node is a leaf node, if not, then according to the quadtree splitting method, divide the area corresponding to the current expansion node into multiple child nodes, and set each of the child nodes as the current expansion node, determine whether the current expansion node is a leaf node, if so, select another node as the current expansion node, and determine whether the current expansion node is a leaf node.
[0145] It should be noted that the aforementioned quadtree-map-based path planning device can execute the quadtree-map-based path planning method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiments of the quadtree-map-based path planning device, please refer to the quadtree-map-based path planning method provided in the embodiments of this application.
[0146] See also Figure 7 , Figure 7 Schematic diagram of a robot according to an embodiment of the present invention. The robot 700 includes one or more processors 71 and a memory 72. The memory 72 is connected to the one or more processors 71, for example, via a bus.
[0147] The processor 71 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.
[0148] The memory 72 is used to store program code, etc. The memory may 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 above types of memory.
[0149] Memory 72 may be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as the program instructions / modules corresponding to the quadtree map-based 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 quadtree map-based path planning method and quadtree map-based path planning device, thereby implementing the functions of the various modules or units of the quadtree map-based path planning method and quadtree map-based path planning device provided in the above-described method embodiments.
[0150] The memory 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 created based on the use of a quadtree map-based path planning device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and such remote memory may be connected to the quadtree map-based path 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.
[0151] The one or more modules are stored in the memory, and when executed by the one or more processors, the path planning method based on the quadtree map 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.
[0152] 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.
[0153] 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).
[0154] 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 based on a quadtree map, characterized in that: include: Obtaining a quadtree map, wherein the quadtree map includes a plurality of idle leaf nodes, each of the idle leaf nodes being a leaf node in an idle state, each of the leaf nodes including at least one grid, and all grids included in the leaf node having the same state; Determine a neighbor set of each target idle leaf node according to the quadtree map, wherein the target idle leaf node is an idle leaf node among the plurality of idle leaf nodes; Plan a path based on the neighbor set and a preset path planning algorithm.
2. The method according to claim 1, characterized in that The quadtree map is configured with a plurality of nodes distributed according to different hierarchies, the neighbor set includes at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node, and the neighbor set of each target idle leaf node determined according to the quadtree map includes: Determining a target node from among the multiple nodes of the quadtree map according to a preset hierarchical distribution order, wherein the target node is configured with a target sibling set and a target child set, wherein the target sibling set includes the target node and multiple sibling nodes at the same level as the target node, and the target child set includes multiple child nodes divided from the target node; At least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node is determined according to the attributes of the brother node and the attributes of the child node.
3. The method according to claim 2, characterized in that The determining, based on the attributes of the brother node and the attributes of the child node, at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node comprises: According to the attributes of the brother node, among the multiple nodes subordinate to the brother node and the brother node, traverse the node that satisfies the neighbor relationship with the child node and has the attribute of an idle leaf attribute as the target idle leaf node; According to the attributes of the child node, among the multiple nodes subordinate to the child node and the child node, the nodes that satisfy the neighbor relationship with the target idle leaf node and have the idle leaf attribute are traversed as neighbor idle leaf nodes.
4. The method according to claim 3, characterized in that The step of traversing, according to the attributes of the brother node, a node that satisfies a neighbor relationship with the child node and has an idle leaf attribute as a target idle leaf node among multiple nodes subordinate to the brother node and the brother node includes: Set the brother node as the first current node; Determine whether the attribute of the first current node is an idle leaf attribute; If the attribute of the first current node is an idle leaf attribute, and the distance between the first current node and the child node satisfies a neighbor relationship, determining that the first current node is a target idle leaf node; If the attribute of the first current node is not an idle leaf attribute, determine the child set subordinate to the first current node, the child set of the first current node includes multiple child nodes divided from the first current node, select any child node in the child set of the first current node as the first current node, and return to the step of determining whether the attribute of the first current node is an idle leaf attribute.
5. The method according to claim 3, characterized in that The step of traversing, according to the attribute of the child node, a plurality of nodes subordinate to the child node and the child node, a node that satisfies a neighbor relationship with the target idle leaf node and has an idle leaf attribute as a neighbor idle leaf node includes: Set the child node of the target node as the second current node; Determine whether the attribute of the second current node is an idle leaf attribute; If the attribute of the second current node is an idle leaf attribute, and the distance between the second current node and the target idle leaf node satisfies a neighbor relationship, determining that the second current node is a neighbor idle leaf node; If the attribute of the second current node is not an idle leaf attribute, determine the child set subordinate to the second current node, select any child node from the child set of the second current node as the second current node, and return to the step of determining whether the attribute of the second current node is an idle leaf attribute.
6. The method according to claim 3, characterized in that The quadtree map is configured with a coordinate system; If the horizontal center distance between the two nodes in the x-axis direction of the coordinate system is less than or equal to half of the total width of the two nodes, and the vertical center distance between the two nodes in the y-axis direction of the coordinate system is less than or equal to half of the total height of the two nodes, then the two nodes satisfy a neighbor relationship.
7. The method according to claim 2, characterized in that Before determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node, the method further includes: Determine whether the brother node and the child node meet the neighbor trigger condition; If so, proceed to the step of determining at least one neighbor idle leaf node that satisfies a neighbor relationship with the target idle leaf node; If not satisfied, stop the operation.
8. The method according to claim 7, characterized in that The determining whether the brother node and the child node meet the neighbor triggering condition includes: Determine whether the level of the brother node is greater than the level of the child node; If it is greater than, it is determined that the brother node and the child node meet the neighbor trigger condition; If not, it is determined that the brother node and the child node do not meet the neighbor trigger condition.
9. The method according to claim 2, characterized in that Also includes: When it is detected that each node in the quadtree map is configured with a corresponding neighbor set, the sibling set of each node in the quadtree map is deleted.
10. The method according to any one of claims 1 to 9, characterized in that Planning a path according to the neighbor set and a preset path planning algorithm includes: Get the starting point and target point; A potential field expansion operation is performed starting from the neighbor set of the starting point according to a preset path planning algorithm to expand to the target point to obtain a path.
11. The method according to any one of claims 1 to 9, characterized in that The obtaining of the quadtree map comprises: Obtaining an original map, wherein the original map is configured with a root node; Set the root node as the current expansion node; Determine whether the current expansion node is a leaf node; If not, then divide the area corresponding to the current expansion node into multiple child nodes according to the quadtree partitioning method, and set each child node as the current expansion node, and return to the step of determining whether the current expansion node is a leaf node; If so, another node is selected as the current expansion node, and the process returns to the step of determining whether the current expansion node is a leaf node.
12. 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 method according to any one of claims 1 to 11.
13. 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 is caused to perform the method according to any one of claims 1 to 11.