Path planning method and system based on improved A* algorithm and improved DWA algorithm
By improving the A* and DWA algorithms, combining fully convolutional neural networks and multi-objective optimization factors, and dynamically adjusting heuristic weights and path smoothing, the computational efficiency and path optimization problems of traditional path planning algorithms in complex scenarios are solved, achieving efficient and robust path planning.
Patent Information
- Application Number
- CN202511890607.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-01-13
AI Technical Summary
Traditional path planning algorithms are computationally inefficient in large maps or complex scenes, making it difficult to meet real-time requirements. Furthermore, in scenes with dense obstacles, the detour paths are lengthy, failing to effectively balance path smoothness and feasibility. The DWA algorithm also lacks foresight and is prone to getting trapped in local optima.
By combining the improved A* algorithm and the DWA algorithm, a multivariate cost factor evaluation model is constructed to optimize path planning by dynamically adjusting the weights of the heuristic function through a fully convolutional neural network, employing bidirectional dynamic neighborhood search and adaptive smoothing processing, and adjusting the dynamic window with multi-objective optimization factors.
It improves the computational efficiency and accuracy of path planning, reduces the number of search nodes, shortens the planning time, optimizes path smoothness, avoids local optima traps, and enhances the robustness and efficiency of robot navigation.
Smart Images

Figure CN121323658A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of path planning technology, and in particular to a path planning method and system based on an improved A* algorithm and an improved DWA algorithm. Background Technology
[0002] Robotics and autonomous driving technologies are widely used in industrial manufacturing, logistics, and other fields. Path planning, as a core technology, directly affects system performance, energy consumption control, and safety and reliability. However, traditional path planning algorithms have significant limitations, specifically in the following aspects:
[0003] 1. In large maps or complex scenes, the A* algorithm needs to maintain open and closed lists, storing a large amount of node information, resulting in high memory consumption. Furthermore, the search space grows exponentially with the map size, leading to decreased computational efficiency and making it difficult to meet real-time requirements.
[0004] 2. Traditional path smoothing methods have two types of problems: First, excessively fitting the planned path leads to excessive curve curvature, resulting in longer travel time or violation of physical constraints; second, excessive smoothing causes the planned path to hit obstacles.
[0005] 3. The DWA algorithm lacks foresight and is prone to getting trapped in local optima. It selects the current optimal speed by simulating short-term trajectories and lacks a global perspective. In complex obstacle scenarios, the robot cannot foresee distant obstacles, which may lead to increased detour distance or planning failure.
[0006] 4. In dense obstacle scenarios, traditional DWA algorithms tend to detour around the outside of obstacles, increasing the total path length. Even if improved versions introduce global path guidance (such as A* key waypoints) to alleviate this problem, detour efficiency is still low in extremely dense environments.
[0007] Therefore, in order to meet the requirements of efficiency, accuracy and robustness of path planning algorithms in practical applications, it is necessary to improve the *A and DWA algorithms and combine the two to achieve better path planning. Summary of the Invention
[0008] Therefore, it is necessary to provide a path planning method and system based on the improved A* algorithm and the improved DWA algorithm to address the above-mentioned technical problems.
[0009] In a first aspect, the present invention provides a path planning method based on an improved A* algorithm and an improved DWA algorithm, comprising: acquiring a grid map of a material delivery scenario, and combining semantic information to output dynamically optimized heuristic function weights through a fully convolutional neural network model; generating a complete path based on the robot's current and target positions through bidirectional dynamic neighborhood search combined with heuristic function weights, obtaining a global path after adaptive smoothing and initiating navigation; when encountering dynamic obstacles during navigation, adjusting dynamic window parameters based on multi-objective optimization factors, predicting multiple motion trajectories, and selecting the optimal trajectory through a multi-cost factor evaluation model; after navigation is completed, inputting the current path coefficients into a path coefficient optimization network with a hierarchical attention mechanism, and using the updated coefficients for the next path planning.
[0010] Furthermore, a grid map of the material delivery scenario in which the robot performs its navigation task is obtained, and a fully convolutional neural network model is constructed by combining semantic information. The output of dynamically optimized heuristic function weights includes: obtaining semantic information of different semantic categories in the material delivery scenario, fusing it with the grid map in a multi-channel form to construct a semantic map; inputting it into a multi-scale fully convolutional neural network model to dynamically evaluate the current environment difficulty and output a score, and dynamically adjusting the heuristic function weights by combining feedback-optimized adjustment coefficients; at the same time, a semantic attention mechanism is deployed in the model to generate attention weight maps corresponding to different semantic categories, which are multiplied element-wise with the original input feature map to complete the weighted processing of different semantic features.
[0011] Furthermore, the process of generating attention weight maps corresponding to different semantic categories based on the input feature map, and performing element-wise multiplication of the attention weight maps with the original input feature map to achieve weighted processing of different semantic features includes: obtaining the feature map output by any convolutional block in the fully convolutional neural network model as the input feature map, and obtaining the semantic category label map corresponding to the input feature map; fusing the input feature map and the semantic category label map, and calculating the attention weights on the fused feature map to generate attention weight maps corresponding to different semantic categories; S143, applying the generated attention weight maps to the original input feature map to achieve weighted processing of different semantic features.
[0012] Furthermore, the process involves obtaining the robot's current and target positions, performing a bidirectional dynamic neighborhood search based on their relative positions, and combining this with heuristic function weights to generate the complete path for the current navigation task. This includes: obtaining the node coordinates of the robot's current and target positions, calculating the base angle between them and the target direction unit vector; checking if there are obstacles at nodes ahead in the target direction, returning the base angle if there are no obstacles; if there are obstacles, traversing the neighbor region of the current node to find unobstructed neighbor directions, returning the corresponding direction angle if the neighbor node is within the map and unobstructed; if there are no obstacles at the node ahead or no obstacle neighbors are found, returning the base angle; if there are obstacles at the node ahead and an obstacle-free neighbor is found, returning the obstacle avoidance angle; executing a bidirectional neighborhood pruning strategy based on the two dynamic relative positions of the search start point and target point, discarding three neighborhoods of the start point and target point respectively, and retaining five search directions; determining the final search direction and combining it with heuristic function weights to generate the complete path for the current navigation task.
[0013] Furthermore, based on the path curvature characteristics of the complete path, adaptive smoothing is performed to output the smoothed global path, and the robot is then initiated to perform navigation tasks, including: calculating the first and second derivatives of each node in the complete path; calculating the path curvature and performing moving average filtering to obtain the current path segment starting from the target position and calculating its average curvature; adjusting the length of the path segment in real time according to the average curvature of the current path segment; searching for obstacle grids in the neighborhood around each path point, retaining only grids with valid indices, and if there are obstacle grids in the neighborhood, calculating the Euclidean distance from the current path point to the nearest obstacle to quantify the proximity of the path to the obstacle; performing an adaptive smoothing strategy based on the path curvature and the proximity of the obstacle, using Bezier curve smoothing when the maximum curvature is greater than a preset threshold; using Gaussian conservative smoothing when the obstacle proximity is less than a preset threshold; using cubic spline interpolation when both threshold conditions are met; merging the path segments and achieving smooth transition between segments through linear interpolation of overlapping areas to obtain the smoothed global path.
[0014] Furthermore, a dynamic window adjustment strategy based on multi-objective optimization factors is employed to generate dynamic window parameters. Dynamic trajectory prediction is then performed based on these parameters, generating multiple motion trajectories. These parameters include: calculating a safety factor based on the distance between the robot's current position and the nearest obstacle (a smaller safety factor results in a smaller dynamic window); calculating an efficiency factor based on the distance between the robot's current position and the target position (a larger efficiency factor results in a larger dynamic window); calculating a stability factor based on the robot's current speed and the maximum permissible speed (a smaller stability factor results in a smaller dynamic window); assigning weighting coefficients to the safety factor, efficiency factor, and stability factor, and calculating an adjustment factor fused from the multi-objective optimization factors through weighted average summation; acquiring the robot's current linear velocity and angular velocity variables, along with their original constraints, and adjusting the dynamic window size based on the adjustment factor to obtain the final variable constraints, linear velocity constraints, and angular velocity constraints, which serve as the dynamic window parameters; and predicting the motion trajectory based on these parameters to generate multiple candidate motion trajectories.
[0015] Furthermore, based on a pre-defined multivariate evaluation function, a multivariate cost factor evaluation model is constructed to comprehensively evaluate each motion trajectory, generate evaluation values for each trajectory, and select the trajectory with the optimal evaluation value as the final trajectory. This includes: constructing multivariate evaluation functions and calculating the corresponding multivariate cost factors; the multivariate evaluation functions include curvature continuity evaluation function, path mileage evaluation function, dynamic obstacle prediction and avoidance evaluation function, social force field evaluation function, and task completion time evaluation function; the multivariate cost factors include curvature continuity cost, path mileage cost, dynamic obstacle prediction and avoidance cost, social force field cost, and task completion time cost; based on the calculation results of the multivariate cost factors, combined with the target azimuth cost, velocity cost, and obstacle distance cost, a multivariate cost factor evaluation model is constructed to calculate the evaluation value of each motion trajectory through a weighted summation method, which serves as the total cost for the robot to select the corresponding motion trajectory. The trajectory with the optimal evaluation value, i.e., the lowest total cost, is selected as the final trajectory.
[0016] Furthermore, after the navigation task is completed, the path coefficients recorded in this navigation task are input into a path coefficient optimization network based on a hierarchical attention mechanism to obtain optimized and updated path coefficients. These optimized path coefficients are used for path planning in the next navigation task. This includes: recording multi-dimensional path coefficients during the current navigation task; path coefficients include heuristic function weight adjustment coefficients, preset curvature thresholds, safety factor weighting coefficients, efficiency factor weighting coefficients, stability factor weighting coefficients, and weights of various multi-dimensional cost factors; based on the collected multi-dimensional path coefficients, combined with environmental features and historical performance, they are input into the path weight optimization network to output optimized path coefficients; environmental features include map complexity, obstacle density, and dynamic obstacle speed; historical performance includes path length, planning time, obstacle avoidance success rate, path smoothness, and dynamic obstacle response; and the optimized path coefficients are used as the original path coefficients for the next navigation task.
[0017] Secondly, the present invention also provides a path planning system based on an improved A* algorithm and an improved DWA algorithm, the system comprising:
[0018] The dynamic environment assessment module acquires a grid map of the material delivery scenario, constructs a fully convolutional neural network model based on semantic information, and outputs dynamically optimized heuristic function weights. The bidirectional neighborhood search module acquires the robot's current and target positions, performs a bidirectional dynamic neighborhood search based on relative positions, and generates a complete path using heuristic function weights. The adaptive path smoothing module performs adaptive smoothing based on the curvature characteristics of the complete path, outputs the smoothed global path, and initiates navigation. The dynamic window adjustment module generates parameters based on a dynamic window adjustment strategy using multi-objective optimization factors when encountering dynamic obstacles during navigation, thereby predicting multiple motion trajectories. The multivariate cost evaluation module constructs an evaluation model based on a preset multivariate evaluation function, comprehensively evaluates each motion trajectory, generates an evaluation value, selects the optimal trajectory, and issues it to the robot for execution. The path coefficient optimization module, after navigation, inputs the recorded path coefficients into a hierarchical attention mechanism path coefficient optimization network to obtain updated coefficients for use in the next path planning.
[0019] The beneficial effects of this invention are as follows:
[0020] 1. This invention systematically improves a series of problems existing in global path planning and local path optimization, aiming to reduce the planning time of the A* algorithm in global path planning and improve its search efficiency in large-scale scenarios by optimizing the algorithm structure. At the same time, it proposes innovative solutions to address the limitations of traditional path smoothing methods (such as Bézier curves, cubic spline interpolation, Gaussian curves, etc.) in the field of path planning, especially the difficulty in balancing smoothness and path feasibility. In addition, it makes various improvements to address the shortcomings of the DWA algorithm in easily getting trapped in local optima in dynamic environments, as well as the problem of long and inefficient detour paths in extremely dense obstacle scenarios, in order to achieve more robust local obstacle avoidance.
[0021] 2. Regarding the improvement of the A* algorithm, there are three innovative measures: First, dynamic weight adjustment based on FCN environment assessment, which dynamically adapts the heuristic function weights to the hospital material delivery scenario through autonomous learning; second, dynamic neighborhood pruning strategy, which reduces the number of nodes searched and significantly shortens the planning time; and third, adaptive path smoothing strategy, which effectively solves the problems of excessive curve curvature leading to excessive travel time or violation of physical constraints in traditional methods, as well as excessive smoothing causing the path to hit obstacles.
[0022] 3. For the DWA algorithm, based on the traditional dynamic window, a multi-objective optimization strategy is proposed to dynamically adjust the velocity and angular velocity windows to balance safety, efficiency and stability; the evaluation function is improved and a multi-trajectory fusion decision mechanism is constructed to shorten the task time and avoid getting trapped in local optima; in addition, a path coefficient optimization network based on a hierarchical attention mechanism is proposed to help the robot continuously optimize autonomously after each navigation task and improve navigation performance. Attached Figure Description
[0023] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0024] Figure 1 This is a flowchart of the path planning method according to an embodiment of the present invention;
[0025] Figure 2 This is a flowchart of a dynamic neighborhood search based on relative position according to an embodiment of the present invention;
[0026] Figure 3 (a) is a schematic diagram of 8-neighborhood search according to an embodiment of the present invention;
[0027] Figure 3 (b) is a schematic diagram of a bidirectional dynamic neighborhood search pruning strategy based on relative position according to an embodiment of the present invention;
[0028] Figure 4(a) is a schematic diagram of the conventional A* algorithm according to an embodiment of the present invention;
[0029] Figure 4 (b) is a schematic diagram of the improved A* algorithm according to an embodiment of the present invention;
[0030] Figure 5 This is a flowchart of an adaptive path smoothing strategy based on curvature according to an embodiment of the present invention;
[0031] Figure 6 This is a schematic diagram of an adaptive path smoothing strategy based on curvature according to an embodiment of the present invention;
[0032] Figure 7 (a) is a schematic diagram of the traditional DWA algorithm according to an embodiment of the present invention;
[0033] Figure 7 (b) is a schematic diagram of the improved DWA algorithm according to an embodiment of the present invention;
[0034] Figure 8 This is a flowchart of a path weight optimization network based on a hierarchical attention mechanism according to an embodiment of the present invention;
[0035] Figure 9 This is a path weight optimization network operation process based on a hierarchical attention mechanism according to an embodiment of the present invention;
[0036] Figure 10 This is a system principle block diagram according to an embodiment of the present invention.
[0037] The icons are labeled as follows: 1. Dynamic environment assessment module; 2. Bidirectional neighborhood search module; 3. Adaptive path smoothing module; 4. Dynamic window adjustment module; 5. Multivariate cost evaluation module; 6. Path coefficient optimization module. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0039] Please see Figure 1 A path planning method based on an improved A* algorithm and an improved DWA algorithm, comprising:
[0040] Before robot navigation, global path planning is initiated: the grid map is dynamically weighted based on FCN (Fully Convolutional Neural Network) to obtain heuristic function weights. Combined with the robot's current position, target point, and the relative position of the grid map input, a dynamic neighborhood search algorithm is used to obtain angle values. Then, a complete path is generated through a dynamic bidirectional neighborhood pruning strategy. After curvature adaptive smoothing, the global basic path is output, and the robot then starts navigation. When encountering dynamic obstacles during navigation, local path planning is initiated immediately. Based on multi-objective optimization factors, dynamic window parameters are adjusted and multiple motion trajectories are generated. After comprehensive evaluation by a multi-cost factor evaluation system, the optimal trajectory is determined for the robot to execute. After the task is completed, the path coefficients are input into a hierarchical attention mechanism optimization network. The output optimization coefficients are used as the original coefficients for the next planning iteration, gradually realizing path planning optimization. This process can autonomously adjust and learn for different environments.
[0041] S1 and A* Algorithms - Dynamic Weight Adjustment for Environment Assessment Based on FCN: Before navigation, the robot obtains a grid map of the material delivery scenario, combines semantic information to construct a fully convolutional neural network model, and outputs dynamically optimized heuristic function weights.
[0042] In complex hospital material delivery scenarios, the traditional A* algorithm has significant limitations. As a classic heuristic search algorithm widely used in robot path planning, its core is to guide the search direction through a heuristic function and evaluate the merits of the path based on the actual cost. However, the heuristic function weights of the traditional A* algorithm are fixed, resulting in a static weight defect that cannot adapt to changes in environmental complexity.
[0043] Specifically, in complex environments, excessively small weights can lead to search space explosion, while in simple environments, excessively large weights may ignore the global optimum. To address this, we propose an A* algorithm for dynamic weight adjustment based on FCN (Flexible Coding Network), which uses environmental characteristics to achieve heuristic adaptive weight adjustment.
[0044] In the description of this invention, a grid map of the material delivery scenario in which the robot is located before performing the navigation task is obtained, and a fully convolutional neural network model is constructed by combining semantic information. The output dynamically optimized heuristic function weights include:
[0045] S11. Obtain semantic information of different semantic categories in the material delivery scenario, and integrate the semantic information with the grid map in a multi-channel form to construct a semantic map containing semantic information.
[0046] Specifically, for hospital material delivery scenarios, this invention defines semantic categories into the following nine types, which better reflect the impact of different areas on path planning in actual application scenarios:
[0047] a) Open corridors: Frequent personnel flow, spacious layout, relatively flexible path selection, but personnel avoidance must be considered; b) Large medical equipment area: Fixed and large equipment, limited surrounding space, requiring precise avoidance; c) Wall barrier area: Completely impassable fixed obstacles, a hard constraint for path planning; d) General staff office corridors: Daily personnel passage area, moderate traffic flow, path planning can balance efficiency and safety; e) Pharmacy storage area: Less frequent personnel movement, but potentially complex internal layout, requiring reasonable path planning; f) Warehouse storage area: Densely stored goods, infrequent personnel activity, path planning can focus on efficiency; g) Contamination risk paths: Paths with contamination risks, such as those around infectious disease wards, should be avoided as much as possible; h) Emergency access corridors: For rapid passage of emergency vehicles and personnel, strictly prohibited from being occupied by other personnel; i) Aseptic operation corridors: Used for aseptic surgery and other procedures, must maintain a sterile environment, and unauthorized personnel are strictly prohibited from entering.
[0048] Semantic information is fused with a raster map in a multi-channel manner to construct a map containing the aforementioned semantic information. Each semantic information occupies one channel, forming 10 channels with the raster map, which are then input into the FCN network. Channel 1 is the original raster map, where 0 represents a passable area and 1 represents an obstacle area; channels 2-10 correspond to 9 semantic categories, where 1 indicates that the pixel belongs to the corresponding category and 0 indicates that it does not.
[0049] S12. Using a multi-channel semantic map as input, construct a multi-scale fully convolutional neural network model to dynamically evaluate the difficulty of the robot's current environment and output an environment difficulty score.
[0050] Specifically, to quantify environmental complexity, a multi-scale FCN architecture was designed. The input is a 10-channel semantic map, and the output is an environmental difficulty score N∈[0,1]. The structure is as follows:
[0051] a) Input layer: A grayscale map of any H×W pixels with 10 channels.
[0052] b) Feature Extraction Layer: Through three downsampling passes, the spatial resolution of the feature map is reduced by 8 times, but the number of channels is gradually increased (32→64→128). Simultaneously, a semantic attention module is added. This module generates an attention weight map of the same size as the input feature map through 1×1 convolution, weighting features of different semantic categories. This module will be further explained at the end of this section.
[0053] 1. Convolutional block 1: Input channel 10; Output channel 32; Operations: 3×3 convolution (Padding=1) + ReLU + 2×2 MaxPooling (stride 2) + semantic attention module; Output size: H / 2×W / 2×32.
[0054] 2. Convolutional Block 2: Input channels 32; Output channels 64; Operations: 3×3 convolution (Padding=1) + ReLU + 2×2 MaxPooling (stride 2) + semantic attention module; Output size: H⁄4×W⁄4×64.
[0055] 3. Convolutional block 3: Input channels 64; Output channels 128; Operations: 3×3 convolution (Padding=1) + ReLU + 2×2 MaxPooling (stride 2); Output size: H / 8×W / 8×128.
[0056] c) Global Feature Layer: 1. Adaptive global average pooling can compress feature maps of arbitrary size (e.g., H / 8×W / 8×128) to 1×1×128. For the H×W feature map of each channel, the average value of all spatial locations is calculated:
[0057] ;
[0058] 2. 1×1 Convolution Compression: 2.1 First Layer: Input channels 128; Output channels 256; Operation: 1×1 convolution (linear transformation) + ReLU; Output size: 1×1×256. 2.2 Second Layer: Input channels 256; Output channels 10; Operation: 1×1 convolution (linear transformation) + Sigmoid; Output size: 1×1×10.
[0059] Output 10 values. The first value is the overall influence of the original raster map on the overall environmental difficulty, ranging from [0, 1]. The second to tenth values correspond to the environmental difficulty contribution of the nine semantic categories, also ranging from [0, 1].
[0060] d) Output layer: Remove the 1×1 dimension to obtain 10 scalar values; Environmental difficulty score calculation:
[0061] ;
[0062] Wherein, n1 represents the overall influence of the original raster map, n2–n10 represent the environmental difficulty contributions of the nine semantic categories, and w1–w10 are the corresponding weight coefficients. The weight coefficients are set based on the degree of influence of different semantic scenarios and the original raster map on path planning.
[0063] S13. Based on the environmental difficulty score and combined with the feedback-optimized heuristic function weight adjustment coefficient, dynamically adjust the heuristic function weights for the robot to perform navigation tasks.
[0064] Specifically, the heuristic function weights are positively correlated with the environment difficulty score, and the adjustment rules are as follows:
[0065] ;
[0066] in, The base weight is set to 1.0, and α is the heuristic function weight adjustment coefficient.
[0067] Through the A* algorithm, an improvement on the dynamic weight adjustment of environmental assessment based on FCN, the environmental difficulty score N and the heuristic function weight ω are adjusted differently under different semantic scenarios: In open corridors with frequent personnel flow and many dynamic obstacles, N and ω are moderate, taking into account both search speed and safety, combined with static obstacle information from the grid map; In areas with large medical equipment and wall obstacles, N is high, and the grid map accurately marks the obstacle positions, corresponding to a larger ω, strengthening heuristic guidance to accurately avoid obstacles and reduce redundant nodes; In ordinary employee office passages, pharmacies, and warehouse storage areas, N is moderately large, and ω is also moderately large, combined with grid map information, improving search efficiency while ensuring reasonable paths; In contamination risk paths, emergency passages, and sterile operation passages, N is extremely high, and the grid map marks the passage positions, corresponding to a very large ω, ensuring strict avoidance to meet safety and sterility requirements; If too many dynamic obstacles are detected in areas such as open corridors, the calculation method of N can be adjusted in real time to increase the contribution of the semantic category of dynamic obstacles and the comprehensive influence of dynamically changing areas in the grid map, thereby reducing ω and adopting a more conservative search strategy to ensure safety.
[0068] S14. Deploy a semantic attention mechanism in the fully convolutional neural network model, generate attention weight maps corresponding to different semantic categories based on the input feature map, and perform element-wise multiplication between the attention weight map and the original input feature map to achieve weighted processing of different semantic features.
[0069] The semantic attention mechanism (semantic attention module) mainly consists of three parts: feature input, weight generation, and feature weighting. Its core idea is to use a lightweight sub-network to generate attention weight maps corresponding to different semantic categories based on the input feature map, and then multiply these weight maps element-wise with the original feature map to achieve weighting of different semantic features.
[0070] In the description of this invention, generating attention weight maps corresponding to different semantic categories based on the input feature map, and performing element-wise multiplication of the attention weight maps with the original input feature map to achieve weighted processing of different semantic features includes:
[0071] S141. Feature Input: Obtain the feature map output of any convolutional block in the fully convolutional neural network model as the input feature map, and obtain the semantic category label map corresponding to the input feature map.
[0072] Specifically, the input feature map comes from the output feature map of a convolutional block in the FCN feature extraction layer, denoted as F∈R^(H×W×C), where H and W represent the height and width of the feature map, respectively, and C represents the number of channels. This feature map contains preliminary feature information for different semantic categories.
[0073] The semantic category information comes from the semantic category label map corresponding to the input feature map, denoted as S∈R^(H×W×K), where K represents the number of semantic categories (K=9 in this algorithm). The value of each pixel in the semantic category label map represents the semantic category to which that location belongs, and is represented in one-hot encoding form.
[0074] S142. Weight generation: The input feature map is fused with the semantic category label map, and attention weights are calculated on the fused feature map to generate attention weight maps corresponding to different semantic categories.
[0075] Specifically, the weight generation part is the core of the semantic attention module. Its function is to generate attention weight maps corresponding to different semantic categories based on the input feature map and semantic category information. The steps are as follows:
[0076] a) Feature fusion: fusing the input feature map and semantic category label graph To integrate.
[0077] To achieve this goal, we first analyze the semantic category label graph. Perform a global average pooling operation to reduce its size from Compress to This yields the global feature representation for each semantic category. Then, Through a The convolutional layer undergoes a linear transformation to adjust its number of channels to match the input feature map. Same number of channels The transformed semantic features are obtained. Finally, With input feature map Perform element-wise addition to achieve feature fusion and obtain the fused feature map. ,Right now:
[0078] ;
[0079] ;
[0080] ;
[0081] .
[0082] b) Attention weight calculation: Calculate the attention weights for the fused feature map. Perform attention weight calculation. First, use a... Convolutional layer pairs Perform a linear transformation to compress the number of channels to K, and obtain the feature map. Then, regarding In spatial dimension ( and Applying the softmax function to the dimension ( ) yields attention weight maps corresponding to different semantic categories. The formula for calculating the softmax function is as follows:
[0083] ;
[0084] In the formula, .
[0085] S143, Feature Weighting: The generated attention weight map is applied to the original input feature map to achieve weighted processing of different semantic features.
[0086] Specifically, the function of the feature weighting part is to generate an attention weight map. Applied to the original input feature map This involves weighting different semantic features. The specific operation is as follows:
[0087] a) Semantic feature extraction: For each semantic category Attention weight map Weighted graph of corresponding categories (Right now ) and the original input feature map Perform element-wise multiplication to obtain the corresponding semantic category. Weighted feature map ,Right now:
[0088] ;
[0089] Where i=1,2,⋯,H,j=1,2,⋯,W,c=1,2,⋯,C.
[0090] b) Feature fusion output: a weighted feature map of all semantic categories. A concatenation operation is performed along the channel dimension to obtain the final weighted feature map. Then, in order to maintain the same number of channels in the output feature map as the input feature map... Figure 1 To, use one Convolutional layer pairs Perform channel compression to reduce the number of channels from Compress back The final output feature map is obtained. .
[0091] The semantic attention module boasts excellent adaptive and feature extraction capabilities. On one hand, its powerful adaptive learning ability can automatically learn the importance weights of different semantic categories without requiring manual parameter setting. This significantly improves the model's adaptability to complex semantic scenarios and enhances its generalization ability under different data distributions, ensuring stable performance in diverse real-world application scenarios. On the other hand, by precisely weighting different semantic features, this module can guide the model to focus on key semantic information and suppress irrelevant interference, significantly improving the quality of feature extraction and providing more accurate and effective feature representations for subsequent tasks such as path planning.
[0092] S2 and A* algorithms - bidirectional dynamic neighborhood search based on relative position: obtain the robot's current position and target position, perform bidirectional dynamic neighborhood search based on relative position, and combine heuristic function weights to generate the complete path for the current navigation task.
[0093] In the bidirectional A* algorithm node search process, the search direction can be dynamically selected based on the relative position of the current search starting point and the target point, thereby significantly reducing the number of search nodes and shortening the global path planning time. The process is as follows: Figure 2 .
[0094] In the description of this invention, obtaining the robot's current position and target position, performing a bidirectional dynamic neighborhood search based on the relative positions, and combining heuristic function weights to generate the complete path for the current navigation task includes:
[0095] S21. Obtain the node coordinates of the robot's current position and the target position, and calculate the basic angle of the robot from the current position to the target position based on the relative position of the node coordinates.
[0096] Specifically, the basic relative position is first calculated, which involves calculating the basic angle (in radians) from the current node (the node where the current position is located) to the target node (the node where the target position is located):
[0097] ;
[0098] In the formula, These are the coordinates of the current node. These are the coordinates of the target node. It is the four-quadrant arctangent function, and its return value range is... .
[0099] S22. Calculate the unit vector of the robot's target direction from its current position to the target position.
[0100] Specifically, it is necessary to calculate the unit vector in the target direction, that is, to calculate the unit vector in the target direction. :
[0101] ;
[0102] ;
[0103] In the formula, It is the Euclidean distance from the current node to the target node.
[0104] S23. Check if there are any obstacles in the nodes ahead of the target direction. If an obstacle is detected, proceed to the next step. If no obstacle is detected, return to the base angle.
[0105] Specifically, obstacle check involves checking whether the node in front of the target direction is an obstacle:
[0106] ;
[0107] In the formula, To detect whether there is an obstacle in the target direction, and to detect if... If the obstacle is within the map's range, then the obstacle avoidance logic is entered; otherwise, return. .
[0108] S24. If the node in front of the target direction is an obstacle, then traverse the neighbor area of the current node to find an unobstructed neighbor direction. If the neighbor node is within the map range and is unobstructed, then return the corresponding direction angle.
[0109] Specifically, if there is an obstacle ahead, traverse the current node's neighbor region to find unobstructed neighbor directions. :
[0110] ;
[0111] ;
[0112] in, Let the coordinates of the neighboring nodes be... If the area is within the map and unobstructed, the angle in that direction will be returned:
[0113] ;
[0114] in, This is a list of domain offsets.
[0115] S25. If there are no obstacles or no obstacle neighbors are found at the node ahead, return to the base angle. If there are obstacles at the node ahead and no obstacle neighbors are found, return to the obstacle avoidance angle.
[0116] Specifically, if there are no obstacles ahead or no unobstructed neighbors are found, return to the base angle. If there is an obstacle ahead and an accessible neighbor is found, return to the obstacle avoidance angle. .
[0117] Relative angle of coordinates It changes with the coordinates of the current search starting point and the current search target point. Based on the characteristics of the bidirectional A* algorithm, each search... and Both will change, thus yielding two dynamic results. :Right now Compared to relative position , Compared to relative position At the same time, according to this and A dynamic bidirectional neighborhood pruning strategy is implemented, as shown in Table 1.
[0118] Table 1. Dynamic bidirectional neighborhood pruning strategy
[0119] The relationship between the search neighborhood and grid coordinates is as follows: Figure 3 As shown in (a).
[0120] S26. Obtain the two dynamic relative positions of the starting point and the target point for each search. Implement a dynamic bidirectional neighborhood pruning strategy based on the two relative positions. Dynamically discard the three neighbors of the starting point and the three neighbors of the target node in a single search, and retain the five search directions of the starting point and the target point respectively.
[0121] Where point O is the robot's current position, point A corresponds to the search direction [1, 0], point B corresponds to the search direction [1, 1], point C corresponds to the search direction [0, 1], and so on, for a total of 8 search directions, which is the traditional 8-neighborhood search.
[0122] Based on the traditional 8-neighbor search, this method combines the bidirectional A* algorithm with the above-calculated... and The value dynamically discards the three neighborhoods of the starting point and the three neighborhoods of the target point for a single search, retaining the five search directions of the starting point and the five search directions of the target point, such as... Figure 3 As shown in (b).
[0123] S27. Determine the final search direction and, in conjunction with heuristic function weights, generate the complete path for the current navigation task.
[0124] Specifically, after determining the search direction, the complete search process is achieved by combining the heuristic function weights obtained from S1.
[0125] Each time the current search starting point and the current search target point change, the search domain also changes accordingly. This improvement, combined with Improvement 1: dynamic weight adjustment based on FCN-based environment assessment, can reduce search nodes by 45%, save 58% of path planning time, and significantly reduce the probability of planning failures that may be caused by static domain search strategies and static domain pruning search strategies. Furthermore, traditional A* programming... Figure 4 As shown in (a), the improved A* program is as follows: Figure 4 As shown in (b).
[0126] S3 and A* algorithms - Curvature-based adaptive path smoothing strategy: Based on the path curvature characteristics of the complete path, perform adaptive smoothing processing, output the smoothed global path, and start the robot to perform navigation tasks.
[0127] To address two key issues with traditional path smoothing methods—namely, over-fitting the planned path leading to excessive curve curvature, resulting in excessively long travel times or violations of physics constraints, and over-smoothing causing the planned path to encounter obstacles—an adaptive path smoothing strategy is proposed. The process is as follows: Figure 5 As stated above.
[0128] In the description of this invention, based on the path curvature characteristics of the complete path, adaptive smoothing processing is performed to output a smoothed global path, and the robot is then initiated to perform a navigation task, including:
[0129] S31. Calculate the first and second derivatives of each node in the complete path.
[0130] S34. Search for obstacle grids in the neighborhood around each path point, and retain only obstacle grids that match the valid index. If there is an obstacle grid in the neighborhood, calculate the Euclidean distance from the current path point to the nearest obstacle to quantify the proximity of the path to the obstacle.
[0131] Specifically, the proximity of the path to obstacles is quantitatively calculated for each path point. Search for obstacle grids within its surrounding area:
[0132] ;
[0133] Only retain valid indexes (within the map area):
[0134] ;
[0135] W and H represent the width and height (number of grid cells) of the map.
[0136] If there is an obstacle grid within the domain, calculate the Euclidean distance from the current path point to the nearest obstacle:
[0137] ;
[0138] In the formula, , .
[0139] S35. Based on the path curvature and the proximity of obstacles, an adaptive smoothing strategy is applied to the path segments. If the maximum path curvature is greater than a preset curvature threshold, Bézier curve smoothing is used. If the proximity of obstacles is less than a preset proximity threshold, Gaussian conservative smoothing is used. If the maximum path curvature is less than or equal to the preset curvature threshold and the proximity of obstacles is greater than or equal to the preset proximity threshold, cubic spline interpolation is used.
[0140] Specifically, based on the calculated path curvature and proximity to obstacles, an adaptive smoothing strategy is implemented for path segmentation, whereby... The set curvature threshold is: a) High curvature road sections a) Smoothing using Bézier curves; b) Areas with dense obstacles Enable Gaussian conservative smoothing; c) Use cubic spline interpolation for ordinary road sections.
[0141] S36. Merge multiple path segments and achieve smooth transition between segments through linear interpolation of overlapping areas to obtain a smoothed global path.
[0142] Specifically, multiple path segments are merged, and linear interpolation of overlapping areas is used to achieve smooth transitions between segments, avoiding abrupt changes in path direction; overlap length calculation:
[0143] ;
[0144] in, The length of the current segment. This represents the length of the merged paths.
[0145] Linear interpolation for overlapping regions:
[0146]
[0147] In the formula, k is the index from back to front in the merge path. These are the coordinates of points in the overlapping area between the previous and current path segments. The coordinates of the points where the current path segment overlaps with the previous path segment.
[0148] like Figure 6As shown, the black curve generated by the adaptive path smoothing method exhibits significant optimization effects. Compared to other smoothing algorithms, cubic spline interpolation and B-spline curves, due to over-fitting the original path data points, result in redundant transitions and insufficient smoothness, leading to longer final paths. Linear smoothing methods are also limited by insufficient smoothness, resulting in poor optimization effects. While Bézier curves achieve the shortest path due to high smoothness, over-smoothing causes the trajectory to penetrate obstacle areas, rendering it infeasible. In contrast, the adaptive path smoothing curve generated by this improved method achieves multi-dimensional optimization: inheriting the short-path advantage of Bézier curves, it precisely avoids obstacles through dynamic adjustment, preserving the trajectory-fitting characteristics of spline interpolation while overcoming the local defects of various traditional methods, ultimately achieving a superior path smoothing effect.
[0149] S4, DWA Algorithm - Dynamic Window Adjustment Strategy Based on Multi-Objective Optimization Factor: When the robot encounters dynamic obstacles while performing navigation tasks, it generates dynamic window parameters based on the dynamic window adjustment strategy of multi-objective optimization factor, and performs dynamic trajectory prediction based on the dynamic window parameters to generate multiple motion trajectories.
[0150] This invention adds a safety factor, an efficiency factor, and a stability factor to the traditional dynamic window, and adopts a multi-objective optimization strategy to dynamically adjust the speed and angular velocity windows, balancing the three key factors of safety, efficiency, and stability.
[0151] In the description of this invention, a dynamic window adjustment strategy based on multi-objective optimization factors is used to generate dynamic window parameters, and dynamic trajectory prediction is performed based on the dynamic window parameters to generate multiple motion trajectories, including:
[0152] S41. Construct a safety factor formula based on the distance between the robot's current position and the nearest obstacle to calculate the safety factor. The smaller the safety factor, the smaller the dynamic window.
[0153] Specifically, safety factors The safety factor is dynamically adjusted based on the distance between the robot and the nearest obstacle. The closer the distance, the smaller the safety factor and the smaller the window to improve safety.
[0154] ;
[0155] in, The current coordinates, The coordinates of the nearest obstacle.
[0156] S42. Construct an efficiency factor formula based on the distance between the robot's current position and the target position to calculate the efficiency factor. The larger the efficiency factor, the larger the dynamic window.
[0157] Specifically, efficiency factor The efficiency factor is adjusted based on the distance between the robot and the target point; the farther the robot is from the target, the larger the efficiency factor and the larger the window to improve efficiency.
[0158]
[0159] in, The current coordinates, The coordinates of the nearest obstacle.
[0160] S43. Construct a stability factor formula based on the robot's current speed and the maximum allowable speed to calculate the stability factor. The smaller the stability factor, the smaller the dynamic window.
[0161] Specifically, stability factor Adjustments are made based on the robot's current speed; the higher the speed, the smaller the stability factor and the smaller the window to improve stability.
[0162] ;
[0163] in, At the current speed, To allow the maximum speed.
[0164] S44. Assign weighting coefficients to the safety factor, efficiency factor, and stability factor respectively, and calculate the adjustment factor for the fusion of multi-objective optimization factors by weighted average summation.
[0165] Specifically, the three factors are combined using a weighted average to form the final adjustment factor.
[0166] .
[0167] .
[0168] in, , , These are the weighting coefficients for the safety factor, efficiency factor, and stability factor, respectively.
[0169] S45. Obtain the robot's current linear velocity and angular velocity variables, along with their original constraints. Adjust the dynamic window size according to the adjustment factor to obtain the final variable constraints, linear velocity constraints, and angular velocity constraints, which serve as the dynamic window parameters. Based on these dynamic window parameters, predict the motion trajectory and generate multiple candidate trajectories.
[0170] Specifically, adjust the dynamic window based on the adjustment factor.
[0171] For variables Original constraints :
[0172] ;
[0173] Final constraint This yields a linear velocity constraint that balances safety, efficiency, and stability. Angular velocity constraint .
[0174] From the robot's linear velocity and angular velocity Several groups were selected from the feasible region. Combinations; based on these combinations of linear and angular velocities, the motion trajectory of the robot running with the corresponding parameters can be simulated and inferred.
[0175] S5 and DWA Algorithms - Improved Based on Multivariate Cost Factor Evaluation System: Based on a pre-defined multivariate evaluation function, a multivariate cost factor evaluation model is constructed to comprehensively evaluate each motion trajectory, generate evaluation values for each motion trajectory, and select the motion trajectory with the best evaluation value as the final trajectory.
[0176] In the DWA algorithm, the traditional evaluation system is built upon three core evaluation functions: target azimuth cost, obstacle distance cost, and velocity cost. Building upon this system, a curvature coherence evaluation function is added to reduce paths with high curvature; a path mileage evaluation function is added to reduce the total path distance; a dynamic obstacle prediction and avoidance evaluation function is added to consider the prediction of the future position of moving obstacles; a social force field evaluation function is added, drawing on social force models to simulate human avoidance behavior; and a task completion time evaluation function is added to shorten the task time as much as possible.
[0177] In the description of this invention, a multivariate cost factor evaluation model is constructed based on a pre-defined multivariate evaluation function to comprehensively evaluate each motion trajectory, generate evaluation values for each motion trajectory, and select the motion trajectory with the optimal evaluation value as the final trajectory, including:
[0178] S51. Construct multivariate evaluation functions and calculate the corresponding multivariate cost factors. The multivariate evaluation functions include curvature continuity evaluation function, path mileage evaluation function, dynamic obstacle prediction and avoidance evaluation function, social force field evaluation function, and task completion time evaluation function. The multivariate cost factors include curvature continuity cost, path mileage cost, dynamic obstacle prediction and avoidance cost, social force field cost, and task completion time cost.
[0179] Specifically, the curvature coherence evaluation function:
[0180] ;
[0181] In the formula, For the first Angle at each position, This is at the cost of curvature continuity.
[0182] Path mileage evaluation function:
[0183] ;
[0184] In the formula, The coordinates of the points already traveled. This refers to the cost of the path mileage.
[0185] Dynamic obstacle prediction and avoidance evaluation function:
[0186] ;
[0187] In the formula, Indicates the robot's current position through Predicting the location after a certain time. Predict the cost of avoiding dynamic obstacles.
[0188] Social force field evaluation function:
[0189]
[0190] In the formula, A collection of obstacles. The robot's current coordinates, Here are the coordinates of the obstacle. For personal space radius, The cost of social forces.
[0191] Task completion time evaluation function:
[0192] ;
[0193] In the formula, Where n is the remaining distance for the task and n is the number of trajectory points. Let the velocity be at point i+1. It is the maximum speed allowed. It is the cost of time to complete the task.
[0194] S52. Based on the calculation results of the multivariate cost factors, and combined with the target azimuth cost, velocity cost and obstacle distance cost, a multivariate cost factor evaluation model is constructed to calculate the evaluation value of each motion trajectory by weighted summation, and to use it as the total cost for the robot to select the corresponding motion trajectory.
[0195] Specifically, based on the evaluation function above, the total cost is:
[0196] ;
[0197] in, For the total cost, Cost of the target azimuth angle For the price of speed, The obstacle distance cost is as described above. The weights are for each item.
[0198] The multivariate cost factor evaluation model calculates its own evaluation value for each trajectory and uses it as the total cost for the robot to choose that path. The trajectory with the lowest total cost is selected as the robot's final trajectory.
[0199] also, Figure 7 The scale is 1:1m. Figure 7 In (a), the dynamic obstacles marked 1-5 all perform linear reciprocating motion. The robot's maximum linear velocity is 2 m / s and its maximum angular velocity is π / 2 rad / s. The parameters of each obstacle are as follows: Obstacle 1 has a motion range of (0, 2) to (4, 2) and a velocity of 2 m / s; Obstacle 2 has a motion range of (4, 2) to (4, 6) and a velocity of 2.5 m / s; Obstacle 3 has a motion range of (10, 2) to (10, 6) and a velocity of 3 m / s; Obstacle 4 has a motion range of (6, 6) to (10, 6) and a velocity of 2 m / s; Obstacle 5 has a motion range of (6, 8) to (10, 8) and a velocity of 2 m / s. Figure 7 (b) and Figure 7 (a) Consistent environment.
[0200] like Figure 7 As shown in (a), in complex environments, the traditional DWA algorithm is prone to getting trapped in local optima, causing the robot trajectory to repeatedly circle, significantly increasing the motion time and path length; while Figure 7 (b) By adopting the improved methods of steps S4 and S5, local optima can be effectively avoided in the same complex environment, while improving obstacle avoidance capability.
[0201] S6. Path coefficient optimization network based on hierarchical attention mechanism: After the navigation task is completed, the path coefficients recorded in this navigation task are input into the path coefficient optimization network based on hierarchical attention mechanism to obtain the optimized and updated path coefficients, which are used to perform path planning for the next navigation task.
[0202] In the description of this invention, after the navigation task is completed, the path coefficients recorded in this navigation task are input into a path coefficient optimization network based on a hierarchical attention mechanism to obtain optimized and updated path coefficients, which are used for path planning for the next navigation task.
[0203] S61. Record the multi-dimensional path coefficients during the current navigation task; the path coefficients include the heuristic function weight adjustment coefficient, the preset curvature threshold, the safety factor weighting coefficient, the efficiency factor weighting coefficient, the stability factor weighting coefficient, and the weights of various multi-dimensional cost factors.
[0204] Specifically, after each path planning operation by the robot, the following coefficient parameters involved in the improvements are optimized: the heuristic function weight adjustment coefficient in S1. Curvature threshold in S3 Safety factor weighting coefficient in S4 Efficiency factor weighting coefficient Stability factor weighting coefficient And the cost weights of each item in the total cost calculation in S5. A total of 13-dimensional weight vector is generated. This 13-dimensional weight vector, along with 3-dimensional environmental features (map complexity, obstacle density, and dynamic obstacle speed) and 5-dimensional historical performance (path length, planning time, obstacle avoidance success rate, path smoothness, and dynamic obstacle response), is input into the path weight optimization network. The network ultimately outputs an optimized 13-dimensional coefficient vector. The processing flow is as follows: Figure 8 As shown.
[0205] S62. Based on the collected multi-dimensional path coefficients, environmental features and historical performance are combined and input into the path weight optimization network, outputting the optimized path coefficients. Environmental features include map complexity, obstacle density, and dynamic obstacle speed. Historical performance includes path length, planning time, obstacle avoidance success rate, path smoothness, and dynamic obstacle response.
[0206] Specifically, the path weight optimization network and its principles are explained below.
[0207] I. The overall network architecture of the path weight optimization network adopts a three-level architecture of encoder-fusionist-decoder, including: a) Feature encoding stage: extracting local feature representations of environment, performance, and weights through grouped Transformers. b) Cross-modal fusion stage: realizing dynamic interaction of environment, performance, and weights using cross-attention. c) Weight optimization stage: generating a refined weight adjustment strategy by combining self-attention.
[0208] enter: (41-dimensional); Output: Optimized 13-dimensional weight vector ;
[0209] in, It is a 3D environmental feature vector. The historical performance vectors are concatenated from five previous data points (each five-dimensional). This is the original 13-dimensional weight vector.
[0210] II. Feature Encoding Stage - Group Transformer;
[0211] a) Environmental feature encoding branch; Input: 3D environmental features (map complexity) Obstacle density Dynamic obstacle speed ).
[0212] The processing flow includes: 1) Position encoding: adding a learnable position embedding to each feature. ), enhancing spatial relationship modeling. 2) Grouped Transformer: using a single-layer Transformer encoder (4-head attention, hidden layer dimension). ).
[0213] Output: 32-dimensional environmental feature vector ;
[0214]
[0215] Function: It can capture nonlinear dependencies between features (such as the relationship between obstacle density and dynamic velocity).
[0216] b) Historical performance coding branch;
[0217] enter: Dimensional historical performance sequence (Path length) Planning time Obstacle avoidance success rate Path smoothness Dynamic obstacle response ).
[0218] The processing flow includes: 1) Serialization: directly using the five historical performance data as time series input; 2) Grouping Transformer: using a single-layer Transformer encoder (4-head attention, hidden layer dimension...). ).
[0219] Output: 32-dimensional historical performance vector ;
[0220] ;
[0221] Function: Automatically learns the causal relationships between performance metrics (e.g., excessively long planning time may be caused by excessively long path length or low obstacle avoidance success rate). Additional information: If the number of historical performance records is less than 5, it expands to 5 records based on the most recent record.
[0222] c) Original coefficient branch; Input: 13-dimensional current coefficient vector (heuristic function weight adjustment coefficients) Curvature threshold Safety factor weighting coefficient Efficiency factor weighting coefficient Stability factor weighting coefficient Weight of each cost ).
[0223] The processing flow includes: 1) Weight grouping: Dividing the weights into 4 categories: heuristic function weight adjustment coefficient : 1-dimensional; curvature threshold coefficient : 1-dimensional; factor weighting coefficients , , 3D; Cost Weights 1) 8-dimensional. 2) Linear mapping: for 1-dimensional coefficients. , Directly map to 16 dimensions through fully connected (FC) layers. 3) Grouped Transformer: Apply a single-layer Transformer encoder (4-head attention, hidden layer dimension) to each group of weights. 4) Stitching and dimensionality reduction: The four sets of 16-dimensional features are stitched together to form 64-dimensional features, and then dimensionality is reduced to 32-dimensional through one layer of FC.
[0224] Output: 32-dimensional original coefficient feature vector .
[0225] .
[0226] Function: It can model dependencies within a coefficient group (e.g., (Competitive relationship). Supplement: The initial coefficients for the first run are manually set; thereafter, the initial coefficients for each run are the output coefficients from the previous run.
[0227] III. Cross-modal attention fusion stage - Cross-Attention.
[0228] a) Environment-performance cross-attention, input: (32 dimensions, as a query) + (32 dimensions, used as Key / Value);
[0229] Processing flow: Using a 4-head attention mechanism, hidden layer dimension The weighting of historical performance by computational environment characteristics.
[0230] Output: 32-dimensional environment-performance fusion features ;
[0231] ;
[0232] Dynamically determine the degree of attention given to historical performance based on environmental characteristics (e.g., pay more attention to obstacle avoidance success rate when there is a high obstacle density).
[0233] b) Trimodal cross-attention; Input: (32 dimensions, as a query) + (32 dimensions, used as Key / Value);
[0234] Processing flow: Using a 4-head attention mechanism, hidden layer dimension Calculate the attention weight of the fused features to the original weights.
[0235] Output: 32-dimensional three-modal fusion features ;
[0236] ;
[0237] Achieve dynamic interaction between environment, performance, and coefficients (e.g., prioritize adjusting collision cost weights when historical obstacle avoidance failures occur). ).
[0238] IV. Weight Optimization Stage: Self-Attention;
[0239] a) Weight adjustment strategy; Input: (32 dimensions).
[0240] The processing flow includes: 1) Self-attention expansion: The 32-dimensional feature is copied into 4 tokens (each token is 32D), simulating sequential input; 4 32-dimensional adjustment vectors are generated through a single-layer Transformer decoder (4-head attention). 2) Policy fusion: The 4 adjustment vectors are averaged, and 13-dimensional dynamic adjustment coefficients are generated through an FC layer. ).
[0241] Output: 13-dimensional dynamic adjustment coefficient ;
[0242] ;
[0243] Capture dependencies within the adjustment strategy (such as simultaneously adjusting safety factors). Distance cost weights to obstacles To enhance security.
[0244] b) Constraint handling, including: 1) Coefficient boundary constraints: for , The Sigmoid function restricts the range to [a certain value]. :
[0245] , ;
[0246] 2) Weight normalization: For vectors The Softmax function ensures that the sum is 1:
[0247] ;
[0248] in, It is the input vector of the th The denominator is the sum of the exponents of all input elements.
[0249] right The Softmax function ensures that the sum is 1:
[0250] ;
[0251] The optimized 13-dimensional coefficients are used as the initial coefficients for the next path planning iteration. After the next path planning is completed, the optimized coefficients from this iteration are used as the initial coefficients for subsequent optimizations. This process is repeated to gradually optimize the path planning. Simultaneously, this process can autonomously adjust and learn for different environments. The optimization process is as follows: Figure 9 As shown.
[0252] S63. Use the optimized path coefficients as the original path coefficients for the next navigation task.
[0253] After the robot completes path planning, the system records the current environmental features, original coefficients, and archives historical performance data. The current environmental features, original coefficients, and the five most recent historical performance records are then input into a hierarchical attention mechanism path weight optimization network, which outputs optimized coefficients. The system waits for the robot's next task, using the optimized coefficients as parameters for the new task. After the task is completed, the process is repeated, allowing the robot to autonomously learn and adjust its path planning. During autonomous learning, the model uses a cross-attention mechanism to infer the direction of weight adjustment from historical performance. For example, a low obstacle avoidance success rate might mean increasing the collision cost weight or decreasing the path smoothness weight. The system can also infer the current weight optimization direction from the current environment and historical performance.
[0254] Please see Figure 10This paper presents a path planning system based on an improved A* algorithm and an improved DWA algorithm. The system includes:
[0255] The dynamic environment assessment module 1 is used to obtain a grid map of the material delivery scene where the robot is located before performing the navigation task, and to build a fully convolutional neural network model by combining semantic information, and output dynamically optimized heuristic function weights.
[0256] The bidirectional neighborhood search module 2 is used to obtain the robot's current position and target position, perform bidirectional dynamic neighborhood search based on the relative position, and combine heuristic function weights to generate the complete path for the current navigation task.
[0257] The adaptive path smoothing module 3 is used to perform adaptive smoothing based on the path curvature characteristics of the complete path, output the smoothed global path, and start the robot to perform navigation tasks.
[0258] The dynamic window adjustment module 4 is used to generate dynamic window parameters based on a dynamic window adjustment strategy with multi-objective optimization factors when the robot encounters dynamic obstacles during navigation tasks. It then performs dynamic trajectory prediction based on the dynamic window parameters to generate multiple motion trajectories.
[0259] The multivariate cost evaluation module 5 is used to construct a multivariate cost factor evaluation model based on a pre-defined multivariate evaluation function, to comprehensively evaluate each motion trajectory, generate evaluation values for each motion trajectory, and select the trajectory with the best evaluation value as the final trajectory.
[0260] The path coefficient optimization module 6 is used to input the path coefficients recorded in the current navigation task into the path coefficient optimization network based on the hierarchical attention mechanism after the navigation task is completed, so as to obtain the optimized and updated path coefficients, which are used to perform path planning for the next navigation task.
[0261] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
Claims
1. A path planning method based on improved A* algorithm and improved DWA algorithm, characterized in that, The method comprises the following steps: S1, obtaining a grid map of a material distribution scene where a robot is located before performing a navigation task, combining semantic information to construct a full convolutional neural network model, and outputting a dynamically optimized heuristic function weight; S2, obtaining the current position and target position of the robot, performing bidirectional dynamic neighborhood search according to the relative position, and combining the heuristic function weight to generate a complete path for the current navigation task; S3, performing adaptive smoothing processing based on the path curvature characteristics of the complete path, outputting a smoothed global path, and starting the robot to perform the navigation task; S4, when the robot performs the navigation task, if a dynamic obstacle is encountered, generating a dynamic window parameter based on a multi-objective optimization factor dynamic window adjustment strategy, and performing dynamic trajectory prediction according to the dynamic window parameter to generate multiple motion trajectories; S5, constructing a multi-element evaluation function based on a pre-set multi-element evaluation function, constructing a multi-element cost factor evaluation model, comprehensively evaluating each motion trajectory, generating an evaluation value of each motion trajectory, and selecting the motion trajectory with the optimal evaluation value as the final trajectory; S6, after the navigation task is completed, inputting the path coefficient recorded in the navigation task into a path coefficient optimization network based on a hierarchical attention mechanism to obtain an updated path coefficient, which is used for path planning in the next navigation task.
2. The path planning method based on improved A* algorithm and improved DWA algorithm according to claim 1, characterized in that, The method comprises the following steps: S11, obtaining semantic information of different semantic categories in the material distribution scene, and fusing the semantic information with the grid map in the form of multiple channels to construct a semantic map containing semantic information; S12, taking the multi-channel semantic map as input, constructing a multi-scale full convolutional neural network model, dynamically evaluating the difficulty of the current environment of the robot, and outputting an environment difficulty score; S13, based on the environment difficulty score, combining a feedback-optimized heuristic function weight adjustment coefficient, and dynamically adjusting the heuristic function weight of the robot performing the navigation task; S14, deploying a semantic attention mechanism in the full convolutional neural network model, generating an attention weight map corresponding to different semantic categories according to the input feature map, and multiplying the attention weight map and the original input feature map element by element to realize weighted processing of different semantic features.
3. The path planning method based on improved A* algorithm and improved DWA algorithm according to claim 2, characterized in that, The method comprises the following steps: S141, obtaining a feature map output by any convolution block in the full convolutional neural network model as an input feature map, and obtaining a semantic category label map corresponding to the input feature map; S142, fusing the input feature map and the semantic category label map, and performing attention weight calculation on the fused feature map to generate an attention weight map corresponding to different semantic categories; S143, applying the generated attention weight map to the original input feature map to realize weighted processing of different semantic features.
4. The path planning method based on improved A* algorithm and improved DWA algorithm according to claim 1, characterized in that, The method comprises the following steps of: S21, acquiring node coordinates of the current position and the target position of the robot, and calculating a basic angle of the robot from the current position to the target position according to the relative positions of the node coordinates; S22, calculating a unit vector of a target direction of the robot from the current position to the target position; S23, checking whether there is an obstacle in the node in front of the target direction, and if an obstacle is detected, performing the next step, and if no obstacle is detected, returning the basic angle; S24, if the node in front of the target direction is an obstacle, traversing the neighbor region of the current node to find a neighbor direction without an obstacle, and if the neighbor node is within the range of the map and has no obstacle, returning the corresponding direction angle; S25, if the node in front of the target direction has no obstacle or no obstacle neighbor is found, returning the basic angle; if the node in front of the target direction has an obstacle and an obstacle-free neighbor is found, returning an obstacle-avoiding angle; S26, acquiring two dynamic relative positions of the starting point and the target point of each search, and realizing a dynamic bidirectional neighbor pruning strategy according to the two relative positions, dynamically discarding three neighbors of the starting point and three neighbors of the target node of a single search, and respectively retaining five search directions of the starting point and the target point; S27, determining a final search direction, combining a heuristic function weight, and generating a complete path of the current navigation task.
5. The path planning method based on improved A* algorithm and improved DWA algorithm according to claim 1, characterized in that, The method comprises the following steps of: S31, calculating first and second derivatives of each node in the complete path; S32, calculating path curvature of the complete path and performing a sliding average filtering process; acquiring a current path segment of the robot starting from the target position, and calculating an average curvature of the current path segment; S33, adjusting the length of the path segment in real time according to the average curvature of the current path segment; S34, searching for obstacle grids in the neighborhood around each path point, retaining only obstacle grids conforming to valid indexes, and if there are obstacle grids in the neighborhood range, calculating the Euclidean distance from the current path point to the nearest obstacle to quantify the proximity of the path to the obstacle; S35, based on the path curvature and the proximity of the obstacle, performing an adaptive smoothing strategy on the path segment, and performing corresponding smoothing processing on different path segments; S36, merging multiple path segments, realizing smooth transition between segments through linear interpolation in the overlapping area, and obtaining a smoothed global path.
6. The path planning method based on the improved A* algorithm and the improved DWA algorithm according to claim 5, characterized in that, The adaptive smoothing strategy for the path segment based on the path curvature and the proximity of the obstacle includes: if the maximum path curvature is greater than a preset curvature threshold, a Bezier curve smoothing is adopted; if the proximity of the obstacle is less than a preset proximity threshold, a Gaussian conservative smoothing is adopted; if the maximum path curvature is less than or equal to the preset curvature threshold and the proximity of the obstacle is greater than or equal to the preset proximity threshold, a cubic spline interpolation is adopted.
7. The path planning method based on improved A* algorithm and improved DWA algorithm according to claim 1, characterized in that, The dynamic window adjustment strategy based on the multi-objective optimization factor generates a dynamic window parameter, and performs dynamic trajectory prediction according to the dynamic window parameter to generate a plurality of motion trajectories, which comprises: S41, constructing a safety factor formula according to the distance between the current position of the robot and the nearest obstacle to calculate the safety factor, and the smaller the safety factor, the smaller the dynamic window; S42, constructing an efficiency factor formula according to the distance between the current position of the robot and the target position to calculate the efficiency factor, and the larger the efficiency factor, the larger the dynamic window; S43, constructing a stability factor formula according to the current speed of the robot and the maximum allowed speed to calculate the stability factor, and the smaller the stability factor, the smaller the dynamic window; S44, respectively assigning weighting coefficients to the safety factor, the efficiency factor and the stability factor, and calculating the adjustment factor of the multi-objective optimization factor fusion by weighted average summation; S45, obtaining the variables composed of the current linear speed and angular speed of the robot and the original constraints of the variables, adjusting the dynamic window size according to the adjustment factor to obtain the final variable constraint, linear speed constraint and angular speed constraint as the dynamic window parameter; and performing motion trajectory prediction according to the dynamic window parameter to generate a plurality of candidate motion trajectories.
8. The path planning method based on improved A* algorithm and improved DWA algorithm according to claim 1, characterized in that, The multi-element evaluation function based on the pre-set multi-element evaluation function constructs a multi-element cost factor evaluation model to comprehensively evaluate each motion trajectory, generates an evaluation value of each motion trajectory, and selects the motion trajectory with the optimal evaluation value as the final trajectory, which comprises: S51, constructing a multi-element evaluation function to calculate corresponding multi-element cost factors; the multi-element evaluation function comprises a curvature continuity evaluation function, a path mileage evaluation function, a dynamic obstacle prediction avoidance evaluation function, a social force field evaluation function and a task completion time evaluation function; the multi-element cost factors comprise curvature continuity cost, path mileage cost, dynamic obstacle prediction avoidance cost, social force field cost and task completion time cost; S52, based on the calculation results of the multi-element cost factors, combining the target azimuth angle cost, the speed cost and the obstacle distance cost, constructing a multi-element cost factor evaluation model to calculate the evaluation value of each motion trajectory by weighted summation, and selecting the motion trajectory with the lowest total cost as the final trajectory.
9. The path planning method based on improved A* algorithm and improved DWA algorithm according to claim 1, characterized in that, When the navigation task is completed, the path coefficient of the current navigation task is input into the path coefficient optimization network based on the hierarchical attention mechanism to obtain the optimized and updated path coefficient, which is used for path planning of the next navigation task, which comprises: S61, recording the multi-dimensional path coefficient in the current navigation task process; the path coefficient comprises heuristic function weight adjustment coefficient, preset curvature threshold, safety factor weighting coefficient, efficiency factor weighting coefficient, stability factor weighting coefficient and weight of each multi-element cost factor; S62, based on the collected multi-dimensional path coefficients, the environmental characteristics and historical performance are combined and input into the path weight optimization network, and the optimized path coefficients are output; the environmental characteristics include map complexity, obstacle density and dynamic obstacle speed; the historical performance includes path length, planning time, obstacle avoidance success rate, path smoothness and dynamic obstacle response; S63, the optimized path coefficients are used as the original path coefficients for the next navigation task.
10. A path planning system based on improved A* algorithm and improved DWA algorithm, characterized in that, The system for implementing the path planning method based on the improved A* algorithm and the improved DWA algorithm in any one of claims 1-9 comprises: A dynamic environment evaluation module for obtaining a grid map of a material distribution scene where a robot performs a navigation task, constructing a full convolutional neural network model combined with semantic information, and outputting a dynamically optimized heuristic function weight; A bidirectional neighborhood search module for obtaining the current position and target position of the robot, performing bidirectional dynamic neighborhood search according to the relative position, and generating a complete path for the current navigation task combined with the heuristic function weight; An adaptive path smoothing module for performing adaptive smoothing processing based on the path curvature characteristics of the complete path, outputting a smoothed global path, and starting the robot to perform the navigation task; A dynamic window adjustment module for generating dynamic window parameters based on a multi-objective optimization factor dynamic window adjustment strategy if a dynamic obstacle is encountered when the robot performs the navigation task, and performing dynamic trajectory prediction according to the dynamic window parameters to generate multiple motion trajectories; A multi-element cost evaluation module for constructing a multi-element cost factor evaluation model based on a pre-set multi-element evaluation function, comprehensively evaluating each motion trajectory, generating an evaluation value for each motion trajectory, and selecting the motion trajectory with the optimal evaluation value as the final trajectory; A path coefficient optimization module for inputting the path coefficients recorded in the navigation task into a path coefficient optimization network based on a hierarchical attention mechanism after the navigation task is completed, obtaining updated path coefficients, and using the updated path coefficients for path planning in the next navigation task.
Citation Information
Cited By
Low-altitude path planning method and system based on dynamic adaptive graph neural network
CN121544810A
Multi-objective optimization-based vehicle-machine cooperative inspection vehicle path planning method
CN121558044A
Multi-unmanned aerial vehicle cooperative path planning method, device and system and electronic equipment
CN121898440A
