Robot dynamic obstacle avoidance method based on improved A* algorithm and dynamic window method
By combining the improved A* algorithm with the dynamic window method, the problems of low efficiency and insufficient obstacle avoidance in dynamic environments are solved, generating more optimized paths and achieving efficient random and dynamic obstacle avoidance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2023-06-08
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, the A* algorithm has low search efficiency in dynamic environments, uneven paths, many redundant nodes, and cannot effectively avoid dynamic obstacles. The traditional DWA algorithm is prone to getting stuck in local optima in local path planning and cannot guarantee the global optimal solution.
By combining the improved A* algorithm with the dynamic window method, an optimized global path node sequence is generated by introducing an adaptive weight heuristic search function, path pruning, and trajectory optimization. The optimized dynamic window method is then used for local path planning between local target points. Finally, the evaluation function is optimized to achieve the optimal solution by combining global path information and dynamic environmental changes.
This improves the practicality and flexibility of dynamic obstacle avoidance methods, generates paths that are closer to the global optimum, effectively avoids random and dynamic obstacles, optimizes path length and smoothness, and improves search efficiency.
Smart Images

Figure CN116734877B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mobile robot path planning, specifically a robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method. Background Technology
[0002] The statements in this section are merely background information relating to this disclosure, and these statements may constitute prior art. In the process of developing this invention, the inventors discovered at least the following problems in the prior art.
[0003] Path planning is a key technology in autonomous robot research and has important applications in the field of mobile robot navigation. Based on the robot's familiarity with map information, path planning can be divided into global path planning based on prior global information and local path planning based on dynamic local information.
[0004] The A* algorithm is a widely used graph search method for finding the globally optimal path in a static environment. It combines heuristic search with Dijkstra's algorithm and has advantages such as short planned paths and simple computation. However, the traditional A* algorithm has disadvantages such as high time complexity, low path smoothness, redundant nodes, and close proximity to obstacles. The Accelerated A* algorithm proposed by [Authors' Name] improves search efficiency while ensuring optimal path optimization. This algorithm employs a heuristic distance estimation method to reduce the computational cost per node, thus accelerating path planning; however, it does not consider safe distances to obstacles. Lin M et al. considered the influence of the current node's parent node on the search path, incorporating parent node information into the heuristic function and adjusting its weights to reduce the number of search nodes. Min Haitao proposed an improved A* algorithm that avoids collisions by setting a redundant safety space and introduces path curvature cost in the heuristic function design to improve path smoothness. Cao P et al. proposed an Any-Angle A* algorithm based on a visibility graph, which can search paths at arbitrary angles, shortening path length and reducing the search space. Cheng Chuanqi et al. proposed a key point selection strategy to eliminate redundant nodes and unnecessary turning points.
[0005] The Dynamic Window Approach (DWA) algorithm performs real-time local path planning for the robot by combining sensor information, exhibiting excellent dynamic obstacle avoidance capabilities. Missura M proposed an improved DWA algorithm that considers the motion of other objects in the environment and predicts future collisions by establishing a dynamic collision model, significantly reducing the number of collisions compared to the traditional DWA algorithm. Mai Xiquan et al. introduced an evaluation sub-function related to obstacle distribution density into the DWA evaluation function, enabling the robot to accelerate in advance and avoid entering areas with dense obstacles.
[0006] In summary, global path planning algorithms cannot detect dynamic obstacles in the environment and therefore cannot dynamically avoid them. Local path planning algorithms are prone to getting trapped in local optima and cannot guarantee a feasible solution. Therefore, path planning algorithms suitable for dynamic environments need to possess both global path planning and dynamic obstacle avoidance capabilities.
[0007] The patent application with application number CN202110842405.X is entitled "Real-time Global Path Planning Method for Unmanned Vehicles Based on Dynamic Window with Safe A* Guidance Point". It combines the A* algorithm and the dynamic window method. It uses the safe A* algorithm to quickly find the optimal safe virtual target point, and then uses the virtual target point as the local target of the dynamic window method to perform speed sampling, thereby realizing path planning and obstacle avoidance.
[0008] However, after in-depth research, the applicant discovered that the method still has some shortcomings.
[0009] First, regarding the heuristic function of the A* algorithm, this patented method chooses Euclidean distance, which has low search efficiency.
[0010] Secondly, for safety reasons, this patented method avoids passing through obstacle vertices during the initial path planning in the A* algorithm and considers the straight-line distance between the path and obstacles when eliminating redundant points, thus achieving safety. Although safety is achieved, its final path planning deviates significantly from the optimal path and fails to reach the optimal solution. Furthermore, because it only eliminates redundant points on the same straight line and uses safety-based node selection, the path length cannot be effectively reduced.
[0011] Finally, this patent does not consider dynamic obstacles and can only be implemented in environments with both static and random obstacles. Furthermore, it lacks trajectory optimization, failing to provide a better node sequence for subsequent dynamic window methods, resulting in less than ideal obstacle avoidance capabilities. Summary of the Invention
[0012] In view of the above problems, the purpose of this invention is to solve some of the problems in the prior art, or at least alleviate these problems.
[0013] A robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method includes:
[0014] Initialize the map and robot position information;
[0015] The A* algorithm is used for global path planning to generate a sequence of path nodes.
[0016] The generated path node sequence is pruned to obtain the optimized global path;
[0017] The global path after path pruning optimization is smoothed to obtain the global path node sequence;
[0018] Select local target points from the smoothed and optimized global path node sequence;
[0019] Local path planning is performed between the obtained local target points using the optimized dynamic window method until the global target point is reached.
[0020] The A* algorithm described is an improved version of the A* algorithm, which introduces an adaptive weighted heuristic search function that comprehensively considers Manhattan distance and Euclidean distance to guide the search direction.
[0021] Furthermore, the cost function f(n) of the improved A* algorithm is:
[0022]
[0023]
[0024] h m (n)=|x n -x goal |+|y n -y goal |
[0025] h e (n)=((x n -x goal ) 2 +(y n -y goal ) 2 )
[0026] Where g(n) represents the actual cost from the starting node to the current node n, p(n) represents the proportion of the Manhattan distance from the current node to the target node in the total distance, and x start and y start Here, are the x and y coordinates of the starting node, w is the weight of the heuristic function; h m (n) is a heuristic function using Manhattan distance, h e(n) is a heuristic function using Euclidean distance; x n and y n These are the x and y coordinates of the current node, x goal and y goal These are the x and y coordinates of the target node.
[0027] The generated path node sequence is pruned, including the following steps:
[0028] Input the path node sequence generated by the A* algorithm into the path pruning module;
[0029] Redundant path nodes are removed using the redundancy point removal method, thus pruning the path.
[0030] Furthermore, the steps of the redundant point removal method are as follows:
[0031] Using the path nodes generated by the A* algorithm as input, create and initialize the node set AstarNset; where the initial value of the AstarNset set is {n1, n...} m}, n1 is the starting point of the path, n m is the target point, and m is the number of nodes in the path generated by the A* algorithm;
[0032] Create a key node set KeyNset to store the optimized path nodes;
[0033] Starting from n1, connect n3, n4, ..., n sequentially. i Determine the straight line n1n i Does it pass through an obstacle? If it passes through an obstacle, then n i-1 If it is a key node, add it to the KeyNset set; otherwise, determine the value of n2,…,n. i It is a redundant node, from n i Continue connecting the nodes in the AsatrNset set until the target node n is reached. m At this point, the KeyNset set contains all the key nodes, with values {n1, ..., n}. m};
[0034] Connect all the key nodes in the KeyNset set in sequence to complete the path pruning.
[0035] The global path optimized by path pruning is then smoothed. This involves inputting the optimized global path into the trajectory optimization module and using Minimum Snap for smoothing. The trajectory can be represented by an nth-order polynomial p(t).
[0036]
[0037] Where p0, p1, p2, ..., p n These are trajectory parameters; divided into multiple segments according to time t, each segment is represented by a polynomial curve as follows:
[0038]
[0039] Where k is the number of trajectory segments; the Minimum Snap optimization function is constructed as follows:
[0040]
[0041]
[0042] Where r and c are the row and column indices of the matrix; p i =[p i0 ,p i1 ,p i2 ,...,p in ] is the parameter vector of the i-th segment of the trajectory.
[0043] Local path planning is performed between the obtained local target points using the optimized dynamic window method until the global target point is reached, including the following steps:
[0044] The velocity constraint space is sampled using the robot's kinematic model;
[0045] Each evaluation sub-function is normalized, and the trajectory with the best score is selected from multiple sets of motion trajectories based on the evaluation function scores.
[0046] Update the robot's pose information for the next moment. If the updated robot position is a local target point, it means that the local path planning for that segment is complete.
[0047] Continue using the optimized dynamic window method for local path planning between local target points until the global target point is reached.
[0048] Furthermore, local path planning is performed between the obtained local target points using an optimized dynamic window method until the global target point is reached. This also includes constructing a global path evaluation sub-function by incorporating global path information into the traditional dynamic window method evaluation function. The improved evaluation function is shown below:
[0049] G(v,ω)=σ(α*heading(v,ω)+β*dist(v,ω)+μdist m (v,ω)+γvel(v,ω)+ψPath(v,ω))
[0050] Where heading(v,ω) is the azimuth evaluation function, which evaluates the angle difference between the current predicted trajectory's end orientation and the target point; dist(v,ω) and dist m (v,ω) is the obstacle distance evaluation function, and dist(v,ω) evaluates the distance between the end of the current predicted trajectory and a static obstacle. m (v,ω) evaluates the distance between the end of the current predicted trajectory and dynamic obstacles; vel(v,ω) is the velocity evaluation function, which evaluates the current linear velocity of the robot, enabling it to reach the target point faster; Path(v,ω) is the global path offset evaluation function, which evaluates the distance between the endpoint of the current predicted trajectory and the global path. σ is a smoothing factor, α is the weight of the azimuth evaluation function, β is the weight of the static obstacle distance evaluation function, μ is the weight of the dynamic obstacle distance evaluation function, γ is the weight of the velocity evaluation function, and ψ is the weight of the global path offset evaluation function.
[0051] Initialize the map and robot position information, including initializing the parameters of the improved A* algorithm and the optimized dynamic window method.
[0052] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method.
[0053] The present invention has the following beneficial effects:
[0054] 1. This invention first employs the A* algorithm to plan the global path, and then, based on the global path information and dynamic environmental changes, uses an optimized dynamic window algorithm to complete the local path planning, thereby improving the practicality and flexibility of the dynamic obstacle avoidance method. Furthermore, the path safety of this invention is guaranteed by the optimized dynamic window method, and the A* algorithm can select the optimal path as early as possible, making the final path planning closer to the optimal solution, achieving both random and dynamic obstacle avoidance while closely adhering to the global path.
[0055] 2. This invention introduces Manhattan distance and Euclidean distance into the A* algorithm and optimizes the trajectory, which improves the search efficiency and makes the path planned by the A* algorithm conform to the robot's kinematic model, providing a better node sequence for the subsequent dynamic window method; and improves the evaluation function of the dynamic window method so that it can be better integrated with the A* algorithm to achieve dynamic obstacle avoidance of the optimal solution.
[0056] 3. The triangular pruning strategy not only ensures the removal of redundant nodes on the same straight path, but also performs path pruning, effectively reducing path length. Furthermore, it can be combined with Minimum Snap for smooth optimization. Attached Figure Description
[0057] Figure 1 This invention provides a flowchart of a robot dynamic obstacle avoidance method based on an improved A* algorithm and a dynamic window method;
[0058] Figure 2 This is a simulation diagram of random obstacle avoidance according to the present invention; wherein, the small squares near the path are random obstacles added after the initial path planning by the improved A* algorithm;
[0059] Figure 3 A comparison of the dynamic obstacle avoidance simulation effects of the improved DWA algorithm, potential field ant colony algorithm, and the fusion algorithm of this application is shown; in the figure, the small squares with moving trajectories are dynamic obstacles. Detailed Implementation
[0060] The present invention will be further described below with reference to the accompanying drawings. The embodiments of the present invention are only used to illustrate the present invention and not to limit the present invention. Various substitutions and modifications made based on ordinary technical knowledge and common practices in the art without departing from the technical concept of the present invention should be included within the scope of the present invention.
[0061] like Figure 1 As shown, the robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method includes:
[0062] Initialize the map and robot position information;
[0063] The A* algorithm is used for global path planning to generate a sequence of path nodes.
[0064] The generated path node sequence is pruned to obtain the optimized global path;
[0065] The global path after path pruning optimization is smoothed to obtain the global path node sequence;
[0066] Select local target points from the smoothed and optimized global path node sequence;
[0067] Local path planning is performed between the obtained local target points using the optimized dynamic window method until the global target point is reached.
[0068] To address the global path planning and dynamic obstacle avoidance problems of mobile robots in dynamic environments, this invention proposes a hybrid path planning method integrating the A* algorithm and the optimized dynamic window method. First, the A* algorithm is used to plan the global path. Then, based on the global path information and dynamic environmental changes, the optimized dynamic window algorithm is used to complete the local path planning, thereby improving the practicality and flexibility of the dynamic obstacle avoidance method. Furthermore, the path safety of this invention is guaranteed by the dynamic window method, while the A* algorithm can select the optimal path as early as possible, making the final path planning closer to the optimal solution. This allows for both random and dynamic obstacle avoidance while closely adhering to the global path.
[0069] The A* algorithm described is an improved version of the A* algorithm, which introduces an adaptive weighted heuristic search function that comprehensively considers Manhattan distance and Euclidean distance to guide the search direction.
[0070] The cost function f(n) of the improved A* algorithm is:
[0071]
[0072]
[0073] h m (n)=|x n -x goal |+|y n -y goal |
[0074] h e (n)=((x n -x goal ) 2 +(y n -y goal ) 2 )
[0075] Where g(n) represents the actual cost from the starting node to the current node n, p(n) represents the proportion of the Manhattan distance from the current node to the target node in the total distance, and x start and y start Here, are the x and y coordinates of the starting node, w is the weight of the heuristic function; h m (n) is a heuristic function using Manhattan distance, h e (n) is a heuristic function using Euclidean distance; x n and y n These are the x and y coordinates of the current node, x goal and y goal These are the x and y coordinates of the target node. When the current node is far from the target node, the Euclidean distance is much smaller than the actual distance, resulting in a large number of nodes searched by the algorithm and slow computation speed. In this case, the h coordinates should be reduced. m The weight of (n) is increased by h. e The weights of (n) are used; when the current node is close to the target node, the Euclidean distance is close to the actual distance, and at this time, h is reduced. e The weight of (n) is increased by h. m The weights of (n).
[0076] To better integrate with the dynamic window method, this invention redesigns the heuristic function of the A* algorithm, combining two common heuristic functions (Manhattan distance and Euclidean distance). The heuristic function weights can be automatically adjusted according to the distance from the robot's current position to the target point, making the heuristic estimation function value closer to the actual cost value and improving search efficiency.
[0077] The generated path node sequence is pruned, including the following steps:
[0078] Input the path node sequence generated by the A* algorithm into the path pruning module;
[0079] Redundant path nodes are removed using the redundancy point removal method, thus pruning the path.
[0080] The steps of the redundant point removal method are as follows:
[0081] Using the path nodes generated by the A* algorithm as input, create and initialize the node set AstarNset; where the initial value of the AstarNset set is {n1, n...} m}, n1 is the starting point of the path, n m is the target point, and m is the number of nodes in the path generated by the A* algorithm;
[0082] Create a key node set KeyNset to store the optimized path nodes;
[0083] Starting from n1, connect n3, n4, ..., n sequentially. i Determine the straight line n1n i Does it pass through an obstacle? If it passes through an obstacle, then n i-1 If it is a key node, add it to the KeyNset set; otherwise, determine the value of n2,…,n. i It is a redundant node, from n i Continue connecting the nodes in the AsatrNset set until the target node n is reached. m At this point, the KeyNset set contains all the key nodes, with values {n1, ..., n}. m};
[0084] Connect all the key nodes in the KeyNset set in sequence to complete the path pruning.
[0085] The triangular pruning strategy employed in this invention not only ensures the removal of redundant nodes on the same straight path but also performs path pruning, effectively reducing path length. Furthermore, it can be further combined with MinimumSnap for smoothing optimization.
[0086] The global path optimized by path pruning is then smoothed. This involves inputting the optimized global path into the trajectory optimization module and using Minimum Snap for smoothing. Minimum Snap is a trajectory smoothing algorithm based on polynomial optimization. It generates a smooth trajectory by applying penalty terms at the derivatives of the polynomial. The trajectory can be represented by an nth-order polynomial p(t):
[0087]
[0088] Where p0, p1, p2, ..., p n These are trajectory parameters. Since a single polynomial curve is too simple to accurately represent a complex trajectory, a better approach is to divide the trajectory into segments along time t, each represented by a polynomial curve:
[0089]
[0090] Where k is the number of trajectory segments, p i =[p i0 ,p i1 ,p i2 ,...,p in Let be the parameter vector of the i-th trajectory segment. Each trajectory segment is represented by an n-th order polynomial with equal time intervals. The Minimum Snap optimization function is constructed as follows:
[0091]
[0092]
[0093] Here, r and c are the row and column indices of the matrix. Therefore, solving the Snap problem, which minimizes the entire trajectory, can be transformed into solving the minp problem for each segment of the curve. T Qp.
[0094] Using Minimum Snap for trajectory optimization ensures that the path planned by the A* algorithm conforms to the robot's kinematics model, providing a better node sequence for the subsequent dynamic window method. This allows the A* algorithm to be better integrated with the dynamic window method, making the final path planning more closely resemble the optimal path while ensuring obstacle avoidance safety.
[0095] Local path planning is performed between the obtained local target points using the optimized dynamic window method until the global target point is reached, including the following steps:
[0096] The velocity constraint space is sampled using the robot's kinematic model;
[0097] Each evaluation sub-function is normalized, and the trajectory with the best score is selected from multiple sets of motion trajectories based on the evaluation function scores.
[0098] Update the robot's pose information for the next moment. If the updated robot position is a local target point, it means that the local path planning for that segment is complete.
[0099] Continue using the optimized dynamic window method for local path planning between local target points until the global target point is reached.
[0100] The above describes existing methods for local path planning using the dynamic window method. Each evaluation sub-function is an evaluation function constructed using the dynamic window method. To better integrate the dynamic window method with the A* algorithm and enable the robot to avoid obstacles in real-time in environments with dynamic obstacles, an optimized dynamic window method is used for local path planning between the obtained local target points until the global target point is reached. This includes constructing a global path evaluation sub-function by combining global path information with the traditional dynamic window method evaluation function. The improved evaluation function is shown below:
[0101] G(v,ω)=σ(α*heading(v,ω)+β*dist(v,ω)+μdist m (v,ω)+γvel(v,ω)+ψPath(v,ω))
[0102] Where heading(v,ω) is the azimuth evaluation function, which evaluates the angle difference between the current predicted trajectory's end orientation and the target point; dist(v,ω) and dist m (v,ω) is the obstacle distance evaluation function, and dist(v,ω) evaluates the distance between the end of the current predicted trajectory and a static obstacle. m (v,ω) evaluates the distance between the end of the current predicted trajectory and dynamic obstacles; vel(v,ω) is the velocity evaluation function, which evaluates the current linear velocity of the robot, enabling it to reach the target point faster; Path(v,ω) is the global path offset evaluation function, which evaluates the distance between the endpoint of the current predicted trajectory and the global path. σ is a smoothing factor, α is the weight of the azimuth evaluation function, β is the weight of the static obstacle distance evaluation function, μ is the weight of the dynamic obstacle distance evaluation function, γ is the weight of the velocity evaluation function, and ψ is the weight of the global path offset evaluation function.
[0103] To address the issues of random and dynamic obstacle avoidance, this invention adds an evaluation sub-function for the distance between the trajectory end and dynamic obstacles and a global path fit evaluation sub-function to the evaluation function of the traditional dynamic window method. The fusion algorithm uses the global path nodes generated by the improved A* algorithm as local target points and employs an optimized dynamic window method for local path planning. In the path node sequence generated by the improved A* algorithm, key nodes are selected as local target points for the optimized DWA algorithm, enabling the robot to simultaneously achieve random and dynamic obstacle avoidance, thus significantly enhancing its real-time obstacle avoidance capability.
[0104] Initialize the map and robot position information, including initializing the parameters of the improved A* algorithm and the optimized dynamic window method.
[0105] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a robot dynamic obstacle avoidance method based on an improved A* algorithm and a dynamic window method.
[0106] Simulation analysis of fusion algorithm in dynamic environment:
[0107] 1. To verify the random obstacle avoidance performance of the fusion algorithm, two sets of simulation experiments were set up on a 30x30 grid map, one with one unknown obstacle and the other with multiple unknown obstacles. The simulation results are as follows: Figure 2 As shown, the small squares are random obstacles added after the initial path planning in the improved A* algorithm. Simulation data are shown in Table 1.
[0108] Table 1 Random obstacle avoidance simulation data
[0109]
[0110] Figure 2 (a) There is only one random obstacle that appears on the path pre-planned by the improved A* algorithm. The robot plans its path with global path nodes as local target points. Due to the need to avoid the random obstacle, the path temporarily deviates from the global optimal path. Figure 2 (b) in Figure 2 Based on (a), two more random obstacles are added. One of these obstacles is some distance from the globally optimal path and does not affect the path planning of the fusion algorithm. The other obstacle is adjacent to the globally optimal path, requiring the fusion algorithm to temporarily move away from the global path to avoid it. According to Table 1, to avoid the third random obstacle, the fusion algorithm increases the path length by 0.83m and deviates from the path by 0.2 rad (radian angle). In summary, the fusion algorithm proposed in this invention can achieve random obstacle avoidance, and the planned path is close to the globally optimal path.
[0111] 2. To verify the dynamic obstacle avoidance performance of the fusion algorithm, dynamic obstacles were added to a 30x30 grid map, and path planning was performed on the improved DWA algorithm, the potential field ant colony method, and the fusion algorithm of this invention, respectively. Simulation results are as follows: Figure 3 As shown, the vertically moving small cubes are dynamic obstacles. Simulation data is shown in Table 2.
[0112] Table 2 Dynamic obstacle avoidance simulation data
[0113]
[0114] from Figure 2 It can be seen that the improved DWA algorithm, the potential field ant colony algorithm, and the fusion algorithm presented in this paper can all successfully avoid dynamic obstacles. For example... Figure 3 As shown in (a), the obstacle avoidance path of the potential field ant colony algorithm is not smooth and has a large number of turning points, while the obstacle avoidance path of the improved DWA algorithm is the longest. And as... Figure 3 (b) and Table 2 show that the obstacle avoidance path of the fusion algorithm of the present invention is smooth and the shortest. Compared with the improved DWA algorithm and the potential field ant colony algorithm, the path length is reduced by 25.8% and 12.97% respectively, which is obviously effective.
[0115] This invention presents a robot dynamic obstacle avoidance method that integrates an improved A* algorithm and an optimized dynamic window method. It effectively solves the problems of low search efficiency, uneven path smoothness, numerous redundant nodes, and inability to perform random and dynamic obstacle avoidance in complex environments inherent in the traditional A* algorithm. Furthermore, it offers higher search efficiency, and both path length and smoothness are optimized.
Claims
1. A robot dynamic obstacle avoidance method based on an improved A* algorithm and a dynamic window method, characterized in that, include: Initialize the map and robot position information; The A* algorithm is used for global path planning to generate a sequence of path nodes. The A* algorithm is an improved version that introduces an adaptive weighted heuristic search function that comprehensively considers Manhattan distance and Euclidean distance to guide the search direction. The cost function of the improved A* algorithm is... for: in, This represents the actual cost from the starting node to the current node n. This represents the proportion of the Manhattan distance from the current node to the target node in the total distance. and These are the x and y coordinates of the starting node. These are the weights of the heuristic function; It uses the Manhattan distance heuristic function. It uses a heuristic function based on Euclidean distance; and These are the x and y coordinates of the current node. and These are the x and y coordinates of the target node; The generated path node sequence is pruned to obtain the optimized global path; The global path optimized by path pruning is then smoothed to obtain a global path node sequence. The optimized global path is then input into the trajectory optimization module, where Minimum Snap is used for smoothing optimization. The trajectory can be represented by an nth-order polynomial. express: in, These are trajectory parameters; by time Divide into multiple segments, each represented by a polynomial curve as follows: in, This represents the number of trajectory segments; the Minimum Snap optimization function is constructed as follows: Where r and c are the row and column indices of the matrix; It is the parameter vector of the i-th segment of the trajectory; Select local target points from the smoothed and optimized global path node sequence; Local path planning is performed between the obtained local target points using the optimized dynamic window method until the global target point is reached.
2. The robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method according to claim 1, characterized in that, The generated path node sequence is pruned, including the following steps: Input the path node sequence generated by the A* algorithm into the path pruning module; Redundant path nodes are removed using the redundancy point removal method, thus pruning the path.
3. The robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method according to claim 2, characterized in that, The steps of the redundant point removal method are as follows: Using the path nodes generated by the A* algorithm as input, create and initialize the node set AstarNset; where the initial value of the AstarNset set is... , It is the starting point of the path. is the target point, and m is the number of nodes in the path generated by the A* algorithm; Create a key node set KeyNset to store the optimized path nodes; from Start connecting sequentially Determine the straight line Did it pass through any obstacles? If it did, then... If it is a key node, add it to the KeyNset set; otherwise, determine... It is a redundant node, from Continue connecting the nodes in the AsatrNset set until the target node is reached. At this point, the KeyNset set contains all the key nodes, with values... ; Connect all the key nodes in the KeyNset set in sequence to complete the path pruning.
4. The robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method according to claim 1, characterized in that, Local path planning is performed between the obtained local target points using the optimized dynamic window method until the global target point is reached, including the following steps: The velocity constraint space is sampled using a robot kinematics model; Each evaluation sub-function is normalized, and the trajectory with the best score is selected from multiple sets of motion trajectories based on the evaluation function scores. Update the robot's pose information for the next moment. If the updated robot position is a local target point, it means that the local path planning for that segment is complete. Continue using the optimized dynamic window method for local path planning between local target points until the global target point is reached.
5. The robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method according to claim 4, characterized in that, Local path planning is performed between the obtained local target points using an optimized dynamic window method until the global target point is reached. This also includes constructing a global path evaluation sub-function by incorporating global path information into the traditional dynamic window method evaluation function. The improved evaluation function is shown below: in, It is an azimuth evaluation function that evaluates the angle difference between the orientation of the current predicted trajectory's end and the target point; and It is an obstacle distance evaluation function. Evaluate the distance between the end of the current predicted trajectory and the static obstacle. Evaluate the distance between the end of the current predicted trajectory and the dynamic obstacle; It is a velocity evaluation function that evaluates the current linear velocity of the robot, enabling the robot to reach the target point faster; It is a global path offset evaluation function that evaluates the distance between the endpoint of the current predicted trajectory and the global path. It is a smoothing factor. It is the weight of the azimuth evaluation function. These are the weights of the static obstacle distance evaluation function. It is a dynamic obstacle distance evaluation function. These are the weights of the speed evaluation function. It is the weight of the global path offset evaluation function.
6. The robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method according to claim 1, characterized in that, Initialize the map and robot position information, including initializing the parameters of the improved A* algorithm and the optimized dynamic window method.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the robot dynamic obstacle avoidance method based on the improved A* algorithm and dynamic window method as described in any one of claims 1 to 6.