AGV path planning method based on improved DWA algorithm in dynamic environment
By combining the improved DWA algorithm with the A* algorithm to dynamically classify obstacles and optimize the evaluation function, the problem of AGV's insufficient obstacle avoidance ability in complex environments is solved, and the dynamic obstacle avoidance effect and transportation efficiency are improved.
Patent Information
- Application Number
- CN202210544455.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-05-19
AI Technical Summary
Existing AGV path planning algorithms are difficult to efficiently avoid obstacles in complex dynamic environments, especially the insufficient recognition and processing capabilities of dynamic obstacles, resulting in large path deviations and low transportation efficiency.
The improved DWA algorithm is combined with the A* algorithm to extract key points through the raster map, reduce the obstacle sensing area, dynamically classify obstacles, adjust the AGV motion state, and optimize the evaluation function to improve dynamic obstacle avoidance capabilities and path planning efficiency.
It improves the AGV's ability to avoid dynamic obstacles, reduces the AGV's deviation from the shortest path, shortens the AGV movement time, and improves transportation efficiency and path quality.
Smart Images

Figure CN114859929B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of AGV path planning, and more specifically, relates to an AGV path planning method based on an improved DWA algorithm in a dynamic environment. Background Art
[0002] The production process of multi-variety, small batch, customized complex products belongs to discrete production. For example, in a typical semi-automated production workshop with gyroscope parts, tasks such as material transportation during the assembly process are still completed by manual transportation, which has problems such as low efficiency and high error rate. With the development of intelligent manufacturing technology, these semi-automated production companies have gradually begun to upgrade transportation tasks to intelligent ones, and provide support for intelligent production by using AGV to replace manual transportation. Since some assembly processes of customized complex products such as gyroscope parts cannot be separated from manual work, there is a strong flow of personnel in the production workshop. When AGV is used to transport assembly materials, due to the complex dynamic situation of the workshop environment, the dynamic random obstacle avoidance capability of AGV on the transportation path is very high. Therefore, it is particularly important to study a path planning algorithm with strong random obstacle avoidance capability.
[0003] AGV path planning is divided into global path planning and local path planning. Common global planning algorithms include Dijkstra, A*, D* and RRT, and the A* algorithm is the most commonly used path planning algorithm due to its simplicity and effectiveness. The global path planning algorithm mainly outputs the AGV path and cannot avoid dynamic obstacles during the operation of the AGV. The local path planning can control the AGV speed according to the AGV's own sensors so that it can complete collision-free movement from the starting point to the target point in a dynamic unknown environment.
[0004] In the existing technology, the current research on AGV path planning mainly focuses on using different planning methods to search for paths, improve the speed of path search, reduce the turning points on the path, and improve the smoothness of the path curve. However, there is little research on methods for efficient obstacle avoidance of dynamic obstacles in complex dynamic environments such as production workshops. Summary of the invention
[0005] The present invention aims at solving the technical problems existing in the prior art and provides an AGV path planning method based on an improved DWA algorithm in a dynamic environment.
[0006] To solve the above technical problems, the present invention comprises the following steps:
[0007] Step 1: Taking the production workshop as the research object, extract and simplify the workshop layout, build a grid map of the production workshop, pre-set the starting and ending positions on the grid map, and mark the positions of obstacles;
[0008] Step 2: Use the A* algorithm to perform global path planning, extract key points from the path obtained by the A* algorithm, and use them as the target points for AGV movement. Use the DWA algorithm to predict the sampling trajectory, and then use the evaluation function to select the AGV state corresponding to the path with the highest evaluation as its next operation state;
[0009] Step 3: Use the improved DWA algorithm to narrow the DWA's perception area of obstacles, take the highest-rated path described in step 2 as the reference path, perform local dynamic obstacle avoidance path planning from the starting point to the end point described in step 1, and plan an optimal dynamic obstacle avoidance path for the AGV;
[0010] Step 4: When step 3 is identifying dynamic obstacles, the improved DWA algorithm needs to classify the dynamic obstacles according to their speed direction, and then evaluate the speed of the dynamic obstacles to adjust the motion state of the AGV;
[0011] Step 5: When the AGV reaches the turning point obtained by the A* algorithm, the DWA evaluation function is optimized, the target direction evaluation function is added, and the AGV path planning is completed.
[0012] Preferably, step 1 specifically includes:
[0013] Perform two-dimensional raster processing on the internal environment of the production workshop where the AGV is located, and place the AGV in a plane rectangular coordinate system, with the horizontal axis being the X axis and the vertical axis being the Y axis;
[0014] Referring to the actual situation of objects in the production workshop, the black parts are marked as static obstacles, and the red parts are marked as dynamic obstacles. At the same time, the grid map also shows the starting position, end position and planned path.
[0015] Preferably, step 2 comprises the following steps:
[0016] Step 2.1: Use the A* algorithm for global path planning. The evaluation function expression of the A* algorithm is:
[0017] f(n)=g(n)+h(n)
[0018] Where n represents the current node, f(n) represents the evaluation function from the starting point to the target point via node n; g(n) represents the actual cost from the starting point to node n; h(n) is the estimated value, which represents the estimated cost from node n to the target point, also known as the heuristic function;
[0019] Step 2.2: Establish the AGV motion model. The mathematical expression of the AGV motion model is:
[0020] x n+1 =xn +Δs*cosΔθ
[0021] y n+1 =y n +Δs*sinΔθ
[0022] θ n+1 =θ n +Δθ
[0023] Among them, (x n ,y n ,θ n ) is the current position information of AGV, (x n+1 ,y n+1 ,θ n+1 ) is the location information of AGV at the next moment;
[0024] Step 2.3: Sample the speed and angular velocity according to the current speed and angular velocity of the AGV, and calculate the feasible speed sampling space;
[0025] Step 2.4: After obtaining the sampled trajectory of the AGV, the predicted path is evaluated by the evaluation function.
[0026] Preferably, in step 2.3, the constraints that need to be satisfied by the adoption process are:
[0027] The robot's maximum and minimum speed and angular velocity limits are U i ; Affected by the robot's own motor speed increase and deceleration torque, the robot's current speed and angular velocity range is limited to U j ; In order for the robot to avoid obstacles safely, consider the linear velocity and angular velocity U within the safe braking range of the robot's current state k ;
[0028] U i ={(v,ω)|v∈[v min ,v max ]∩ω∈[ω min ,ω max ]}
[0029]
[0030]
[0031] Among them, v c is the current linear velocity of the robot, ω c is the current angular velocity of the robot, a1 is the maximum deceleration of the robot, a2 is the maximum acceleration of the robot, is the maximum angular deceleration of the robot, is the maximum angular acceleration of the robot, dist(v,ω) and theta(v,ω) are the minimum distance and minimum angle of obstacles predicted by the corresponding speed and angular velocity, respectively;
[0032] The velocity vector space of the robot is:
[0033] U=U i ∩U j ∩U k .
[0034] Preferably, in step 2, the expression of the evaluation function is:
[0035] G(v,ω)=α*heading(v,ω)+β*distance(v,ω)+γ*velocity(v,ω)
[0036] Among them, v and ω are the linear velocity and angular velocity of the robot respectively; heading(v,ω) is the deflection evaluation function, which mainly estimates the angle between the vector between the robot and the target point in the simulation state and the current orientation of the robot; distance(v,ω) is the safety evaluation function, which mainly estimates the distance between the current robot position and the obstacle; velocity(v,ω) is the speed evaluation function, which mainly estimates the selection of the faster state among the robot states that meet the conditions; α*, β*, and γ* are the weight parameters of the evaluation factors respectively.
[0037] Preferably, in step 3, the DWA's perception area of obstacles is reduced by using an improved local dynamic window algorithm, thereby distinguishing dynamic obstacles from static obstacles;
[0038] In the local dynamic window algorithm, the larger area represents a rectangular moving window with a length of 2L centered on the AGV. The local moving window captures the information of the electronic map in real time, classifies the obstacle types, and records the movement direction of the dynamic obstacles.
[0039] Preferably, step 4 comprises the following steps:
[0040] When the local DWA algorithm is used to classify dynamic obstacles, the current AGV direction θ is used as the vertical reference, and the left and right sides of the AGV are divided into two dangerous areas, namely Dangerous Area a and Dangerous Area b. At the same time, the dangerous area is further divided into upper and lower parts along the directions of θ-90° and θ+90°, thereby dividing the dynamic obstacles into four parts;
[0041] After the dynamic obstacles are classified, the speed of the dynamic obstacles needs to be predicted.
[0042] Preferably, the prediction method used is:
[0043] The dynamic obstacle keeps moving within the unit time Δt, Δt=0...t max ; speed is v n , the moving distance is Δs n , then Δs n =v n *Δt; for AGV, the distance it travels per unit time is Δs k =v k *Δt; at this time, the position of the AGV and the position of the dynamic obstacle are x n+1 =x n +Δs n *cosθ n ,y n+1 =y n +Δs n *sinθ n , x k+1 =x k +Δs k *cosθ k ,y k+1 =y k +Δs k *sinθ k ; The distance between the two is dist i , In Δt from 0 to t max During the iteration process, it is necessary to ensure that the dist in each time period i >R obs , that is, the AGV and the dynamic obstacle will not collide, and the dynamic obstacle speed v at this time n and the speed v of the AGV k Within the safe range, if a collision occurs, the AGV status needs to be decelerated and adjusted.
[0044] Preferably, the evaluation function expression of the optimized DWA algorithm is:
[0045] G(v,ω)=α*heading(v,ω)+β*distance(v,ω)+γ*velocity(v,ω)+η*direction(v,ω)
[0046] direction(v,ω)=θ goal -θ agv
[0047] Among them, direction(v,ω) is used to evaluate the direction angle of the AGV to reach the destination.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The present invention aims at the problem that the traditional DWA algorithm cannot distinguish the obstacle types and the target point is too far away from the starting point, which easily causes a large deviation from the global shortest path. The present invention optimizes it. First, the local map information is extracted, the dynamic obstacles are classified, the speed of the dynamic obstacles is evaluated, and local obstacle avoidance is performed. Compared with the traditional DWA algorithm, the obstacle avoidance judgment ability of the AGV for dynamic obstacles is improved, and the degree of AGV deviation from the shortest path is reduced while ensuring the dynamic obstacle avoidance effect.
[0050] Secondly, in the process of path planning for the DWA algorithm, since the target point itself has a direction angle, the DWA algorithm needs to perform angle correction when controlling the AGV to move to the destination point. The DWA algorithm is optimized by adding an evaluation function with a direction angle function. This shortens the AGV movement time compared to the traditional DWA algorithm.
[0051] Since the path obtained by the global path planning search has some turning points, and the turning points affect the AGV transportation speed during the AGV movement, the present invention adopts an optimized DWA algorithm to optimize the global path turning points. Compared with the traditional method of correcting the global path, it has better dynamic obstacle avoidance effect and lower requirements on the AGV path quality. At the same time, it can also shorten the AGV transportation time and improve the AGV transportation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0053] Figure 1 This is a schematic diagram of the path planning process of the present invention;
[0054] Figure 2 The grid electronic map of the production workshop of the present invention;
[0055] Figure 3 This is a schematic diagram of the AGV motion model of the present invention;
[0056] Figure 4 This is a schematic diagram of the trajectory adopted by the AGV of the present invention;
[0057] Figure 5 This is an example of the dynamic obstacle movement of the present invention;
[0058] Figure 6 It is a schematic diagram of the local DWA algorithm of the present invention;
[0059] Figure 7 This is a schematic diagram of dynamic obstacle classification of the present invention;
[0060] Figure 8 This is a schematic diagram of the dynamic obstacle speed prediction of the present invention;
[0061] Fig. 9 This is a schematic diagram of the angle deviation of the AGV of the present invention at the target point;
[0062] Fig.10 It is a schematic diagram of the DWA speed window at different estimated times of the present invention;
[0063] Fig.11 It is a schematic diagram of the target direction optimization function of the present invention;
[0064] Fig.12 This is a schematic diagram of the path planning trajectory of the traditional DWA of the present invention;
[0065] Fig.13 It is a schematic diagram of the path planning trajectory of the local DWA algorithm of the present invention;
[0066] Fig.14 Schematic diagram of AGV status at different times when the local DWA algorithm does not add the direction angle;
[0067] Fig.15 It is the AGV transportation speed variation curve diagram of the present invention;
[0068] Fig.16 This is a curve diagram of the AGV transport angular velocity change of the present invention;
[0069] Fig.17 Schematic diagram of AGV states at different times for the local DWA algorithm to optimize the direction angle;
[0070] Fig.18 This is a graph showing the AGV speed variation of the DWA algorithm for optimizing the direction angle of the present invention;
[0071] Fig.19 This is a graph showing the AGV angular velocity variation of the DWA algorithm for optimizing the direction angle of the present invention;
[0072] Fig. 20 This is a schematic diagram of the AGV state at different times when the inflection point algorithm is not optimized in the present invention;
[0073] Fig.21 This is the AGV running speed change curve diagram without optimizing the inflection point algorithm of the present invention;
[0074] Fig. 22 This is a curve diagram of AGV running angular velocity change without optimizing the inflection point algorithm of the present invention;
[0075] Fig.23This is a schematic diagram of the AGV state at different times when the inflection point algorithm is optimized in the present invention;
[0076] Fig.24 This is the AGV running speed change curve diagram of the invention's optimized inflection point algorithm;
[0077] Fig.25 This is the AGV running angular velocity change curve diagram for optimizing the inflection point algorithm of the present invention. DETAILED DESCRIPTION
[0078] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0079] like Figure 1 As shown, the present invention provides an AGV path planning method based on an improved DWA algorithm in a dynamic environment, comprising the following steps:
[0080] Step 1: Taking the production workshop as the research object, extract and simplify the workshop layout, build a grid map of the production workshop, pre-set the starting and ending positions on the grid map, and mark the positions of obstacles;
[0081] Step 2: Use the A* algorithm to perform global path planning, extract key points from the path obtained by the A* algorithm, and use them as the target points for AGV movement. Use the DWA algorithm to predict the sampling trajectory, and then use the evaluation function to select the AGV state corresponding to the path with the highest evaluation as its next operation state;
[0082] Step 3: Use the improved DWA algorithm to narrow the DWA's perception area of obstacles, take the path with the highest evaluation in step 2 as the reference path, perform local dynamic obstacle avoidance path planning from the starting point to the end point in step 1, and plan an optimal dynamic obstacle avoidance path for the AGV;
[0083] Step 4: When step 3 is identifying dynamic obstacles, the improved DWA algorithm needs to classify the dynamic obstacles according to their speed direction, and then evaluate the speed of the dynamic obstacles to adjust the motion state of the AGV;
[0084] Step 5: When the AGV reaches the turning point obtained by the A* algorithm, the DWA evaluation function is optimized, the target direction evaluation function is added, and the AGV path planning is completed.
[0085] Example 1: Building a grid map
[0086] The present invention takes the semi-automatic production workshop of gyroscope products as the research object, extracts and simplifies the layout of the workshop, performs two-dimensional rasterization processing on the internal environment of the production workshop where the AGV is located, and constructs a raster map of the production workshop. Figure 2 shown.
[0087] In the figure, the length of the production workshop is about 32m and the width is about 20m. The AGV is placed in a plane rectangular coordinate system, with the horizontal axis being the X-axis and the vertical axis being the Y-axis. Referring to the actual situation of the objects in the production workshop, the black squares in the figure are the largest in number, representing walls, workstations and other static obstacles, while the scattered dark squares in the space surrounded by static obstacles and with a smaller number represent people or other dynamic obstacles. There are two light squares, which are set at the two ends of the dotted line, and represent the starting position and the end position respectively. The black cross symbol represents the AGV, the dotted line represents the shortest path obtained by A*, and the solid line represents the actual moving path of the AGV. The grid map is used for path planning of the improved DWA algorithm.
[0088] Example 2: Principle of A* Algorithm
[0089] Specifically, the A* algorithm is used for global path planning. The A* algorithm is mainly used for path planning in a two-dimensional plane and is the most effective direct search method for finding the shortest path in a static map. The A* algorithm is a type of heuristic algorithm that uses a heuristic function to guide the search direction of the path. Using a heuristic search-type path planning algorithm, an evaluation function is used to guide the search and expansion of nodes, so the evaluation function affects the size of the search space and the speed of the algorithm. The evaluation function expression of the traditional A* algorithm is shown in the following formula.
[0090] f(n)=g(n)+h(n)
[0091] Among them, n represents the current node, f(n) represents the evaluation function from the starting point via node n to the target point; g(n) represents the actual cost from the starting point to node n; h(n) is the estimated value, which represents the estimated cost from node n to the target point, also known as the heuristic function.
[0092] The selection of the heuristic function h(n) can control the search and expansion of nodes, and thus the speed and accuracy of the algorithm. The commonly used heuristic functions of the traditional A* algorithm are Manhattan distance, Chebyshev distance, and Euclidean distance. The expressions of the three distances are shown in the following formulas.
[0093] h(n)=w*(|start.x-dest.x|+|start.y-dest.y|)
[0094] h(n)=w dia*min(|start.x-dest.x|,|start.y-dest.y|)+
[0095] w stt *||start.x-dest.x|-|start.y-dest.y||
[0096]
[0097] Example 3: DWA algorithm principle
[0098] The DWA algorithm needs to convert position control into speed control, so it is necessary to analyze the motion model of the AGV. The kinematic model of the AGV of the present invention is as follows: Figure 3 shown.
[0099] The AGV kinematic model of the present invention adopts a two-wheel differential motion model. Assuming that within the sampling time, the AGV displacement is very small and the moving trajectory is regarded as a straight line, the mathematical expression of the motion model is:
[0100] x n+1 =x n +Δs*cosΔθ
[0101] y n+1 =y n +Δs*sinΔθ
[0102] θ n+1 =θ n +Δθ
[0103] Among them, (x n ,y n ,θ n ) is the current position information of AGV, (x n+1 ,y n+1 ,θ n+1 ) is the location information of AGV at the next moment.
[0104] The DWA algorithm samples the speed and angular velocity according to the current speed and angular velocity of the AGV and calculates a feasible speed sampling space. The constraints that need to be met during the adoption process are:
[0105] The robot's maximum and minimum speed and angular velocity limits are U i ; Affected by the robot's own motor speed increase and deceleration torque, the robot's current speed and angular velocity range is limited to U j ; In order for the robot to avoid obstacles safely, consider the linear velocity and angular velocity U within the safe braking range of the robot's current state k ; The specific expression is as follows:
[0106] Ui ={(v,ω)|v∈[v min ,v max ]∩ω∈[ω min ,ω max ]}
[0107]
[0108]
[0109] Among them, v c is the current linear velocity of the robot; ω c is the current angular velocity of the robot; a1 is the maximum deceleration of the robot; a2 is the maximum acceleration of the robot; is the maximum angular deceleration of the robot; is the maximum angular acceleration of the robot; dist(v,ω) and theta(v,ω) are the minimum distance and minimum angle of obstacles predicted by the corresponding speed and angular velocity, respectively.
[0110] Finally, the dynamic window limit of the robot's velocity is:
[0111] U=U i ∩U j ∩U k
[0112] Finally, the velocity and angular velocity in the dynamic window are combined as the motion state of the robot, and the motion trajectory in a certain simulation time is predicted. The sampled trajectory is as follows: Figure 4 shown.
[0113] Furthermore, after obtaining the sampled trajectory of the AGV, it is necessary to evaluate the predicted path through an evaluation function, and select the state of the AGV corresponding to the path with the highest evaluation as the next operating state of the robot.
[0114] The evaluation function expression is shown in the following formula.
[0115] G(v,ω)=α*heading(v,ω)+β*distance(v,ω)+γ*velocity(v,ω)
[0116] Among them, v and ω are the linear velocity and angular velocity of the robot respectively; heading(v,ω) is the deflection evaluation function, which mainly estimates the angle between the vector between the robot and the target point in the simulation state and the current orientation of the robot; distance(v,ω) is the safety evaluation function, which mainly estimates the distance between the current robot position and the obstacle; velocity(v,ω) is the speed evaluation function, which mainly estimates the selection of the faster state among the robot states that meet the conditions; α*, β*, and γ* are the weight parameters of the evaluation factors respectively.
[0117] Example 4: Local DWA algorithm
[0118] Due to the complex dynamics of the semi-automatic production environment of gyroscope parts, if we rely solely on the A* algorithm, the dynamic obstacle avoidance effect will be insufficient. Therefore, the key points of the path obtained by the A* algorithm are extracted and used as the target point for the AGV to move. When the AGV moves, it judges the obstacles within a certain range around it based on the electronic map information obtained.
[0119] In the process of path planning, the traditional DWA algorithm does not consider the type of obstacles when conducting safety assessments on obstacles. Instead, it creates an obstacle table for all obstacles on the map to make braking safety judgments on the assumed robot state and evaluate the safety factor.
[0120] However, in actual operation, obstacles of different states have different effects on AGV. Static obstacles are fixed in position and must be avoided during AGV operation. However, for dynamic obstacles, such as Figure 5 In the case shown in the figure, some dynamic obstacles do not affect the operation of the AGV during actual operation; however, in the traditional DWA algorithm, there is no obvious judgment on the obstacle type, resulting in a large degree of deviation from the optimal route during path planning.
[0121] Specifically, since the traditional DWA algorithm cannot distinguish between static obstacles in known positions and unknown dynamic obstacles, resulting in low dynamic obstacle avoidance sensitivity, the present invention proposes to use an improved local dynamic window algorithm to reduce the DWA perception area of obstacles, thereby distinguishing between dynamic obstacles and static obstacles, thereby improving the ability to predict dynamic obstacles.
[0122] The schematic diagram of the local dynamic window algorithm is as follows Figure 6 shown.
[0123] from Figure 6It can be seen that the larger area in the middle represents a rectangular moving window with a length of 2L centered on the AGV. The local moving window captures the information of the electronic map in real time. The position information of static obstacles in the electronic map is fixed. Therefore, in the moving window, if there is other obstacle information that is different from the coordinates of the static obstacles, it is judged as a dynamic obstacle, so as to achieve the effect of classifying the obstacle types.
[0124] The present invention utilizes the local DWA algorithm and only focuses on the information of the AGV's own surrounding environment. As for the map information far away from the AGV, it has little effect on the movement of the AGV and is no longer concerned, thereby reducing the influence of unnecessary map information on the DWA algorithm. At the same time, in the local DWA algorithm, the AGV can distinguish between static obstacles and dynamic obstacles, and can record the movement direction of dynamic obstacles, which is more effective for subsequent trajectory judgment.
[0125] Example 5: Dynamic obstacle assessment
[0126] When dynamic obstacles are identified in the local DWA area, the local DWA algorithm also needs to classify the dynamic obstacles because the actual movement direction of some dynamic obstacles will not affect the AGV. The local DWA algorithm classifies dynamic obstacles mainly based on the speed direction.
[0127] Specifically, Figure 7 As shown in the figure, when the local DWA algorithm is used to classify dynamic obstacles, the current AGV direction θ is used as the vertical reference, and the left and right sides of the AGV are divided into two dangerous areas, namely Dangerous Area a and Dangerous Area b. At the same time, the dangerous area is further divided into two parts along the directions of θ-90° and θ+90°, that is, in the Dangerous Area a, it is divided into Dangerous Dynamic Obstacle a and Dangerous Dynamic Obstacle c. The effective speed directions of the two need to be distinguished. The dangerous speed direction of Dangerous Dynamic Obstacle a is the left half plane direction toward the AGV, while the dangerous speed direction of Dangerous Dynamic Obstacle c is only the 1 / 4 plane toward the robot.
[0128] Similarly, in the Dangerous Area b, it is divided into two parts: Dangerous Dynamic Obstacle b and Dangerous Dynamic Obstacle d. The effective speed directions of the two also need to be distinguished, so that the dynamic obstacle is divided into four parts.
[0129] Furthermore, after the dynamic obstacles are classified, if the speed of some dynamic obstacles is within a safe range, they will not affect the AGV transportation during the actual movement. At the same time, for dynamic obstacles that appear behind the AGV, since the dynamic obstacles have a certain judgment ability, they will not accelerate and collide with the AGV in front of them, so it is necessary to predict the speed of the dynamic obstacles.
[0130] Specifically, the prediction methods used are as follows: Figure 8 As shown, when the AGV is at the current speed v k When decelerating, the maximum deceleration time is t max , take the unit time △t from 0 to t max Perform cyclic judgment to evaluate whether the AGV and the dynamic obstacle will collide within the unit time △t. Among them:
[0131] t max =v k / a1
[0132] △t=0…t max
[0133] The dynamic obstacle keeps moving in unit time Δt, with a speed of v n , the moving distance is Δs n , then Δs n =v n *Δt;
[0134] For AGV, the distance it runs per unit time is Δs k =v k *Δt,v n =v k –a1*△t; at this time, the position of the AGV and the position of the dynamic obstacle are:
[0135] x n+1 =x n +Δs n *cosθ n ,
[0136] y n+1 =y n +Δs n *sinθ n ,
[0137] x k+1 =x k +Δs k *cosθ k ,
[0138] y k+1 =yk +Δs k *sinθ k ;
[0139] The distance between the two is dist i ,
[0140] In Δt from 0 to t max During the iteration process, it is necessary to ensure that the dist in each time period i >R obs , that is, the AG V and the dynamic obstacle will not collide, and the dynamic obstacle speed v at this time n and the speed v of the AGV k Within the safe range, if a collision occurs, the AGV status needs to be decelerated and adjusted.
[0141] Example 6: DWA evaluation function optimization
[0142] When AGV is planning its path, if the DWA algorithm is used alone, its global planning ability is poor and it is easy to fall into the local optimum. When the A* algorithm is combined with the DWA algorithm for path planning, the path point obtained by the A* algorithm is generally used as the target point of the DWA algorithm. Because the target point of the A* algorithm has a certain direction when solving, and the DWA algorithm controls the AGV to move to the target point, it also takes a certain amount of time to correct, such as Fig. 9 As shown in the figure, the starting point, the end point and the next path point are all obtained through A* algorithm planning. The AGV starts from the starting point and executes the DWA planning algorithm to reach the end point. At this time, there is an angle θ deviation between the AGV speed direction and the direction of movement to the next path point. In order to reduce the deviation from the optimal path, the omnidirectional mobile AGV decelerates before reaching the end point. After reaching the end point, the speed is 0 and the angle begins to be adjusted. Therefore, in the process of merging the traditional DWA algorithm and the A* algorithm, when the AGV reaches the turning point obtained by the A* algorithm, appropriate optimization is required to shorten the turning time.
[0143] When the traditional DWA algorithm predicts the robot, it mainly determines the dispersion of the DWA speed window by estimating the time (persimtime), such as Fig.10 As shown, Persimtimeb is greater than Persimtimea. It can be seen that the larger the estimated time, the larger the radius of the velocity window obtained by the DWA algorithm, and the larger the deflection angle, that is, the larger the velocity and angular velocity.
[0144] Therefore, choosing an appropriate estimated time will affect the AGV deflection angle calculated by the DWA algorithm.
[0145] Therefore, when optimizing the evaluation function of the DWA algorithm, the target direction evaluation function is added within a certain distance close to the target point, such as Fig.11 shown.
[0146] Specifically, the AGV starts from the starting point. At this time, the estimated time used by the DWA algorithm is persimtimea. Once the AGV runs to the distance dist from the target point, the DWA algorithm estimated time is adjusted to persimtimeb, where persimtimeb is less than persimtimea, and an evaluation function direction(v,ω) is added to evaluate the direction angle of the AGV to the destination point. The expression of direction(v,ω) is shown in the following formula.
[0147] direction(v,ω)=θ goal -θ agv
[0148] The evaluation function expression of the optimized DWA algorithm is:
[0149] G(v,ω)=α*heading(v,ω)+β*distance(v,ω)+γ*velocity(v,ω)+η*direction(v,ω)
[0150] This ensures that the AGV can choose a higher speed state in the early stage of movement, and when approaching the target point, it chooses an AGV state with an angular velocity closer to the target point, thereby reducing the turning time and improving transportation efficiency.
[0151] As for this, facing the completion of the path planning of the semi-automatic processing workshop of gyroscope parts, the path planning flow chart is as follows Figure 1 As shown in the figure, in the process of AGV path planning, the A* algorithm is first used for global path planning. Due to the complex dynamic situation of the semi-automatic production environment of gyroscope parts, the dynamic obstacle avoidance effect of relying solely on the A* algorithm is insufficient. Therefore, the key points of the path obtained by the A* algorithm are extracted and used as the target point for the AGV movement. When the AGV moves, the obstacles within a certain range around it are judged from the obtained electronic map information, and the dynamic obstacles on the map are classified and the speed is evaluated. If it is judged that the obstacle conflicts with the current movement of the AGV, DWA obstacle avoidance processing is performed, otherwise the AGV continues to move along the path obtained by the A* algorithm. Since the path planned by the A* algorithm is not smooth enough, for the turning points on the A* algorithm path, the AGV also uses the DWA algorithm to bypass the turning points and finally completes the entire path planning.
[0152] The present invention also simulates and verifies the proposed improved local DWA algorithm, specifically, using Python and Matplotlib to simulate AGV transport path planning on the R74800H platform, wherein Matplotlib is an open source comprehensive library for creating animations in Python.
[0153] Verification Example 1: Comparison between Traditional DWA Algorithm and Local DWA Algorithm
[0154] Before simulation verification, parameter setting is required.
[0155] The motion parameters of AGV are shown in Table 1.
[0156] Table 1 AGV motion parameters
[0157]
[0158] The parameters of the traditional DWA algorithm mainly include angle weight α, distance weight β, speed weight γ and estimated simulation time t sim , where the values of each parameter are shown in Table 2.
[0159] Table 2 Parameters of traditional DWA algorithm
[0160]
[0161] The local DWA algorithm is different from the traditional DWA algorithm in terms of angle weight α, distance weight β, speed weight γ and estimated simulation time t sim The above are consistent, as shown in Table 2; the other parameters of the local DWA algorithm are mainly: search area length L, collision detection distance R obs , Estimated simulation time t for direction angle optimization simd and direction angle evaluation coefficient η, and the various parameters are shown in Table 3.
[0162] Table 3 Some parameters of local DWA algorithm
[0163]
[0164] Fig.12 The schematic diagram of the path planning trajectory of the traditional DWA is specifically represented by the AGV status at different times of t = 0s, 120s, 200s, and 240s. Among them, the starting point coordinates are (2,1), represented by light-colored squares, and the end point coordinates are (5,7), also represented by light-colored squares. The black squares in the figure are static obstacles, and the scattered squares between the black squares are dynamic obstacles. The dotted line trajectory is the global optimal path obtained by the A* algorithm, and the solid line trajectory is the motion trajectory obtained by the DWA algorithm with the end point (5,7).
[0165] As can be seen from the figure, although the AGV can effectively avoid obstacles during operation, it is unable to distinguish whether dynamic obstacles will affect the AGV, resulting in a large deviation between the DWA running trajectory and the shortest path obtained by A*.
[0166] Fig.13 It is a schematic diagram of the path planning trajectory combined with the local DWA algorithm, specifically representing the AGV status at different times of t=0s, 150s, 170s, and 200s.
[0167] As can be seen from the figure, the local DWA algorithm enables the AGV to always move along the A* algorithm when no conflicting obstacles are detected. When encountering dynamic obstacles, the local DWA algorithm is turned on to reach the destination. The path curve has a smaller deviation than the traditional DWA algorithm, which improves transportation efficiency.
[0168] Verification Example 2: Improved DWA Algorithm Verification
[0169] During the path planning process, if the global path found by the A* algorithm is too long, the DWA algorithm will need to make angle adjustments after moving to the destination. Therefore, the improved DWA algorithm adds a direction angle evaluation function direction(v,ω), which can shorten the angle deviation of the DWA algorithm moving to the destination and increase the AGV transportation efficiency.
[0170] Select the starting point coordinates (7,1) and the target point (13,9), and compare the local DWA algorithm without adding the direction angle evaluation function within 120 seconds with the local DWA algorithm with adding the direction angle evaluation function. The AGV operation status of the local DWA algorithm without adding the direction angle evaluation function within 120 seconds is as follows: Fig.14 As shown, the AGV states at four different times, t=0s, 20s, 40s, and 120s, are represented respectively. In order to intuitively display the AGV running trajectory, the local DWA algorithm search area is no longer displayed at this time.
[0171] As can be seen from the figure, when the AGV starts to move from the starting point (7,1) along the shortest path obtained by the A* algorithm, at t=20s, the local DWA algorithm has detected that the dynamic obstacle at (7,3) will affect the AGV, so the AGV begins to deviate from the shortest path to the left, and finally at t=120s the AGV moves to point (6,6).
[0172] During the operation of AGV, its speed change curve is as follows: Fig.15 As shown, the angular velocity variation curve is as follows Fig.16 As shown in the figure, by analyzing the speed and angular velocity change curves of AGV, the specific process of its obstacle avoidance can be better reflected.
[0173] Through the analysis of the change curve, it is known that during the AGV transportation process, it performs uniform acceleration along the path found by A*. At t=10s, the AGV angular velocity begins to increase, that is, the AGV detects a conflicting obstacle at this moment, so it deflects under the local DWA algorithm until t=55s, when the AGV angular velocity drops to 0 (rad / s), which means that the AGV reaches the target point (8,4). Subsequently, the angle correction is performed to make the robot's direction consistent with the target point. The angle correction is completed at t=65s, and the robot begins to perform linear acceleration along the shortest path of the A* algorithm.
[0174] The operation status of the AGV in 120s after adding the direction angle evaluation function for optimization is as follows: Fig.17 As shown, it represents the AGV status at four different times of t=0s, 20s, 40s, and 120s respectively.
[0175] It can be seen from the figure that the AGV has identified the conflicting dynamic obstacle before t = 20s. At t = 120s, the AGV has moved to the coordinate point (6, 8). The transportation distance of the AGV using the local DWA algorithm with direction angle optimization is greater than that of the DWA algorithm without direction angle optimization.
[0176] During the operation of AGV, its speed change curve is as follows: Fig.18 As shown, the angular velocity variation curve is as follows Fig.19 shown.
[0177] By comparing before and after, at t=10s, the local DWA algorithm detected a dangerous obstacle in the moving direction, so the AGV deviated. The peak value of the AGV angular velocity under the DWA algorithm with the added direction angle evaluation function at t=15s was greater than that of the AGV without the DWA algorithm with the added direction angle evaluation function; at t=38s, the speed of the AGV under the DWA algorithm with the added direction angle evaluation function was 0, that is, the AGV moved to the middle point (8,4); at t=25s, the AGV rotated to the target point angle and began to move in a straight line along the shortest path obtained by the A* algorithm. It can be seen from the figure that the optimized DWA algorithm with the added direction angle evaluation function shortened the time to move to the target point by nearly 20s compared with the local DWA algorithm without the added direction angle, which greatly improved the transportation efficiency of the AGV.
[0178] Verification Example 3: DWA Algorithm Optimization Path Verification
[0179] When the local DWA algorithm moves along the target point, the local DWA can also be used for transition at the turning point of the path of the A* algorithm, thereby reducing the adjustment time of the AGV at the turning point and improving transportation efficiency.
[0180] The path running trajectory without using the DWA algorithm to optimize the turning point is as follows Fig. 20 As shown, the figure shows the AGV status at four different times of t=0s, 120s, 300s, and 425s respectively.
[0181] The speed and angular velocity change curves of the AGV during operation are as follows: Fig.21 , Fig. 22 shown.
[0182] As can be seen from the figure, it takes 430 seconds for the car to run from the starting point (9,1) to the point (25,13). At the turning point, the speed of the AGV is 0 and the angular velocity begins to change. At the straight line segment of the A* path, the angular velocity of the AGV is 0 and the speed begins to change.
[0183] For optimizing the AGV path, the present invention directly uses the optimized local DWA algorithm to optimize the global path turning points, so that the AGV can still have a high obstacle avoidance capability while adjusting the running path.
[0184] The path trajectory after the inflection point is optimized using the local DWA algorithm. Fig.23 As shown, the figure shows the AGV status at four different times: t=0s, 100s, 200s, and 340s.
[0185] As can be seen from the figure, the DWA algorithm is used to optimize the inflection point, and the two path points before and after the inflection point are taken as the starting point and end point of the local DWA algorithm. The speed and angular velocity change curves during the operation of the AGV are as follows: Fig.24 , Fig.25 shown.
[0186] As can be seen from the figure, during the entire operation process, the situation where the AGV speed drops to 0 is shorter than the path time without turning point optimization. The total time for the entire transportation process using the DWA algorithm to optimize the turning point is 340s. Compared with not optimizing, the moving time is shortened by 85s, which greatly improves the transportation efficiency of the AGV.
[0187] The present invention aims at the problem that the traditional DWA algorithm cannot distinguish the obstacle types and the target point is too far away from the starting point, which easily causes a large deviation from the global shortest path. The present invention optimizes it. First, the local map information is extracted, the dynamic obstacles are classified, the speed of the dynamic obstacles is evaluated, and local obstacle avoidance is performed. Compared with the traditional DWA algorithm, the obstacle avoidance judgment ability of the AGV for dynamic obstacles is improved, and the degree of AGV deviation from the shortest path is reduced while ensuring the dynamic obstacle avoidance effect.
[0188] Secondly, in the process of path planning for the DWA algorithm, since the target point itself has a direction angle, the DWA algorithm needs to perform angle correction when controlling the AGV to move to the destination point. The DWA algorithm is optimized by adding an evaluation function with a direction angle function. This shortens the AGV movement time compared to the traditional DWA algorithm.
[0189] Since the path obtained by the global path planning search has some turning points, and the turning points affect the AGV transportation speed during the AGV movement, the present invention adopts an optimized DWA algorithm to optimize the global path turning points. Compared with the traditional method of correcting the global path, it has better dynamic obstacle avoidance effect and lower requirements on the AGV path quality. At the same time, it can also shorten the AGV transportation time and improve the AGV transportation efficiency.
[0190] Finally, the present invention is verified by simulation, and the simulation results show that the improved DWA algorithm proposed in the present invention can ensure the real-time obstacle avoidance of AGV in an environment with complex dynamic conditions, while shortening the transportation time of AGV and improving the transportation efficiency.
[0191] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. The AGV path planning method based on the improved DWA algorithm in a dynamic environment is characterized by: The steps include: Step 1: Taking the production workshop as the research object, feature extraction and simplification of the workshop layout are performed, and a grid map of the production workshop is constructed. The starting and ending positions are pre-set on the grid map, and the positions of obstacles are marked; Step 2: Use the A* algorithm to perform global path planning, extract key points from the path obtained by the A* algorithm, and use them as the target points for AGV movement. Use the DWA algorithm to predict the sampling trajectory, and then use the evaluation function to select the AGV state corresponding to the path with the highest evaluation as its next operation state; In step 2, the expression of the evaluation function is: in, v , ω are the linear velocity and angular velocity of the robot respectively; It is the deflection evaluation function, which mainly estimates the angle between the vector between the robot and the target point in the simulation state and the current orientation of the robot; It is a safety evaluation function, which mainly estimates the distance between the current robot position and the obstacle; is the speed evaluation function, which mainly estimates the state with faster speed among the robot states that meet the conditions; α *、 β *、 γ * are weight parameters of evaluation factors respectively; Step 3: Use the improved DWA algorithm to narrow the DWA's perception area of obstacles, take the path with the highest evaluation in step 2 as the reference path, perform local dynamic obstacle avoidance path planning from the starting point to the end point in step 1, and plan an optimal dynamic obstacle avoidance path for the AGV; Step 4: When step 3 is identifying dynamic obstacles, the improved DWA algorithm needs to classify the dynamic obstacles according to their speed direction, and then evaluate the speed of the dynamic obstacles to adjust the motion state of the AGV; Step 5: When the AGV reaches the turning point obtained by the A* algorithm, the DWA evaluation function is optimized, the target direction evaluation function is added, and the AGV path planning is completed; The evaluation function expression of the optimized DWA algorithm is: in, Used to evaluate the direction angle of AGV when it reaches the destination.
2. The AGV path planning method based on the improved DWA algorithm in a dynamic environment according to claim 1 is characterized in that: The step 1 specifically includes: Perform two-dimensional raster processing on the internal environment of the production workshop where the AGV is located, and place the AGV in a plane rectangular coordinate system, with the horizontal axis being the X axis and the vertical axis being the Y axis; Referring to the actual situation of objects in the production workshop, the black parts are marked as static obstacles, and the red parts are marked as dynamic obstacles. At the same time, the grid map also shows the starting position, end position and planned path.
3. The AGV path planning method based on the improved DWA algorithm in a dynamic environment according to claim 1 is characterized in that: The step 2 comprises the following steps: Step 2.1: Use the A* algorithm to perform global path planning. The evaluation function expression of the A* algorithm is: in, n Represents the current node, f ( n ) means from the starting point through the node n The evaluation function for reaching the target point; g ( n ) indicates reaching the node from the starting point n the actual cost of h ( n ) is an estimated value, indicating that n The estimated cost to the target point is also called the heuristic function; Step 2.2: Establish the AGV motion model. The mathematical expression of the AGV motion model is: in,( x n , y n , θ n ) is the current position information of AGV, ( x n+1 , y n+1 , θ n+1 ) is the location information of AGV at the next moment; Step 2.3: Sample the speed and angular velocity according to the current speed and angular velocity of the AGV, and calculate the feasible speed sampling space; Step 2.4: After obtaining the sampled trajectory of the AGV, the predicted path is evaluated by the evaluation function.
4. The AGV path planning method based on the improved DWA algorithm in a dynamic environment according to claim 3 is characterized in that: In step 2.3, the constraints that need to be met in the adoption process are: The robot's maximum and minimum speed and angular velocity limits are: U i ; Affected by the robot's own motor speed increase and deceleration torque, the robot's current speed and angular velocity range are limited U j ; In order for the robot to avoid obstacles safely, consider the linear velocity and angular velocity within the safe braking range of the robot's current state U k ; in, v c is the current linear velocity of the robot, ω c is the current angular velocity of the robot, a 1 is the maximum deceleration of the robot, a 2 is the maximum acceleration of the robot, φ 1 is the maximum angular deceleration of the robot, φ 2 is the maximum angular acceleration of the robot, dist ( v , ω )and theta ( v , ω ) are the minimum distance and minimum angle of obstacles predicted by the corresponding speed and angular velocity respectively; The velocity vector space of the robot is: 。 5. The AGV path planning method based on the improved DWA algorithm in a dynamic environment according to claim 1 is characterized in that: In step 3, the improved local dynamic window algorithm is used to reduce the DWA's perception area of obstacles, thereby distinguishing between dynamic obstacles and static obstacles; In the local dynamic window algorithm, the larger area represents a rectangular moving window with a length of 2L centered on the AGV. The local moving window captures the information of the electronic map in real time, classifies the obstacle types, and records the movement direction of the dynamic obstacles.
6. The AGV path planning method based on the improved DWA algorithm in a dynamic environment according to claim 1 is characterized in that: The step 4 comprises the following steps: When the local DWA algorithm is used to classify dynamic obstacles, the current AGV direction θ As a vertical reference, the left and right sides of the AGV are divided into two dangerous areas, namely Dangerous Area A and Dangerous Area B. θ -90° and θ The +90° direction divides the danger zone into two parts again, the upper and lower parts, and thus divides the dynamic obstacle into four parts; After the dynamic obstacles are classified, the speed of the dynamic obstacles needs to be predicted.
7. The AGV path planning method based on the improved DWA algorithm in a dynamic environment according to claim 6 is characterized in that: The prediction method used is: Dynamic obstacles per unit time The transport movement is maintained. ; Speed is , the moving distance is ,but ; For AGV, the running distance per unit time is ; At this time, the position of AGV and the position of dynamic obstacles are , , , The distance between the two is , ;exist From 0 to During the iteration process, it is necessary to ensure , that is, the AGV and the dynamic obstacle will not collide, and the speed of the dynamic obstacle at this time is and the speed of AGV Within the safe range, if a collision occurs, the AGV status needs to be decelerated and adjusted.
Citation Information
Patent Citations
Improved ant colony path planning algorithm based on non-uniform modeling
CN109506655A
ROS robot local path planning method based on DWA
CN112325884A
Mobile robot intelligent path planning method
CN112631294A
Local path planning method for an indoor mobile robot in dynamic environment
CN113050646A
Method for planning shortest path in robot obstacle avoidance
WO2017173990A1
Cited By
Robot deceleration obstacle avoidance method based on DWA
CN119759019A
