A robot path planning method based on large language model guidance
The path planning method guided by a large language model solves the problem of excessive computational resource consumption in traditional algorithms in dynamic obstacle environments, and realizes efficient and intelligent path planning, ensuring that robots can respond safely and quickly in complex environments, and improving operational efficiency and adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN JIAOYUAN ENERGY TECH CO LTD
- Filing Date
- 2025-11-13
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional path planning algorithms consume excessive computational resources in dynamic obstacle environments and struggle to respond in real time to the dynamic blocking relationships of movable obstacles, leading to path failures or suboptimal results. They fail to meet the real-time and adaptability requirements of complex dynamic environments.
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, an obstacle ID list is generated, a path tree is constructed, node sampling and tolerance verification are performed, and the optimal solution is finally selected by combining cost function optimization.
It significantly improves the efficiency and intelligence of path planning, enabling robots to respond quickly to environmental changes, improve operational efficiency and safety in complex environments, and enhance adaptability and system stability in unpredictable environments.
Smart Images

Figure CN121163528B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robot path planning technology, and specifically relates to a robot path planning method guided by a large language model. Background Technology
[0002] With the rapid development of autonomous driving, service robots, and industrial automation technologies, robots are increasingly being used in complex and dynamic environments. Path planning, as a core function, directly determines the safety and efficiency of robot task execution. In scenarios such as warehousing and logistics, and disaster relief, the environment often contains a large number of movable obstacles. The positions and states of these obstacles change in real time, posing a severe challenge to path planning. Robots not only need to avoid static obstacles but also need to dynamically respond to the interactive behavior of movable obstacles, which places higher demands on the real-time performance and adaptability of path planning.
[0003] Traditional path planning algorithms, such as the A* algorithm and Rapid Expanding Random Tree (RRT), demonstrate good performance in static obstacle environments, but their design logic is difficult to adapt to dynamic scenarios. These methods mostly rely on fixed environmental models. When movable obstacles appear, they cannot identify the dynamic blocking relationships 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 computational resources. On the other hand, due to the lack of dynamic decision-making ability regarding the movement order of obstacles and the target position, path failure or suboptimal problems often occur, limiting their 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 of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a robot path planning method based on a large language model.
[0006] This invention provides a robot path planning method guided by a large language model, comprising:
[0007] Discretize the environmental space to establish robot configuration space and obstacle configuration space;
[0008] 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.
[0009] The free space is divided into several connected components, and the connected components are updated in real time.
[0010] Extract the relative positions and obstruction relationships between obstacles and the target, and generate prompt text;
[0011] The large language model is invoked to parse the prompt text and output a list of recommended obstacle IDs.
[0012] The obstacles recommended by the large language model are transformed into obstacle sampling distributions and node sampling distributions to obtain a path tree;
[0013] 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.
[0014] 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.
[0015] 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.
[0016] A further embodiment is that both the robot configuration space and the obstacle configuration space are poses, and the poses are two-dimensional positions and orientations.
[0017] A further approach is to calculate the collision region as follows:
[0018] ;
[0019] in From the distance formula ;Sure;
[0020] 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 θ Coordinates after angle Let be the radius of the robot.
[0021] A further approach involves calculating the relative position of the obstacle and the target as follows:
[0022] ;
[0023] 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.
[0024] A further approach is that the obstacle sampling distribution construction process is as follows:
[0025] Based on the list of recommended obstacle IDs output by the large language model, the obstacle sampling distribution is defined as follows:
[0026] ;
[0027] 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;
[0028] The node sampling distribution construction process is as follows:
[0029] ;
[0030] 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.
[0031] A further approach is to define the candidate path as a backtracking path from the root node to the new node:
[0032] ;
[0033] 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;
[0034] The candidate path is an intermediate result dynamically generated during the expansion of the path tree.
[0035] A further approach is that the tolerance verification is implemented through a tolerance path validator, with candidate paths as input and feasibility boolean values as output, including:
[0036] 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 ε.
[0037] Check if there is an alternative path satisfy:
[0038] ;
[0039] 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;
[0040] For each ,verify:
[0041] ;
[0042] Output reachability determination:
[0043] ;
[0044] 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.
[0045] A further approach involves selecting the optimal solution from the solution set as follows:
[0046] Choose the cost function that is minimized:
[0047] ;
[0048] 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.
[0049] A further solution is that if the reachability determination is... Then, a new node is generated.
[0050] A further proposed solution is that the process for generating the new node is as follows:
[0051] Sampling distribution by node from the current path tree Select a parent node to be expanded. ;
[0052] By distribution Select a movable obstacle ;
[0053] In the obstacle Configuration space In the middle, sample a new pose Generate obstacles movement actions ;
[0054] Combine parent node Based on the movement of obstacles, update the connected components and obstacle pose vectors, and generate new nodes.
[0055] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0056] This invention significantly improves the efficiency and intelligence 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, while the close integration of structured semantic prompt generation and large language model reasoning enables intelligent interpretation and decision-making in complex environments.
[0057] The dynamic target detection and optimization capabilities of this invention enable robots to respond rapidly to environmental changes and select the optimal path. In applications such as warehousing logistics and disaster relief, this not only improves operational efficiency but also enhances adaptability and safety in unpredictable environments, demonstrating significant practical value and innovative potential. The combination of non-uniform distribution construction and tolerance verification optimizes the search strategy while ensuring path reliability and fault tolerance, greatly enhancing system stability and user experience. Attached Figure Description
[0058] The following figures are for illustrative purposes only and are not intended to limit the scope of the invention, wherein:
[0059] Figure 1 : A schematic diagram of the path planning method of this invention;
[0060] Figure 2 Path Expansion-Verification-Dynamic Detection Interaction Architecture Diagram;
[0061] Figure 3 : Schematic diagram of the process for updating the optimal solution of the path. Detailed Implementation
[0062] To make the objectives, technical solutions, design methods, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0063] This invention provides a robot path planning method based on a large language model. By spatial discretization, a continuous environment is mapped into a robot configuration space and an obstacle configuration space. Combined with real-time collision detection and incremental connected component analysis, the method dynamically tracks the robot's reachable safe zone. When an obstacle moves, only the connected components of the affected region are calculated, avoiding global updates, and the connected component where the robot is located is output in real time. Relationship with accessibility to the target area This provides an efficient and reliable environmental perception foundation for path planning. Features such as obstacle location, obstruction relationships, and target distance are extracted to generate a structured prompt, and a large language model (LLM) is used to output a multi-candidate obstacle recommendation list. A non-uniform sampling distribution is constructed through a probability bias transformation mechanism. An error degradation mechanism is introduced (in case of invalid recommendations). To ensure robustness, node value scoring is used. This approach drives search to focus on high-potential areas, encoding semantic decisions (such as prioritizing moving obstacles closer to the target) as probabilistic biases, significantly reducing invalid sampling. It also facilitates tolerance-based validation (building...). Neighborhood verification of alternative path existence), progressive expansion control (through expected divergence) Strictly guarantee that the probability converges to 1) for dynamic target detection (real-time inspection) And select the least cost path) for layered collaboration. Without time constraints, through... The tolerance band buffers numerical errors, and the optimization is achieved by combining non-uniform sampling distribution with cost function. Achieve rapid return and continuous optimization of feasible paths, ensuring probabilistic completeness.
[0064] Specifically, such as Figure 1 As shown, in this embodiment of the invention, the robot path planning method guided by a large language model includes:
[0065] Discretize the environmental space to establish robot configuration space and obstacle configuration space;
[0066] 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.
[0067] The free space is divided into several connected components, and the connected components are updated in real time.
[0068] Extract the relative positions and obstruction relationships between obstacles and the target, and generate prompt text;
[0069] The large language model is invoked to parse the prompt text and output a list of recommended obstacle IDs.
[0070] The obstacles recommended by the large language model are transformed into obstacle sampling distributions and node sampling distributions to obtain a path tree;
[0071] 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.
[0072] 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.
[0073] 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.
[0074] The process of establishing the robot configuration space and obstacle configuration space is as follows:
[0075] Perform spatial modeling of the robot: simplify the robot into a disk model with radius r (e.g., r=0.2m), and define P={(x,y,θ)|(x,y)∈Ω,θ∈[0,2π]}, where Ω is the rectangular region of the environmental boundary;
[0076] Perform obstacle space modeling:
[0077] For each obstacle Calculate its minimum bounding box (AABB) and generate the configuration space:
[0078] ;
[0079] Non-moving obstacles are marked as ,That Fixed and unchanging;
[0080] In the above formula and The Cartesian product constitutes the complete state space. This provides a basis for discretization operations in subsequent planning.
[0081] The process of marking the collision region is as follows:
[0082] For each obstacle Calculate the minimum distance between the robot disk and the obstacle polygon:
[0083] ;
[0084] in As vertices Rotate around the center of the obstacle The coordinates after;
[0085] like ,but Real-time collision map updates, outputting a dynamic set of collision regions:
[0086] ;
[0087] In this embodiment, The boundary is determined by the obstacle pose. It was decided that the pose of moving obstacles needs to be recalculated in real time to provide a basis for free space analysis;
[0088] The process of calculating free space is as follows:
[0089] ;
[0090] The process of dividing free space is as follows:
[0091] Will Discretize into a raster map (resolution) ,like Breadth-first search (BFS) is used to identify all connected components. ;
[0092] The component in which the robot is located:
[0093] Solve for the condition The amount ;
[0094] Incremental update mechanism: If the movement of an obstacle only affects a local area, BFS is rerun only for the changed area to avoid global recalculation.
[0095] In this embodiment, The core metric for path reachability: target and The intersection is non-empty This is the termination condition for path planning.
[0096] The process of extracting the relative positions and obstruction relationships between obstacles and the target, and generating prompt text, is as follows:
[0097] Environmental feature extraction, calculation of the relative positions of obstacles and targets:
[0098] ;
[0099] 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. ;
[0100] LLM outputs JSON-formatted prompt text based on a pre-designed Prompt framework; the Prompt framework is:
[0101] {
[0102] "task": "Plan the robot's path to the target area, and recommend obstacles that need to be moved".
[0103] "environment":{
[0104] "robot_position": [x_r, y_r],
[0105] "goal_region": [[x_g1, y_g1], [x_g2, y_g2], ...],
[0106] "movable_obstacles": [
[0107] {
[0108] "id": "obs1",
[0109] "position": [x1, y1],
[0110] "distance_to_goal": d1,
[0111] "is_blocked": true / false,
[0112] "is_near_robot": true / false
[0113] }, ... ]
[0115] },
[0116] "rules": [
[0117] "Only 3 unblocked obstacles are recommended (is_blocked=false)".
[0118] "Prioritize recommending obstacles closest to the target"
[0119] Minimize the total distance the robot moves.
[0120] ],
[0121] "output_format": "Returns a list of obstacle IDs, such as: ['obs3', 'obs5']"
[0122] }
[0123] The process of outputting the recommended list of obstacle IDs is as follows:
[0124] Input the structured Prompt text into the LLM and output a list of recommended obstacle IDs. ;
[0125] In this embodiment, the error handling mechanism for LLM output is as follows:
[0126] Error detection: If the output is a non-standard list of IDs (such as a natural language description), a retry will be triggered.
[0127] Content validity verification: Check If either of the above two conditions is not met, the recommendation is deemed invalid.
[0128] The process of constructing the obstacle sampling distribution is as follows:
[0129] Based on the list of recommended obstacle IDs output by the large language model, the obstacle sampling distribution is defined as follows:
[0130]
[0131] 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;
[0132] The node sampling distribution construction process is as follows:
[0133] 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:
[0134] ;
[0135] High-resolution node set: free space ;
[0136] Distribution function:
[0137] ;
[0138] 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.
[0139] like Figure 2 As shown, in this embodiment, the candidate path is a backtracking path from the root node to the new node:
[0140] ;
[0141] 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.
[0142] Tolerance validation is implemented through a tolerance path validator, which takes candidate paths as input and outputs feasibility boolean values, including:
[0143] Define the ε-tolerance band:
[0144] For each node τq(k)=[N(k),c(k)] in the path, establish a neighborhood with radius ε:
[0145] ;
[0146] Where ε>0 is the preset tolerance parameter (default ε=0.1); : Obstacle pose vector of the original path point; Obstacle pose vectors that replace path points;
[0147] Check if there is an alternative path satisfy:
[0148] ;
[0149] 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;
[0150] For each ,verify:
[0151] Output reachability determination:
[0152] ;
[0153] in, The target area that the robot needs to reach. To replace the free-space connected components of path node k, the safe region of the robot's current position, To replace the obstacle pose of path node k, A safe area where obstacles can be placed to allow for flexible space configuration;
[0154] in, This means that at each position of the robot on the alternative path, its safe zone must contain the target point (or be connected to the target area), ensuring that the robot can actually reach the destination from that position (there is no completely isolated area); the new position of obstacles in the alternative path must be legal (do not hit walls / do not overlap), and obstacles cannot get stuck in walls or collide with other objects after being moved (e.g., shelves cannot be embedded in walls).
[0155] New node Target area As input, the output is either a termination signal or a continuation command; the termination signal represents the optimal path solution. The new node... Describes the new nodes generated by the progressive scaling controller. The complete state representation, its core significance lies in dynamically capturing environmental changes and accessibility information during robot path planning. A detailed breakdown follows: :time The connected component of the free space where the robot is located (i.e., the safe area without obstacles). :time The pose vectors of all obstacles, i.e. ,in It is the first The location and orientation of each obstacle. Specifically, this includes:
[0156] like Figure 3 As shown, the dynamic target detector receives newly added nodes. ;calculate Check if it is empty and perform reachability determination:
[0157] ;
[0158] in, The target area that the robot needs to reach. New node A safe zone with no obstacles in the surrounding area; a new node The generation process is as follows: sampling distribution from the path tree according to nodes. Select a parent node to be expanded. Sampling distribution according to obstacles Select a movable obstacle ; in the obstacle Configuration space In the middle, sample a new pose Generate obstacles movement actions Combined with parent node Based on the movement of obstacles, update the connected components and obstacle pose vectors, and generate new nodes.
[0159] If the output is , will new node Add to solution set Update the current optimal solution based on the cost function;
[0160] If multiple reachable nodes are detected Choose the cost function that minimizes:
[0161] ;
[0162] 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.
[0163] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
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 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 from the root node to... A backtracking path: ; 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