A path planning method for museum tour robot based on improved RRT* fusion algorithm
By introducing ant colony algorithm into the RRT* algorithm for static path optimization and combining with the DWA algorithm for dynamic evasion, the problems of large path length, many inflection points and poor smoothness caused by the RRT* algorithm are solved, and efficient and safe path planning is achieved.
Patent Information
- Application Number
- CN202411003911.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-07-25
AI Technical Summary
The existing RRT* algorithms lead to large path lengths, many inflection points, poor path smoothness in dynamic environments in the path planning of movable robots.
Ant colony algorithm is introduced to optimize the static path obtained by the RRT* algorithm, and dynamically evade it with the DWA algorithm to ensure the safety and efficiency of the path.
The length, smoothness and inflection points of the static path are effectively optimized, the travel efficiency of the path is improved, and safe dynamic evasion is achieved in a dynamic environment.
Smart Images

Figure CN118936500B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of mobile robot path planning applications, and in particular relates to a museum tour guide robot path planning method based on an improved RRT* fusion algorithm. Background Art
[0002] With the rise of Industry 4.0 and smart manufacturing, the demand for automation and robotics is increasing. Mobile robots are widely used in warehousing and logistics, manufacturing, agriculture, healthcare and other fields. These application scenarios have put forward higher requirements for efficient and reliable path planning technology. Path planning is a key component in mobile robotics technology, which involves how robots can autonomously navigate in complex environments to reach the predetermined target location. With the advancement of science and technology, especially the rapid development of computer science, artificial intelligence, sensor technology and robotics, path planning technology is also evolving.
[0003] In the field of mobile robots, there are many classic path planning algorithms, but most of them are not suitable for direct application and need to be improved according to the needs. Traditional planning algorithms include A* algorithm, APF algorithm, PRM algorithm (probabilistic road map), etc. For the A* algorithm, there are obvious shortcomings in dynamic environments. The A* algorithm usually assumes that the environment is static, that is, the map and obstacles will not change. In a dynamic environment, if an obstacle moves or the path changes, the A* algorithm may need to replan the path, which will increase the computational cost. The PRM algorithm is not applicable to environments with dense obstacles and narrow spaces, and the path is tortuous and random. The most common problems of the APF algorithm are local optimality and path unreachability. The development trend of path planning algorithms is to develop in the direction of being more efficient, smarter, and more adaptable to complex and dynamic environments. With the improvement of computing power and the advancement of machine learning technology, future path planning algorithms will rely more on data-driven methods and be able to better deal with problems such as uncertainty, multi-objective optimization, and multi-agent collaboration. In the path planning of mobile robots, the RRT* algorithm has high randomness, the quality of the generated path is uncertain, the road is relatively tortuous, and it is not efficient in dynamic environments. Summary of the invention
[0004] In view of the deficiencies of the above-mentioned prior art, the present invention provides a museum guide robot path planning method based on an improved RRT* fusion algorithm, which solves the problems of long path length, many turning points and poor path smoothness caused by only using the RRT* algorithm in robot path planning; the present invention introduces an ant colony algorithm to optimize the total length, number of turning points and smoothness of the static path obtained by the RRT* algorithm, and at the same time combines the DWA algorithm on this basis to dynamically avoid obstacles that may exist in the environment during the robot's movement, so that the final dynamic path has both safety and path efficiency.
[0005] In order to achieve the above technical objectives, the present invention provides the following technical solutions:
[0006] A museum tour guide robot path planning method based on an improved RRT* fusion algorithm is characterized by comprising the following steps:
[0007] S1. Establish a static space map, set the parameters of the improved RRT* fusion algorithm, and set fixed-point coordinates for each display cabinet in the museum;
[0008] The establishment of the static space map specifically includes: using SLAM technology to enable the navigation robot to obtain surrounding environment information through its own sensors during movement to construct a static space map in real time;
[0009] The improved RRT* fusion algorithm is a combination of the RRT* algorithm, the ant colony algorithm and the DWA algorithm;
[0010] The improved RRT* fusion algorithm parameters to be set include:
[0011] The maximum number of iterations of the RRT* algorithm;
[0012] Ant colony algorithm parameters, including ant colony size, number of iterations, and static rules;
[0013] The DWA algorithm coefficients include the speed sampling space and sampling frequency determined based on the hardware conditions of the navigation robot, and the evaluation function coefficients of the DWA algorithm.
[0014] S2, waiting for an event signal, wherein the event signal includes an emergency signal and a call signal;
[0015] S3, after receiving the event signal, initialize the static space map information, take the current location of the guide robot as the starting point, set different end points for different event signals, and prepare for path planning;
[0016] S4, execute the RRT* algorithm to find an approximate optimal path with the shortest path length from the starting point to the end point;
[0017] S5, using the ant colony algorithm to optimize the path smoothness, length and number of path points of the approximate optimal path obtained in step S4 to obtain an optimized static path;
[0018] S6, path tracking; the navigation robot follows the optimized static path obtained in step S5. When encountering a dynamic obstacle during the journey, the DWA algorithm is used to infer possible avoidance paths, and each possible avoidance path is evaluated to obtain the optimal dynamic path, thereby completing dynamic avoidance;
[0019] S7: The tour guide robot reaches the end point and processes the event.
[0020] Furthermore, the tour guide robot is an autonomous mobile robot, whose structure includes a Raspberry Pi host computer, an stm32F103 mainboard and actuators and sensors, and uses a laser radar to import static space map data.
[0021] Furthermore, in steps S2 and S3: the priority of the emergency signal is higher than that of the call signal. When an emergency signal is received, the emergency exit is taken as the end point, and an emergency voice prompt signal is played; when a call signal is received, the signal source is taken as the end point.
[0022] Furthermore, step S4 specifically includes the following steps:
[0023] S41, select the starting node x start , target node x target , node set interval X near , create an empty tree list T, and change the starting node x start As the root node x init , put into the empty tree list T;
[0024] S42, when the iteration starts, the starting node x start As the parent node, at the starting point x start Randomly update the first random node x nearby rand1 , starting from the starting node x start To x rand1 The direction is extended by a certain step length, and the end point is set to the first child node x new1 ;
[0025] S43, then at the first child node x new1 With the target node x target Randomly update the second random node x in the space between rand2 , and select the starting node x in step S42 start With the first child node x new1 The second random node x at the middle distance rand2 A node that is closer to the node is set as the parent node, and the node is moved from the parent node to the second random node x.rand2 The direction is extended by a certain step length, and the end point is set to the second child node x new2 ;
[0026] S44, then at the second child node x new2 With the target node x target Then randomly update the third random node x in the space between rand3 , and find the starting node x in the previous step start , the first child node x new1 , the second child node x new2 The third random node x at the middle distance rand3 The nearest one is set as the parent node, and then go from the parent node to the third random node x rand3 The direction is extended by a certain step length, and the end point is set to the third child node x new3 ; According to the correspondence between the parent node and the child node, connect each node, get the preliminary path, and put it into the empty tree list T;
[0027] Then, the third child node x new3 is the center of the circle, and all nodes within the radius r belong to the node set interval X near , node set interval X near Divided into parent node set threshold X par and the child node set threshold X chi ; Calculate the parent node set threshold X par Each node in to the third child node x new3 The path cost is the smallest, and a node with no obstacles on the path is set as the third child node x new3 The new parent node reconnects the path; then the child node set threshold X chi The same is true for the third child node x new3 Select the child node, reconnect the path, and check whether the new child node reaches the target node x target Nearby; all possible paths are put into the empty tree list T;
[0028] S45, if the target node x is reached target If it is nearby, then connect to the target node x target Get the approximate optimal path;
[0029] If the target node x is not reached target If the last child node is near, the path cost from the nodes within the radius r around it to the last child node is recalculated, and a new parent node and child node are selected, and the path is reconnected until the last child node reaches the target node x. target Near or reaching the maximum number of iterations.
[0030] More specifically, the calculation of the path length cost in steps S44 and S45 is as follows:
[0031] Parent node set threshold X par , child node set threshold X chi , both of which are included in the circular node set interval X with the current node as the center and radius r near Inside; set the new parent node x np , the new child node is x nc , the current node is x cur ; There are M nodes before the new parent node, and the step length of each step is H i , let the new parent node x np To the current node x cur The path cost is L(x cur ), then its formula is expressed as:
[0032]
[0033] Among them, dis(x np , x cur ) describes x np , x cur The actual path length between them is expressed as Euclidean distance;
[0034] Let the path cost from the new child node to the current node be L(x nc ), its formula is expressed as:
[0035]
[0036] Among them, dis(x cp , x cur ) describes x cp , x cur The actual path length between them is expressed as Euclidean distance.
[0037] Furthermore, step S5 specifically includes the following steps:
[0038] S51, storing each node included in the approximate optimal path output by the RRT* algorithm into a set E;
[0039] S52, setting the coordinates of each node in E to a different city, and determining the static rule as follows: the concentration of pheromones released by ants during their travel between different cities depends on the path length, the angle between the road sections, and the number of path sections, that is, the smaller the sum of the three, the greater the amount of pheromones released;
[0040] S53, each ant randomly selects a starting point, and selects the next unvisited target city coordinate according to a probability formula until all coordinates are traversed; when all ants complete this task, it is recorded as the end of one iteration, and the path length, road section angle, and number of sections of the path traversed by each ant are evaluated, and the pheromone concentration matrix is updated, and the road with the largest pheromone concentration is used as the path for the next iteration;
[0041] S54, check whether the maximum number of iterations is met, terminate if it is met, and output the optimized static path.
[0042] More specifically, the pheromone concentration in step S5 regulates the path length, the angle of the road section, and the number of path sections to optimize the total length, smoothness, and number of turning points of the static path; and the probability of the ant selecting the next target city that has not been visited is determined by the pheromone concentration; the specific expression of the pheromone concentration is as follows:
[0043] Suppose the pheromone concentration of a path from city S to city H in t unit time is Its formula is:
[0044]
[0045] in, represents the pheromone concentration on the path at the last unit time, and Y represents the percentage of pheromone remaining for the volatilization effect per unit time. is the sum of the pheromone concentrations produced by all G ants on the path, l e is the pheromone concentration left by ant e through the path, and its formula is expressed as:
[0046]
[0047] Among them, L represents the length of the path it has traveled, θ represents the angle of the road segments it has traveled, m represents the number of path segments it has traveled, and Q is the pheromone constant.
[0048] The above pheromone concentration can further be used to obtain the probability of other ants moving from city S to city H: The formula is:
[0049] Z is the set of cities to be visited;
[0050] Where length(S,H) represents the inverse of the distance between two cities. η and τ represent the weight coefficients of the ant's choice of city depending on the pheromone concentration and the distance between cities in the probability formula.
[0051] Furthermore, step S6 specifically includes the following steps:
[0052] S61. According to the rigid conditions of the robot, its linear velocity, acceleration, angular velocity, angular acceleration and environmental obstacles are limited to form a sampling space. Considering the safety during the movement, the speed must be associated with the distance from the robot's path to the obstacle, so:
[0053] 0 <v<dis(h,k)*r
[0054] 0<ω <dis(h,k)*r
[0055] Where v and ω represent the linear velocity and angular velocity of the robot respectively, dis(h, k) represents the Euclidean distance between the point on the robot's path closest to the obstacle vertex and the obstacle vertex, and r is a coefficient. When dis(h, k) is greater than the robot size, r is 1, and when dis(h, k) is less than the robot size, r is 0.
[0056] S62, inferring a possible avoidance path at a certain sampling frequency;
[0057] S63. Use the evaluation function to evaluate all possible avoidance paths to obtain the optimal dynamic path; the total evaluation function is denoted as T(v,ω), and its formula is expressed as:
[0058] T(v,ω)=ω ang ang(v,ω)+ω obs obs(v,ω)+ω vel vel(v,ω);
[0059] Among them, ang(v,ω), obs(v,ω), and vel(v,ω) are the azimuth evaluation function, obstacle evaluation function, and speed evaluation function, respectively, which are used to evaluate the angle of the robot's path toward the target point, the distance between the robot's path and the obstacles that may be encountered, and the speed when there are no obstacles and the angle toward the target point is appropriate; ω ang ,ω obs ,ω vel are the weight coefficients corresponding to the three evaluation functions, and ω is taken ang ,ω obs The value is higher than ω vel , that is, the safety of path planning takes precedence over speed; the higher the value of the total evaluation function T(v,ω), the better the selected path is. The path with the highest value of the total evaluation function T(v,ω) and a value of all three evaluation functions that are not zero is the optimal dynamic path.
[0060] The present invention has the following beneficial effects:
[0061] The improved RRT* fusion algorithm proposed in the present invention effectively solves the problem of too many turning points in the RRT* algorithm in the path planning of mobile robots by introducing the ant colony algorithm, optimizes the length and smoothness of the static path, improves the travel efficiency of the static path, and facilitates subsequent dynamic adjustment; combined with the use of the DWA algorithm, an evaluation function is used to give an evaluation value to the problems on the static path (such as obstacles), and dynamic obstacle avoidance is performed to obtain the optimal dynamic path, which not only solves the safety problem during the robot's movement, but also further improves the travel efficiency of the path; through the fusion of the three algorithms, it can better cope with situations of uncertainty, multi-objective optimization and multi-agent collaboration. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is a flow chart of the present invention;
[0063] Figure 2 For the simulated terrain model gazebo;
[0064] Figure 3 It is a schematic diagram of the simulation process path planning;
[0065] Figure 4 It is the approximate optimal path output by RRT*;
[0066] Figure 5 Get the optimized static path for the ant colony algorithm;
[0067] Figure 6 To simulate dynamic obstacle avoidance through DWA algorithm; DETAILED DESCRIPTION
[0068] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0069] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0070] Please refer to Figure 1 , a museum tour guide robot path planning method based on an improved RRT* fusion algorithm proposed by the present invention is given, which specifically includes the following steps:
[0071] S1. Establish a static space map, set the parameters of the improved RRT* fusion algorithm, and set fixed-point coordinates for each display cabinet in the museum;
[0072] The establishment of the static space map specifically includes: using SLAM technology to enable the guide robot to obtain surrounding environment information through its own sensors during movement to construct a static space map in real time;
[0073] The improved RRT* fusion algorithm is a combination of the RRT* algorithm, the ant colony algorithm and the DWA algorithm;
[0074] The improved RRT* fusion algorithm parameters to be set include:
[0075] The maximum number of iterations of the RRT* algorithm is 30,000;
[0076] Ant colony algorithm parameters include ant colony size of 50, number of iterations of 100, initial pheromone concentration of 0; and determine the static rules;
[0077] DWA algorithm coefficients, including speed sampling space and sampling frequency determined based on the hardware conditions of the navigation robot, and the evaluation function coefficients of the DWA algorithm;
[0078] As a preferred implementation of step S1, the tour guide robot is specifically an autonomous mobile robot, whose structure includes a Raspberry Pi host computer, an stm32F103 mainboard and actuators and sensors, and uses a laser radar to import static space map data.
[0079] S2, waiting for an event signal, wherein the event signal includes an emergency signal and a call signal;
[0080] S3, after receiving the event signal, initialize the static space map information, take the current location of the guide robot as the starting point, set different end points for different event signals, and prepare for path planning;
[0081] More specifically, in steps S2 and S3, the priority of the emergency signal is higher than that of the call signal. When an emergency signal is received, the emergency exit is used as the end point, and an emergency voice prompt signal is played; when a call signal is received, the signal source is used as the end point.
[0082] S4, execute the RRT* algorithm to find an approximate optimal path with the shortest path length from the starting point to the end point;
[0083] As a preferred implementation of step S4, the following steps are specifically included:
[0084] S41, select the starting node x start , target node x target , node set interval X near, create an empty tree list T, and change the starting node x start As the root node x init , put into the empty tree list T;
[0085] S42, when the iteration starts, the starting node x start As the parent node, at the starting point x start Randomly update the first random node x nearby rand1 , starting from the starting node x start To x rand1 The direction is extended by a certain step length, and the end point is set to the first child node x new1 ;
[0086] S43, then at the first child node x new1 With the target node x target Randomly update the second random node x in the space between rand2 , and select the starting node x in step S42 start With the first child node x new1 The second random node x at the middle distance rand2 A node that is closer to the node is set as the parent node, and the node is moved from the parent node to the second random node x. rand2 The direction is extended by a certain step length, and the end point is set to the second child node x new2 ;
[0087] S44, then at the second child node x new2 With the target node x target Then randomly update the third random node x in the space between rand3 , and find the starting node x in the previous step start , the first child node x new1 , the second child node x new2 The third random node x at the middle distance rand3 The nearest one is set as the parent node, and then go from the parent node to the third random node x rand3 The direction is extended by a certain step length, and the end point is set to the third child node x new3 ; According to the correspondence between the parent node and the child node, connect each node, get the preliminary path, and put it into the empty tree list T;
[0088] Then, the third child node x new3 is the center of the circle, and all nodes within the radius r belong to the node set interval X near , node set interval X near Divided into parent node set threshold X par and the child node set threshold X chi ; Calculate the parent node set threshold X par Each node in to the third child node x new3The path cost is the smallest, and a node with no obstacles on the path is set as the third child node x new3 The new parent node reconnects the path; then the child node set threshold X chi The same is true for the third child node x new3 Select the child node, reconnect the path, and check whether the new child node reaches the target node x target Nearby; all possible paths are put into the empty tree list T;
[0089] S45, if the target node x is reached target If it is nearby, then connect to the target node x target Get the approximate optimal path;
[0090] If the target node x is not reached target If the last child node is near, the path cost from the nodes within the radius r around it to the last child node is recalculated, and a new parent node and child node are selected, and the path is reconnected until the last child node reaches the target node x. target Near or reaching the maximum number of iterations;
[0091] More specifically, in this embodiment, the step size in step S4 is set to 1, and the calculation of the path length cost in steps S44 and S45 is specifically as follows:
[0092] Parent node set threshold X par , child node set threshold X chi , both of which are included in the circular node set interval X with the current node as the center and radius r near Inside; set the new parent node x np , the new child node is x nc , the current node is x cur ; There are M nodes before the new parent node, and the step length of each step is H i , let the new parent node x np To the current node x cur The path cost is L(x cur ), then its formula is expressed as:
[0093]
[0094] where dis(x np , x cur ) describes x np , x cur The actual path length between them is expressed as Euclidean distance;
[0095] Let the path cost from the new child node to the current node be L(x nc ), its formula is expressed as:
[0096]
[0097] where dis(x cp , x cur ) describes x cp , x cur The actual path length between them is expressed as Euclidean distance.
[0098] S5, using the ant colony algorithm to optimize the path smoothness, length and number of path points of the approximate optimal path obtained in step S4 to obtain an optimized static path;
[0099] As a preferred implementation of step S5, the following steps are specifically included:
[0100] S51, storing each node included in the approximate optimal path output by the RRT* algorithm into a set E;
[0101] S52, setting the coordinates of each node in E to a different city, and determining the static rule as follows: the concentration of pheromones released by ants during their travel between different cities depends on the path length, the angle between the road sections, and the number of path sections, that is, the smaller the sum of the three, the greater the amount of pheromones released;
[0102] S53, each ant randomly selects a starting point, and selects the next unvisited target city coordinate according to a probability formula until all coordinates are traversed; when all ants complete this task, it is recorded as the end of one iteration, and the path length, the angle of each path section, and the number of path sections of each ant are evaluated, and the pheromone concentration matrix is updated, and the path with the largest pheromone concentration is used as the path for the next iteration;
[0103] S54, checking whether the maximum number of iterations is met, if so, terminating and outputting the optimized static path;
[0104] More specifically, the pheromone concentration in step S5 regulates the path length, the angle of the road section, and the number of path sections to optimize the total length, smoothness, and number of turning points of the static path; and the probability of the ant selecting the next target city that has not been visited is determined by the pheromone concentration; the specific expression of the pheromone concentration is as follows:
[0105] Suppose the pheromone concentration of a path from city S to city H in t unit time is Its formula is:
[0106]
[0107] in, represents the pheromone concentration on the path at the last unit time, and Y represents the percentage of pheromone remaining for the volatilization effect per unit time. is the sum of the pheromone concentrations produced by all G ants on the path, l e is the pheromone concentration left by ant e through the path, and its formula is expressed as:
[0108]
[0109] Among them, L represents the length of the path it has traveled, θ represents the angle of the road segments it has traveled, m represents the number of path segments it has traveled, and Q is the pheromone constant.
[0110] The above pheromone concentration can further be used to obtain the probability of other ants moving from city S to city H: The formula is:
[0111] Z is the set of cities to be visited;
[0112] Where length(S,H) represents the inverse of the distance between two cities. η and τ represent the weight coefficients of the ant's choice of city depending on the pheromone concentration and the distance between cities in the probability formula.
[0113] S6, path tracking; the navigation robot follows the optimized static path obtained in step S5. When encountering a dynamic obstacle during the journey, the DWA algorithm is used to infer possible avoidance paths, and each possible avoidance path is evaluated to obtain the optimal dynamic path, thereby completing dynamic avoidance;
[0114] As a preferred implementation of step S6, the following steps are specifically included:
[0115] S61. According to the rigid conditions of the robot, its linear velocity, acceleration, angular velocity, angular acceleration and environmental obstacles are limited to form a sampling space. Considering the safety during the movement, the speed must be associated with the distance from the robot's path to the obstacle, so:
[0116] 0 <v<dis(h,k)*r
[0117] 0<ω <dis(h,k)*r
[0118] Where v and ω are the linear velocity and angular velocity of the robot, respectively; dis(h, k) represents the Euclidean distance between the point on the robot's path closest to the obstacle vertex and the obstacle vertex; r is a coefficient. When dis(h, k) is greater than the robot size, r is 1; when dis(h, k) is less than the robot size, r is 0.
[0119] S62, inferring a possible avoidance path at a certain sampling frequency;
[0120] S63. Use the evaluation function to evaluate all possible avoidance paths to obtain the optimal dynamic path; the total evaluation function is denoted as T(v,ω), and its formula is expressed as:
[0121] T(v,ω)=ω ang ang(v,ω)+ω obs obs(v,ω)+ω vel vel(v,ω);
[0122] Among them, ang(v,ω), obs(v,ω), and vel(v,ω) are the azimuth evaluation function, obstacle evaluation function, and speed evaluation function, respectively, which are used to evaluate the angle of the robot's path toward the target point, the distance between the robot's path and the obstacles that may be encountered, and the speed when there are no obstacles and the angle toward the target point is appropriate; ω ang ,ω obs ,ω vel are the weight coefficients corresponding to the three evaluation functions, and ω is taken ang ,ω obs The value is higher than ω vel , that is, the safety of path planning takes precedence over speed; the higher the value of the total evaluation function T(v,ω), the better the selected path is. The path with the highest value of the total evaluation function T(v,ω) and a value of all three evaluation functions that are not zero is the optimal dynamic path.
[0123] S7: The tour guide robot arrives at the destination and handles the event; if it is a call signal, it provides interactive services to tourists; if it is an emergency signal, it evacuates tourists.
[0124] In this embodiment, in step 1, a static space map required during the operation of the navigation robot is established according to the real environment or the simulated physical environment. Figure 2 Shown. Figure 2 This is a simulation of the world's physical model. The spherical and cylindrical obstacles are dynamically added obstacles, and the starting position of the guide robot is shown in this map, that is, Figure 2 As shown by the small dot in the upper middle right; Figure 2 The blue area in the figure is the location that the navigation robot can reach without collision. For the navigation robot, the distance between its location and the destination and the location of obstacles are all states that need to be obtained before path planning begins. Figure 2 Combination Figure 3 , which is a static route planning diagram. Figure 3 It is a two-dimensional grid map of the simulated world. The green line in the picture is the static path, the red curve indicates the obstacle boundary detected by the radar, and the orange dot is a two-wheel drive differential robot model.
[0125] The method proposed in this invention is to first perform static path planning by combining the RRT* algorithm and the ant colony algorithm, and then perform dynamic obstacle avoidance by the DWA algorithm. In order to reduce the complexity of the simulation model during the simulation using matlab, all maps, obstacles, starting points, and robots are displayed in a fixed coordinate system, such as Figure 4 The red and green dots shown are the starting points, the blue line is the static path planned by the RRT* algorithm, and the white circles represent static obstacles.
[0126] In addition, in this embodiment, the Euclidean distance is used as a distance estimate when performing path planning through the RRT* algorithm to determine the path cost when reselecting a node. The Euclidean distance is a distance measurement method used in geometry, which represents the straight-line distance between two points in Euclidean space. For two points A(x1, y1) and B(x2, y2) in two-dimensional space, the Euclidean distance d is calculated as follows:
[0127]
[0128] The calculation formula of Euclidean distance is simple and clear, easy to implement and calculate.
[0129] As for the DWA algorithm, since it is necessary to first calculate the possible obstacle avoidance path, it involves generating the robot's future motion path based on the current speed combination. The purpose of calculating the path is to evaluate the path safety, goal orientation, and smoothness under different speed combinations. Assume that the robot's position at the current time t is (x t ,y t ), with direction θ t , the current linear velocity is v t , the angular velocity is ω t , select a set of velocity combinations (v,ω) within the dynamic window, which will be used in the next time step Δ t The robot's motion model is used to predict the time step Δ t This example is for a differential drive robot model.
[0130] By applying the above motion model successively, a future path can be generated starting from the current time t. Typically, the path predicts multiple time steps Δ in the future for several seconds. t , to form a continuous path. After generating multiple paths, each path is evaluated through the evaluation function, aiming to select the path with the smallest difference between the target angle and the pointing angle, so that the robot's forward direction is aligned with the end point, select the path far away from the obstacle to avoid collision during the robot's operation, and select the path with a larger linear speed to make the robot move as fast as possible.
[0131] The azimuth evaluation function designed in this embodiment is:
[0132]
[0133] The midpoint of the end of the simulation path is the starting point, and the angle between its horizontal direction and the target point is expressed as θ goal , θ* is the positive direction of the robot during its movement, ensuring that the robot will not deviate from the target direction during its movement.
[0134] The designed obstacle evaluation function is:
[0135]
[0136] Where dis(h,k) represents the Euclidean distance between the point on the simulation path closest to the obstacle vertex and the obstacle vertex. When dis(h,k) is larger than the robot size m, it is fixed to a constant k to prevent a high score from affecting the other two items. When it is smaller than the robot size m, it is set to 0 to avoid collisions, in order to protect the robot's safe movement.
[0137] The designed speed evaluation function is:
[0138]
[0139] Among them, |v| refers to the average linear velocity of the robot, Refers to the maximum acceleration of the robot, Refers to the rate of improvement within the range allowed by the robot's performance; d represents the Euclidean distance between the point closest to the obstacle vertex on the simulation path and the obstacle vertex, d safe represents the safety distance, d0 represents the critical distance that allows acceleration to the maximum speed outside the safety distance;
[0140] The speed evaluation function aims to ensure that the robot moves safely and does not deviate from the target, and to reach the target point as quickly as possible under the constraints of hardware conditions, thereby improving the travel efficiency.
[0141] After evaluating all possible speed combinations, the DWA algorithm selects the speed combination with the highest score as the optimal speed at the current moment and applies it to the robot's control. The DWA algorithm evaluates the path quality under different speed combinations through path prediction. Path prediction is based on the robot's motion model and generates a path by simulating future motion. The generated path requires obstacle avoidance, goal guidance, and speed evaluation to determine the optimal speed combination. In this way, the DWA algorithm is able to generate obstacle avoidance paths in real time in dynamic environments.
[0142] Figure 4 , Figure 5 and Figure 6These are the simulation path diagrams obtained by planning using the RRT* algorithm, ant colony algorithm, and DWA algorithm, respectively. Figure 4 is the approximate optimal path generated by RRT*, Figure 5 is the path optimized by the ant colony algorithm, compared to Figure 4 Path smoothness is significantly improved and path length is reduced. Figure 6 It is the simulation of the overall fusion algorithm after integrating the DWA algorithm. The gray circle is a dynamic obstacle that is constantly moving, and the blue dot represents a certain stage target point. Since the method proposed in the present invention optimizes the smoothness of the path through the ant colony algorithm, it can be more efficient when performing dynamic path planning through the DWA algorithm.
[0143] In addition, the path planning method proposed in the present invention is used on a museum guide robot in this embodiment. The path planning realized by the fusion algorithm enables the guide robot to autonomously navigate in the museum and avoid obstacles with the help of built-in sensors and map data. It can understand tourists' questions and instructions through voice recognition technology, generate answers using natural language processing technology, and respond to tourists in a natural voice through speech synthesis technology. In emergency situations, such as fire or injury to tourists, it can also provide emergency information and assist in evacuation, thereby completing the robot's guide task more efficiently.
[0144] In summary, the improved RRT* fusion algorithm proposed in the present invention effectively solves the problem of too many turning points in the RRT* algorithm in the path planning of mobile robots by introducing the ant colony algorithm, optimizes the length and smoothness of the static path, improves the travel efficiency of the static path, and facilitates subsequent dynamic adjustment; combined with the use of the DWA algorithm, an evaluation value is given to the problems on the static path (such as obstacles) through the evaluation function, dynamic obstacle avoidance is performed, and the optimal dynamic path is obtained, which not only solves the safety problem in the robot's movement process, but also further improves the travel efficiency of the path; through the fusion of the three algorithms, it can better cope with situations of uncertainty, multi-objective optimization and multi-agent collaboration.
[0145] In this specification, the terms "one embodiment", "some embodiments", "examples", "specific examples" or "some examples" refer to at least one embodiment or example described in combination with specific features, structures, materials or characteristics. These described specific features, structures, materials or characteristics can be combined in an appropriate manner in one or more embodiments or examples. In addition, the technician can combine and combine different embodiments or examples and their features described in this specification without contradiction.
[0146] The logic and / or steps shown in the flowchart or described in other ways can be regarded as a sequence of executable instructions for implementing logical functions. These instructions can be implemented in any computer-readable medium for use by instruction execution systems, devices or equipment. These systems, devices or equipment include processor systems or other systems capable of receiving and executing instructions.
[0147] The above embodiments have described the principles and implementations of the present invention in detail, and have used specific examples to illustrate the working principles thereof. These examples are only used to help understand the method of the present invention and its core concept. Meanwhile, according to the concept of the present invention, the actual implementation methods and application scope may vary. Therefore, the contents of this specification should not be construed as limiting the present invention.
Claims
1. A museum tour guide robot path planning method based on an improved RRT* fusion algorithm, characterized in that: The specific steps include: S1. Establish a static space map, set the parameters of the improved RRT* fusion algorithm, and set fixed-point coordinates for each display cabinet in the museum; The establishment of the static space map specifically includes: using SLAM technology to enable the navigation robot to obtain surrounding environment information through its own sensors during movement to construct a static space map in real time; The improved RRT* fusion algorithm is a combination of the RRT* algorithm, the ant colony algorithm and the DWA algorithm; The improved RRT* fusion algorithm parameters that are set include: The maximum number of iterations of the RRT* algorithm; Ant colony algorithm parameters, including ant colony size, number of iterations, and static rules; DWA algorithm coefficients, including speed sampling space and sampling frequency determined based on the hardware conditions of the navigation robot, and the evaluation function coefficients of the DWA algorithm; S2, waiting for an event signal, wherein the event signal includes an emergency signal and a call signal; S3, after receiving the event signal, initialize the static space map information, take the current location of the guide robot as the starting point, set different end points for different event signals, and prepare for path planning; S4, execute the RRT* algorithm to find an approximate optimal path with the shortest path length from the starting point to the end point; S5, using the ant colony algorithm to optimize the path smoothness, length and number of path points of the approximate optimal path obtained in step S4 to obtain an optimized static path; step S5 specifically includes the following steps: S51, storing each node included in the approximate optimal path output by the RRT* algorithm into a set E; S52, setting the coordinates of each node in E to a different city, and determining the static rule as follows: the concentration of pheromones released by ants during their travel between different cities depends on the path length, the angle between the road sections, and the number of path sections, that is, the smaller the sum of the three, the greater the amount of pheromones released; S53, each ant randomly selects a starting point, and selects the next unvisited target city coordinate according to a probability formula until all coordinates are traversed; when all ants complete this task, it is recorded as the end of one iteration, and the path length, the angle of each path section, and the number of path sections of each ant are evaluated, and the pheromone concentration matrix is updated, and the path with the largest pheromone concentration is used as the path for the next iteration; S54, checking whether the maximum number of iterations is met, if so, terminating and outputting the optimized static path; S6, path tracking; the navigation robot follows the optimized static path obtained in step S5. When encountering a dynamic obstacle during the journey, the DWA algorithm is used to infer possible avoidance paths, and each possible avoidance path is evaluated to obtain the optimal dynamic path, thereby completing dynamic avoidance; S7: The tour guide robot arrives at the destination and handles the event; if it is a call signal, it provides interactive services to tourists; if it is an emergency signal, it evacuates tourists.
2. According to claim 1, a museum tour guide robot path planning method based on an improved RRT* fusion algorithm is characterized in that: The tour guide robot is an autonomous mobile robot, whose structure includes a Raspberry Pi host computer, an stm32F103 mainboard, actuators and sensors, and uses a laser radar to import static space map data.
3. The museum tour guide robot path planning method based on the improved RRT* fusion algorithm according to claim 1 is characterized in that: In steps S2 and S3: The priority of the emergency signal is higher than that of the call signal. When an emergency signal is received, the emergency exit is taken as the end point, and an emergency voice prompt signal is played; when a call signal is received, the signal source is taken as the end point.
4. The museum tour guide robot path planning method based on the improved RRT* fusion algorithm according to claim 1 is characterized in that: Step S4 The specific steps include: S41, select the starting node x start , target node x target , node set interval X near , create an empty tree list T, and change the starting node x start As the root node x init , put into the empty tree list T; S42, when the iteration starts, the starting node x start As the parent node, at the starting point x start Randomly update the first random node x nearby rand1 , starting from the starting node x start To x rand1 The direction is extended by a certain step length, and the end point is set to the first child node x new1 ; S43, then at the first child node x new1 With the target node x target Randomly update the second random node x in the space between rand2 , and select the starting node x in step S42 start With the first child node x new1 The second random node x at the middle distance rand2 A node that is closer to the node is set as the parent node, and the node is moved from the parent node to the second random node x. rand2 The direction is extended by a certain step length, and the end point is set to the second child node x new2 ; S44, then at the second child node x new2 With the target node x target Then randomly update the third random node x in the space between rand3 , and find the starting node x in the previous step start 、The first child node x new1 , the second child node x new2 The third random node x at the middle distance rand3 The nearest one is set as the parent node, and then go from the parent node to the third random node x rand3 The direction is extended by a certain step length, and the end point is set to the third child node x new3 ; According to the correspondence between the parent node and the child node, connect each node, get the preliminary path, and put it into the empty tree list T; Then, the third child node x new3 is the center of the circle, and all nodes within the radius r belong to the node set interval X near , node set interval X near Divided into parent node set threshold X par and the child node set threshold X chi ; Calculate the parent node set threshold X par Each node in to the third child node x new3 The path cost is the smallest, and a node with no obstacles on the path is set as the third child node x new3 The new parent node reconnects the path; then the child node set threshold X chi The same is true for the third child node x new3 Select the child node, reconnect the path, and check whether the new child node reaches the target node x target Nearby; all possible paths are put into the empty tree list T; S45, if the target node x is reached target If it is nearby, then connect to the target node x target Get the approximate optimal path; if the target node x is not reached target If the last child node is near, the path cost from the nodes within the radius r around it to the last child node is recalculated, and a new parent node and child node are selected, and the path is reconnected until the last child node reaches the target node x. target Near or reaching the maximum number of iterations.
5. The museum tour guide robot path planning method based on the improved RRT* fusion algorithm according to claim 4 is characterized in that: The calculation of the path length cost in steps S44 and S45 is specifically as follows: Parent node set threshold X par , child node set threshold X chi , both of which are contained in the circular node set interval X with the current node as the center and radius r near Inside; set the new parent node x np , the new child node is x nc , the current node is x cur ; There are M nodes before the new parent node, and the step length of each step is H i , let the new parent node x np To the current node x cur The path cost is L(x cur ), then its formula is expressed as: Among them, dis(x np , x cur ) describes x np , x cur The actual path length between them is expressed as Euclidean distance; Let the path cost from the new child node to the current node be L(x nc ), its formula is expressed as: L(x nc )=L(x cur )+dis(x cur ,x nc ),x nc ∈X chi ; Among them, dis(x cur , x nc ) describes x nc , x cur The actual path length between them is expressed as Euclidean distance.
6. The museum tour guide robot path planning method based on the improved RRT* fusion algorithm according to claim 1 is characterized in that: The pheromone concentration in step S5 regulates the path length, the angle of the road section, and the number of path sections to optimize the total length, smoothness, and number of turning points of the static path; and the probability of the ant selecting the next target city that has not been visited is determined by the pheromone concentration; the specific expression of the pheromone concentration is as follows: Suppose the pheromone concentration of a path from city S to city H in t unit time is Its formula is: in, represents the pheromone concentration on the path at the last unit time, Y represents the percentage of pheromone remaining for the volatilization effect per unit time, is the sum of the pheromone concentrations produced by all G ants on the path, l e is the pheromone concentration left by ant e through the path, and its formula is expressed as: Among them, L represents the length of the path it has traveled, θ represents the angle of the path it has traveled, m represents the number of path segments it has traveled, and Q is the pheromone constant; The above pheromone concentration can further be used to obtain the probability of other ants moving from city S to city H: The formula is: Z is the set of cities to be visited; Where length(S, H) represents the inverse of the distance between two cities; η and τ represent the weight coefficients of the ant's choice of city depending on the pheromone concentration and the distance between cities in the probability formula.
7. The museum tour guide robot path planning method based on the improved RRT* fusion algorithm according to claim 1 is characterized in that: The specific process in step S6 is: S61. According to the rigid conditions of the robot, its linear velocity, acceleration, angular velocity, angular acceleration and environmental obstacles are limited to form a sampling space. Considering the safety during the movement, the speed must be associated with the distance from the robot's path to the obstacle, so: 0 <v<dis(h,k)*r 0<ω<dis(h,k)*r in , v, ω represent the linear velocity and angular velocity of the robot respectively, dis(h, k) represents the Euclidean distance between the point on the robot's path closest to the obstacle vertex and the obstacle vertex, r is the coefficient, when dis(h, k) is greater than the robot size, r is 1, when dis(h, k) is less than the robot size, r is 0; S62, inferring a possible avoidance path at a certain sampling frequency; S63. Use the evaluation function to evaluate all possible avoidance paths to obtain the optimal dynamic path; the total evaluation function is denoted as T(v, ω), and its formula is expressed as: T(v,ω)=ω ang ang(v,ω)+ω obs obs(v,ω)+ω vel vel(v,ω); Among them, ang(v, ω), obs(v, ω), and vel(v, ω) are the azimuth evaluation function, obstacle evaluation function, and speed evaluation function, respectively, which are used to evaluate the angle of the robot's path toward the target point, the distance between the robot's path and the obstacles that may be encountered, and the speed when there are no obstacles and the angle toward the target point is appropriate; ω ang ,ω obs ,ω vel are the weight coefficients corresponding to the three evaluation functions, and ω is taken ang ,ω obs The value is higher than ω vel , that is, the safety of path planning takes precedence over speed; the higher the value of the total evaluation function T(v, ω), the better the selected path is. The path with the highest value of the total evaluation function T(v, ω) and a value of all three evaluation functions that are not zero is the optimal dynamic path.