DWA-based Robot Local Path Planning Method and System
The integration of global path planning with DWA to evaluate and select optimal local paths addresses DWA's foresight limitations, maintaining efficiency and simplicity in path planning.
Patent Information
- Application Number
- CN202310182426.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2043-02-24
AI Technical Summary
The DWA algorithm is not proactive in robot local path planning, resulting in poor dynamic obstacle avoidance and failure to select the global optimal path.
Multiple parallel local paths are generated through global path planning, combined with robot velocity and acceleration constraints, and the optimal velocity and path are selected using evaluation functions to overcome DWA prospective shortcomings.
It realizes that while keeping the DWA algorithm simple and efficient, selecting the global optimal path and avoiding obstacles is improved, improving the dynamic obstacle avoidance effect of robot path planning.
Smart Images

Figure CN116048098B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot path planning, and more specifically to a local path planning method and system for robots based on DWA. Background Art
[0002] Due to its low computational complexity and ability to avoid obstacles in real time, the DWA algorithm has been widely applied in local path planning for robots. However, the DWA algorithm also has many deficiencies. For example, it has insufficient foresight: it only simulates and evaluates the next step, resulting in poor dynamic obstacle avoidance effect; and it always selects the best path for the next step instead of the global optimal path.
[0003] How to achieve robot path planning while overcoming the deficiency of DWA's foresight and maintaining the advantages of the DWA algorithm, such as simplicity, high efficiency, and ease of implementation, is a technical problem that needs to be solved. Summary of the Invention
[0004] The technical task of the present invention is to address the above deficiencies by providing a local path planning method and system for robots based on DWA, so as to solve the technical problem of how to achieve robot path planning while overcoming the deficiency of DWA's foresight and maintaining the advantages of the DWA algorithm, such as simplicity, high efficiency, and ease of implementation.
[0005] In a first aspect, a local path planning method for robots based on DWA according to the present invention includes the following steps:
[0006] Perform global path planning based on a global path planning algorithm to obtain a globally optimal path;
[0007] Starting from the current position of the robot, generate n local paths parallel to the globally optimal path on both sides of the globally optimal path along the direction of the globally optimal path. The distance interval between adjacent local paths is S, and the length of each local path is L;
[0008] Starting from the current position of the robot, intercept a path with a length of L on the globally optimal path as a candidate local path, and use the 2n local paths as candidate local paths. For the 2n + 1 local paths, determine whether there are obstacles on each local path, and mark the local paths without obstacles as feasible local paths;
[0009] According to the speed and acceleration constraints of the robot model itself, form a set of speed pairs (v, ω) from the feasible linear driving speed and rotational angular velocity of the robot, where the feasible linear driving speed v is within the range of the maximum and minimum speeds reachable by the robot, and the rotational angular velocity ω is within the range of the maximum and minimum angular velocities reachable by the robot;
[0010] Based on the global optimal path, the previous optimal feasible local path, and the magnitude of the speed, evaluate all the speeds in the set of speed pairs. Based on the evaluation results, select the speed with the highest score as the current target speed path of the robot and send it to the execution mechanism of the robot to control the robot to move along the target speed path. At the same time, mark the feasible local path closest to the target speed path as the current optimal feasible local path for the next evaluation function to evaluate.
[0011] Preferably, the global path planning algorithm includes the A* algorithm and the Dijkstra algorithm.
[0012] Preferably, for each local path, judge whether there are obstacles on the local path by the following method:
[0013] Calculate the closest distance from the edge of the obstacle to the local path. If the closest distance is greater than half of the width of the robot, it is considered that there are no obstacles on the local path, otherwise it is considered that there are obstacles on the local path.
[0014] Preferably, based on the global optimal path, the previous optimal feasible local path, and the magnitude of the speed, evaluate all the speeds in the set of speed pairs through an evaluation function, and the evaluation function is expressed as:
[0015] G(v, ω) = α * dis_global(v, ω) + β * dis_local(v, ω) + γ * vel(v, ω)
[0016] Wherein, dis_global(v, ω) is the distance evaluation function from the speed pair to be evaluated to the global optimal path, dis_local(v, ω) is the distance evaluation function from the speed to be evaluated to the previous optimal feasible local path, and vel(v, ω) is the magnitude evaluation function of the speed;
[0017] α, β, and γ are user-defined weights;
[0018] The closer the speed to be evaluated is to the global optimal path, the higher the score of dis_global(v, ω); the closer the speed to be evaluated is to the previous optimal feasible local path, the higher the score of dis_local(v, ω); the greater the speed to be evaluated, the higher the score of vel(v, ω).
[0019] In a second aspect, the present invention provides a robot local path planning system based on DWA, which is used to perform robot local path planning through the robot local path planning method according to any one of the first aspects. The system includes:
[0020] A global path planning module, which is used to perform global path planning based on a global path planning algorithm to obtain a globally optimal path;
[0021] A local path selection module, which is used to generate n local paths parallel to the global optimal path on both sides of the global optimal path from the current position of the robot along the direction of the global optimal path. The distance interval between local paths is S, and the length of each local path is L;
[0022] A feasible local path selection module, which is used to start from the current position of the robot, intercept a path with a length of L on the global optimal path as a candidate local path, and use the 2n local paths as candidate local paths. For the 2n + 1 local paths, judge whether there are obstacles on each local path, and mark the local paths without obstacles as feasible local paths;
[0023] A speed pair selection module, which is used to form a speed pair set (v, ω) according to the speed and acceleration constraints of the robot model itself, where the feasible linear driving speed v is between the maximum speed and the minimum speed that the robot can reach, and the rotational angular velocity ω is between the maximum angular velocity and the minimum angular velocity that the robot can reach;
[0024] A speed evaluation module, which is used to evaluate all speeds in the speed pair set based on the global optimal path, the previous optimal feasible local path, and the magnitude of the speed. Select the speed with the highest score as the current target speed path of the robot based on the evaluation result and send it to the execution mechanism of the robot to control the robot to move along the target speed path. At the same time, mark the feasible local path closest to the target speed path as the current optimal feasible local path for the next evaluation function to evaluate.
[0025] Preferably, the global path planning algorithm includes the A* algorithm and the Dijkstra algorithm.
[0026] Preferably, for each local path, the feasible local path selection module is used to judge whether there are obstacles on the local path by the following method:
[0027] Calculate the closest distance from the edge of the obstacle to the local path. If the closest distance is greater than half of the width of the robot, it is considered that there are no obstacles on the local path, otherwise it is considered that there are obstacles on the local path.
[0028] Preferably, based on the global optimal path, the previous optimal feasible local path, and the magnitude of the speed, the speed evaluation module is used to evaluate all the speeds in the speed pair set through an evaluation function, and the evaluation function is expressed as:
[0029] G(v, w) = α * dis_global(v, w) + β * dis_local(v, w) + γ * vel(v, ω)
[0030] Among them, dis_global(v, ω) is the distance evaluation function from the speed pair to be evaluated to the global optimal path, dis_local(v, ω) is the distance evaluation function from the speed to be evaluated to the previous optimal feasible local path, and vel(v, ω) is the magnitude evaluation function of the speed;
[0031] α, β, and γ are user-defined weights;
[0032] The closer the speed to be evaluated is to the global optimal path, the higher the score of dis_global(v, ω); the closer the speed to be evaluated is to the previous optimal feasible local path, the higher the score of dis_local(v, ω); and the greater the speed to be evaluated, the higher the score of vel(v, ω).
[0033] The local path planning method and system for a robot based on DWA of the present invention have the following advantages: n local paths parallel to the global optimal path are generated on both sides of the global optimal path, the current feasible local path is selected from the local paths and the global optimal path, the DWA algorithm is used to form a speed pair set (v, ω) from the feasible linear driving speed and rotational angular velocity of the robot, and in combination with the current optimal local path, the global optimal path, and the magnitude of the speed, the speeds in the set are evaluated, and the current optimal speed magnitude and direction of the robot are selected therefrom as the current local path, which can overcome the drawback of the lack of foresight of DWA, while maintaining the original advantages of the algorithm being simple, efficient, and easy to implement. Description of the Drawings
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0035] The present invention will be further described below in conjunction with the drawings.
[0036] Figure 1 It is a flowchart of the local path planning method for a robot based on DWA in Embodiment 1. Detailed Embodiments
[0037] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, so that those skilled in the art can better understand the present invention and be able to implement it. However, the embodiments cited are not intended to limit the present invention. Without conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0038] The embodiment of the present invention provides a local path planning method and system for a robot based on DWA, which is used to solve the technical problem of realizing robot path planning on the premise of overcoming the disadvantage of insufficient foresight of DWA and at the same time maintaining the advantages of simple, efficient and easy-to-implement of the DWA algorithm.
[0039] Embodiment 1:
[0040] A local path planning method for a robot based on DWA of the present invention includes the following steps:
[0041] S100. The algorithm performs global path planning to obtain a globally optimal path;
[0042] S200. Starting from the current position of the robot, n local paths parallel to the globally optimal path are respectively generated on both sides of the globally optimal path along the direction of the globally optimal path. The distance interval between the local paths is S, and the length of each local path is L;
[0043] S300. Starting from the current position of the robot, a path with a length of L on the globally optimal path is intercepted as a candidate local path, and the 2n local paths are used as candidate local paths. For the 2n + 1 local paths, it is judged whether there are obstacles on each local path, and the local paths without obstacles are marked as feasible local paths;
[0044] S400. According to the speed and acceleration constraints of the robot model itself, the feasible linear driving speed and rotational angular velocity of the robot are combined into a set of speed pairs (v, ω), where the feasible linear driving speed v is between the maximum speed and the minimum speed that the robot can reach, and the rotational angular velocity ω is between the maximum angular velocity and the minimum angular velocity that the robot can reach;
[0045] S500. Based on the globally optimal path, the previous optimal feasible local path, and the magnitude of the speed, all the speeds in the set of speed pairs are evaluated. Based on the evaluation results, the speed with the highest score is selected as the current target speed path of the robot and sent to the execution mechanism of the robot to control the robot to move along the target speed path. At the same time, the feasible local path closest to the target speed path is marked as the current optimal feasible local path for use in the next evaluation function.
[0046] Among them, in step S100 of this embodiment, a global path planning algorithm such as the A* algorithm or the Dijkstra algorithm is used for global path planning to obtain a globally optimal path.
[0047] In step S300, the method for determining whether there are obstacles on the candidate local path is as follows: calculate the shortest distance from the edge of the obstacle to the path. If the shortest distance is greater than half of the robot width, it is considered that there are no obstacles on the path, otherwise it is considered that there are obstacles on the path.
[0048] In step S400, v ∈ [v min , v max ∧ w ∈ [w min , w max , the speed v should be between the maximum speed and the minimum speed that the robot can reach, and the angular velocity ω should be between the maximum angular velocity and the minimum angular velocity that the robot can reach.
[0049] In step S500, the evaluation function is:
[0050] G(v, w) = α * dis_global(v, w) + β * dis_local(v, w) + γ * vel(v, ω)
[0051] The evaluation factors in the above evaluation function include: the distance evaluation function dis_global(v, ω) of the speed pair to be evaluated to the globally optimal path, the distance evaluation function dis_local(v, ω) of the speed to be evaluated to the previous optimal feasible local path, and the speed magnitude evaluation function vel(v, ω). Among them, the closer the speed to be evaluated is to the globally optimal path, the higher the score of dis_global(v, ω); the closer the speed to be evaluated is to the previous optimal feasible local path, the higher the score of dis_local(v, ω); the greater the speed to be evaluated, the higher the score of vel(v, ω); α, β, and γ are weights, which are set according to actual needs.
[0052] The method of this embodiment aims at the path selection problem of the DWA algorithm for robots. By generating multiple candidate local paths, combining the current optimal local path, the globally optimal path, and the magnitude of the speed, the speeds in the set are evaluated, and the current optimal speed magnitude and direction of the robot are selected as the current local path, which can overcome the drawback of the lack of foresight of DWA, and at the same time maintain the original advantages of the algorithm, such as simplicity, high efficiency, and easy implementation.
[0053] Embodiment 2:
[0054] A local path planning system for a robot based on DWA includes a global path planning module, a local path selection module, a feasible local path selection module, a speed pair selection module, and a speed evaluation module. This system can perform robot local path planning according to the method disclosed in Embodiment 1.
[0055] The global path planning module is used to perform global path planning based on a global path planning algorithm to obtain a globally optimal path.
[0056] In this embodiment, in the global path planning module, existing global path planning algorithms such as the A* algorithm or the Dijkstra algorithm are used to perform global path planning to obtain a globally optimal path.
[0057] The local path selection module is used to generate n local paths parallel to the globally optimal path on both sides of the globally optimal path from the current position of the robot along the direction of the globally optimal path. The distance interval between the local paths is S, and the length of each local path is L.
[0058] The feasible local path selection module is used to start from the current position of the robot, intercept a path with a length of L on the globally optimal path as a candidate local path, and use the 2n local paths as candidate local paths. For the 2n + 1 local paths, it is judged whether there are obstacles on each local path, and the local paths without obstacles are marked as feasible local paths.
[0059] In this embodiment, the feasible local path selection module judges whether there are obstacles in the local path by the following method: calculate the nearest distance from the edge of the obstacle to the path. If the nearest distance is greater than half of the robot width, it is considered that there are no obstacles on this path, otherwise it is considered that there are obstacles on this path.
[0060] The speed pair selection module is used to form a set of speed pairs (v, ω) by the feasible linear driving speed and the rotational angular velocity of the robot according to the speed and acceleration constraints of the robot model itself, where the feasible linear driving speed v is between the maximum speed and the minimum speed that the robot can reach, and the rotational angular velocity ω is between the maximum angular velocity and the minimum angular velocity that the robot can reach.
[0061] The speed evaluation module is used to evaluate all the speeds in the set of speed pairs based on the globally optimal path, the previous optimal feasible local path, and the magnitude of the speed. Based on the evaluation results, the speed with the highest score is selected as the current target speed path of the robot and sent to the execution mechanism of the robot to control the robot to move along the target speed path. At the same time, the feasible local path closest to the target speed path is marked as the current optimal feasible local path for the next evaluation function to evaluate.
[0062] Among them, the evaluation function is as follows:
[0063] G(v, ω) = α * dis_global(v, ω) + β * dis_local(v, ω) + γ * vel(v, ω)
[0064] The evaluation factors in the above evaluation function include: dis_global(v, ω), the evaluation function of the distance from the speed to be evaluated to the global optimal path; dis_local(v, ω), the evaluation function of the distance from the speed to be evaluated to the previous optimal feasible local path; vel(v, ω), the evaluation function of the magnitude of the speed. Among them, the closer the speed to be evaluated is to the global optimal path, the higher the score of dis_global(v, ω); the closer the speed to be evaluated is to the previous optimal feasible local path, the higher the score of dis_local(v, ω); the greater the speed to be evaluated, the higher the score of vel(v, ω); α, β, and γ are weights, which are set according to actual requirements.
[0065] The above text has detailedly demonstrated and described the present invention through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above-mentioned multiple embodiments, those skilled in the art can know that code review means in different above-mentioned embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A local path planning method for a robot based on DWA, characterized in that, It includes the following steps: Perform global path planning based on the global path planning algorithm to obtain a globally optimal path; From the current position of the robot, generate n local paths parallel to the globally optimal path on both sides of the globally optimal path along the direction of the globally optimal path. The distance interval between the local paths is S, and the length of each local path is L; Starting from the current position of the robot, intercept a path with a length of L on the globally optimal path as a candidate local path, and use the 2n local paths as candidate local paths. For the 2n + 1 local paths, determine whether there are obstacles on each local path, and mark the local paths without obstacles as feasible local paths; According to the speed and acceleration constraints of the robot model itself, form a set of speed pairs (v, ω) by the feasible linear driving speed and rotational angular velocity of the robot. Among them, the feasible linear driving speed v is within the range of the maximum and minimum speeds reachable by the robot, and the rotational angular velocity ω is within the range of the maximum and minimum angular velocities reachable by the robot; Based on the globally optimal path, the previous optimal feasible local path, and the magnitude of the speed, evaluate all the speeds in the set of speed pairs. Based on the evaluation results, select the speed with the highest score as the current target speed path of the robot and send it to the execution mechanism of the robot to control the robot to move along the target speed path. At the same time, mark the feasible local path closest to the target speed path as the current optimal feasible local path for use in the next evaluation function for evaluation; 2. The method for local path planning of a robot based on DWA according to claim 1, wherein The global path planning algorithm includes the A* algorithm and the Dijkstra algorithm; 3. The method for local path planning of a robot based on DWA according to claim 1, characterized in that, For each local path, determine whether there are obstacles on the local path through the following method: Calculate the closest distance from the edge of the obstacle to the local path. If the closest distance is greater than half of the width of the robot, it is considered that there are no obstacles on the local path, otherwise it is considered that there are obstacles on the local path; 4. The method for local path planning of a robot based on DWA according to claim 1, wherein, Based on the globally optimal path, the previous optimal feasible local path, and the magnitude of the speed, evaluate all the speeds in the set of speed pairs through an evaluation function. The evaluation function is expressed as: G(v, ω) = α * dis_global(v, ω) + β * dis_local(v, ω) + γ * υel(υ, ω) where dis_global(v, ω) is the distance evaluation function from the speed pair to be evaluated to the globally optimal path, dis_local(v, ω) is the distance evaluation function from the speed to be evaluated to the previous optimal feasible local path, and vel(v, ω) is the magnitude evaluation function of the speed; α, β, γ are user-defined weights; The closer the speed to be evaluated is to the globally optimal path, the higher the score of dis_global(v, ω). The closer the speed to be evaluated is to the previous optimal feasible local path, the higher the score of dis_local(v, ω). The greater the speed to be evaluated, the higher the score of vel(v, ω).
5. A robot local path planning system based on DWA, characterized in that, For robot local path planning using the DWA-based robot local path planning method according to any one of claims 1-4, the system includes: A global path planning module, which is used to perform global path planning based on a global path planning algorithm to obtain a globally optimal path; A local path selection module, which is used to generate n local paths parallel to the global optimal path on both sides of the global optimal path from the current position of the robot along the direction of the global optimal path. The distance interval between local paths is S, and the length of each local path is L; A feasible local path selection module, which is used to start from the current position of the robot, intercept a path of length L on the global optimal path as a candidate local path, and use the 2n local paths as candidate local paths. For the 2n + 1 local paths, determine whether there are obstacles on each local path, and mark the local paths without obstacles as feasible local paths; A speed pair selection module, which is used to form a speed pair set (v, ω) by the feasible linear driving speed and rotational angular velocity of the robot according to the speed and acceleration constraints of the robot model itself, where the feasible linear driving speed v is between the maximum speed and the minimum speed that the robot can reach, and the rotational angular velocity ω is between the maximum angular velocity and the minimum angular velocity that the robot can reach; A speed evaluation module, which is used to evaluate all speeds in the speed pair set based on the global optimal path, the previous optimal feasible local path, and the magnitude of the speed. Based on the evaluation results, select the speed with the highest score as the current target speed path of the robot and send it to the execution mechanism of the robot to control the robot to move along the target speed path. At the same time, mark the feasible local path closest to the target speed path as the current optimal feasible local path for use in the next evaluation function; 6. The local path planning system for a robot based on DWA according to claim 5, characterized in that, The global path planning algorithm includes the A* algorithm and the Dijkstra algorithm.
7. The local path planning system for a robot based on DWA according to claim 5, wherein For each local path, the feasible local path selection module is used to determine whether there are obstacles on the local path by the following method: Calculate the closest distance from the edge of the obstacle to the local path. If the closest distance is greater than half of the width of the robot, it is considered that there are no obstacles on the local path, otherwise it is considered that there are obstacles on the local path.
8. The local path planning system for a robot based on DWA according to claim 5, wherein, Based on the global optimal path, the previous optimal feasible local path, and the magnitude of the speed, the speed evaluation module is used to evaluate all speeds in the speed pair set through an evaluation function, and the evaluation function is expressed as: G(v, ω) = α * dis_global(v, ω) + β * dis_local(v, ω) + γ * vel(v, ω) Among them, dis_global(v, ω) is the distance evaluation function of the velocity to be evaluated to the global optimal path, dis_local(v, ω) is the distance evaluation function of the velocity to be evaluated to the previous optimal feasible local path, and vel(v, ω) is the magnitude evaluation function of the velocity; α, β, and γ are user-defined weights; The closer the velocity to be evaluated is to the global optimal path, the higher the score of dis_global(v, ω); the closer the velocity to be evaluated is to the previous optimal feasible local path, the higher the score of dis_local(v, ω); the greater the velocity to be evaluated, the higher the score of vel(v, ω).
Citation Information
Patent Citations
ROS robot local path planning method based on DWA
CN112325884A
Local path planning method for an indoor mobile robot in dynamic environment
CN113050646A