Path planning method, robot and computer readable storage medium
By obtaining the target feature vectors and heuristic areas in the path planning model, combining two-way search and neural heuristic areas, high-quality path planning is generated, and the problem of incomplete path planning in the marine environment in the existing technology is solved, and efficient detection of marine dock structure is achieved.
Patent Information
- Application Number
- CN202510421070.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-08-15
AI Technical Summary
The prior art cannot effectively plan the path in a highly unstructured and complex marine environment, resulting in incomplete robot detection tasks and poses safety risks.
The path planning method is adopted to input environmental map information, starting point and end point position information into the path planning model, obtain the target feature vector, determine the heuristic area, and sample it based on the predetermined algorithm and the target feature vector, and combine two-way search and neural heuristic area to generate high-quality target planning paths.
It realizes efficient path planning in highly unstructured scenarios, and can comprehensively detect different dock structures in the ocean, improving the efficiency and safety of detection tasks.
Smart Images

Figure CN120491674A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of path planning, and in particular to a path planning method, a robot, and a computer-readable storage medium. Background Art
[0002] In recent years, various forms of mobile robots, including ground, aerial, and underwater types, have achieved remarkable success in improving efficiency and reducing risks to humans. Due to the high level of operational activity and factors such as seawater erosion, the reliability and safety of terminal structures have become crucial for many terminals. For example, the Hong Kong-Macau Terminal, one of Asia's busiest passenger terminals, requires regular inspections to detect signs of rust, cracks, or structural collapse.
[0003] Currently, dock inspections generally rely on human divers to conduct underwater inspections. However, manual inspections are difficult for docks with complex bottom environments. For example, it is difficult for human divers to enter narrow spaces for more thorough inspections, resulting in incomplete inspections and potential safety hazards.
[0004] However, existing methods are unable to perform path planning in highly unstructured and complex scenarios (e.g., marine environments), which prevents robots from performing comprehensive and efficient inspection tasks. Summary of the Invention
[0005] In view of this, embodiments of the present application provide a path planning method, a robot, and a computer-readable storage medium to solve the problem in the prior art that path planning cannot be performed in highly unstructured and complex scenarios.
[0006] A first aspect of an embodiment of the present application provides a path planning method, including:
[0007] Input the environment map information, the starting point location information, and the end point location information into the path planning model to obtain the target feature vector; the target feature vector is used to represent the heuristic region, which is the area for bias sampling of the planned path;
[0008] Determine a first forward tree and a first backward tree based on a predetermined algorithm of a path planning model, environmental map information, starting point location information, and end point location information; the first forward tree has a root node as a starting point, and the first backward tree has a root node as an end point;
[0009] Based on a predetermined algorithm and a target feature vector, sampling is performed on the heuristic area to determine sampling information;
[0010] Based on a predetermined algorithm and sampling information, tree structure processing is performed on the first forward tree and the first backward tree to determine a target planning path.
[0011] A second aspect of an embodiment of the present application provides a robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the computer program.
[0012] A third aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method of the first aspect are implemented.
[0013] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0014] The path planning method of the first aspect of the embodiment of the present application can input environmental map information, starting point location information and end point location information into the path planning model to obtain the target feature vector, so as to determine the heuristic area, facilitate subsequent targeted bias sampling, and improve sampling efficiency. Then, the embodiment of the present application can determine the first forward tree and the first backward tree based on the predetermined algorithm of the path planning model, environmental map information, starting point location information, and end point location information. Since the first forward tree starts with the root node and the first backward tree ends with the root node, it is convenient to perform a two-way search and obtain the target planning path. At the same time, the embodiment of the present application can sample the heuristic area based on the predetermined algorithm and the target feature vector, determine the sampling information, and facilitate the determination of some paths for preliminary path planning. Finally, the embodiment of the present application can perform tree structure processing on the first forward tree and the first backward tree based on the predetermined algorithm and sampling information to determine the target planning path, combine the two-way search with the neural heuristic area, and obtain the target planning path. Therefore, the embodiments of the present application provide a novel and fast global path planning framework that can be applied to highly unstructured scenarios (especially marine environments), and can perform comprehensive and efficient detection tasks based on target planning paths, and can be designed for underwater detection tasks of different dock structures in the ocean.
[0015] It can be understood that the beneficial effects of the second to third aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. 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.
[0017] Figure 1 This is a flow chart of a path planning method provided by an embodiment of the present application;
[0018] Figure 2 This is a flow chart of a method for obtaining a target feature vector provided by an embodiment of the present application;
[0019] Figure 3 This is a flow chart of a method for determining a target planning path provided by an embodiment of the present application;
[0020] Figure 4 This is a flow chart of a method for obtaining a path planning model provided in an embodiment of the present application;
[0021] Figure 5 This is a schematic structural diagram of a path planning device provided in an embodiment of the present application;
[0022] Figure 6 This is a schematic structural diagram of a robot provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0024] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0025] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0026] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0027] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0028] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0029] Research has found that global path planning methods in complex environments can be divided into three main categories. Classic search-based methods, such as the A* algorithm, can provide resolution optimality but are often limited by high computational and memory requirements in high-dimensional spaces. Artificial potential field (APF) methods use gradient descent to guide robot motion but are prone to getting stuck in local minima. Sampling-based methods, including the rapidly exploring random tree (RRT), seek the global optimal solution through iterative exploration and exploitation of environmental information. Its advanced version, RRT*, achieves asymptotic optimality by gradually reconstructing the search tree in continuous space. Its ability to balance exploration and exploitation in complex, high-dimensional spaces has made it a widely adopted global path planning method for many current robotics tasks. A classic work, Informed RRT*, improves planning speed by leveraging geometric heuristic regions. By focusing on the L_2 heuristic set, it reduces exploration of irrelevant regions in the state space, thereby improving sampling efficiency. Cyl-iRRT* achieves efficient and safe path planning for autonomous underwater vehicles in three-dimensional environments by focusing the search space within a shrinking cylinder. A recent study further improved planning efficiency and speed by combining Informed RRT* with bidirectional sampling, optimizing the overall sampling process. Although these heuristic RRT* methods are effective, their performance is limited by the quality of the initial solution, and the design geometry itself can be quite tedious.
[0030] In recent years, researchers have begun to apply neural network methods to improve the performance of RRT-based algorithms. By learning a large number of successful optimal path planning cases, targeted heuristic areas are generated to improve sampling efficiency. Among them, two pioneering works are particularly prominent. Neural RRT adopts a network architecture similar to U-Net, takes the original map as input, and directly predicts the heuristic area for biased sampling based on the RRT tree method, thereby greatly improving efficiency. On the other hand, MPNet uses convolutional neural networks to directly output the optimal path. In recent studies, Neural Informed RRT combines the advantages of traditional heuristic sets and neural network predictions, and uses point cloud representation to further improve the planning performance of the RRT method. Although the above methods have achieved good results,
[0031] However, their map environments are usually regular and structured, and the test environment is very similar to the training environment. In fact, the application of neural network-assisted RRT methods in underwater robots in highly unstructured scenarios (especially marine environments) is still a blank in the current literature.
[0032] The path planning method, robot, and computer-readable storage medium provided in this application are intended to solve the above technical problems in the prior art.
[0033] The following is a detailed description of the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems with specific embodiments. It should be noted that the following embodiments can refer to, draw on, or combine with each other, and the same terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0034] See also Figure 1 As shown, the present invention provides a flow chart of a path planning method. Figure 1 As shown, the path planning method of the embodiment of the present application includes: steps S101 to S104.
[0035] S101. Input the environment map information, the starting position information, and the ending position information into the path planning model to obtain a target feature vector; the target feature vector is used to represent the heuristic area, which is the area for bias sampling of the planned path.
[0036] Optionally, the environmental map information may be underwater environmental information, such as ocean environmental information, and the environmental map information may be extracted from an ocean environmental map.
[0037] In some embodiments, inputting the environment map information, the starting point location information, and the ending point location information into the path planning model to obtain the target feature vector includes:
[0038] Inputting the environment map information, the starting position information, and the end position information into an encoder of a path planning model to obtain a first intermediate feature vector; the first intermediate feature vector is used to characterize the characteristics of the environment map including the starting position and the end position;
[0039] Based on the first intermediate feature vector, the heuristic area in the environment map is reconstructed through the decoder of the path planning model to obtain the target feature vector.
[0040] Alternatively, a heuristic region generally refers to a specific area or range defined by a heuristic method during problem solving or optimization. A heuristic method is a strategy based on experience, intuition, or rules that is used to quickly find feasible solutions or near-optimal solutions to complex problems without traversing the entire solution space.
[0041] In some embodiments, inputting the environment map information, the starting point location information, and the ending point location information into an encoder of a path planning model to obtain a first intermediate feature vector includes:
[0042] Extract features from the environment map information through the encoder of the path planning model to obtain a first spatial feature;
[0043] The encoder extracts the starting position information and the end position information to obtain the second spatial feature;
[0044] Splicing the first spatial feature and the second spatial feature to obtain a spliced spatial feature;
[0045] performing a convolution operation on the spliced spatial features through at least two different convolutional layers of an encoder to obtain at least two spatial implicit feature vectors;
[0046] Perform feature aggregation on at least two spatial implicit feature vectors to obtain a first intermediate feature vector.
[0047] The input of the embodiment of the present application can be composed of two three-dimensional grid maps, represented as E1 (starting point / end point position) and E2 (obstacles and free space), which are processed separately by convolutional encoders to extract spatial features and then spliced. In order to enhance the network's ability to capture multi-scale spatial dependencies, the encoder adopts a dilated spatial pyramid pooling (ASPP) module (three different sizes of convolutions) to achieve effective feature aggregation in different receptive fields, and the output of the intermediate state represents the heuristic area. The encoded feature representation of the environment E (E1 and E2) is gradually downsampled to form a compact potential representation while retaining key structural information.
[0048] In some embodiments, based on the first intermediate feature vector, reconstructing the heuristic region in the environment map by a decoder of the path planning model to obtain the target feature vector includes:
[0049] Performing a deconvolution operation on the first intermediate feature vector through at least two deconvolution layers of a decoder of the path planning model to obtain an output vector of each deconvolution layer;
[0050] Normalize and activate the output vector of each deconvolution layer to obtain the second intermediate feature vector;
[0051] Based on the self-attention mechanism of the decoder, at least two deconvolution layers, and the second intermediate feature vector, a target feature vector is obtained.
[0052] The decoding end of the embodiment of the present application can be a decoder. The decoder uses a series of deconvolution layers to reconstruct the heuristic region H. The output vector of each layer is batch normalized (BN) and ReLU activated to ensure stable gradient flow. A self-attention mechanism is introduced in the intermediate stage of decoding to optimize long-range dependencies and adapt to the complex spatial structure of underwater terrain. The final output H maintains the same resolution as E, providing an information-rich heuristic representation for efficient motion planning in challenging unstructured environments.
[0053] S102. Determine a first forward tree and a first backward tree based on a predetermined algorithm of a path planning model, environmental map information, starting point location information, and end point location information; the first forward tree starts with a root node, and the first backward tree ends with the root node.
[0054] Alternatively, a forward tree is a tree structure that starts from a root node and expands outward along directed edges. Each node has only one parent node (except the root node), but can have multiple child nodes. A backward tree is a tree structure that starts from a leaf node and converges inward along directed edges. Each node can have multiple parent nodes but only one child node (except the leaf node).
[0055] S103: Based on a predetermined algorithm and a target feature vector, sampling is performed on the heuristic area to determine sampling information.
[0056] Optionally, the sampling information may include candidate paths.
[0057] In some embodiments, the sampling information includes a target triplet corresponding to each sampling point; the target triplet includes a cost value within a predetermined cost range, a point within a predetermined distance range, and an initial candidate path, and the heuristic region is represented by a plurality of points;
[0058] Based on the predetermined algorithm and the target feature vector, sampling is performed on the heuristic area to determine sampling information, including:
[0059] Based on the preset threshold of the sampling distribution and the target feature vector, sampling is performed on the heuristic area to determine the sampling triplet; the sampling triplet includes the nearest point corresponding to the sampling point, the newly added point, and the point within the predetermined distance range;
[0060] The points within a predetermined distance range in the sampled triples are traversed by a predetermined algorithm to determine the target triplet corresponding to each point.
[0061] Optionally, the newly added points can be sampling points, and the cost value includes the distance.
[0062] S104: Based on a predetermined algorithm and sampling information, perform tree structure processing on the first forward tree and the first backward tree to determine a target planning path.
[0063] In some embodiments, based on a predetermined algorithm and sampling information, performing tree structure processing on the first forward tree and the first backward tree to determine the target planning path includes:
[0064] Based on a preset algorithm, traverse the initial candidate paths of all target triples to update the set of nodes and edges of the first forward tree and the set of nodes and edges of the first backward tree to obtain a second forward tree and a second backward tree;
[0065] determining at least one additional candidate path based on the second forward tree and the second backward tree;
[0066] Determine an initial planning path based on the initial candidate path and the added candidate paths;
[0067] Based on the preset algorithm and the initial planning path, the second forward tree and the second backward tree are processed into tree structures to determine the target planning path.
[0068] The path planning method of the embodiment of the present application can input environmental map information, starting point location information and end point location information into the path planning model to obtain the target feature vector, so as to determine the heuristic area, facilitate subsequent targeted bias sampling and improve sampling efficiency.
[0069] Then, the embodiment of the present application can determine the first forward tree and the first backward tree based on the predetermined algorithm of the path planning model, environmental map information, starting point location information, and end point location information. Since the first forward tree starts with the root node and the first backward tree ends with the root node, it is convenient to perform a two-way search and obtain the target planning path.
[0070] At the same time, the embodiment of the present application can sample the heuristic area based on a predetermined algorithm and a target feature vector to determine sampling information, which can facilitate the determination of some paths for preliminary path planning.
[0071] Finally, the embodiment of the present application can perform tree structure processing on the first forward tree and the first backward tree based on a predetermined algorithm and sampling information, determine the target planning path, combine the bidirectional search with the neural heuristic region, and obtain the target planning path.
[0072] Therefore, the embodiments of the present application provide a novel and fast global path planning framework that can be applied to highly unstructured scenarios (especially marine environments), and can perform comprehensive and efficient detection tasks based on target planning paths, and can be designed for underwater detection tasks of different dock structures in the ocean.
[0073] The path planning model of the embodiment of the present application adopts a neural network architecture for feature extraction in an unstructured underwater environment.
[0074] The framework of the path planning method of the embodiment of the present application combines bidirectional search with neural heuristic regions, and designs a new neural network specifically for unstructured marine environments, which can generate high-quality heuristic regions. This integration achieves more efficient path planning by reducing the search space and accelerating convergence. The path planning method of the basic embodiment of the present application proposes PierGuard, which is a novel and fast global path planning framework designed for underwater inspection tasks of different dock structures in the ocean. We designed a new neural network architecture to generate high-quality heuristic regions, thereby improving planning performance in unstructured underwater environments. At the same time, the effectiveness and efficiency of the proposed method can be verified through simulation environments and real ocean experiments.
[0075] See also Figure 2 As shown, the embodiment of the present application provides a flow chart of a method for obtaining a target feature vector. Figure 2 As shown, the method for obtaining the target feature vector includes: S201 to S208.
[0076] S201. Perform feature extraction on environment map information through an encoder of a path planning model to obtain a first spatial feature.
[0077] S202: Extract features of the starting position information and the ending position information through an encoder to obtain a second spatial feature.
[0078] The input of the embodiment of the present application may be composed of two three-dimensional grid maps, represented as E1 (starting / end point location) and E2 (obstacles and free space),
[0079] S203: Splice the first spatial feature and the second spatial feature to obtain a spliced spatial feature.
[0080] In the embodiment of the present application, convolutional encoders are used to process the images separately to extract spatial features, and then the images are spliced together.
[0081] S204 . Perform a convolution operation on the spliced spatial features through at least two different convolutional layers of the encoder to obtain at least two spatial implicit feature vectors.
[0082] The embodiment of the present application adopts an atrous spatial pyramid pooling (ASPP) module (three convolutions of different sizes) to achieve effective feature aggregation on different receptive fields, and the output of the intermediate state represents the heuristic region.
[0083] S205 : Perform feature aggregation on at least two spatial implicit feature vectors to obtain a first intermediate feature vector.
[0084] S206. Perform a deconvolution operation on the first intermediate feature vector through at least two deconvolution layers of the decoder of the path planning model to obtain an output vector of each deconvolution layer.
[0085] The decoder of the embodiment of the present application uses a series of deconvolution layers to reconstruct the heuristic region H, and the output vector of each layer is batch normalized BN and ReLU activated to ensure stable gradient flow.
[0086] S207: Normalize and activate the output vector of each deconvolution layer to obtain a second intermediate feature vector.
[0087] S208. Obtain a target feature vector based on the self-attention mechanism of the decoder, at least two deconvolution layers, and the second intermediate feature vector.
[0088] The embodiment of the present application introduces a self-attention mechanism in the intermediate stage of decoding to optimize long-range dependencies and adapt to the complex spatial structure of underwater terrain.
[0089] See also Figure 3 As shown, the embodiment of the present application provides a flow chart of a method for determining a target planning path. Figure 3 As shown, the method for determining the target planning path includes:
[0090] S301. Based on a preset algorithm, traverse the initial candidate paths of all target triples to update the set of nodes and edges of the first forward tree and the set of nodes and edges of the first backward tree to obtain a second forward tree and a second backward tree.
[0091] S302: Determine at least one additional candidate path based on the second forward tree and the second backward tree.
[0092] S303: Determine an initial planned path based on the initial candidate path and the added candidate paths.
[0093] In the embodiment of the present application, an initial planned path is determined based on the minimum cost value among all initial candidate paths and all added candidate paths.
[0094] S304: Based on the preset algorithm and the initial planning path, perform tree structure processing on the second forward tree and the second backward tree to determine the target planning path.
[0095] Optionally, based on a preset algorithm and the initial planning path, performing tree structure processing on the second forward tree and the second backward tree to determine the target planning path includes:
[0096] Based on the preset algorithm and the initial planned path, the first operation is executed cyclically until an initial planned path having a cost value less than the cost values of other planned paths is determined as the target planned path.
[0097] The first operation includes:
[0098] Based on the initial planned path, reconnect the branches of the second forward tree and the second backward tree to obtain a third forward tree and a third backward tree;
[0099] Based on a predetermined algorithm, connecting nodes of the third forward tree and the third backward tree to form a target tree structure;
[0100] Based on the target tree structure, the planned path to be confirmed is determined and used as the initial planned path.
[0101] In the embodiment of the present application, the previously determined preferred planning path to be confirmed is continued to be used as the initial planning path for tree operation, and the tree operation is repeated a predetermined number of times or the optimal planning path is obtained as the target planning path.
[0102] The default algorithm used in this embodiment is the PierGuard algorithm. PierGuard integrates three key components: neural-inspired region generation with biased sampling to guide the search process, rewiring techniques for path optimization, and tree connection and optimization strategies to enhance overall planning performance. First, the algorithm initializes the starting point x_init, the end point x_goal, map information E, and the first forward and backward trees. Indicates the current optimal path, and c_best indicates the cost value corresponding to the optimal path.
[0103] Subsequently, a high-quality heuristic region H is generated using a neural network designed specifically for unstructured environments. When sampling new nodes, this embodiment primarily samples within the heuristic region while ensuring uniform sampling with a certain probability across the global space to maintain probabilistic completeness, where μ is a preset threshold that controls the sampling distribution. Ultimately, the algorithm returns a sampling triplet (x_nearest, x_new, x_near).
[0104] Initially, the target triples are calculated and added by traversing the x_near set The algorithm then traverses the candidate paths to update the tree's vertex and edge sets. It then traverses the candidate paths again, and if a new path is found that is better than the original path, it attempts to reconnect the branches. The algorithm attempts to connect the forward and backward trees. If the new path formed by connecting is better, a global update is performed. The algorithm then performs operations on the tree, such as vertex contraction, removal of high-cost paths, and swapping. Finally, if the cycle count is reached or the optimal path is found as the target planning path, the algorithm returns the tree structure.
[0105] The PierGuard algorithm of the present application inherits the probabilistic completeness and asymptotic optimality of the original RRT* algorithm. To verify the optimality and complexity of the PierGuard algorithm of the present application, the present application cites the following examples:
[0106] Lemma 1 (Probabilistic Completeness of PierGuard): The PierGuard algorithm is probabilistically complete, i.e., for any robustly feasible planning problem, the following holds:
[0107]
[0108] Among them, V_N^PierGuard is the vertex set after N iterations of the PierGuard algorithm, and X_goal is the target area.
[0109] First, define V_N^RRT as the final vertex set of RRT when the number of sampled nodes is N. The RRT algorithm is probabilistically complete. When N → ∞, V_N^pierGuard = V_N^RRT. Because PierGuard ensures a connected graph, it has the same probabilistic completeness as RRT*.
[0110] Lemma 2 (Asymptotic Optimality of PierGuard): The PierGuard algorithm is asymptotically optimal, i.e., for any path planning triple (X_free, x_init, X_goal), optimal cost c(ζ^*), and minimum cost set C_N obtained by tree query using the algorithm of the embodiment of the present application, the following holds:
[0111] P({lim(N→∞)supC_N=c(ζ^*)})=1,
[0112] If and only if the search radius η satisfies the following conditions:
[0113] η>(2(1+1 / m))^(1 / m)(M(X_free) / ξ_d)^(1 / m),
[0114] Here, m is the dimension of the state space, M(X_free) is the Lebesgue measure of X_free, and ξ_d is the volume of the unit sphere, which can all be pre-computed based on the environment.
[0115] Therefore, PierGuard is an improvement to the sampling strategies of RRT* and B_RRT*, without changing their expansion and reconnection processes.
[0116] Lemma 3 (PierGuard and Computational Complexity Ratio): There exists a constant δ such that:
[0117] lim_(N→∞)supE[M_N^PierGuard / M_N^RRT-connect]≤δ,
[0118] Among them, M_N^PierGuard and M_N^RRT-connect are the total number of computational steps of the PierGuard algorithm and the RRT-connect algorithm, respectively.
[0119] In fact, PierGuard and RRT-connect include an extra step in each iteration to try to connect two trees. Assuming the expansion step size parameter is large enough, the computational cost of this extra step is equivalent to the cost of a single tree expansion iteration. This comparison shows that despite PierGuard's enhanced asymptotic optimality properties, its computational overhead is not significantly increased compared to RRT-connect.
[0120] See also Figure 4 As shown, the embodiment of the present application provides a flow chart of a method for obtaining a path planning model. Figure 4 As shown, the training process of the path planning model includes steps S401 to S407.
[0121] S401, obtaining sample data: the sample data includes environment map sample information, starting point location sample information, end point location sample information, and sample planning path;
[0122] S402, training the initial planning model based on the sample data to obtain a sample feature vector; the sample feature vector is used to represent the sample heuristic region;
[0123] S403 : Based on the sample feature vector and the sample planning path, obtain a plurality of first sample points for the heuristic area and a second sample point for the sample planning path.
[0124] Optionally, pixel processing is performed on the sample feature vector and the sample planning path, so that the first sample point and the second sample point are both pixel points.
[0125] S404. Determine a first loss function based on the actual probability, predicted probability, and weight factor of each first sample point; the actual probability is used to represent the probability that the first sample point actually belongs to the sample planning path, the predicted probability is used to represent the probability that the first sample point is predicted to belong to the sample planning path, and the weight factor is determined based on the minimum distance from the first sample point to the sample planning path.
[0126] The quality of the heuristic region in this embodiment directly affects the effectiveness of the path planning algorithm. Compared with the traditional binary cross entropy (BCE) loss, the formula proposed in this embodiment increases the weight of pixels close to the true path to enhance the learning effect of key areas:
[0127] L_path=-∑—iv_i[p_gt,ilog(p_o,i)+(1-p_gt,i)log(1-p_o,i)]
[0128] Here, p_gt,i represents the true probability that pixel i belongs to the true path, while p_o,i is the predicted probability. The weight factor w_i = 1 + λd_i^-1 is determined by the minimum distance d_i from the current pixel to the true path, with λ controlling the weight. This formula allows the model to prioritize regions close to the true path while minimizing the influence of distant background pixels. This heuristic region maintains a reasonable geometric shape.
[0129] S405 : Determine a second loss function based on the set of first sample points, the set of second sample points, and the Euclidean distances between the adjacent first sample points and the adjacent second sample points.
[0130] The present embodiment uses the Hausdorff distance to measure the shape similarity between the two:
[0131] L_haus=max{max_x∈P_omin_y∈P_gtd(x,y), max_y∈P_gtmin_x∈P_od(x,y)}
[0132] Where P_o is the set of predicted heuristic region points, p_gt is the set of true path points, and d(x,y) is the Euclidean distance between two points. Unlike the connectivity enhancement method, the formula in this embodiment not only reduces excessive isolated points to enhance connectivity, but also improves shape alignment with the true path.
[0133] S406 , performing weighted processing on the first loss function and the second loss function to obtain a total loss function.
[0134] Optionally, the total loss function of the embodiment of the present application is defined as: L=α_1L_path+α_2L_haus, where α_1 and α_2 are coefficients.
[0135] S407: Update the model parameters of the initial planning model based on the total loss function to obtain a path planning model.
[0136] See also Figure 5 As shown, an embodiment of the present application provides a schematic structural diagram of a path planning device 50. The path planning device 50 includes: a coding module 501, a tree construction module 502, a sampling module 503 and a path planning module 504.
[0137] The encoding and decoding module 501 is used to input the environment map information, the starting position information and the ending position information into the path planning model to obtain the target feature vector; the target feature vector is used to represent the heuristic area, which is the area for bias sampling of the planned path.
[0138] The tree construction module 502 is used to determine the first forward tree and the first backward tree based on the predetermined algorithm of the path planning model, environmental map information, starting point location information, and end point location information; the first forward tree starts with the root node, and the first backward tree ends with the root node.
[0139] The sampling module 503 is used to perform sampling on the heuristic area based on a predetermined algorithm and a target feature vector, and determine sampling information.
[0140] The path planning module 504 is used to perform tree structure processing on the first forward tree and the first backward tree based on a predetermined algorithm and sampling information to determine a target planning path.
[0141] Optionally, the encoding and decoding module 501 is used to input the environmental map information, the starting position information and the end position information into the encoder of the path planning model to obtain a first intermediate feature vector; the first intermediate feature vector is used to characterize the characteristics of the environmental map including the starting position and the end position; based on the first intermediate feature vector, the heuristic area in the environmental map is reconstructed through the decoder of the path planning model to obtain a target feature vector.
[0142] Optionally, the encoding and decoding module 501 is used to extract features of the environmental map information through the encoder of the path planning model to obtain a first spatial feature; extract features of the starting point position information and the end point position information through the encoder to obtain a second spatial feature; splice the first spatial feature and the second spatial feature to obtain a spliced spatial feature; perform a convolution operation on the spliced spatial feature through at least two different convolutional layers of the encoder to obtain at least two spatial implicit feature vectors; and perform feature aggregation on at least two spatial implicit feature vectors to obtain a first intermediate feature vector.
[0143] Optionally, the encoding and decoding module 501 is used to perform a deconvolution operation on the first intermediate feature vector through at least two deconvolution layers of the decoder of the path planning model to obtain an output vector of each deconvolution layer; normalize and activate the output vector of each deconvolution layer to obtain a second intermediate feature vector; and obtain a target feature vector based on the self-attention mechanism of the decoder, at least two deconvolution layers and the second intermediate feature vector.
[0144] Optionally, the sampling module 503 is used to sample the heuristic area based on a preset threshold of the sampling distribution and the target feature vector to determine a sampling triplet; the sampling triplet includes the nearest point corresponding to the sampling point, the newly added point, and the point within a predetermined distance range; the points within the predetermined distance range in the sampling triplet are traversed through a predetermined algorithm to determine the target triplet corresponding to each point.
[0145] Optionally, the path planning module 504 is used to traverse the initial candidate paths of all target triples based on a preset algorithm to update the set of nodes and edges of the first forward tree and the set of nodes and edges of the first backward tree to obtain a second forward tree and a second backward tree; determine at least one additional candidate path based on the second forward tree and the second backward tree; determine an initial planned path based on the initial candidate path and the additional candidate path; perform tree structure processing on the second forward tree and the second backward tree based on the preset algorithm and the initial planned path to determine the target planned path.
[0146] Optionally, the path planning module 504 is used to cyclically execute the first operation based on a preset algorithm and the initial planned path until an initial planned path whose cost value is less than the cost value of other planned paths is determined as the target planned path; wherein the first operation includes: based on the initial planned path, reconnecting branches of the second forward tree and the second backward tree to obtain a third forward tree and a third backward tree; based on a predetermined algorithm, connecting nodes of the third forward tree and the third backward tree to form a target tree structure; based on the target tree structure, determining the planned path to be confirmed, and using the planned path to be confirmed as the initial planned path.
[0147] Optionally, the path planning device 50 also includes a training module, which is used to obtain sample data: the sample data includes environmental map sample information, starting point position sample information, end point position sample information, and sample planning path; the initial planning model is trained based on the sample data to obtain a sample feature vector; the sample feature vector is used to characterize the sample heuristic area; based on the sample feature vector and the sample planning path, multiple first sample points for the heuristic area and second sample points for the sample planning path are obtained; based on the actual probability, predicted probability and weight factor of each first sample point, a first loss function is determined; the actual probability is used to represent the probability that the first sample point actually belongs to the sample planning path, and the predicted probability is used to represent the probability that the first sample point is predicted to belong to the sample planning path, and the weight factor is determined based on the minimum distance from the first sample point to the sample planning path; based on the set of first sample points, the set of second sample points and the Euclidean distance between the adjacent first sample points and the second sample points, a second loss function is determined; the first loss function and the second loss function are weighted to obtain a total loss function; the model parameters of the initial planning model are updated based on the total loss function to obtain a path planning model.
[0148] The device of the embodiment of the present application can execute the method provided by the embodiment of the present application, and its implementation principle is similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, and will not be repeated here.
[0149] An embodiment of the present application provides a robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method of the embodiment of the present application are implemented.
[0150] The robot in the embodiment of the present application may be an underwater robot used for automatic inspection of ocean terminals.
[0151] Based on the above technical solution, the embodiment of the present application constructed a dataset containing approximately 29,874 samples from successful path planning scenarios in a 3D unstructured ocean environment, which is designed to simulate real-world conditions. Approximately 80% of the samples are used for training and validation, while the remaining 20% constitute a test set generated on an unseen map for evaluating generalization ability. The true path is obtained through the A* algorithm, and the expansion operation is used for post-processing to improve the recognition ability of the neural network. We use Python 3.8.10, PyTorch 1.13.1 and NVIDIA RTX 3070Ti for model training and inference.
[0152] The embodiment of the present application adopts a simulation platform based on the Robot Operating System (ROS), in which the map is pre-built and stored in the form of occupancy grids to achieve obstacle collision detection. In the experiment, the embodiment of the present application selected two representative maps and visualized the path planning results. In the visualization, the black grid represents the obstacle area and the white grid represents the free space. The light red edge represents the final growth state of the tree, and the green nodes and edges correspond to the final path points and path segments. In the first experimental scenario, the obstacles mainly consist of circular obstacles with a radius between 0.4 and 2.5 and a height between 0.5 and 7.5.
[0153] The traditional RRT* method generates a large number of invalid samples in the global space, resulting in a long time consumption in finding the initial solution and the optimal solution. In contrast, the path planning method of the embodiment of the present application utilizes a bidirectional search within a high-quality heuristic area, significantly reducing invalid sampling and tree operations, thereby enabling the rapid discovery of the initial solution and the optimal solution. In the second experimental scenario, in addition to circular obstacles, there are also cylindrical obstacles with heights between 5.5 and 10.5, which are very close to the real dock environment. It has been verified that the path planning method of the embodiment of the present application performs well.
[0154] The embodiment of this application uses a drone-captured aerial view of Pier A to showcase the docking area. The path planning method demonstrates the ability to efficiently generate a global path in this complex underwater environment, facilitating subsequent inspection tasks. In experiments, the robot in this embodiment of the application moved to different locations along a pre-planned path at different times, capturing real-time observation images at selected moments. These images can be processed by a target detection system to identify potential safety hazards.
[0155] The PierGuard framework adopted by the robot in the embodiment of the present application is a fast and efficient global path planning method, which is specially designed for underwater inspection tasks of wharf structures. By combining bidirectional search and a new neural network that generates high-quality heuristic areas, it shows excellent planning performance in unstructured underwater environments. Its effectiveness has been verified through extensive simulation experiments and field tests in the real marine environment of Hong Kong, China, demonstrating its practical application potential in complex wharf environments. The robot in the embodiment of the present application is committed to achieving full automation of the autonomous planning and detection system of underwater robots, so that it can be widely used in various inspection tasks in coastal city docks. The application fields of the robot in the embodiment of the present application include wharf structure inspection and maintenance, marine engineering facility inspection, underwater robot navigation and planning, port and coastline management, and scientific research and exploration. The application of the robot in the embodiment of the present application in complex marine environments provides an efficient and reliable solution with broad practical application value and market prospects.
[0156] See also Figure 6 As shown, the present embodiment provides a schematic structural diagram of a robot 6. Figure 6 As shown, the robot 6 of this embodiment includes: at least one processor 60 ( Figure 6 Only one is shown in the figure) a processor, a memory 61, and a computer program 62 stored in the memory 61 and executable on at least one processor 60. When the processor 60 executes the computer program 62, the steps of any of the above-mentioned method embodiments are implemented.
[0157] Those skilled in the art will understand that Figure 6 This is merely an example of the robot 6 and does not constitute a limitation on the robot 6 . The robot 6 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the robot 6 may also include input and output devices, network access devices, etc.
[0158] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0159] In some embodiments, the memory 61 may be an internal storage unit of the robot 6, such as the robot 6's hard drive or memory. In other embodiments, the memory 61 may also be an external storage device of the robot 6, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the memory 61 may include both the robot 6's internal storage unit and an external storage device. The memory 61 is used to store the operating system, application programs, a boot loader, data, and other programs, such as the program code of a computer program. The memory 61 may also be used to temporarily store data that has been output or is about to be output.
[0160] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0162] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method of the embodiment of the present application are implemented.
[0163] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned various method embodiments when executing the computer program product.
[0164] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include at least: any entity or device that can carry the computer program code to the device / terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.
[0165] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0166] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0167] In the embodiments provided in this application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely illustrative. For example, the division of the above modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0168] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0169] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A path planning method, characterized in that: include: Input the environment map information, the starting point location information, and the end point location information into the path planning model to obtain the target feature vector; described The target feature vector is used to characterize the heuristic region, which is the region for bias sampling of the planned path; Determining a first forward tree and a first backward tree based on a predetermined algorithm of the path planning model, the environmental map information, the starting point location information, and the end point location information; The first forward tree starts from the root node, and the first backward tree ends at the root node; Based on the predetermined algorithm and the target feature vector, sampling is performed on the heuristic area to determine sampling information; Based on the predetermined algorithm and the sampling information, tree structure processing is performed on the first forward tree and the first backward tree to determine a target planning path.
2. The path planning method according to claim 1, characterized in that: Input the environment map information, starting point location information, and end point location information into the path planning model to obtain the target feature vector, including: Inputting the environment map information, the starting point location information, and the end point location information into an encoder of a path planning model to obtain a first intermediate feature vector; the first intermediate feature vector is used to characterize the characteristics of the environment map including the starting point location and the end point location; Based on the first intermediate feature vector, the heuristic area in the environment map is reconstructed through the decoder of the path planning model to obtain a target feature vector.
3. The path planning method according to claim 2, characterized in that: Inputting the environment map information, the starting point location information, and the ending point location information into the encoder of the path planning model to obtain a first intermediate feature vector includes: Extracting features from the environment map information using an encoder of a path planning model to obtain a first spatial feature; Extracting features from the starting position information and the ending position information by the encoder to obtain a second spatial feature; Splicing the first spatial feature and the second spatial feature to obtain a spliced spatial feature; Performing a convolution operation on the spliced spatial features through at least two different convolutional layers of the encoder to obtain at least two spatial implicit feature vectors; Perform feature aggregation on at least two of the spatial implicit feature vectors to obtain a first intermediate feature vector.
4. The path planning method according to claim 2, characterized in that: Reconstructing the heuristic region in the environment map based on the first intermediate feature vector through a decoder of the path planning model to obtain a target feature vector includes: Performing a deconvolution operation on the first intermediate feature vector through at least two deconvolution layers of a decoder of the path planning model to obtain an output vector of each deconvolution layer; Normalizing and activating the output vector of each deconvolution layer to obtain a second intermediate feature vector; A target feature vector is obtained based on the self-attention mechanism of the decoder, at least two of the deconvolution layers, and the second intermediate feature vector.
5. The path planning method according to claim 1, wherein: The sampling information includes a target triplet corresponding to each sampling point; the target triplet includes a cost value within a predetermined cost range, a point within a predetermined distance range, and an initial candidate path, and the heuristic area is represented by a plurality of the points; Based on the predetermined algorithm and the target feature vector, sampling is performed on the heuristic area to determine sampling information, including: Based on a preset threshold of the sampling distribution and a target feature vector, sampling is performed on the heuristic area to determine a sampling triplet; the sampling triplet includes the nearest point corresponding to the sampling point, a newly added point, and a point within a predetermined distance range; The points within a predetermined distance range in the sampling triplet are traversed by the predetermined algorithm to determine the target triplet corresponding to each point.
6. The path planning method according to claim 5, characterized in that: Based on the predetermined algorithm and the sampling information, performing tree structure processing on the first forward tree and the first backward tree to determine a target planning path includes: Based on the preset algorithm, traverse all initial candidate paths of the target triples to update the set of nodes and edges of the first forward tree and the set of nodes and edges of the first backward tree to obtain a second forward tree and a second backward tree; determining at least one additional candidate path based on the second forward tree and the second backward tree; Determining an initial planned path based on the initial candidate path and the added candidate path; Based on the preset algorithm and the initial planning path, tree structure processing is performed on the second forward tree and the second backward tree to determine a target planning path.
7. The path planning method according to claim 6, characterized in that: Based on the preset algorithm and the initial planning path, performing tree structure processing on the second forward tree and the second backward tree to determine a target planning path includes: Based on the preset algorithm and the initial planned path, the first operation is executed cyclically until an initial planned path having a cost value less than the cost values of other planned paths is determined as the target planned path; The first operation includes: Based on the initial planned path, reconnecting branches of the second forward tree and the second backward tree to obtain a third forward tree and a third backward tree; Based on the predetermined algorithm, connecting nodes of the third forward tree and the third backward tree to form a target tree structure; Based on the target tree structure, a planned path to be confirmed is determined, and the planned path to be confirmed is used as the initial planned path.
8. The path planning method according to claim 1, characterized in that: The path planning model is trained in the following way: Obtain sample data: Sample data includes environment map sample information, starting point location sample information, end point location sample information, and sample planning path; The initial planning model is trained based on the sample data to obtain the sample feature vector; The sample feature vector is used to characterize the sample heuristic region; Based on the sample feature vector and the sample planning path, obtaining a plurality of first sample points for the heuristic area and a second sample point of the sample planning path; Determining a first loss function based on the actual probability, predicted probability, and weight factor of each first sample point; the actual probability is used to represent the probability that the first sample point actually belongs to the sample planned path, the predicted probability is used to represent the probability that the first sample point is predicted to belong to the sample planned path, and the weight factor is determined based on the minimum distance between the first sample point and the sample planned path; determining a second loss function based on the set of the first sample points, the set of the second sample points, and the Euclidean distances between adjacent first sample points and second sample points; Performing weighted processing on the first loss function and the second loss function to obtain a total loss function; The model parameters of the initial planning model are updated based on the total loss function to obtain the path planning model.
9. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Robot path planning method and device and robot
CN121589827A