Robot path planning method based on large language model guidance
The path planning method guided by a large language model solves the problems of computational resource consumption and path adjustment in dynamic obstacle environments of traditional algorithms, realizes efficient and intelligent path planning, and improves the robot's adaptability and safety in complex environments.
Patent Information
- Application Number
- CN202511662345.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2045-11-13
AI Technical Summary
Traditional path planning algorithms consume excessive computational resources in dynamic obstacle environments and struggle to efficiently adjust planning strategies, leading to path failures or suboptimal results, and are unable to respond to complex environmental changes in real time.
A path planning method guided by a large language model is adopted. By discretizing the environment space, the collision area is calculated in real time, and obstacle sampling distribution and node sampling distribution are generated. Combined with tolerance verification and cost function optimization, an efficient and reliable path is generated.
It significantly improves the efficiency and intelligence of path planning, enabling robots to respond quickly to environmental changes, enhancing their adaptability and safety in complex environments, and improving system stability and user experience.
Smart Images

Figure CN121163528A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of robot path planning, and particularly relates to a robot path planning method based on large language model guidance. BACKGROUND
[0002] With the rapid development of unmanned driving, service robots and industrial automation technology, robots are increasingly widely used in complex dynamic environments. Path planning, as a core function, directly determines the safety and efficiency of robot task execution. In warehouse logistics, disaster rescue and other scenarios, the environment often contains a large number of movable obstacles. The position and state of these obstacles change in real time, making path planning face serious challenges. Robots not only need to avoid static obstacles, but also need to dynamically respond to the interaction behavior of movable obstacles, which puts higher requirements on the real-time and adaptability of path planning.
[0003] Traditional path planning algorithms such as A* algorithm and Rapidly-exploring Random Tree (RRT) have shown good performance in static obstacle environments, but their design logic is difficult to adapt to dynamic scenarios. These methods rely on fixed environment models. When movable obstacles appear, they cannot identify the dynamic blocking relationship of obstacles in real time, nor can they efficiently adjust the planning strategy. On the one hand, the search space expands exponentially with the number of movable obstacles, leading to excessive consumption of computing resources. On the other hand, due to the lack of dynamic decision-making ability for obstacle movement order and target position, path failure or non-optimal problems often occur, limiting the applicability in complex dynamic environments.
[0004] Therefore, there is an urgent need for a new path planning method to provide robots with more intelligent, efficient and reliable path planning. SUMMARY
[0005] The purpose of the present application is to overcome the defects in the prior art and provide a robot path planning method based on large language model guidance.
[0006] The present application provides a robot path planning method based on large language model guidance, comprising: Discretizing the environment space, establishing the robot configuration space and the obstacle configuration space; Real-time calculation of the accurate distance between the robot and the obstacle, marking the collision area, and then determining the free space available for the robot to walk; Dividing the free space into several connected components and updating the connected components in real time; Extracting the relative position and blocking relationship of the obstacle and the target, and generating a prompt text; Calling a large language model to analyze the prompt text and output a recommended obstacle ID list; The large language model recommendation obstacle is converted into an obstacle sampling distribution and a node sampling distribution, and a path tree is obtained; A high-value node is selected from the path tree according to the node sampling distribution, and an obstacle is selected according to the obstacle sampling distribution, and a target pose is sampled in the obstacle configuration space to generate a new node; A candidate path is generated based on the new node, and each node of the candidate path is verified for tolerance, allowing the obstacle pose corresponding to the node to shift within a preset range; When the target region is connected to the connected component, the current path is added to the solution set library, and the optimal solution is selected from the solution set library according to the cost function.
[0007] Further, the robot configuration space and the obstacle configuration space are both poses, and the pose is a two-dimensional position and an orientation.
[0008] Further, the calculation process of the collision region is: ; Where is determined by the distance formula ; Where, is the collision region at time t, is the collision region of the i-th obstacle at time t, is the collision distance function, is the position of the robot, i.e. = , is the i-th obstacle, is the total number of obstacles, represents taking the minimum distance for each point in the feature point set of the obstacle , , rotating the coordinates of the feature point by an angle θ , is the radius of the robot.
[0009] Further, the calculation process of the relative position of the obstacle and the target is: ; The blocking relationship is: when the spatial position of the first obstacle is in the line region of the second obstacle and the current position of the robot, it is determined that the direct reachable path between the second obstacle and the robot is blocked by the first obstacle.
[0010] Further, the obstacle sampling distribution construction process is: Based on the recommended obstacle ID list output by the large language model, define the obstacle sampling distribution: ; Wherein, ∈(0,1), is a preset preference weight, is the number of elements in the set is the current set of operable obstacles, is the i-th obstacle in the candidate obstacle set, is the total number of obstacles, is the obstacle associated with the large language model decision; The node sampling distribution construction process is: ; Wherein, is the preference weight of the high-score node; is the total node set of the path tree, is the high-score node set, , is a single node in the path tree; is a dummy variable used to traverse the elements in the set .
[0011] Further, the candidate path is a path from the root node to the new node backtracking: ; Wherein, , determine the connected component of node k on the candidate path and the obstacle pose vector; , the operation action of node k, wherein, is the pose before the obstacle moves, is the pose after the obstacle moves; The candidate path is an intermediate result generated dynamically by the path tree during the expansion process.
[0012] Further, the tolerance verification is implemented by a tolerance path verifier, the input is the candidate path, and the output is a feasibility Boolean value, including: Establish a neighborhood with a radius of ε for each node of the candidate path, allowing a small deviation within the range of ε for the position of the candidate path node; Check if there is an alternative path satisfies: ; Wherein, is node k of the candidate path, is node k of the alternative path, neighborhood, allowable position error range, : path node index, all nodes from root node to end point; for each , verify: ; output reachability decision: ; wherein, target area that the robot needs to reach, : free space connected component of alternative path node k, safe area of the current position of the robot, : obstacle pose of alternative path node k, : free configuration space, safe area where the obstacle can be placed.
[0013] Further, the process of selecting the optimal solution in the solution set library is: select the minimum cost function: ; wherein, weight coefficient, optimal path, solution set library, path length, total distance or step number of the robot movement, linear distance of the kth step obstacle movement.
[0014] Further, if the reachability decision is , a new node is regenerated.
[0015] Further, the process of generating the new node is: sample a node from the current path tree according to the node sampling distribution select a parent node to be expanded ; select an obstacle that can be moved according to the distribution ; ; sample a new pose in the configuration space of the obstacle ; generate the movement action of the obstacle ; ; update the connected component and the obstacle pose vector by combining the parent node and the movement action of the obstacle, and generate a new node.
[0016] Compared with the prior art, the present application has the beneficial effects that: The application significantly improves the efficiency and intelligence level of robot path planning by introducing a large language model. Real-time collision detection and connected component analysis ensure a safe operating environment for the robot. Structured semantic prompt generation is closely integrated with large language model reasoning, enabling intelligent interpretation and decision-making in complex environments.
[0017] The dynamic target detection and optimization capability of the application enables the robot to quickly respond to environmental changes and select the optimal path. In warehouse logistics and disaster rescue scenarios, the application not only improves operational efficiency but also enhances adaptability and safety in unpredictable environments, demonstrating great practical value and innovation potential. The combination of non-uniform distribution structure and tolerance verification optimizes the search strategy while ensuring the reliability and fault tolerance of the path, greatly enhancing the stability and user experience of the system. BRIEF DESCRIPTION OF DRAWINGS
[0018] The following drawings are only illustrative and explanatory of the application and do not limit the scope of the application, in which: Figure 1 : Path planning method flowchart of the application; Figure 2 : Path expansion-verification-dynamic detection interaction architecture diagram; Figure 3 : Update path optimal solution flowchart. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical scheme, design method and advantages of the application more clear and clear, the following will be further described in detail by specific embodiments combined with the drawings. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application.
[0020] The application provides a robot path planning method based on large language model guidance. By spatial discretization, the continuous environment is mapped to the robot configuration space and obstacle configuration space. Combined with real-time collision detection and incremental connected component analysis, the reachable safety area of the robot is dynamically tracked. When the obstacle moves, only the connected components of the affected area are calculated to avoid global update, and the connectivity of the robot in the target area and the accessibility relationship of the target area , providing an efficient and reliable environment perception basis for path planning. Extract obstacle position, blocking relationship and target distance features to generate structured Prompt, use large language model (LLM) to output multiple candidate obstacle recommendation lists , and construct a non-uniform sampling distribution through a probability deviation conversion mechanism. Introduce error degradation mechanism (when invalid recommendations ) to ensure robustness, combined with node value scoring Pushing the search to focus on high-potential areas, encoding semantic decisions (such as prioritizing moving obstacles closer to the goal) as probability biases significantly reduces invalid sampling. From tolerance verification (constructing neighborhood verification alternative path existence), gradual expansion control (by expected divergence strictly guaranteeing probability convergence to 1) to dynamic target detection (checking and selecting the minimum cost path in real time) hierarchical cooperation. Without limiting time, by tolerance band buffering numerical errors, combining non-uniform sampling distribution and cost function optimization to achieve fast return and continuous optimization of feasible paths, ensuring probability completeness.
[0021] Specifically, as shown in the embodiment of the application, the robot path planning method based on large language model guidance comprises: Figure 1 Discretizing the environment space, establishing the robot configuration space and the obstacle configuration space; Real-time calculation of the accurate distance between the robot and the obstacle, marking the collision area, and then determining the free space available for the robot to walk; Dividing the free space into several connected components and updating the connected components in real time; Extracting the relative position and blocking relationship of the obstacle and the target, and generating a prompt text; Calling a large language model to analyze the prompt text and output a recommended obstacle ID list; Converting the large language model recommended obstacle into an obstacle sampling distribution and a node sampling distribution to obtain a path tree; Selecting high-value nodes from the path tree according to the node sampling distribution, selecting obstacles according to the obstacle sampling distribution, and sampling target poses in the obstacle configuration space to generate new nodes; Generating candidate paths based on the new nodes, and performing tolerance verification on each node of the candidate paths to allow the obstacle pose corresponding to the node to deviate within a predetermined range; When the target region is detected to be connected to the connected component, the current path is added to the solution set library, and the optimal solution is selected from the solution set library according to the cost function.
[0022] The process of establishing the robot configuration space and the obstacle configuration space is: Robot space modeling: simplify the robot as a disc model with a radius r (such as r = 0.2m), and define P = {(x, y, θ) | (x, y) ∈ Ω, θ ∈ [0, 2π]}, where Ω is the environment boundary rectangular region; Obstacle space modeling: For each obstacle , calculate its minimum bounding box (AABB), generate configuration space: ; Non-moving obstacle is marked as , which is fixed and unchanging; The Cartesian product of and in the above formula constitutes the full state space , which provides a discrete operation basis for subsequent planning.
[0023] The process of marking the collision region is: For each obstacle , calculate the minimum distance between the robot disc and the obstacle polygon: ; Where is the coordinate of the vertex after rotating around the center of the obstacle ; If , then , real-time collision map update, output dynamic collision region set: ; In this embodiment, The boundary of is determined by the obstacle pose , and the moving obstacle pose changes in real time, which provides the basis for free space analysis; The process of calculating the free space is: The process of segmenting the free space is: Discretize into a grid map (resolution , such as ), use breadth-first search (BFS) to identify all connected regions ; Locate the component where the robot is located: Solve the component that satisfies ; Incremental update mechanism: if the obstacle movement only affects the local area, only re-run BFS for the changed area to avoid global recalculation.
[0024] In this embodiment, is the core indicator of path accessibility: the intersection of target and is not empty is the path planning termination condition.
[0025] The process of extracting the relative positions and obstruction relationships between obstacles and the target, and generating prompt text, is as follows: Environmental feature extraction, calculation of the relative positions of obstacles and targets: ;
[0026] Identify blocking relationships: If lie in On the path connecting to the robot, it is marked That is, when the obstacle The spatial position is in the obstacle When within the area connected to the robot's current position, determine The direct reachable path between the robot and the robot is Blocking, denoted as a blocking relationship. ; LLM outputs JSON-formatted prompt text based on a pre-designed Prompt framework; the Prompt framework is: { "task": "Plan the robot's path to the target area, and recommend obstacles that need to be moved". "environment":{ "robot_position": [x_r, y_r], "goal_region": [[x_g1, y_g1], [x_g2, y_g2], ...], "movable_obstacles": [ { "id": "obs1", "position": [x1, y1], "distance_to_goal": d1, "is_blocked": true / false, "is_near_robot": true / false }, ... ] }, "rules": [ "Only 3 unblocked obstacles are recommended (is_blocked=false)". "Prioritize recommending obstacles closest to the target" Minimize the total distance the robot moves. ], "output_format": "Returns a list of obstacle IDs, such as: ['obs3', 'obs5']" } The process of outputting the recommended list of obstacle IDs is as follows: Input the structured Prompt text into the LLM and output a list of recommended obstacle IDs. ; In this embodiment, the error handling mechanism for LLM output is as follows: Error detection: If the output is a non-standard list of IDs (such as a natural language description), a retry will be triggered.
[0027] Content validity verification: Check If either of the above two conditions is not met, the recommendation is deemed invalid.
[0028] The process of constructing the obstacle sampling distribution is as follows: Based on the list of recommended obstacle IDs output by the large language model, the obstacle sampling distribution is defined as follows:
[0029] in, ∈(0,1), representing the preset preference weights. For set The number of elements, For the currently operable set of obstacles, Let i be the i-th obstacle in the set of candidate obstacles. Obstacles associated with decision-making in large language models; The node sampling distribution construction process is as follows: Node value rating: If a new node If the obstacles recommended by LLM are moved during the generation process, then... The valuation is increased by an additional 1 unit of free space, raising its priority. If the obstacles recommended by LLM are not used, then... Valuation and basic nodes Consistent, with unchanged priority, that is: ; High-resolution node set: free space ; Distribution function: ; in, The preference weights for high-scoring nodes; The set of all nodes in the path tree. For the high-scoring node set, , for a single node in the path tree; is a dummy variable for iterating over the elements of a collection .
[0030] As shown in Figure 2 , in this embodiment, the candidate path is a path from the root node to the new node backtracking: ; wherein, , the connected component of node k on the candidate path and the obstacle pose vector; , the operation action of node k, wherein, is the pose of the obstacle before moving, is the pose of the obstacle after moving.
[0031] The tolerance verification is implemented by a tolerance path verifier, the input is the candidate path, and the output is a feasibility Boolean value, including: Define the ε-tolerance band: For each node τq in the path, establish a neighborhood with a radius of ε: ; wherein ε>0 is a preset tolerance parameter (default ε=0.1); : the obstacle pose vector of the original path point; ; the obstacle pose vector of the alternative path point; Check whether there is an alternative path satisfying: ; wherein, is node k of the candidate path, is node k of the alternative path, is the neighborhood, the allowed position error range, : path node index, all nodes from the root node to the end point; For each , verify: ; output the reachability decision: ; wherein, is the target area that the robot needs to reach, is the free space connected component of the alternative path node k, the safe area of the current position of the robot, is the obstacle pose of the alternative path node k, is the free configuration space, the safe area where the obstacle can be placed; wherein, The meaning of "safe region" is that at each position of the alternative path, the safe region of the robot must contain the target point (or be connected with the target region), ensuring that the robot can actually reach the end point from that position (there is no completely isolated region); the new position of the obstacle in the alternative path must be legal (not hitting the wall / not overlapping), and the obstacle cannot be stuck in the wall after moving, nor can it collide with other objects (such as shelves cannot be embedded in the wall).
[0032] The new node , the target region is input, and the output is a termination signal or a continue instruction, and the termination signal is the optimal path solution. Among them, the new node The complete state representation of the new node generated by the progressive expansion controller is described , and its core meaning is to dynamically capture the environmental changes and accessibility information in robot path planning. Specifically, it is decomposed as follows: : The free space connected component (i.e. the safe region without obstacles) where the robot is located at time , : The pose vector of all obstacles at time , that is , where is the position and orientation of the th obstacle. Specifically, it includes: As shown in Figure 3 , the dynamic target detector receives the newly added node ; calculates whether is empty and performs accessibility determination: ; Among them, : The target region that the robot needs to reach, : The safe region without obstacles around the new node ; The generation process of the new node : Select a parent node to be expanded from the node sampling distribution in the path tree; select a movable obstacle according to the obstacle sampling distribution ; sample a new pose in the configuration space of the obstacle , generate the moving action of the obstacle ; update the connected component and the obstacle pose vector, and generate a new node by combining the moving action of the parent node and the obstacle.
[0033] If the output is , the new node Joining solution set updating the current optimal solution according to the cost function; If multiple reachable nodes are detected selecting the minimum cost function: ; wherein, is a weight coefficient, is an optimal path, is a solution set library, is a path length, total distance or step number of robot movement, is a straight line distance of the kth step obstacle movement.
[0034] Embodiments of the application have been described above, with the understanding that the above description is intended to be illustrative and not exhaustive or limited to the disclosed embodiments. Numerous modifications and adaptations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The scope of the embodiments should be determined by the appended claims, along with the full scope of equivalents to which such claims are entitled. The claims, by themselves, presented below are not intended to be exhaustive or to limit the application to the precise forms disclosed. The claims, by themselves, presented below are not intended to be exhaustive or to limit the application to the precise forms disclosed. The terminology used by the inventor or others involved in the manufacture, use or sale of the applications described herein is intended to be taken art- specific and descriptive (and not a limitation) as per the statutory provisions of 35 U.S.C. § 112.
Claims
1. A robot path planning method guided by a large language model, characterized in that, include: Discretize the environmental space to establish robot configuration space and obstacle configuration space; The robot calculates the precise distance between itself and obstacles in real time, marks the collision area, and then determines the free space available for the robot to move in. The free space is divided into several connected components, and the connected components are updated in real time. Extract the relative positions and obstruction relationships between obstacles and the target, and generate prompt text; The large language model is invoked to parse the prompt text and output a list of recommended obstacle IDs. The obstacles recommended by the large language model are transformed into obstacle sampling distribution and node sampling distribution to obtain a path tree; High-value nodes are selected from the path tree based on node sampling distribution, obstacles are selected based on obstacle sampling distribution, target poses are sampled in the obstacle configuration space, and new nodes are generated. Candidate paths are generated based on new nodes, and tolerance verification is performed on each node of the candidate path, allowing the pose of the obstacle corresponding to the node to shift within a preset range. When a target region is detected to be connected to a connected component, the current path is added to the solution set library, and the optimal solution is selected from the solution set library according to the cost function.
2. The robot path planning method based on a large language model as described in claim 1, characterized in that, Both the robot configuration space and the obstacle configuration space are poses, and the pose is a two-dimensional position and orientation.
3. The robot path planning method based on a large language model as described in claim 1, characterized in that, The calculation process for the collision region is as follows: ; in From the distance formula Sure; in, Let be the collision region at time t. Let i be the collision region of the i-th obstacle at time t. Let the collision distance function be... The position of the robot, i.e. = , For the i-th obstacle, The total number of obstacles. Indicates obstacles feature point set Each point in Take the minimum distance. For feature points Rotate around the center of the obstacle θ Coordinates after angle Let be the radius of the robot.
4. The robot path planning method based on a large language model as described in claim 3, characterized in that, The calculation process for the relative position of the obstacle and the target is as follows: ; The blocking relationship is as follows: when the spatial position of the first obstacle is within the line area connecting the second obstacle and the robot's current position, it is determined that the direct reachable path between the second obstacle and the robot is blocked by the first obstacle.
5. The robot path planning method based on a large language model as described in claim 4, characterized in that, The process for constructing the obstacle sampling distribution is as follows: Based on the list of recommended obstacle IDs output by the large language model, the obstacle sampling distribution is defined as follows: ; in, ∈(0,1), representing the preset preference weights. For set The number of elements, For the currently operable set of obstacles, Let i be the i-th obstacle in the set of candidate obstacles. The total number of obstacles. Obstacles associated with decision-making in large language models; The node sampling distribution construction process is as follows: ; in, The preference weights for high-scoring nodes; The set of all nodes in the path tree. For the high-scoring node set, , A single node in the path tree; It is a dummy variable used to iterate over a collection. The elements in.
6. The robot path planning method based on a large language model as described in claim 5, characterized in that, The candidate path is a backtracking path from the root node to the new node: ; in, That is, determining candidate paths The connected components of the upper node k and the pose vector of the obstacle; That is, the operation action of node k, where... The pose of the obstacle before it moves. The pose of the obstacle after it has moved; The candidate path is an intermediate result dynamically generated during the expansion of the path tree.
7. The robot path planning method based on a large language model as described in claim 6, characterized in that, The tolerance verification is implemented through a tolerance path validator, with candidate paths as input and feasibility boolean values as output, including: For each node of the candidate path, a neighborhood with a radius of ε is established, allowing small offsets of the candidate path node positions within the range of ε. Check if there is an alternative path satisfy: ; in, Let k be the node of the candidate path. For node k of the alternative path, For the neighborhood, the allowable range of positional errors is... : Path node index, representing all nodes from the root node to the destination node; For each ,verify: ; Output reachability determination: ; in, The target area that the robot needs to reach. : The free-space connected component that replaces path node k, representing the safe zone of the robot's current position. : The obstacle pose that replaces path node k : A freely configurable space, a safe area where obstacles can be placed.
8. The robot path planning method based on a large language model as described in claim 7, characterized in that, The process of selecting the optimal solution from the solution set is as follows: Choose the cost function that is minimized: ; in, These are the weighting coefficients. The optimal path, To solve the library, The path length is the total distance or number of steps the robot moves. Let be the straight-line distance the obstacle moves in the k-th step.
9. The robot path planning method based on a large language model as described in claim 8, characterized in that, If the reachability determination is Then, a new node is generated.
10. A robot path planning method based on a large language model as described in claim 9, characterized in that, The process of generating the new node is as follows: Sampling distribution by node from the current path tree Select a parent node to be expanded. ; By distribution Select a movable obstacle ; In the obstacle Configuration space In the middle, sample a new pose Generate obstacles movement actions ; Combine parent node Based on the movement of obstacles, update the connected components and obstacle pose vectors, and generate new nodes.
Citation Information
Patent Citations
Exhibition hall robot visual language navigation method based on large model
CN119309580A
Robot path planning method based on RRT improved algorithm
CN119321769A
Robot path planning perception method and system based on large language model
CN119414833A
Automatic driving vehicle path planning method and device based on large language model, equipment and medium
CN119756400A
Robot navigation method based on three-dimensional semantic map and large language model
CN120293150A
Cited By
Robot path planning method and device and robot
CN121589827A