Full-time Non-homotopic Robot Path Optimization Method Based on Online Environment Learning
Through online environment learning and non-homoethic path planning methods, a pedestrian matrix knowledge base is constructed and a non-homoethic reverse loop path is generated, which solves the problem that robots cannot avoid sudden crowds in the existing technology, and improves navigation fluency and pedestrian comfort.
Patent Information
- Application Number
- CN202311768924.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2043-12-21
AI Technical Summary
The existing path planning algorithm cannot predict the possible population on the path in advance, nor can it avoid the sudden population on the path in time, resulting in the hindrance of the robot's progress.
The full-time non-homogenetic robot path optimization method based on online environment learning is adopted, map feature points are obtained through Gaussian hybrid model, pedestrian matrix knowledge base is constructed, initial heuristic path is generated using the Risk-RRT algorithm, and bursting populations are monitored in real time through the pedestrian cluster dynamic matrix algorithm to generate non-homogenetic inverse loop paths to avoid the crowd.
It effectively avoids the contact between robots and sudden crowds, and improves the smoothness of robot navigation and the social comfort of pedestrians.
Smart Images

Figure CN117850410B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot path planning, and in particular to a method and device for optimizing the path of a non-homotopic robot at all times based on online environment learning. Background Art
[0002] In recent years, the breakthrough of artificial intelligence technology has brought great opportunities to the research of mobile service robots. At present, mobile service robots such as guiding robots, floor-sweeping robots, shopping guide robots, and goods handling robots have been successfully applied to human-robot coexisting environments such as airports, supermarkets, museums, and families. In some typical environments, the flow time and direction of the crowd often have certain rules. Traditional path planning algorithms usually do not refer to these rules and incorporate them into actual navigation. More specifically, current mainstream path planning algorithms often focus on obstacle avoidance for individual pedestrians and cannot intelligently choose to simply avoid or select a non-homotopic path for navigation when dealing with suddenly emerging crowded people.
[0003] RRT is a tree-based path search algorithm used to search for a path from the start state to the goal state in a high-dimensional state space. Its basic idea is to start from a random node in the current tree, sample a new state, and grow the tree to this new state through the system dynamics model, repeating this process until a path is found or the maximum number of iterations is reached. Risk-RRT introduces the concept of "risk" on the basis of the RRT algorithm to consider the safety and reliability of the path. Risk can usually be measured by a cost or cost function, which can be defined according to specific applications. For example, for an autonomous vehicle, risk can represent the distance from other vehicles, the probability of collision, speed, etc.
[0004] The existing Risk-RRT (Risk-Biased Rapidly Exploring Random Trees) algorithm is a path planning algorithm that combines the fast path search of RRT (Rapidly Exploring Random Trees) and risk assessment to generate a safer and more reliable path. This algorithm is particularly suitable for path planning problems of robots, autonomous vehicles, and other autonomous systems. The Risk-RRT algorithm can control the risk preference of path planning by adjusting the risk weight. If the risk weight is high, the algorithm will be more cautious and more inclined to generate low-risk paths. If the risk weight is low, the algorithm may accept higher-risk paths to reach the goal faster. The generated path usually needs to be further optimized, such as by a smooth trajectory generation algorithm or other techniques to reduce the curvature of the path and make it more suitable for actual execution.
[0005] However, when the above path planning algorithm based on random sampling encounters a pedestrian suddenly appearing ahead in a narrow environment of human-robot coexistence, it often fails to recognize and detour in time. Moreover, in a narrow area, the ordinary algorithm can only generate homotopy paths with minor modifications to avoid the crowd, which almost inevitably leads to contact with the crowd. In a specific environment, it is necessary to avoid contact with the crowd as much as possible to ensure the navigation efficiency and consider the comfort of pedestrians. If in a fixed environment, such as a shopping mall, hotel, or restaurant, the flow pattern of pedestrians generally has typical rules during specific periods, such as the morning and evening rush hours. The ordinary algorithm does not have the knowledge base function to record these knowledge rules, resulting in the robot being unable to extract and reuse these knowledge rules before navigation during specific periods, making the navigation plan lack wisdom and unable to "predict in advance" the movement trend of pedestrians.
[0006] In summary, the existing path planning algorithms cannot predict in advance the possible crowd on the path, nor can they avoid the sudden crowd appearing on the path in time, resulting in the robot being blocked when moving along the planned path and affecting the normal operation of the robot. Summary of the Invention
[0007] Therefore, the technical problem to be solved by the present invention is to overcome the problem in the prior art that sudden crowds cannot be avoided in a narrow area, resulting in the robot being blocked during movement.
[0008] To solve the above technical problem, the present invention provides an all-time non-homotopy robot path optimization method based on online environment learning, including:
[0009] S1: Using the Gaussian mixture model, obtaining the feature points of the obstacle-free area in the map, generating a set of feature points; constructing a pedestrian matrix based on the total number of pedestrians passing through the area between the connections of every two feature points in the set of feature points; obtaining the pedestrian matrices of multiple typical periods and forming a pedestrian matrix knowledge base;
[0010] S2: According to the initial starting point, target point of the robot and the pedestrian matrix of the current period, based on the set of feature points, using the Risk-RRT algorithm, generating an initial heuristic path and making the robot move along the initial heuristic path;
[0011] S3: Using the pedestrian aggregation dynamic matrix algorithm, based on the pedestrian matrix and the average walking speed of pedestrians, updating the pedestrian aggregation dynamic matrix according to a preset time step;
[0012] S4: Comparing the value of each element in the updated pedestrian aggregation dynamic matrix with the preset pedestrian threshold: If there is an element in the pedestrian aggregation dynamic matrix whose value is not less than the preset pedestrian threshold and the area where the element is located is on the path that the robot has not passed on the heuristic path, it is determined that a sudden crowd appears on the heuristic path;
[0013] S5: Use the depth - first search algorithm to obtain all obstacles in the map; extract and sort multiple neighborhood feature points of each obstacle to generate a core - ring structure corresponding to each obstacle.
[0014] S6: Obtain the obstacle with the minimum distance from the sudden crowd; if the minimum distance does not exceed the preset aggregation threshold, based on the core - ring structure of the obstacle, extract its corresponding neighborhood feature points.
[0015] S7: According to the neighborhood feature points of the obstacle corresponding to the minimum distance, with the current robot position as the current starting point and keeping the target point unchanged, use the Risk - RRT algorithm to perform path planning again to generate a non - homotopy reverse loop path.
[0016] S8: Let the robot travel along the non - homotopy reverse loop path, and repeat steps S3 to S7 until the robot reaches the target point.
[0017] In an embodiment of the present invention, the method of using the Gaussian mixture model to obtain the feature points of the obstacle - free area in the map and generate a set of feature points includes:
[0018] Randomly scatter points in the obstacle - free area of the map to obtain an initial training set.
[0019] Preset the number n of Gaussian components of the Gaussian mixture model, and use the Gaussian mixture model to cluster the initial training set to obtain n clustering results.
[0020] The n center points of the n clustering results are used as the feature points of the map to form a set of feature points.
[0021] In an embodiment of the present invention, the method of constructing a pedestrian matrix based on the total number of pedestrians passing between the connection areas of every two feature points in the set of feature points includes:
[0022] For each feature point G in the set of feature points i , obtain its connections with each feature point in the set of feature points except itself, and form an adjacent - area connection matrix of this feature point G i with all the connections without obstacle blockage.
[0023] Initialize all elements α ij in the adjacent - area connection set to 0; α ij represents the total number of pedestrians passing between the connection area of feature point G i and another feature point G j , 1 ≤ i ≤ n, 1 ≤ j ≤ n and j ≠ i, where n represents the total number of feature points in the set of feature points.
[0024] Obtain the number of pedestrians passing between the connection area of feature point G and another feature point during the current time period ti The total number of pedestrians whose vertical distance from the connection line with G j is less than the preset distance threshold is assigned to α ij , and an n×n pedestrian matrix is constructed, expressed as:
[0025]
[0026] In an embodiment of the present invention, the obtaining of pedestrian matrices for multiple typical time periods to form a pedestrian matrix knowledge base includes:
[0027] The typical time periods include the morning rush hour, the evening rush hour, and the holiday period;
[0028] The pedestrian matrices for all the morning rush hour, the evening rush hour, and the holiday period are respectively obtained and used as a unit in the pedestrian matrix knowledge base, and are stored in the pedestrian matrix knowledge base.
[0029] In an embodiment of the present invention, the generating of an initial heuristic path based on the initial starting point, the target point, and the pedestrian matrix of the current time period of the robot by using the Risk-RRT algorithm includes:
[0030] Initialize the initial starting point, the target point, and the pedestrian matrix of the current time period, and initialize the RRT to be empty;
[0031] Based on the pedestrian matrix of the current time period, delete the current obstacle points in the feature point set to obtain an updated feature point set;
[0032] Taking the initial starting point of the robot as the initial state point, in the updated feature point set, obtain the feature point with the smallest Euclidean distance from the initial state point as the next state point and add it to the RRT;
[0033] Taking the next state point as the current state point, obtain the feature point with the smallest Euclidean distance from the current state point as the new current state point;
[0034] Repeatedly obtain the feature point with the smallest Euclidean distance from the new current state point, expand the path along the system dynamics model, and update the RRT until the updated RRT contains the target point;
[0035] Based on the updated RRT, generate an initial heuristic path from the initial starting point to the target point.
[0036] In an embodiment of the present invention, the updating of the pedestrian crowd clustering dynamic matrix based on the pedestrian matrix and the average pedestrian walking speed by using the pedestrian crowd clustering dynamic matrix algorithm includes:
[0037] Obtain the pedestrian matrix of the current typical time period and the average pedestrian walking speed of the current typical time period;
[0038] Based on each element α in the pedestrian matrix during the current typical period ij , multiply it by the corresponding average pedestrian walking speed v ij , and initialize the pedestrian clustering dynamic element b ij = α ij × v ij , and generate a pedestrian clustering dynamic matrix;
[0039] Using the average pedestrian walking speed and the preset time step, update the position of each pedestrian, subtract one from the element of the pedestrian matrix at the original position where the pedestrian leaves, add one to the element of the pedestrian matrix at the new position where the pedestrian arrives, and update the pedestrian matrix;
[0040] Based on the updated pedestrian matrix, update the pedestrian clustering dynamic matrix.
[0041] In an embodiment of the present invention, comparing the value of each element in the updated pedestrian clustering dynamic matrix with the preset pedestrian threshold includes:
[0042] Compare the pedestrian clustering dynamic element b ij with the preset pedestrian threshold. If there is a pedestrian clustering dynamic element b ij that is not less than the preset pedestrian threshold, it is determined that a sudden crowd appears, and connect the corresponding feature points G ij of this pedestrian clustering dynamic element b i and G j , and enclose an unreliable area;
[0043] If the pedestrian clustering dynamic elements b ij are all less than the preset pedestrian threshold, it is determined that no sudden crowd appears, and the robot travels to the target point according to the initial heuristic path.
[0044] In an embodiment of the present invention, using the depth - first search algorithm to obtain all obstacles in the map; extracting and sorting multiple neighborhood feature points of each obstacle to generate a core - ring structure corresponding to each obstacle includes:
[0045] Using the depth - first search algorithm to obtain all obstacles in the map;
[0046] For each obstacle, extract multiple neighborhood feature points until the connection lines of all neighborhood feature points corresponding to the obstacle enclose the corresponding obstacle;
[0047] Respectively perform counter - clockwise sorting on all neighborhood feature points of each obstacle using the polar - angle sorting method to generate the core - ring structure of the obstacle.
[0048] In one embodiment of the present invention, for the neighborhood feature points of the obstacle corresponding to the minimum distance, with the current robot position as the current starting point and the target point remaining unchanged, the Risk-RRT algorithm is used to perform path planning again to generate a non-homotopic reverse loop path, including:
[0049] Obtain the neighborhood feature points of the obstacle corresponding to the minimum distance from the sudden crowd;
[0050] If the unreliable area of the sudden crowd is on the initial heuristic path and the minimum distance from the obstacle is not greater than the preset aggregation threshold, obtain the feature point closest to the current robot position in the unreliable area as the replanning starting point;
[0051] The robot travels along the initial heuristic path until the distance between the robot and the replanning starting point is less than the preset threshold, then use the robot's current position as the current starting point;
[0052] Keep the target point unchanged, combine the neighborhood feature points of the obstacle corresponding to the minimum distance from the sudden crowd, and use the Risk-RRT algorithm to perform path planning to generate a non-homotopic reverse loop path around the obstacle from the current starting point to the target point.
[0053] An embodiment of the present invention provides a robot non-homotopic path planning device, including:
[0054] A knowledge construction module, which is used to use the Gaussian mixture model to obtain the feature points of the obstacle-free area in the map, generate a set of feature points; construct a pedestrian matrix based on the total number of pedestrians passing between the connection areas of every two feature points in the set of feature points; obtain the pedestrian matrices of multiple typical time periods to form a pedestrian matrix knowledge base;
[0055] An initial path planning module, which is used to generate an initial heuristic path according to the initial starting point, target point of the robot and the pedestrian matrix of the current time period, based on the set of feature points, and use the Risk-RRT algorithm to make the robot move along the initial heuristic path;
[0056] A sudden crowd judgment module, which is used to use the pedestrian aggregation dynamic matrix algorithm to update the pedestrian aggregation dynamic matrix based on the pedestrian matrix and the average pedestrian walking speed at a preset time step; compare the values of each element in the updated pedestrian aggregation dynamic matrix with the preset pedestrian threshold: if there is an element in the pedestrian aggregation dynamic matrix whose value is not less than the preset pedestrian threshold and the area where the element is located is on the path that the robot has not passed on the heuristic path, it is determined that there is a sudden crowd on the heuristic path;
[0057] The minimum-distance obstacle acquisition module is used to obtain all obstacles in the map by using the depth-first search algorithm; extract multiple neighborhood feature points of each obstacle for sorting to generate a kernel-ring structure corresponding to each obstacle; obtain the obstacle with the minimum distance from the sudden crowd; if the minimum distance does not exceed the preset aggregation threshold, based on the kernel-ring structure of the obstacle, extract its corresponding neighborhood feature points;
[0058] The path replanning module is used to, based on the neighborhood feature points of the obstacle corresponding to the minimum distance, with the current robot position as the current starting point and keeping the target point unchanged, use the Risk-RRT algorithm to perform path planning again to generate a non-homotopic reverse loop path;
[0059] The navigation module is used to make the robot travel along the non-homotopic reverse loop path, and repeatedly execute the sudden crowd judgment module, the minimum-distance obstacle acquisition module and the path replanning module until the robot reaches the target point.
[0060] The above technical solution of the present invention has the following advantages compared with the prior art:
[0061] The all-time non-homotopic robot path optimization method based on online environment learning described in the present invention constructs a pedestrian matrix knowledge base based on pedestrian matrices in different typical time periods, records and stores the flow information in the maps of past typical time periods for subsequent extraction and reuse; when using the Risk-RRT algorithm to generate an initial heuristic path, the present invention takes into account the pedestrian matrix in the corresponding time period and initially avoids conflicts between the robot and pedestrians. The present invention uses the pedestrian clustering dynamic matrix algorithm to update the pedestrian clustering dynamic matrix based on the pedestrian matrix and the average forward speed of pedestrians, and real-time monitors whether there are sudden crowds on the initial heuristic path, so as to combine navigation obstacle avoidance with obstacles, generate a non-homotopic reverse loop path by using the neighborhood feature points of the obstacles, and change the deficiency of the traditional method of avoiding crowds by fine-tuning the homotopic path. The present invention greatly avoids contact between the robot and sudden crowds through prior knowledge and real-time map pedestrian monitoring, and improves the fluency of robot navigation and pedestrian social comfort. Description of the Drawings
[0062] In order to make the content of the present invention easier to be clearly understood, the following further details the present invention according to specific embodiments of the present invention and in combination with the drawings, where
[0063] Figure 1 is a flowchart of the steps of the all-time non-homotopic robot path optimization method provided by the present invention;
[0064] Figure 2 is a schematic diagram of the initial heuristic path provided by the present invention;
[0065] Figure 3 It is a schematic diagram of the generation of the obstacle core ring structure provided by the present invention;
[0066] Figure 4 It is a schematic diagram of non-homotopic path planning provided by the present invention;
[0067] Figure 5 It is a schematic diagram of path planning in the presence of sudden crowds provided by the present invention;
[0068] Figure 6 It is a schematic diagram of the core ring structure generated by obstacles provided by the present invention;
[0069] Figure 7 It is a schematic diagram of non-homotopic reverse loop path planning based on sudden crowds provided by the present invention. Detailed implementation manners
[0070] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand the present invention and be able to implement it, but the embodiments cited are not intended to limit the present invention.
[0071] Refer to Figure 1 As shown, the flowchart of the steps of the all-time non-homotopic robot path optimization method based on online environment learning of the present invention specifically includes:
[0072] S1: Using the Gaussian mixture model, obtain the feature points in the obstacle-free area of the map, and generate a set of feature points; based on the total number of pedestrians passing through the area between the connections of every two feature points in the set of feature points, construct a pedestrian matrix; obtain the pedestrian matrices of multiple typical time periods and form a pedestrian matrix knowledge base;
[0073] S2: According to the initial starting point, target point of the robot and the pedestrian matrix of the current time period, based on the set of feature points, use the Risk-RRT algorithm to generate an initial heuristic path, and make the robot move along the initial heuristic path;
[0074] S3: Using the pedestrian crowding dynamic matrix algorithm, based on the pedestrian matrix and the average pedestrian walking speed, update the pedestrian crowding dynamic matrix according to the preset time step;
[0075] S4: Compare the value of each element in the updated pedestrian crowding dynamic matrix with the preset pedestrian threshold:
[0076] If there is a pedestrian crowding dynamic element b not less than the preset pedestrian threshold in the updated pedestrian crowding dynamic matrix ij , then it is determined that a sudden crowd appears, and connect the feature point G ij corresponding to this pedestrian crowding dynamic element b i with G j, enclose an unreliable area;
[0077] If the pedestrian clustering dynamic element b in the updated pedestrian clustering dynamic matrix ij is less than the preset pedestrian threshold, it is determined that there is no sudden crowd, and the robot travels to the target point according to the initial heuristic path;
[0078] S5: Use the depth-first search algorithm to obtain all obstacles in the map; extract multiple neighborhood feature points of each obstacle for sorting, and generate a kernel ring structure corresponding to each obstacle;
[0079] S6: Obtain the obstacle with the minimum distance from the sudden crowd; if the minimum distance does not exceed the preset aggregation threshold, based on the kernel ring structure of the obstacle, extract its corresponding neighborhood feature points;
[0080] S7: According to the neighborhood feature points of the obstacle corresponding to the minimum distance, with the current robot position as the current starting point and keeping the target point unchanged, use the Risk-RRT algorithm to perform path planning again to generate a non-homotopic reverse loop path;
[0081] S8: Let the robot travel along the non-homotopic reverse loop path, and repeat steps S3 to S7 until the robot reaches the target point.
[0082] Specifically, in step S1, the construction of the feature point set and the pedestrian matrix knowledge base includes:
[0083] S11: Randomly scatter points in the obstacle-free area of the map to obtain an initial training set; preset the number of Gaussian components n of the Gaussian mixture model, and use the Gaussian mixture model to cluster the initial training set to obtain n clustering results; the n center points of the n clustering results are used as the feature points of the map to form a feature point set;
[0084] S12: For each feature point G in the feature point set i , obtain the connection lines between it and each feature point in the feature point set except itself, and use all the connection lines without obstacle blocking to form the adjacent area connection matrix of this feature point G i ; initialize all elements α ij in the adjacent area connection set to 0; α ij represents the total number of pedestrians passing through the connection area between feature point G i and another feature point G j , 1 ≤ i ≤ n, 1 ≤ j ≤ n and j ≠ i, n represents the total number of feature points in the feature point set; obtain the total number of pedestrians whose vertical distance from the connection line between feature point G i and G j is less than the preset distance threshold during the current time period t, and assign it to α ij, construct an n×n pedestrian matrix, denoted as:
[0085]
[0086] S13: The typical periods include the morning rush hour, the evening rush hour, and the holiday period; respectively obtain the pedestrian matrices for all morning rush hours, evening rush hours, and holiday periods, and use them as a unit in the pedestrian matrix knowledge base for storage.
[0087] Specifically, referring to Figure 2 shown, it is a schematic diagram of the initial heuristic path; in step S2, use the Risk-RRT algorithm to generate the initial heuristic path, including:
[0088] S21: Initialize the initial starting point, the target point, and the pedestrian matrix for the current period, and initialize the RRT to be empty;
[0089] S22: Based on the pedestrian matrix for the current period, delete the current obstacle points in the set of feature points to obtain an updated set of feature points;
[0090] S23: Use the initial starting point of the robot as the initial state point, and in the updated set of feature points, obtain the feature point with the smallest Euclidean distance from the initial state point as the next state point, and add it to the RRT;
[0091] S24: Use the next state point as the current state point, and obtain the feature point with the smallest Euclidean distance from the current state point as the new current state point;
[0092] S25: Repeatedly obtain the feature point with the smallest Euclidean distance from the new current state point, expand the path along the system dynamics model, and update the RRT until the updated RRT contains the target point;
[0093] S26: Based on the updated RRT, generate the initial heuristic path from the initial starting point to the target point.
[0094] Specifically, in step S3, the execution process of the pedestrian crowd clustering dynamic matrix algorithm includes:
[0095] S31: Obtain the pedestrian matrix for the current typical period and the average walking speed of pedestrians in the current typical period;
[0096] S32: Based on each element α ij in the pedestrian matrix for the current typical period, multiply it by the corresponding average walking speed of pedestrians v ij , and initialize the pedestrian crowd clustering dynamic element b ij = α ij × v ij , and generate the pedestrian crowd clustering dynamic matrix;
[0097] S33: Update the position of each pedestrian using the average walking speed of pedestrians and the preset time step, subtract one from the pedestrian matrix element at the original position where the pedestrian leaves, add one to the pedestrian matrix element at the new position where the pedestrian arrives, and update the pedestrian matrix;
[0098] S34: Update the pedestrian clustering dynamic matrix based on the updated pedestrian matrix.
[0099] Specifically, referring to Figure 3 as shown, it is a schematic diagram for generating the nuclear ring structure of obstacles; in step S6, the generation of the nuclear ring structure of all obstacles in the map includes:
[0100] S61: Use the depth-first search algorithm to obtain all obstacles in the map;
[0101] S62: For each obstacle, extract multiple neighborhood feature points until the connection lines of all neighborhood feature points corresponding to the obstacle enclose the corresponding obstacle;
[0102] S63: Respectively perform counterclockwise sorting on all neighborhood feature points of each obstacle using the polar angle sorting method to generate the nuclear ring structure of the obstacle.
[0103] Referring to Figure 4 as shown, it is a schematic diagram for non-homotopic path planning; specifically, the planning of the non-homotopic reverse loop path includes:
[0104] Obtain the neighborhood feature points of the obstacle corresponding to the minimum distance from the sudden crowd;
[0105] If the unreliable area of the sudden crowd is on the initial heuristic path and the minimum distance from the obstacle is not greater than the preset aggregation threshold, obtain the feature point closest to the current robot position in the unreliable area as the replanning starting point;
[0106] The robot travels along the initial heuristic path until the distance between the robot and the replanning starting point is less than the preset threshold, then use the current position of the robot as the current starting point;
[0107] Keep the target point unchanged, combine the neighborhood feature points of the obstacle corresponding to the minimum distance from the sudden crowd, and use the Risk-RRT algorithm for path planning to generate a non-homotopic reverse loop path around the obstacle from the current starting point to the target point.
[0108] The all-time non-homotopic robot path optimization method based on online environment learning described in the present invention constructs a pedestrian matrix knowledge base based on pedestrian matrices in different typical time periods, records and stores the flow information in the maps of past typical time periods for subsequent extraction and reuse; when using the Risk-RRT algorithm to generate an initial heuristic path, the present invention takes into account the pedestrian matrix corresponding to the time period and initially avoids conflicts between the robot and pedestrians. The present invention uses the pedestrian crowd dynamic matrix algorithm to update the pedestrian crowd dynamic matrix based on the pedestrian matrix and the average forward speed of pedestrians, and real-time monitors whether a sudden crowd appears on the initial heuristic path, so as to combine navigation obstacle avoidance with obstacles, generate a non-homotopic reverse loop path using the neighborhood feature points of the obstacles, and change the deficiency of the traditional method of avoiding crowds by fine-tuning the homotopic path. The present invention greatly avoids contact between the robot and sudden crowds through prior knowledge and real-time map pedestrian monitoring, and improves the fluency of robot navigation and the social comfort of pedestrians.
[0109] Based on the above embodiments, in this embodiment, a simulation model is used to perform an all-time robot non-homotopic path optimization method for online environment learning; referring to Figure 5 As shown, it is a schematic diagram of path planning when a sudden crowd appears; the specific optimization process includes:
[0110] S201: Use the Gaussian mixture model to obtain the environmental structure feature points in the map, extract and sort the domain feature points of all obstacles in the map to form several "core-loop structures", and store them;
[0111] Referring to Figure 6 As shown, it is a schematic diagram of the core-loop structure generated by obstacles. The specific generation steps include:
[0112] S201-1: Randomly scatter points in the blank area (i.e., the area without obstacles) in the map to cover the entire map and obtain an initial training set;
[0113] S201-2: Set the number of Gaussian components to n, perform Gaussian mixture model clustering on the initial training set, and obtain n clustering results in the map through several iterations. Take the center points of these n Gaussian components as the feature points in the map;
[0114] S201-3: Adopt the depth-first idea to search all obstacles in the map, and extract the neighborhood feature points of each obstacle. The extraction is completed when it is ensured that the neighborhood feature points of an obstacle can be connected to surround the obstacle;
[0115] After the extraction is completed, use the polar angle sorting method to label and sort the neighborhood feature points of each obstacle counterclockwise. Thus, n special "core-loop structures" are formed for the n obstacles in the map.
[0116] S202: Obtain the wall time in the current ROS and convert it into real-world time;
[0117] S203: Extract the pedestrian matrix matching the current time from the pedestrian matrix knowledge base according to the current real-world time;
[0118] Specifically, the pedestrian matrix is an n×n diagonal matrix; n represents that there are n environmental structure feature points in the map; each element of the matrix is represented as α ij , where i and j are the row and column indices of the matrix; the element α ij represents the total number of pedestrians passing through the area between feature points i and j within the time period t.
[0119] The specific steps to form the pedestrian matrix are as follows: Select any feature point G from the set of feature points k (where k is the identifier of the total number of feature points, k = 1, 2,..., K), and then connect this point G k to other feature points G i (where i is not equal to k, i = 1, 2,..., K), and test these connections on the map. If there are no obstacles blocking these connections, set ped n to 0. Then, extract the pedestrian coordinates stored in ped sum (the statistical set of all pedestrian coordinate information) one by one, and calculate their vertical distance dt from G k and G i . If dt is less than a predetermined value 2, increment ped n by 1. When ped sum is traversed, store the value of ped n in a temporary pedestrian matrix Ptemp_ped(i, x); otherwise, store 0 in Ptemp_ped(i, x). Repeat the execution until all feature points are traversed. Finally, clear the content of the ped sum array, and then add Ptemp_ped to Pped to obtain the pedestrian matrix Pped;
[0120] Build a pedestrian matrix knowledge base based on the pedestrian matrix in each typical time period; among them, the typical time periods include the morning rush hour, the evening rush hour, and the holiday period.
[0121] S204: Form an initial heuristic path by combining the environmental structure feature points with reference to the pedestrian matrix matching the current time;
[0122] Obtain the corresponding pedestrian matrix according to the current time period, and use the Risk-RRT planner to generate an initial heuristic path;
[0123] S205: The robot navigates along the initial heuristic path, and the pedestrian crowd clustering dynamic matrix algorithm starts to work to monitor the pedestrian information in the whole map to check if there are suddenly emerging crowds on the initial heuristic path;
[0124] S206: Use the pedestrian crowd clustering dynamic matrix algorithm to monitor the pedestrian information globally on the map and determine if there are suddenly emerging crowds (i.e., sudden crowds) on the unvisited path of the initial heuristic path:
[0125] If not, rely on the Risk-RRT algorithm for navigation and proceed along the initial heuristic path;
[0126] If there are suddenly emerging crowds, determine if the crowds are near obstacles:
[0127] If not, rely on the Risk-RRT algorithm for navigation;
[0128] If so, obtain the obstacle information shared by the suddenly emerging crowds and the initial heuristic path, extract the "core-ring" structure of the obstacle, and obtain its neighborhood feature points;
[0129] When the robot approaches the crowd and there is no sign of the crowd dispersing, perform a secondary navigation plan based on the neighborhood feature points along the initial heuristic path; starting from the current position of the robot, form a non-homotopic reverse loop path that surrounds the obstacle and avoids the crowd.
[0130] Specifically, in step S206, the monitoring of sudden crowds specifically includes the following steps:
[0131] Use the pedestrian crowd clustering dynamic matrix algorithm to construct and update the pedestrian crowd clustering dynamic matrix based on the pedestrian matrix and the average pedestrian forward speed; where the element b in the pedestrian crowd clustering dynamic matrix ij , represents the product of the total number of pedestrians passing through the area between feature points i and j and their average pedestrian speed within the current time period;
[0132] Refer to Figure 7As shown in the figure, it is a schematic diagram of non-homotopic reverse circular path planning based on sudden crowds; the pedestrian aggregation dynamic matrix algorithm continuously monitors the pedestrians in the map. When it detects that the value of an element in the matrix is not less than the preset pedestrian threshold, the area between the feature points i and j represented by this element is divided into an unreliable area; and it is judged whether this unreliable area is near an obstacle. If it is near an obstacle, the feature point closer to the current position of the robot among feature points i and j is used as the starting point for the next stage; after the robot moves to the starting point of the next stage, the target point remains unchanged. Combining the domain feature points of the obstacle, the Risk-RRT algorithm is used for path replanning to generate a non-homotopic reverse circular path around the obstacle.
[0133] The present invention innovatively combines navigation and obstacle avoidance with the obstacles in the map. By using the nearby obstacles to generate non-homotopic paths, it changes the deficiency that the previous navigation and obstacle avoidance algorithms only fine-tune homotopic paths. The present invention greatly avoids contact with pedestrians through prior knowledge and real-time map pedestrian monitoring, and greatly improves the fluency of robot navigation and the social comfort of pedestrians.
[0134] Based on the above embodiments, in the embodiments of the present invention, there is also provided a non-homotopic path planning device for a robot, including:
[0135] A knowledge construction module 100, configured to use a Gaussian mixture model to obtain the feature points of the obstacle-free area in the map, generate a set of feature points; construct a pedestrian matrix based on the total number of pedestrians passing between the connection areas of every two feature points in the set of feature points; obtain the pedestrian matrices of multiple typical time periods and form a pedestrian matrix knowledge base;
[0136] An initial path planning module 200, configured to generate an initial heuristic path based on the initial starting point, target point of the robot and the pedestrian matrix of the current time period, based on the set of feature points, using the Risk-RRT algorithm, and make the robot move along the initial heuristic path;
[0137] A sudden crowd judgment module 300, configured to use the pedestrian aggregation dynamic matrix algorithm to update the pedestrian aggregation dynamic matrix based on the pedestrian matrix and the average pedestrian speed at a preset time step; compare the value of each element in the updated pedestrian aggregation dynamic matrix with the preset pedestrian threshold: if there is an element in the pedestrian aggregation dynamic matrix whose value is not less than the preset pedestrian threshold, and the area where this element is located is on the path that the robot has not passed on the heuristic path, it is judged that there is a sudden crowd on the heuristic path;
[0138] The minimum-distance obstacle acquisition module 400 is used to obtain all obstacles in the map by using the depth-first search algorithm; extract multiple neighborhood feature points of each obstacle for sorting to generate a core-ring structure corresponding to each obstacle; obtain the obstacle with the minimum distance from the sudden crowd; if the minimum distance does not exceed a preset aggregation threshold, extract the corresponding neighborhood feature points based on the core-ring structure of the obstacle.
[0139] The path replanning module 500 is used to, based on the neighborhood feature points of the obstacle corresponding to the minimum distance, take the current robot position as the current starting point, keep the target point unchanged, and use the Risk-RRT algorithm to perform path planning again to generate a non-homotopic reverse loop path.
[0140] The navigation module 600 is used to make the robot travel along the non-homotopic reverse loop path, and repeatedly execute the sudden crowd judgment module, the minimum-distance obstacle acquisition module, and the path replanning module until the robot reaches the target point.
[0141] The non-homotopic path planning device for the robot in this embodiment is used to implement the foregoing all-time non-homotopic robot path optimization method based on online environment learning. Therefore, the specific implementation manners in the non-homotopic path planning device for the robot can be seen in the embodiment part of the all-time non-homotopic robot path optimization method based on online environment learning in the foregoing text. For example, the knowledge construction module 100 and the initial path planning module 200 are respectively used to implement steps S1 and S2 in the foregoing all-time non-homotopic robot path optimization method based on online environment learning; the sudden crowd judgment module 300 is used to implement steps S3 and S4 in the foregoing all-time non-homotopic robot path optimization method based on online environment learning; the minimum-distance obstacle acquisition module 400 is used to implement steps S5 and S6 in the foregoing all-time non-homotopic robot path optimization method based on online environment learning; the path replanning module 500 and the navigation module 600 are respectively used to implement steps S7 and S8 in the foregoing all-time non-homotopic robot path optimization method based on online environment learning. Therefore, the specific implementation manners can refer to the descriptions of the corresponding respective part embodiments and will not be elaborated herein.
[0142] The all-time non-homotopy robot path optimization method based on online environment learning described in the present invention constructs a pedestrian matrix knowledge base based on pedestrian matrices in different typical time periods, records and stores the pedestrian flow information in the maps of past typical time periods for subsequent extraction and reuse; when generating an initial heuristic path using the Risk-RRT algorithm, the present invention takes into account the pedestrian matrix corresponding to the time period and initially avoids conflicts between the robot and pedestrians. The present invention uses the pedestrian crowd clustering dynamic matrix algorithm to update the pedestrian crowd clustering dynamic matrix based on the pedestrian matrix and the average forward speed of pedestrians, and real-time monitors whether sudden crowds appear on the initial heuristic path, so as to combine navigation obstacle avoidance with obstacles, and generate a non-homotopy reverse loop path using the neighborhood feature points of the obstacles, changing the deficiency of the traditional method of avoiding crowds by fine-tuning the homotopy path. The present invention greatly avoids contact between the robot and sudden crowds through prior knowledge and real-time map pedestrian monitoring, improving the fluency of robot navigation and the social comfort of pedestrians.
[0143] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. 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 code.
[0144] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 a device for realizing the functions specified in one block or multiple blocks.
[0145] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device realizes the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 a device for realizing the functions specified in one block or multiple blocks.
[0146] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the process Figure 1 a process or processes and / or blocks Figure 1 steps for the functions specified in a block or blocks.
[0147] Obviously, the above embodiments are only examples for clear illustration and are not limitations on the implementation manners. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. And the obvious changes or modifications derived therefrom are still within the protection scope of the present invention.
Claims
1. A method for optimizing the path of a non - homotopy robot in all - time based on online environment learning, characterized in that, it includes: S1: Using the Gaussian mixture model, obtain the feature points in the obstacle - free area of the map, and generate a set of feature points; Based on the total number of pedestrians passing through the area between the lines connecting every two feature points in the set of feature points, construct a pedestrian matrix; Obtain the pedestrian matrices of multiple typical time periods and form a pedestrian matrix knowledge base; Among them, constructing a pedestrian matrix includes: for each feature point in the feature point set , obtain the connection lines between it and each feature point in the feature point set except itself, and use all the connection lines without obstacle blocking to form the adjacent area connection line matrix of this feature point ; initialize all elements in the adjacent area connection line matrix to 0; represents the total number of pedestrians passing between the connection line area of feature point and another feature point , , and , represents the total number of feature points in the feature point set; obtain the total number of pedestrians whose vertical distance from the connection line between feature point and within the current time period t is less than a preset distance threshold, and assign it to , and construct an n×n pedestrian matrix, which is expressed as: ; S2: According to the initial starting point, target point of the robot and the pedestrian matrix of the current time period, based on the set of feature points, use the Risk - RRT algorithm to generate an initial heuristic path, and make the robot move along the initial heuristic path; Among them, generating the initial heuristic path includes: initializing the initial starting point, target point and the pedestrian matrix of the current time period, and initializing the RRT as empty; based on the pedestrian matrix of the current time period, delete the current obstacle points in the set of feature points to obtain an updated set of feature points; taking the initial starting point of the robot as the initial state point, in the updated set of feature points, obtain the feature point with the smallest Euclidean distance from the initial state point as the next state point, and add it to the RRT; taking the next state point as the current state point, obtain the feature point with the smallest Euclidean distance from the current state point as the new current state point; repeatedly obtain the feature point with the smallest Euclidean distance from the new current state point, expand the path along the system dynamics model, update the RRT until the updated RRT contains the target point; based on the updated RRT, generate an initial heuristic path from the initial starting point to the target point; S3: Using the pedestrian crowd clustering dynamic matrix algorithm, based on the pedestrian matrix and the average walking speed of pedestrians, update the pedestrian crowd clustering dynamic matrix according to a preset time step; S4: Compare the value of each element in the updated pedestrian crowd clustering dynamic matrix with the preset pedestrian threshold: if there is an element in the pedestrian crowd clustering dynamic matrix whose value is not less than the preset pedestrian threshold, and the area where the element is located is on the unpassed path of the robot on the heuristic path, then it is judged that a sudden crowd appears on the heuristic path; S5: Using the depth - first search algorithm, obtain all obstacles in the map; extract and sort multiple neighborhood feature points of each obstacle to generate a core - ring structure corresponding to each obstacle; S6: Obtain the obstacle with the smallest distance from the sudden crowd; if the smallest distance does not exceed the preset aggregation threshold, then based on the core - ring structure of the obstacle, extract its corresponding neighborhood feature points; S7: According to the neighborhood feature points of the obstacle corresponding to the smallest distance, taking the current robot position as the current starting point and keeping the target point unchanged, use the Risk - RRT algorithm to perform path planning again to generate a non - homotopy reverse loop path; S8: Make the robot move along the non - homotopy reverse loop path, and repeat steps S3 to S7 until the robot reaches the target point.
2. The method for optimizing the path of a non - homotopy robot in all - time based on online environment learning according to claim 1, characterized in that, the using the Gaussian mixture model to obtain the feature points in the obstacle - free area of the map and generate a set of feature points includes: Randomly scatter points in the obstacle-free area of the map to obtain the initial training set; The number of Gaussian components of the preset Gaussian mixture model , and use the Gaussian mixture model to cluster the initial training set to obtain clustering results; The central points of each clustering result are used as the feature points of the map to form a set of feature points.
3. The all-time non-homotopic robot path optimization method based on online environment learning according to claim 1, characterized in that, the obtaining of pedestrian matrices for multiple typical time periods to form a pedestrian matrix knowledge base includes: the typical time periods include the morning rush hour, the evening rush hour, and the holiday period; Respectively obtain the pedestrian matrices for all morning rush hours, evening rush hours, and holiday periods, and use each as a unit in the pedestrian matrix knowledge base to store the pedestrian matrix knowledge base.
4. The all-time non-homotopic robot path optimization method based on online environment learning according to claim 1, characterized in that, the use of the pedestrian crowd clustering dynamic matrix algorithm to update the pedestrian crowd clustering dynamic matrix based on the pedestrian matrix and the average pedestrian walking speed includes: Obtain the pedestrian matrix for the current typical time period and the average pedestrian walking speed for the current typical time period; For each element in the pedestrian matrix based on the current typical period , multiply it by the corresponding average walking speed of pedestrians , initialize the dynamic element of pedestrian clustering , and generate the dynamic matrix of pedestrian clustering; Use the average pedestrian walking speed and the preset time step to update the position of each pedestrian, subtract one from the element of the pedestrian matrix at the original position where the pedestrian leaves, add one to the element of the pedestrian matrix at the new position where the pedestrian arrives, and update the pedestrian matrix; Based on the updated pedestrian matrix, update the pedestrian crowd clustering dynamic matrix.
5. The all-time non-homotopic robot path optimization method based on online environment learning according to claim 4, characterized in that, the comparison of the value of each element in the updated pedestrian crowd clustering dynamic matrix with the preset pedestrian threshold includes: Compare the dynamic elements of pedestrian clustering With the preset pedestrian threshold, if there are dynamic elements of pedestrian clustering not less than the preset pedestrian threshold , it is determined that a sudden crowd appears, and connect the dynamic elements of the pedestrian clustering The corresponding feature points And , enclose an unreliable area; If the dynamic elements of the pedestrian crowd are all less than the preset pedestrian threshold, it is determined that no sudden crowd appears, and the robot travels to the target point according to the initial heuristic path.
6. The all-time non-homotopic robot path optimization method based on online environment learning according to claim 5, characterized in that, the use of the depth-first search algorithm to obtain all obstacles in the map; Extract and sort multiple neighborhood feature points of each obstacle to generate a kernel ring structure corresponding to each obstacle, including: Use the depth-first search algorithm to obtain all obstacles in the map; For each obstacle, extract multiple neighborhood feature points until the connection lines of all neighborhood feature points corresponding to each obstacle surround the corresponding obstacle; Respectively perform counterclockwise sorting on all neighborhood feature points of each obstacle using the polar angle sorting method to generate the kernel ring structure of the obstacle.
7. The all-time non-homotopic robot path optimization method based on online environment learning according to claim 6, characterized in that, according to the neighborhood feature point of the obstacle corresponding to the minimum distance, with the current robot position as the current starting point and the target point remaining unchanged, use the Risk-RRT algorithm to perform path planning again to generate a non-homotopic reverse loop path, including: Obtain the neighborhood feature point of the obstacle corresponding to the minimum distance from the sudden crowd; If the unreliable area of the sudden crowd is on the initial heuristic path and the minimum distance from the obstacle is not greater than the preset aggregation threshold, obtain the feature point closest to the current robot position in the unreliable area as the replanning starting point; The robot travels along the initial heuristic path until the distance between the robot and the replanning starting point is less than the preset threshold, then use the current robot position as the current starting point; Keep the target point unchanged, combine the neighborhood feature points of the obstacle corresponding to the minimum distance from the sudden crowd, and use the Risk-RRT algorithm for path planning to generate a non-homotopic reverse loop path around the obstacle from the current starting point to the target point.
8. An all-time non-homotopic robot path optimization device based on online environment learning, characterized in that, it includes: A knowledge construction module, which is used to use the Gaussian mixture model to obtain the feature points of the obstacle-free area in the map and generate a set of feature points; Construct a pedestrian matrix based on the total number of pedestrians passing between the connection areas of every two feature points in the set of feature points; Obtain pedestrian matrices for multiple typical time periods to form a pedestrian matrix knowledge base; among them, constructing a pedestrian matrix includes: for each feature point in the feature point set , obtain the connection lines between it and each feature point in the feature point set except itself, and use all the connection lines without obstacle blockage to form the adjacent area connection line matrix of this feature point ; initialize all elements in the adjacent area connection line matrix to 0; represents the total number of pedestrians passing between the connection line area of feature point and another feature point , , and , represents the total number of feature points in the feature point set; obtain the total number of pedestrians whose vertical distance from the connection line between feature point and is less than a preset distance threshold within the current time period t, and assign it to , and construct an n×n pedestrian matrix, denoted as: ; An initial path planning module, which is used to generate an initial heuristic path based on the initial starting point, target point of the robot and the pedestrian matrix of the current period, based on the set of feature points, and use the Risk-RRT algorithm to make the robot move along the initial heuristic path; among them, generating the initial heuristic path includes: initializing the initial starting point, target point and the pedestrian matrix of the current period, and initializing the RRT to be empty; based on the pedestrian matrix of the current period, delete the current obstacle points in the set of feature points to obtain an updated set of feature points; use the initial starting point of the robot as the initial state point, and in the updated set of feature points, obtain the feature point with the smallest Euclidean distance from the initial state point as the next state point and add it to the RRT; use the next state point as the current state point, and obtain the feature point with the smallest Euclidean distance from the current state point as the new current state point; repeatedly obtain the feature point with the smallest Euclidean distance from the new current state point, expand the path along the system dynamics model, and update the RRT until the updated RRT contains the target point; based on the updated RRT, generate an initial heuristic path from the initial starting point to the target point; A sudden crowd judgment module, which is used to use the pedestrian clustering dynamic matrix algorithm to update the pedestrian clustering dynamic matrix based on the pedestrian matrix and the average pedestrian walking speed at a preset time step; compare the values of each element in the updated pedestrian clustering dynamic matrix with the preset pedestrian threshold: if there is an element in the pedestrian clustering dynamic matrix whose value is not less than the preset pedestrian threshold, and the area where the element is located is on the unpassed path of the robot on the heuristic path, then judge that a sudden crowd appears on the heuristic path; A minimum distance obstacle acquisition module, which is used to use the depth-first search algorithm to obtain all obstacles in the map; extract and sort multiple neighborhood feature points of each obstacle to generate a core ring structure corresponding to each obstacle; obtain the obstacle with the minimum distance from the sudden crowd; if the minimum distance does not exceed the preset aggregation threshold, then based on the core ring structure of the obstacle, extract its corresponding neighborhood feature points; A path replanning module, which is used to use the neighborhood feature points of the obstacle corresponding to the minimum distance, use the current robot position as the current starting point, keep the target point unchanged, and use the Risk-RRT algorithm to perform path planning again to generate a non-homotopic reverse loop path; The navigation module is used to make the robot travel along the non-homotopic reverse loop path, and repeatedly execute the sudden crowd judgment module, the minimum distance obstacle acquisition module and the path replanning module until the robot reaches the target point.