A Path Planning Method for Mobile Robots Based on an Improved APF Algorithm
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]传统APF算法通常存在以下问题:(1)局部极小值,当运动对象在某一位置所受的引力和所有障碍物对它产生的斥力大小相等且方向相反时,运动对象所受的合力为零,将无法确定其下一步运动位置,出现运动对象在这一位置停止或徘徊的现象
[0063]本发明的有益效果在于:与现有APF技术相比,本发明具有以下优点:(1)在传统APF势场函数的基础上,通过对传统斥力势场函数增加影响函数,拆分斥力为机器人-目标点方向的斥力以及障碍物-目标点方向的斥力,较好避免斥力过大的情况,有效解决传统算法存在目标不可达问题;(2)针对局部最小值问题,将改进后的APF算法与随机游走算法相结合,生成临时目标点,控制机器人沿着根节点与临时目标点连线的方向行驶,走出引力与斥力大小相等方向相反的僵持状态,有效解决局部最小值问题;(3)考虑机器人运动过程中遇到动态障碍物的情况,在传统APF势场函数中添加识别目标角度函数、动态障碍物角度函数和动态障碍物移动函数,提高机器人运动过程的安全稳定性。
Smart Images

Figure CN117170360B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a mobile robot path planning method based on an improved APF algorithm, belonging to the field of APF algorithm technology. Background Technology
[0002] In recent years, with the continuous development of intelligent technology, significant breakthroughs have been achieved in intelligent mobile robot technology, which has been widely applied in material transfer, cargo transportation, and unmanned delivery. Currently, path planning methods are generally divided into global path planning and local path planning methods. Commonly used global path planning methods include the Aspect-Oriented Algorithm (AOP), Regression-Range Transmission (RRT), Ant Colony Algorithm (AOP), Dijkstra's Algorithm (DJKS), and Genetic Algorithm (GRAPH), while local path planning methods include the APF (Advanced Persistent Path Failure) algorithm, the Teb algorithm, and the DWA (Difficulty in Path Planning) algorithm. Among these, the APF algorithm has a short planning time, high execution efficiency, fast computation speed, and relatively low complexity, making it very suitable for path planning.
[0003] Traditional APF algorithms typically have the following problems: (1) Local minima: When the gravitational force on a moving object at a certain position is equal in magnitude and opposite in direction to the repulsive force exerted on it by all obstacles, the net force on the moving object is zero, making it impossible to determine its next moving position, resulting in the moving object stopping or lingering at this position. (2) Unreachable target: When there are obstacles around the target point, the repulsive force on the moving object around the target point is greater than the gravitational force, resulting in the moving object lingering around the target point and being unable to reach the target point smoothly.
[0004] Furthermore, the environment is complex and ever-changing during path planning, and dynamic obstacles may be encountered. Therefore, the traditional APF algorithm should be improved to adapt to planning requirements and achieve better obstacle avoidance and path planning. Publication number CN111694357A discloses a "Robot Walking Path Planning Method Based on Genetic Algorithm and Artificial Potential Field Method." In this method, when the target point is close to an obstacle, and the mobile robot plans to approach the target point, the attractive force of the target point on the robot is proportional to the distance, while the repulsive force of the obstacle on the robot is inversely proportional to the distance. As the robot approaches the target point, the attractive force gradually decreases, and the repulsive force gradually increases. When the repulsive force exceeds the attractive force, the robot cannot reach the target point. Therefore, how to improve the local minima and target unreachability problems in the APF algorithm during the planning process is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to address the aforementioned problems of the traditional APF algorithm by providing a mobile robot path planning method based on an improved APF algorithm. This method improves the goal unreachability problem in the traditional APF algorithm by adding an influence function to the traditional repulsive potential field function. Furthermore, by combining the improved APF algorithm with a random walk algorithm, it overcomes the stalemate state where the magnitudes of attraction and repulsion are equal but their directions are opposite, thus improving the local minimum defect. Simultaneously, considering the movement of complex obstacles during path planning, this method can significantly improve movement safety and meet the requirements of actual movement environments.
[0006] The technical solution implemented by this invention is as follows: a mobile robot path planning method based on an improved APF algorithm, comprising the following steps:
[0007] (1) Model the driving environment, establish the corresponding robot, obstacle and road boundary models, and set the starting point and target point of the robot in the environment.
[0008] (2) Based on the environment established in step (1), detect the position coordinates of the starting point, the target point, and the obstacle. According to the relative positional relationship between the robot and the target point and the obstacle, establish the corresponding APF algorithm function, including the target attraction function, the obstacle repulsion function and the road boundary repulsion function.
[0009] (3) Based on the environmental modeling in step (1) and the location coordinates of the starting point, target point, obstacles and corresponding APF algorithm functions in step (2), the preliminary planned path is obtained.
[0010] (4) Detect whether there are dynamic obstacles in front of the vehicle. If the detection result is yes, calculate the next position and speed of the obstacle according to the dynamic obstacle movement function. Add an influence function to the original repulsive potential field function of the APF algorithm, and classify the intensity of the repulsive force to obtain the improved obstacle repulsive potential field function. Calculate the attraction and repulsion forces on the robot according to the target angle function, target attraction function, obstacle angle function, and improved obstacle repulsive potential field function of the improved APF algorithm.
[0011] (5) Calculate the resultant force and resultant potential field of the robot in the horizontal and vertical coordinate directions based on the attraction of the target point to the robot and the repulsion of each obstacle to the robot. The robot moves at a certain speed according to the resultant force and reaches the next position. Based on the next position of the robot, determine whether the robot has reached the target point. If the target point has not been reached, determine whether the robot has fallen into a local minimum. If it has not fallen into a local minimum, return to step (4). If it has fallen into a local minimum, introduce a random walk algorithm to reach the next position and return to step (4).
[0012] (6) The robot reaches the target point, retains the best path, and the path planning ends.
[0013] Based on environmental modeling and the improved APF algorithm function, a preliminary planned path is obtained, with the following specific steps:
[0014] (1) Based on the environment model, establish a corresponding rectangular coordinate system.
[0015] (2) Based on the rectangular coordinate system, establish the corresponding position coordinates of the robot, the target point, and the fixed obstacle.
[0016] (3) The robot calculates the magnitude and direction of the gravitational force based on the target gravitational function; at the same time, it continuously detects the distance between the robot and the target point and the obstacle, and determines whether the distance reaches the effective distance of the obstacle repulsion force. Then, it calculates the magnitude and direction of the repulsion force based on the obstacle repulsion force function; at the same time, it continuously detects whether the distance between the robot and the road boundary reaches the influence distance of the road boundary. If it reaches the influence distance of the road boundary, the road boundary repulsion force takes effect, and the direction is perpendicular to the center of the road to prevent the car from leaving the road. The robot moves forward under the combined action of gravity, obstacle repulsion force and road boundary repulsion force.
[0017] (4) The robot reaches the target point and obtains the preliminary planned path trajectory.
[0018] The distance from the robot to the target point and the obstacle is the Euclidean distance, and the expression for the Euclidean distance is:
[0019]
[0020]
[0021] The expressions for the target attraction function, obstacle repulsion function, and road boundary repulsion function are as follows:
[0022]
[0023]
[0024]
[0025] Where F_att is the target attraction; F_rep is the obstacle repulsion; Fre_road is the road boundary repulsion; x is the robot's own horizontal coordinate; y is the robot's own vertical coordinate; x goal The x-coordinate of the target point's location; y goal It is the ordinate of the target point's position; x xobs The x-coordinate is the position of the obstacle; y xobsd1 is the vertical coordinate of the obstacle's position; d2 is the Euclidean distance between the robot and the target; d0 is the limit distance affected by the road boundary; s is the limit distance affected by the obstacle; d = y - y1 is the longitudinal distance between the robot and the road; y1 is the longitudinal coordinate of the road in the direction perpendicular to the robot; ρ is the gain coefficient of the target's gravitational force; σ is the gain coefficient of the obstacle's repulsive force; k is the gain coefficient of the road boundary's repulsive force.
[0026] The expression for the dynamic obstacle movement function is as follows:
[0027] X _dob =x dobs +ε*t
[0028] Y _dob =y dobs +μ*t
[0029] In the formula X_ dob Y_ is the x-coordinate of the dynamic obstacle's position; dob It is the ordinate of the dynamic obstacle's position; x dobs It is the initial x-coordinate of the dynamic obstacle; y dobs ε is the initial ordinate of the dynamic obstacle; μ is the lateral movement gain coefficient of the dynamic obstacle; t is the longitudinal movement gain coefficient of the dynamic obstacle; and t is the movement time of the dynamic obstacle.
[0030] The improved APF algorithm includes the target angle function, target gravity function, obstacle angle function, and improved obstacle repulsive potential field function, expressed as follows:
[0031] The target angle function is:
[0032]
[0033] The target gravity function is:
[0034]
[0035] The obstacle angle function is:
[0036]
[0037] The improved obstacle repulsive potential field function is:
[0038]
[0039]
[0040]
[0041] In the formula, x goal It is the x-coordinate of the target point;xobs ρ is the x-coordinate of the obstacle's position; ρ is the gain coefficient of the target's gravity; d1 is the distance between the robot and the target; d2 is the Euclidean distance between the robot and the obstacle; F_ rer The repulsive force F_ in the direction of the robot-target point; ata The repulsive force in the direction of obstacle-target point; F_att is the target attraction; σ is the gain coefficient for calculating the improved obstacle repulsive force; a is the gain coefficient for calculating the improved road boundary repulsive force; s is the obstacle influence limit distance; a_att is the angle between the horizontal coordinate and the robot-target point; β_rep is the angle between the horizontal coordinate and the robot-obstacle.
[0042] In potential field motion, the hierarchical nature of the repulsive potential field makes the repulsive force greater the closer the robot is to the obstacle, thus avoiding collisions between the robot and the obstacle. The splitting of the repulsive force can effectively avoid the situation where the resultant force generated by the combined action of repulsive and attractive forces is zero, effectively solving the problem of target unreachability in traditional APF algorithms, enabling the robot to reach the target point quickly and stably.
[0043] The resultant force and resultant potential field function acting on the robot in the horizontal and vertical coordinate directions are:
[0044]
[0045]
[0046] W = F xmax +F ymax
[0047] In the formula, F xmax F represents the net force generated by the robot in the horizontal direction during its movement. ymax denoted as , where is the net force generated by the robot in the vertical direction during its movement; n is the total number of obstacles in space; and W is the net potential field acting on the robot.
[0048] Based on the resultant force and resultant potential field function acting on the robot in the horizontal and vertical coordinate directions, the path planning steps for the mobile robot are as follows:
[0049] (a) Determine the robot's next position by the resultant force, update the robot's position data in real time, and sample the obstacle position information, the distance between the robot and the target point and the obstacle, the angle between the lateral coordinate axis direction and the robot-target point and the robot-obstacle, and the robot's motion trajectory by using the obstacle movement function, target angle function, target gravity function, obstacle angle function and obstacle repulsion function.
[0050] (b) Determine if the robot is trapped in a local minimum. If the robot is trapped in a local minimum, introduce a random walk algorithm to reach the next position.
[0051] (c) Randomly generate several child nodes in space, and use the robot's current position as the root node.
[0052] (d) Determine whether the generated child node is located at the obstacle point. If it is located at the obstacle point, remove the child node located at the obstacle point and regenerate the corresponding number of child nodes. Calculate the potential field of the root node and each child node, and select the child node with the largest combined potential field as the temporary target point.
[0053] (e) Determine whether the combined potential field of the root node is less than the potential field of the temporary target point. If the combined potential field of the root node is less than the combined potential field of the temporary target point, the robot moves to the temporary target point. If the combined potential field of the root node is greater than the combined potential field of the temporary target point, return to step (c).
[0054] (f) Determine whether the robot has reached the target point; if it has not reached the target point, return to step (a).
[0055] (g) When the robot reaches the target point, the best path can be retained, and the path planning ends.
[0056] The formula for calculating the location of the temporary target point is as follows:
[0057] x newgoal =x + 3*λ*cos(Φ)
[0058] y newgoal = y + 3*λ*sin(Φ)
[0059] In the formula, x newgoal With y newgoal λ is the horizontal and vertical coordinates of the temporary target point; x is the horizontal coordinate of the current position of the root node; y is the vertical coordinate of the current position of the root node; λ is the step size; and Φ is the angle between the line connecting the root node and the temporary target point and the horizontal axis.
[0060] The calculation formula for the random walk algorithm is as follows:
[0061] Y(t)=η+Y(t-1)+ω*t
[0062] Where Y(t) represents the observed value at time t; η represents the intercept or constant term; Y(t-1) represents the observed value at time t-1; ω represents the random variable; and ω*t represents the error term or random disturbance term at time t.
[0063] The beneficial effects of the present invention are as follows: Compared with the existing APF technology, the present invention has the following advantages: (1) Based on the traditional APF potential field function, by adding an influence function to the traditional repulsive potential field function, the repulsive force is split into the repulsive force in the direction of robot-target point and the repulsive force in the direction of obstacle-target point, which better avoids the situation of excessive repulsive force and effectively solves the problem of unreachable target in the traditional algorithm; (2) For the local minimum problem, the improved APF algorithm is combined with the random walk algorithm to generate a temporary target point, and the robot is controlled to move along the direction of the line connecting the root node and the temporary target point, so as to get out of the stalemate state where the magnitude of attraction and repulsion are equal and opposite in direction, which effectively solves the local minimum problem; (3) Considering the situation of encountering dynamic obstacles during the robot's movement, the target angle function, dynamic obstacle angle function and dynamic obstacle movement function are added to the traditional APF potential field function to improve the safety and stability of the robot's movement process. Attached Figure Description
[0064] Figure 1 This is a schematic flowchart of the method of the present invention;
[0065] Figure 2 This is a schematic diagram of the preliminary path flow for potential field planning in the method of the present invention;
[0066] Figure 3 This is a schematic diagram of the potential field forces in the improved APF algorithm of the present invention;
[0067] Figure 4 This is a schematic diagram of the improved APF algorithm for planning the optimal path in the method of this invention;
[0068] Figure 5 This is a schematic diagram comparing the method of the present invention with traditional methods in solving the problem of unreachable targets;
[0069] Figure 6 This is a schematic diagram comparing the method of the present invention with traditional methods for solving local optimization problems;
[0070] Figure 7 This is a schematic diagram of the path planning using the traditional APF algorithm under the same conditions in the method of this invention;
[0071] Figure 8 This is a schematic diagram of the improved APF algorithm for path planning under the same conditions in the method of this invention. Detailed Implementation
[0072] The specific embodiments of the present invention are shown in the accompanying drawings.
[0073] like Figure 1 The diagram shown illustrates the implementation process of a mobile robot path planning method based on an improved APF algorithm according to the present invention. The specific steps are as follows:
[0074] Step 1: Model the driving environment. Create corresponding robot, obstacle, and road boundary models for the driving environment, and set the robot's starting and target point positions in the environment.
[0075] Step 2: Based on the environment established in Step 1, detect the position coordinates of the starting point, target point, and obstacles. According to the relative positional relationship between the robot and the target point and obstacles, establish the corresponding traditional APF algorithm functions, including: target attraction function, obstacle repulsion function, and road boundary repulsion function.
[0076] Step 3: Based on the environmental modeling in Step 1 and the coordinates of the starting point, target point, and obstacles in Step 2, as well as the traditional APF algorithm function, a preliminary planned path can be obtained.
[0077] Step 4: Detect whether there are dynamic obstacles ahead. If the detection result indicates the presence of dynamic obstacles, calculate the next position and velocity of the obstacle based on the dynamic obstacle movement function; add an influence function to the original repulsive potential field function of the APF algorithm, and perform intensity grading on the repulsive force to obtain an improved obstacle repulsive potential field function; calculate the attraction and repulsion forces on the robot based on the target angle function, target attraction function, obstacle angle function, and improved obstacle repulsion function of the improved APF algorithm.
[0078] Step 5: Based on the gravitational force of the target point on the robot and the repulsive force of each obstacle on the robot, calculate the resultant force and resultant potential field acting on the robot in the horizontal and vertical coordinate directions; the robot moves at a certain speed according to the resultant force to reach the next position. Based on the robot's next position, determine whether the robot has reached the target point; if it has not reached the target point, determine whether the robot has fallen into a local minimum. If it has not fallen into a local minimum, return to step 4; if it has fallen into a local minimum, introduce a random walk algorithm to reach the next position and then return to step 4.
[0079] Step 6: Once the robot reaches the target point, the optimal path can be retained, and path planning is complete.
[0080] like Figure 2 As shown, Figure 2 This is a schematic diagram of the preliminary path planning process for the potential field in this embodiment. The specific steps are as follows:
[0081] Step 301: Based on the environment model, establish a corresponding rectangular coordinate system.
[0082] Step 302: Based on the Cartesian coordinate system established in Step 301, set the corresponding position coordinates of the robot, the target point, and the fixed obstacle.
[0083] Step 303: The robot calculates the magnitude and direction of gravity based on the target gravity function; at the same time, it continuously detects the distance between the robot and each obstacle point to determine whether the distance reaches the effective distance of the obstacle repulsion force. Then, it calculates the magnitude and direction of the repulsion force based on the obstacle repulsion force function. During the movement, it continuously detects whether the distance between the robot and the road boundary reaches the influence distance of the road boundary. If it reaches the influence distance of the road boundary, the road boundary repulsion force takes effect, and the direction is perpendicular to the center of the road to prevent the car from leaving the road. The robot moves forward under the combined action of gravity, obstacle repulsion force and road boundary repulsion force.
[0084] Step 304: The robot reaches the target point and obtains the preliminary planned path trajectory.
[0085] Furthermore, in step 303, the distance from the robot to the target point and the obstacle is the Euclidean distance, and the expression for the Euclidean distance is:
[0086]
[0087]
[0088] The specific expressions for the target gravity function, obstacle repulsion function, and road boundary repulsion force are as follows:
[0089]
[0090]
[0091] Where F_att is the target attraction; F_rep is the obstacle repulsion; Fre_road is the road boundary repulsion; x is the robot's own horizontal coordinate; y is the robot's own vertical coordinate; x goal The x-coordinate of the target point's location; y goal It is the ordinate of the target point's position; x xobs The x-coordinate is the position of the obstacle; y xobs d1 is the vertical coordinate of the obstacle's position; d2 is the Euclidean distance between the robot and the obstacle; d0 is the limit distance affected by the road boundary; s is the limit distance affected by the obstacle; d = y - y1 is the longitudinal distance between the robot and the road; y1 is the longitudinal coordinate of the road in the direction perpendicular to the robot; ρ is the gain coefficient of gravity; σ is the gain coefficient of obstacle repulsion; κ is the gain coefficient of road boundary repulsion.
[0092] like Figure 3 As shown, Figure 3 This is a schematic diagram of the potential field forces in the improved APF algorithm of this method.
[0093] like Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the process of planning the optimal path using the improved APF algorithm in this method.
[0094] In step 4 of the embodiment of the mobile robot path planning method based on the improved APF algorithm, it is detected whether there is a dynamic obstacle ahead. If the detection result is that there is a dynamic obstacle, the expression for calculating the movement function of the dynamic obstacle is:
[0095] X _dob =x dobs +ε*t
[0096] Y _dob =y dobs +μ*t
[0097] In the formula, X_ dob Y_ is the x-coordinate of the dynamic obstacle's position; dob It is the ordinate of the dynamic obstacle's position; x dobs It is the initial x-coordinate of the dynamic obstacle; y dobs ε is the initial ordinate of the dynamic obstacle; μ is the lateral movement gain coefficient of the dynamic obstacle; t is the longitudinal movement gain coefficient of the dynamic obstacle; and t is the movement time of the dynamic obstacle.
[0098] In this embodiment, the target angle function, target gravity function, obstacle angle function, and the original repulsive force are decomposed into repulsive forces in the robot-target point direction and repulsive forces in the obstacle-target point direction. Simultaneously, the repulsive forces are graded by intensity to obtain the improved obstacle repulsive potential field function, which is specifically represented as follows:
[0099]
[0100]
[0101]
[0102]
[0103]
[0104] In the formula F_ rer Repulsive force in the direction of the robot-target point; F_ ata σ represents the repulsive force in the direction of the obstacle-target point; σ is the gain coefficient for calculating the improved obstacle repulsive force; a is the gain coefficient for calculating the improved road boundary repulsive force; s is the obstacle influence limit distance; a_att is the angle between the horizontal coordinate and the robot-target point; β_rep is the angle between the horizontal coordinate and the robot-obstacle.
[0105] In potential field motion, the hierarchical nature of the repulsive potential field means that the closer the robot is to the obstacle, the greater the repulsive force, thus preventing collisions. Decomposing the repulsive force effectively avoids excessive repulsive force, thus solving the goal-unreachability problem of traditional APF algorithms and enabling the robot to reach the target point quickly and stably.
[0106] In step 5 of the embodiment of the mobile robot path planning method based on the improved APF algorithm, the resultant force and resultant potential field function of the robot in the horizontal and vertical coordinate directions are calculated based on the gravitational force of the target point on the robot and the repulsive force of each obstacle on the robot. The specific expressions are as follows:
[0107]
[0108]
[0109] W = F xmax +F ymax
[0110] In the formula, F xmax F represents the net force generated by the robot in the horizontal direction during its movement. ymax denoted as , where is the net force generated by the robot in the vertical direction during its movement; n is the total number of obstacles in space; and W is the net potential field acting on the robot.
[0111] Based on the resultant force and resultant potential field function acting on the robot in the horizontal and vertical coordinate directions, the path planning steps of the mobile robot in this embodiment are as follows:
[0112] Step 501: Determine the robot's next position through the resultant force, update the robot's position data in real time, and sample the obstacle position information, the distance between the robot and the target point and the obstacle, the angle between the lateral coordinate axis direction and the robot-target point and the robot-obstacle, and the robot's motion trajectory through the obstacle movement function, target angle function, target gravity function, obstacle angle function and obstacle repulsion function.
[0113] Step 502: Determine if the robot is trapped in a local minimum. If the robot is trapped in a local minimum, introduce a random walk algorithm to reach the next position.
[0114] Step 503: Randomly generate several child nodes in space, and use the robot's current position as the root node.
[0115] Step 504: Determine whether the generated child node is located at an obstacle point. If it is located at an obstacle point, remove the child node located at the obstacle point and regenerate the corresponding number of child nodes. Calculate the potential field of the root node and each child node, and select the child node with the largest combined potential field as the temporary target point.
[0116] Step 505: Determine whether the resultant potential field of the root node is less than the potential field of the temporary target point. If the resultant potential field of the root node is less than the resultant potential field of the temporary target point, the robot moves to the temporary target point. If the resultant potential field of the root node is greater than the resultant potential field of the temporary target point, return to step 503.
[0117] Step 506: Determine whether the robot has reached the target point; if it has not reached the target point, return to step 501.
[0118] Step 507: The robot reaches the target point, and the best path can be retained. Path planning ends.
[0119] The specific formula for calculating the location of the temporary target point is as follows:
[0120] x newgoal =x + 3*λ*cos(Φ)
[0121] y newgoal = y + 3*λ*sin(Φ)
[0122] In the formula, x newgoal The x-coordinate of the temporary target point is y. newgoal y is the ordinate of the temporary target point; x is the abscissa of the root node (current position); y is the ordinate of the root node (current position); λ is the step size; Φ is the angle between the line connecting the root node and the temporary target point and the abscissa.
[0123] The formula for the random walk algorithm is:
[0124] Y(t=η+Y(t-1+ω*t
[0125] Where Y(t) represents the observed value at time t, η represents the intercept (or constant term), Y(t-1) represents the observed value at time t-1; ω represents the random variable, and ω*t represents the error term or random disturbance term at time t.
[0126] Figure 5 This is a schematic diagram comparing the method of the present invention with traditional methods for solving local minima problems.
[0127] The simulation experiment in this embodiment compares the results of the traditional APF algorithm with those of the improved APF algorithm to verify the superiority of the method of the present invention. Figure 5 In the diagram, circles represent static obstacles with coordinates (1, 1), (3, 2.5), (3, 1), (4, 4.5), (5.5, 5.5), (6, 2), (7, 4), (8, 8.5), (8, 7.1), and (8, 4); a pentagram represents the target point with coordinates (10, 10); a square represents the robot's starting point with coordinates (0.3, 0.3); and a triangle represents dynamic obstacles with starting coordinates (1, 1).
[0128] MATLAB verification shows that the improved APF algorithm can effectively solve local minima problems compared with the traditional APF algorithm.
[0129] Figure 6 This diagram illustrates how the method of the present invention addresses the problem of unattainable targets by comparing it with traditional methods.
[0130] The simulation experiment in this embodiment compares the results of the traditional APF algorithm with those of the improved APF algorithm to verify the superiority of the method of the present invention. Figure 5 In the diagram, circles represent static obstacles with coordinates (1, 1), (3, 2.5), (3, 1), (4, 4.5), (5.5, 5.5), (6, 2), (7, 4), (8, 8.5), (8, 7.1), and (8, 4); a pentagram represents the target point with coordinates (10, 10); a square represents the robot's starting point with coordinates (0.3, 0.3); and a triangle represents dynamic obstacles with starting coordinates (1, 1).
[0131] MATLAB verification shows that the improved APF algorithm can effectively solve the goal unreachability problem compared with the traditional APF algorithm.
[0132] Figure 7 and Figure 8 These are schematic diagrams illustrating the path planning of the traditional APF and improved APF algorithms under the same conditions, respectively.
[0133] Depend on Figure 7 and Figure 8 It can be seen that both APF algorithms can avoid obstacles and reach the target point, but compared with the traditional APF algorithm, the improved APF algorithm makes the robot's trajectory smoother.
[0134] Table 1 Comparison of travel time between the two algorithms
[0135] Traditional APF algorithm 162m 27.03 seconds Improved APF algorithm 143m 24.67 seconds
[0136] Table 1 compares the planning distance and time of the two algorithms. As shown in Table 1, under the same conditions, compared to the traditional APF algorithm, the improved APF algorithm reduces the planned robot distance by 11.72% and the planning time by 8.73%.
Claims
1. A path planning method for a mobile robot based on an improved APF algorithm, characterized in that, The method includes the following steps: (1) Perform environmental modeling of the driving environment, establish corresponding robot, obstacle and road boundary models, and set the starting point and target point positions of the robot in the environment; (2) Based on the environment established in step (1), detect the position coordinates of the starting point, the target point, and the obstacles. According to the current relative positional relationship between the robot and the target point and the obstacles, establish the corresponding APF algorithm function, including the target attraction function, the obstacle repulsion function, and the road boundary repulsion function. (3) Based on the environmental modeling in step (1) and the location coordinates of the starting point, target point, and obstacles in step (2) and the corresponding APF algorithm function, the preliminary planned path is obtained; (4) Detect whether there are dynamic obstacles in front of the vehicle. If the detection result is yes, calculate the next position and speed of the obstacle according to the dynamic obstacle movement function. Add an influence function to the original repulsive potential field function of the APF algorithm, and classify the intensity of the repulsive force to obtain the improved obstacle repulsive potential field function and the improved APF algorithm. Calculate the attraction and repulsion forces on the robot according to the target angle function, target attraction function, obstacle angle function and improved obstacle repulsive potential field function of the improved APF algorithm. (5) Calculate the resultant force and resultant potential field of the robot in the horizontal and vertical coordinate directions based on the attraction of the target point to the robot and the repulsive force of each obstacle to the robot. The robot moves at a certain speed according to the resultant force and reaches the next position. Based on the next position of the robot, determine whether the robot has reached the target point. If it has not reached the target point, determine whether the robot has fallen into a local minimum. If it has not fallen into a local minimum, return to step (4). If it has fallen into a local minimum, introduce a random walk algorithm to reach the next position and return to step (4). (6) The robot reaches the target point, retains the best path, and the path planning ends; The improved obstacle repulsive potential field function is: ; In the formula The repulsive force in the direction of the robot-target point; It is the repulsive force of the obstacle; The repulsive force in the direction of the obstacle-target point; ρ It is the gain coefficient of the target's gravity; σ It is the gain coefficient of the repulsive force of the obstacle; a d1 is the gain coefficient for calculating the repulsive force at the improved road boundary; d2 is the distance between the robot and the target; d2 is the Euclidean distance between the robot and the obstacle; s is the obstacle's influence limit distance. The expression for the dynamic obstacle movement function is as follows: ; In the formula It is the x-coordinate of the dynamic obstacle's position; It is the ordinate of the dynamic obstacle's position; It is the starting x-coordinate of the dynamic obstacle; ε is the initial ordinate of the dynamic obstacle; μ is the lateral movement gain coefficient of the dynamic obstacle; t is the longitudinal movement gain coefficient of the dynamic obstacle; and t is the movement time of the dynamic obstacle. The improved APF algorithm includes a target angle function, a target gravity function, an obstacle angle function, and an improved obstacle repulsive potential field function, expressed as follows; The target angle function is: ; The target gravity function is: ; The obstacle angle function is: ; In the formula: It is the target's gravity; ρ d1 is the gain coefficient of the target's gravity; d2 is the distance between the robot and the target; d2 is the Euclidean distance between the robot and the obstacle. It is the x-coordinate of the target point's location; It is the x-coordinate of the obstacle's position; It is the angle between the horizontal coordinate and the robot-target point; It is the angle between the horizontal axis and the robot-obstacle angle; The resultant force and resultant potential field function acting on the robot in the horizontal and vertical coordinate directions are: ; In the formula, This refers to the resultant force generated in the horizontal direction by the robot during its movement. denoted as , where is the net force generated by the robot in the vertical direction during its movement; n is the total number of obstacles in space; and W is the net potential field acting on the robot. Repulsive force at road boundaries; Based on the resultant force and resultant potential field function acting on the robot in the horizontal and vertical coordinate directions, the path planning steps for the mobile robot are as follows: (a) Determine the robot's next position by the resultant force, update the robot's position data in real time, and sample the obstacle position information, the distance between the robot and the target point and the obstacle, the angle between the lateral coordinate axis direction and the robot-target point and the robot-obstacle, and the robot's motion trajectory by using the obstacle movement function, target angle function, target gravity function, obstacle angle function and obstacle repulsion function; (b) Determine if the robot is trapped in a local minimum. If the robot is trapped in a local minimum, introduce a random walk algorithm to reach the next position. (c) Randomly generate several child nodes in space, and use the robot's current position as the root node; (d) Determine whether the generated child node is located at the obstacle point. If it is located at the obstacle point, remove the child node located at the obstacle point and regenerate the corresponding number of child nodes. Calculate the potential field of the root node and each child node, and select the child node with the largest combined potential field as the temporary target point. (e) Determine whether the combined potential field of the root node is less than the potential field of the temporary target point. If the combined potential field of the root node is less than the combined potential field of the temporary target point, the robot moves to the temporary target point. If the combined potential field of the root node is greater than the combined potential field of the temporary target point, return to step (c). (f) Determine if the robot has reached the target point; if not, return to step (a); (g) When the robot reaches the target point, the best path can be retained, and the path planning ends.
2. The mobile robot path planning method based on the improved APF algorithm according to claim 1, characterized in that, Based on environmental modeling and the improved APF algorithm function, a preliminary planned path is obtained, with the following specific steps: (1) Based on the aforementioned environment model, establish a corresponding coordinate system; (2) Based on the coordinate system, establish the corresponding position coordinates of the robot, the target point, and the fixed obstacle; (3) The robot calculates the magnitude and direction of the gravitational force based on the target gravitational function; at the same time, it continuously detects the distance between the robot and the target point and the obstacle, and determines whether the distance reaches the effective distance of the obstacle repulsion force. Then, it calculates the magnitude and direction of the repulsion force based on the obstacle repulsion force function; at the same time, it continuously detects whether the distance between the robot and the road boundary reaches the influence distance of the road boundary. If it reaches the influence distance of the road boundary, the road boundary repulsion force takes effect, and the direction is perpendicular to the center of the road to prevent the car from leaving the road. The robot moves forward under the combined action of gravity, obstacle repulsion force and road boundary repulsion force. (4) The robot reaches the target point and obtains the preliminary planned path trajectory.
3. The mobile robot path planning method based on the improved APF algorithm according to claim 1, characterized in that, The distance from the robot to the target point and the obstacle is the Euclidean distance, and the expression for the Euclidean distance is: ; The expressions for the target attraction function, obstacle repulsion function, and road boundary repulsion function are as follows: ; In the formula, x is the horizontal coordinate of the robot's position; y is the vertical coordinate of the robot's position. It is the x-coordinate of the target point's location; It is the ordinate of the target point's location; It is the x-coordinate of the obstacle's position; It is the vertical coordinate of the obstacle's position; d1 is the distance between the robot and the target; d2 is the Euclidean distance between the robot and the obstacle; F _ att It is the target's gravity; F _ rep It is the repulsive force of the obstacle; Fre _ road It is the repulsive force at the road boundary; d 0 is the limit distance affected by the road boundary; s is the limit distance affected by obstacles. d = yy 1 represents the longitudinal distance between the robot and the road; y 1 represents the longitudinal coordinate of the road relative to the robot's perpendicular direction; ρ σ is the gain coefficient of the target's gravitational force; σ is the gain coefficient of the obstacle's repulsive force; k is the gain coefficient of the road boundary's repulsive force.
4. The mobile robot path planning method based on the improved APF algorithm according to claim 1, characterized in that, The formula for calculating the location of the temporary target point is as follows: ; In the formula, It is the x-coordinate of the temporary target point location; It is the ordinate of the temporary target point location; It is the x-coordinate of the current position of the root node; It is the y-coordinate of the current position of the root node; λ is the step size, and Ф is the angle between the line connecting the root node and the temporary target point and the horizontal axis.
5. A mobile robot path planning method based on an improved APF algorithm according to claim 1, characterized in that, The calculation formula for the random walk algorithm is as follows: ; in, Y (t) represents the observed value at time t; η represents the intercept or constant term; Y (t-1) represents the observation at time t-1; ω represents the random variable, ω t represents the error term or random disturbance term at time t.
Citation Information
Patent Citations
Robot walking path planning method based on genetic algorithm and artificial potential field method
CN111694357A
Robot rolling path planning method and system, storage medium, equipment and application
CN112859866A
AGV path planning method
CN115793648A