An automatic driving vehicle planning method based on flow matching of unstructured scenes
By using a flow matching-based generative planner that combines multi-scale top-down views and vehicle status, a trajectory that satisfies vehicle kinematic constraints is generated. This solves the problems of planning failure and trajectory non-compliance in unstructured scenarios, and achieves efficient, feasible, and comfortable autonomous driving planning.
Patent Information
- Application Number
- CN202511745831.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-11-26
AI Technical Summary
Existing autonomous vehicle planning methods suffer from problems such as planning failure, search space explosion, insufficient generalization ability, and trajectories that do not meet vehicle kinematic constraints in unstructured scenarios, making it difficult to achieve efficient, feasible, and comfortable planning.
A flow matching-based approach is adopted. An initial path is generated by training a generative planner offline, combining multi-scale top-view encoding and vehicle state, and applying curvature hard constraints through an optimization algorithm to output the final trajectory that satisfies the vehicle's driving.
It significantly improves the planning success rate in unstructured scenarios, reduces planning latency, ensures the kinematic feasibility and driving comfort of the trajectory, and has strong generalization ability and engineering deployability.
Smart Images

Figure CN121207207B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automatic driving, in particular to an automatic driving vehicle planning method based on flow matching in an unstructured scene. BACKGROUND
[0002] The application of automatic driving technology in structured roads (such as urban trunk roads and highways) has gradually matured, but in unstructured scenes (including construction sites, parking lots, temporarily changed road sections, snow-covered areas, and gravel-covered areas), the planning capability of vehicles still has significant bottlenecks. Such scenes lack clear lane lines or regular road structures, and the environmental constraints are complex and dynamic, which poses high requirements for the detour and escape planning of vehicles.
[0003] Existing automatic driving vehicle planning methods mainly fall into two categories, but both have obvious shortcomings:
[0004] Traditional planning methods based on search (such as hybrid A* algorithm, sampling tree algorithm, etc.): rely on discrete modeling of the environment and heuristic search to generate trajectories. However, in unstructured scenes, the feasible region is narrow and the obstacle distribution is complex, and such methods are prone to "search space explosion" or "planning failure (vehicle stuck)" problems; and to ensure real-time performance, the search duration is usually limited (such as within a few seconds), further reducing the planning success rate in complex scenarios.
[0005] Planning methods based on learning (including end-to-end learning and traditional deep learning models): learn the "perception-planning" mapping relationship through data-driven learning. However, real data for unstructured scenes is scarce and the annotation cost is extremely high, resulting in insufficient model generalization ability; at the same time, such methods are mostly "black box" outputs, lacking explicit safeguards for vehicle kinematic constraints (such as curvature limits, jerk constraints, etc.), and the generated trajectories may not be executable due to violation of vehicle physical limits.
[0006] In recent years, generative modeling techniques such as flow matching have shown advantages in "generating complex target distributions from simple distributions" in image generation and sequence modeling, providing new ideas for planning problems. However, existing flow matching models have defects in their application to automatic driving planning: general flow matching models are not customized for automatic driving scenarios, and cannot effectively integrate "environmental perception information (such as obstacles and reference lines)" and "vehicle state (such as vehicle position and speed)", nor can they be optimized in combination with vehicle kinematic constraints, resulting in trajectories that are difficult to directly use for detouring and escaping in unstructured scenes, or cannot meet the requirements of driving safety and comfort.
[0007] In summary, there is an urgent need for a technical solution that can leverage the creative generative capabilities of generative models to address the complex constraints of unstructured scenarios, while also integrating environmental perception and vehicle kinematic constraints to achieve "efficient, feasible, and comfortable" autonomous driving planning. Summary of the Invention
[0008] The purpose of this invention is to provide an autonomous vehicle planning method based on flow matching for unstructured scenarios, in order to solve the problems mentioned in the background art.
[0009] To achieve the above objectives, the present invention provides the following technical solution: an autonomous vehicle planning method for unstructured scenarios based on flow matching, comprising:
[0010] Collect real unstructured scene data, set uniform sampling target points in the scene data, generate geometrically feasible true trajectories through offline, time-unrestricted hybrid A* algorithm, and form a training set after processing and quality inspection of the true trajectories.
[0011] A conditional vector field is constructed by encoding and fusing reference lines, vehicle state and target information in a multi-scale top view. The intermediate state velocity residual is minimized through flow matching. Offline policy optimization is performed by combining multi-dimensional rewards. A generative planner is trained and used for flow matching model training.
[0012] Based on the perception information, the current frame environment is detected to generate a two-dimensional grid environment map. After adding the vehicle status, target point information and reference navigation line information, it is input into the trained generative planner, and an initial path is generated through iterative sampling.
[0013] Using the initial path as a warm start, an optimization objective function is constructed, a curvature hard constraint is applied, and an optimization algorithm is used to solve the optimization objective function to output the final trajectory that satisfies the vehicle's driving.
[0014] Preferably, the real unstructured scenario is a complex scenario where traditional search-based planning methods fail and vehicles are stuck. The complex scenario includes construction sites, parking lots, temporary road detours, snow-covered areas, or gravel-covered areas.
[0015] Preferably, the uniform sampling target points in the scene data are set as follows: 400-600 target points containing location information and orientation information are randomly sampled for each complex scene to cover the planning requirements of different locations and orientations within the scene;
[0016] The offline, time-unrestricted hybrid A* algorithm is specifically defined as follows: the maximum solution time limit of the hybrid A* algorithm is set to 100 seconds, and the distance cost to the global reference path is added to the heuristic cost function of the algorithm. The global reference path is obtained through a lane-based global planning algorithm. If the current scenario is an unstructured scenario with no lane information, the global reference path is not added.
[0017] Preferably, the multi-dimensional reward specifically includes:
[0018] State rewards: Set collision penalty weight W_collision=-100, curvature over-limit penalty weight W_κ=-100, and target not reached penalty weight W_miss=-100. The reaching condition is that the Euclidean distance between the target point and the trajectory endpoint is ≤0.5m.
[0019] Cumulative reward: The Bellman recursion is used to calculate the reward, which is Gt=rt+γ・Gt+1, where rt is the state reward at step t, γ is the discount factor and γ∈(0,1], and no discount is applied when γ=1.
[0020] Preferably, the multi-scale top-view encoding fusion reference line is specifically implemented by taking the two-dimensional grid environment map, the vehicle status annotation map, and the reference navigation line annotation map as three-channel top-view inputs, extracting image features through the ResNet model, and embedding the cumulative reward value of the vehicle status, target point information, and ground truth trajectory to form a multi-dimensional conditional feature layer.
[0021] Preferably, the flow matching model specifically involves: learning a time-dependent velocity field Vθ(t,x|c) to gradually transform the Gaussian noise distribution at t=0 into the true trajectory distribution at t=1; during training, a power function with an exponent of n is used to perform nonlinear sampling on time steps t∈[0,1], and the difference between the predicted velocity field value and the true path derivative is minimized through the mean square error loss function.
[0022] Preferably, the step of detecting the current frame environment based on perception information to generate a two-dimensional grid environment map specifically involves: fusing obstacle distance data from the lidar with semantic segmentation data from the camera, and marking obstacles and impassable areas on the two-dimensional grid map, with the grid resolution ensuring that the obstacle boundary accuracy is ≤0.1m;
[0023] The iterative sampling is set to 5 steps, and the velocity field is integrated using the numerical Euler method, iterating step by step from the Gaussian initialization state to the trajectory state at t=1.
[0024] Preferably, the optimization algorithm is used to solve the objective function, specifically: the outer layer uses the augmented Lagrange algorithm to transform constrained optimization into unconstrained optimization, and projects the inequality multipliers to non-negative values when updating the multipliers; the inner layer uses the L-BFGS quasi-Newton algorithm to minimize the objective function; the strict time budget for solving is ≤5ms, and if the timeout occurs, the current most feasible solution is returned to ensure the planning frequency.
[0025] Preferably, the application of curvature hard constraint specifically means that the curvature of any point on the trajectory is ≤1.379, and the proportion of trajectories with excessive curvature is ≤5%.
[0026] Preferably, the output that satisfies the final trajectory of the vehicle's travel further includes: time reparameterizing the geometric path with the goal of minimizing jerk, satisfying the hardware upper limit constraints of speed, acceleration, and jerk; isolating and densifying the final trajectory for vehicle shape expansion collision verification, with a minimum safe distance ≥0.3m, and if the standard is not met, the vehicle slows down and retreats, and finally outputs an executable trajectory in the form of spline coefficients or polynomial parameters.
[0027] Compared with the prior art, the beneficial effects of the present invention are:
[0028] 1. Significantly improves the planning success rate and detour / escape capabilities in unstructured scenarios.
[0029] Existing search-based planning methods (such as hybrid A* and sampling trees) are prone to planning failures and vehicle jams in unstructured scenarios (construction sites, snow-covered areas, temporary road detours, etc.) due to "search space explosion" or "complex environmental constraints." Traditional learning-based methods suffer from insufficient generalization ability due to a lack of targeted difficult examples for training. This application addresses this problem through two major designs: First, during the ground truth training set generation stage, "complex scenarios where traditional planning has failed" are specifically screened, and 400-600 target points covering multiple locations and orientations are sampled for difficult example enhancement to ensure that the model learns the core detour logic of unstructured scenarios. Second, the flow matching model, based on "multi-scale top-down view + vehicle / target state" conditions, can creatively generate escape paths that fit the navigation reference lines, avoiding deviation from the planning intent and effectively solving the problem of vehicle passage in scenarios without lane guidance and with irregular obstacles.
[0030] 2. Meets the high-frequency replanning requirements of autonomous driving, significantly reducing planning latency.
[0031] This application achieves low latency through an architecture of "offline training + online lightweight inference": the offline stage completes the full training of the flow matching model, bringing forward the complex distributed learning process; the online inference stage only requires 5 steps of iterative sampling (numerical Euler method) to generate the initial path, and with the backend optimization using the "augmented Lagrange + L-BFGS" algorithm, the solution time is strictly controlled to ≤5ms, compressing the overall planning latency to the level of traditional hybrid A / B algorithms. * The method is less than 1 / 20th the size, fully adapting to the real-time response requirements of autonomous vehicles in dynamic scenarios, and avoiding traffic congestion caused by planning delays.
[0032] 3. Ensure the kinematic feasibility and driving comfort of the trajectory.
[0033] This application ensures trajectory quality through a two-stage design of "front-end generation + back-end optimization": the front-end flow matching model initially selects paths that meet safety requirements through reward mechanisms such as "collision / curvature / arrival"; the back-end optimization stage further applies hard constraints such as "curvature ≤ 1.379 (adapting to the vehicle's maximum steering capability)", "jerk minimization" and "minimum safe distance ≥ 0.3m", while optimizing the speed curve through time reparameterization to ensure that the trajectory not only meets the vehicle's physical limits (no excessive curvature, rapid acceleration / deceleration) but also reduces passenger bumpiness by minimizing jerk, thus balancing "safety" and "comfort".
[0034] 4. Possesses strong generalization capabilities and engineering deployability, reducing practical application costs.
[0035] On the one hand, the hard example augmentation training set of this application covers multiple unstructured scenarios such as "construction sites, gravel areas, and temporary detours," and each scenario samples multiple target points, so that the flow matching model does not need to be retrained for a single scenario and can adapt to most irregular traffic scenarios. Its generalization ability is significantly better than that of traditional "scenario-specific" planning algorithms, reducing the development cost of multi-scenario adaptation. On the other hand, the "generative planner" output after the model is trained can be directly deployed in the autonomous driving system, and the "spline coefficients / polynomial parameters" output by the backend optimization can be directly connected to the downstream vehicle controller without additional format conversion or adaptation development. The engineering implementation difficulty is low, and it can be quickly applied to actual autonomous driving scenarios such as park logistics, mining construction, and emergency rescue. Attached Figure Description
[0036] Figure 1 A flowchart for generating truth datasets is provided for this invention;
[0037] Figure 2 A flowchart for iterative sampling planning in unstructured scenarios based on flow matching;
[0038] Figure 3Provide a schematic diagram of the environment grid for the model input;
[0039] Figure 4 Input the vehicle's state and target information into the model;
[0040] Figure 5 To output the trajectory result graph;
[0041] Figure 6 A schematic diagram of the closed-loop simulation planning results (I);
[0042] Figure 7 Schematic diagram of closed-loop simulation planning results (II)
[0043] Figure 8 This is a schematic diagram of the training loss results. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] Please see Figures 1 to 2 This invention provides a technical solution: an autonomous vehicle planning method for unstructured scenarios based on flow matching, comprising:
[0046] S100: Data is collected from real unstructured scenes. Target points are uniformly sampled in the collected scenes. A geometrically feasible true trajectory is generated using an offline, time-unrestricted hybrid A* algorithm. The true trajectory is then resampled, parameterized, and augmented with hard examples. After quality inspection based on trajectory length, minimum spacing, and curvature indicators, a training set containing scene, target, top-view conditions, true trajectory, and quality annotations is formed.
[0047] S200: Multi-scale top-view encoding is used to fuse reference lines, vehicle state and target information to construct a conditional vector field. The intermediate state velocity residual is minimized through flow matching. At the same time, offline strategy optimization is performed by combining the rewards of collision, curvature, arrival, efficiency and comfort dimensions to obtain a generative planner for flow matching model training.
[0048] S300: Based on the perception information of LiDAR and camera, detect the current frame environment and generate a two-dimensional grid environment map. Add the current vehicle status, target point information and reference navigation line information to the two-dimensional grid environment map and input it into the trained flow matching model. Generate the initial path for detour and escape planning in the current unstructured scene through iterative sampling.
[0049] S400: Using the generated initial path as a warm start, construct an optimization objective function that includes efficiency, smoothness, and line-hugging objectives. Apply hard constraints on curvature, velocity, acceleration, jerk, and collision distance. Solve the optimization objective function using a quasi-Newton algorithm combined with an augmented Lagrange algorithm. Output the final trajectory that satisfies the vehicle's kinematic feasibility and driving comfort.
[0050] In one embodiment of the present invention, in step S100, the real unstructured scenario is a complex scenario in which traditional search-based planning methods fail to plan and vehicles are stuck. The complex scenario includes construction sites, parking lots, temporary road detours, snow-covered areas, or gravel-covered areas.
[0051] In one embodiment of the present invention, in step S100, the uniform sampling target points are set as follows: 400-600 target points containing location information and orientation information are randomly sampled for each complex scene to cover the planning requirements of different locations and orientations within the scene.
[0052] In one embodiment of the present invention, in step S100, the offline, time-unlimited hybrid A* algorithm specifically involves: setting the maximum solution time limit of the hybrid A* algorithm to 100s, and adding a distance cost to the global reference path in the heuristic cost function of the algorithm. The global reference path is obtained through a lane-based global planning algorithm. If the current scenario is an unstructured scenario with no lane information, the global reference path is not added.
[0053] In one embodiment of the present invention, step S200, which combines the rewards based on collision, curvature, arrival, efficiency, and comfort dimensions, specifically includes:
[0054] Status Rewards: Set collision penalty weights W collision =-100, Curvature Exceedance Penalty Weight W κ=-100, penalty weight for not reaching the target W miss =-100, the arrival judgment condition is that the Euclidean distance between the target point and the end point of the trajectory is ≤0.5m;
[0055] Cumulative reward: The Bellman recursion is used to calculate the reward, which is Gt=rt+γ・Gt+1, where rt is the state reward at step t, γ is the discount factor and γ∈(0,1], and no discount is applied when γ=1.
[0056] In a specific embodiment of the present invention, step S200 specifically includes:
[0057] S210: Reward design, evaluate each state in each trajectory, calculate the reward information for each state, and use the Bellman formula to calculate the cumulative reward value for this trajectory.
[0058] a. Input parameters
[0059] i. Collision penalty: Whether a collision occurs in the t-th state (1 for collision, 0 otherwise).
[0060] ii. Curvature penalty: The curvature of the t-th state and the maximum allowed curvature threshold.
[0061] iii. Arrival penalty: The error between the target point and the current position, distance, and angle are within the threshold.
[0062] b. Status Rewards
[0063] The reward at each time step t is a weighted average of the collision, curvature, and arrival rewards, with weights of . .
[0064] c. Track cumulative reward Discount factor (γ=1 for no discount).
[0065] S220: Conditional Feature Layer Model, which treats the current environment raster as one layer of image. (See also...) Figure 3 The vehicle's state and the target point's state are plotted as features on a top-down view. Please refer to [link / reference]. Figure 4 The global reference path is treated as a single layer. The three-layer image is processed through the ResNet model to output an image feature layer, embedding structured information of the vehicle and target points, and finally embedding the maximum cumulative reward value of the current ground truth.
[0066] S230: Training result metrics are set as follows: the network prediction velocity field is... The target (supervision) speed is Given the time weights and component weighting matrices, the final training result is as follows: Figure 8 As shown, the horizontal axis represents the training rounds, reflecting the iterative training process; the vertical axis represents the model's loss (or error) metrics (such as "the difference between the predicted velocity field value and the derivative of the actual path" and "the optimization loss after reward weighting" in flow matching); the overall trend is that as the number of training rounds increases, the metrics decrease rapidly from a high value and then gradually stabilize, eventually converging to a very low level.
[0067] The flow matching method in this embodiment is a generative modeling approach. Its goal is to learn a continuous, time-dependent velocity field, gradually transforming a simple initial distribution of Gaussian noise into the target data distribution through the flow. The core formula is as follows:
[0068] When a and t=0, Gaussian noise distribution
[0069] b. When t=1 True value trajectory distribution
[0070] c.
[0071] d. Gaussian random generation of the initial trajectory with the same dimension as the true trajectory The velocity field is output using an unconditional classification method through the Dit network and combined with the conditional feature layer generated in the previous step. This represents time t and current position x, and the output is the velocity in the current point's direction of movement. During training, a power function with an exponent of n is used to non-linearly transform the time step for each time x between 0 and 1, allowing for denser sampling steps in the early stages and sparser steps in the later stages. Finally, a mean squared error loss function is used to minimize the difference between the velocity field prediction and the derivative of the true path.
[0072] In one embodiment of the present invention, please refer to Figure 5 In step S300, the multi-scale top view encoding specifically involves: taking the two-dimensional grid environment map, the vehicle status annotation map, and the reference navigation line annotation map as three-channel top view inputs, extracting image features through the ResNet model, and embedding the cumulative reward value of the vehicle status, target point information, and ground truth trajectory to form a multi-dimensional conditional feature layer.
[0073] In one embodiment of the present invention, flow matching specifically involves: learning a time-dependent velocity field Vθ(t,x|c) to gradually transform the Gaussian noise distribution at t=0 into the true trajectory distribution at t=1; during training, a power function with an exponent of n is used to perform nonlinear sampling on time steps t∈[0,1], and the difference between the predicted velocity field value and the true path derivative is minimized through the mean square error loss function.
[0074] In a specific embodiment of the present invention, step S300 specifically includes:
[0075] S310: Based on perception information, the current frame is detected, and the current obstacles and impassable areas are compressed into a top-down two-dimensional grid environment map. The vehicle state and target point information are used as the second layer map, the reference navigation line information is used as the third layer map, and the vehicle state and target point structured information are used. The maximum reward value is set to 1, and the data is input into the trained flow matching model.
[0076] S320: Through iterative sampling, a 5-step sampling method is used to balance effect and efficiency. The sampling time t is calculated for each step, the state is initialized with Gaussian, and the velocity field is output through the trained Dit model at each step. The initial path is output by iterating step by step through the numerical Euler method.
[0077] S330: Key Indicators of Reasoning Results
[0078] a. Position error and heading error
[0079] a) Position and heading errors. The Euclidean error of position at the end of the entire course / end point reflects the degree of fit between the entire trajectory and the reference / true trajectory, and the residual between the end point and the reference / target point. It is defined as the Euclidean distance error between each point and the target point, and the Euclidean distance error between each point and the reference line.
[0080] b) Average / Destination heading error. Defined as the angle error between each point and the destination, normalized to [-π, π].
[0081] b. Path collision ratio
[0082] a) Average Point Collision Ratio: The average "collision cost" between the vehicle entity (after expansion by the bounding rectangle or polygon) and obstacles / boundaries. The average point collision ratio is calculated by dividing the number of collision points by the total number of points.
[0083] b) Average Path Collision Ratio: For each point on each path, if a point on a path collides with another point, the current path is considered to be in a collision state. The average path collision ratio is calculated by dividing the number of colliding paths by the total number of paths.
[0084] c. Arrival and Convergence Quality
[0085] a) Average distance error: The mean of the distance residuals to the target point when the arrival event occurs (or the minimum value of the entire journey), often used as the arrival criterion;
[0086] b) Average heading error upon arrival: the mean of the heading residuals upon reaching the destination;
[0087] c) Arrival rate: The percentage of samples that meet the arrival criteria (distance and heading) within a given time domain, reflecting the mission success rate. The distance threshold is 0.5m and the angle error threshold is 10 degrees.
[0088] d. Feasibility
[0089] a) Proportion of trajectories with excessive curvature: The proportion of trajectories in which at least one point has a curvature exceeding the maximum threshold kappa (the current robot's maximum kappa is 1.379);
[0090] b) Statistical analysis of mean curvature within the path: Take the mean curvature of each trajectory, and then perform a statistical analysis of the mean for all trajectories;
[0091] c) Statistics on the maximum absolute curvature within the path: Take the absolute value of the maximum curvature for each trajectory, and then perform statistics on all trajectories.
[0092] e. Results description, as shown in Table 1
[0093] Table 1 describes the reasoning results of step S300.
[0094] Category Indicator Name Corresponding Entry from Above Result a. Positional and heading error Overall positional error (average) a.i 0.17486m End positional error a.i 0.04065m Heading error (average) a.ii 0.08132 rad End heading error a.ii 0.00633 rad b. Collision / path ratio Average point collision ratio b.i 0.966% Average path collision ratio b.ii 9.091% c. Arrival and convergence quality Average arrival distance error c.i 0.03425m Average arrival heading error c.ii 0.00604 rad Arrival rate c.iii 99.972% d. Executability Proportion of trajectories with curvature exceeding limit d.i 20.3% Mean of curvature within path d.ii 0.35113 Median of maximum absolute curvature within path d.iii 1.13168
[0095] In one embodiment of the present invention, please refer to Figure 5 , Figure 6 , Figure 7 and Figure 8 In step S400, the quasi-Newton algorithm is combined with the augmented Lagrange algorithm. Specifically, the outer layer uses the augmented Lagrange algorithm to transform constrained optimization into unconstrained optimization, and projects the inequality multipliers to non-negative values when updating the multipliers; the inner layer uses the L-BFGS quasi-Newton algorithm to minimize the objective function; the strict time budget for solving the problem is ≤5ms, and if the timeout occurs, the current most feasible solution is returned to ensure the planning frequency. Figure 5 In the text, a, b, c, and d represent passable trajectories generated under different obstacle environments during offline testing; Figure 6 and Figure 7 The results are from the actual closed-loop simulation. The blue lines represent the final trajectory, the red lines represent the global navigation lines, the green lines represent the road area boundary lines, the green rectangles, blue rectangles and white polygons represent obstacles, the green trajectory lines on the obstacles represent the predicted trajectory of the dynamic obstacles, and the yellow rectangles represent the areas that the vehicle must pass through.
[0096] Using front-end flow matching path as a warm start, the discrete trajectory is solved within a strict time limit using augmented Lagrangian + L-BFGS: As variables, minimize smoothing / line-fitting / energy consumption and distance-map-based safety costs, while satisfying kinematic and safety / physics inequalities. Construct a distance map and gradient from a top-down view. Update multipliers / penalty factors in the outer layer and perform quasi-Newton minimization in the inner layer. Perform feasibility projection if necessary, and stop when the KKT threshold is reached or timeout occurs. Subsequently, time is reparameterized (constrained by v / a / j), and after encrypted sampling and shape expansion collision verification, if the threshold is not met, the speed is reduced and backtracked. Finally, the executable spline coefficients are output.
[0097] In one embodiment of the present invention, the curvature hard constraint in step S400 is specifically: the curvature of any point on the trajectory is ≤1.379, and the proportion of trajectories with excessive curvature is ≤5%.
[0098] In a specific embodiment of the present invention, step S400 specifically includes:
[0099] S410: Optimization problem construction and initialization, step-wise optimization of the time domain. Discretized Establish the objective function and constraints and complete the initialization:
[0100] a. Variables and Discretization: Decision Variables Including location , towards ,speed acceleration Curvature included when necessary With jerk .
[0101] b. Objective function Weighted summation – smoothing term, fit reference, safety / accessibility (obstacles / boundary penalties based on distance map), energy consumption / comfort ;
[0102] c. Constraint Set: Equality Constraints (Discrete Kinematics / Dynamics) Inequality constraints (safety distance, maximum curvature, maximum acceleration, maximum jerk) Boundary conditions (given start and end states, upper limit of lateral deviation to fit navigation reference);
[0103] d. Environmental preprocessing: Construct a distance map from the feasible region of the top view to obtain a differentiable distance field; generate temporal occupancy or minimum distance curves for the dynamic volume;
[0104] e. Initialization: Based on the initial front-end track Initialize the multipliers; Penalty Factor Introduce nonnegative slack variables to the inequality constraints. ;
[0105] S420: Augmented Lagrange-quasi-Newton internal and external iterative solution, which converges quickly to a feasible high-quality solution within a strict time budget.
[0106] a. Enhancing the Lagrange objective: in ;
[0107] b. Outer augmenting Lagrange cycle: Inner minimization, multiplier update If the feasibility improvement is insufficient, it will adaptively increase;
[0108] c. Inner layer pseudo-Newtonian: [This is related to...] Iterative line search; gradient interpolation using distance plots for distance terms, and analytical or automatic differentiation for dynamics / curvature terms; setting a time limit of 5ms to return the current most feasible solution early; pressing if necessary. Perform a feasibility projection;
[0109] d. Termination condition: The residual and constraint violation rate meet the threshold or the objective converges, or the iteration / time limit is reached and the optimal feasible solution is returned.
[0110] S430: Time-stamped and executable output, performs time reparameterization of the geometric path and generates control commands.
[0111] a. Time parameterization: Solve for the velocity curve with a fixed geometric path, aiming to minimize the jerk, while satisfying the upper and lower bounds of velocity, acceleration, and jerk, and the curvature-induced parameters. Constraints, resulting in Continuous safety verification: The final trajectory is sampled at equal intervals with encrypted sampling and vehicle body expansion collision checks are performed. The minimum safe distance, maximum lateral deviation and violation rate are calculated. If the standards are not met, the system will fall back to conservative parameters or output a reduced speed version.
[0112] b. Control quantity generation: Converting the trajectory into an executable instruction sequence. It also outputs spline / polynomial parameters for direct use by downstream controllers.
[0113] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for planning autonomous vehicles in unstructured scenarios based on flow matching, characterized in that, include: Collect real unstructured scene data, set uniform sampling target points in the scene data, generate geometrically feasible true trajectories through offline, time-unrestricted hybrid A* algorithm, and form a training set after processing and quality inspection of the true trajectories. A conditional vector field is constructed by encoding and fusing reference lines, vehicle state and target point information in a multi-scale top view. The intermediate state velocity residual is minimized through flow matching. Offline policy optimization is performed by combining multi-dimensional rewards. A generative planner is trained and used for flow matching model training. Based on the perception information, the current frame environment is detected to generate a two-dimensional grid environment map. After adding the vehicle status, target point information and reference navigation line information, it is input into the trained generative planner, and an initial path is generated through iterative sampling. Using the initial path as a warm start, an optimization objective function is constructed, a curvature hard constraint is applied, and an optimization algorithm is used to solve the optimization objective function to output the final trajectory that satisfies the vehicle's driving needs. Data is collected from real unstructured scenarios, and target points are uniformly sampled within the collected scenarios. An offline, time-unrestricted hybrid A / B dataset is then used. * The algorithm generates a geometrically feasible ground truth trajectory, and then resamples, parameterizes, and augments the ground truth trajectory with hard examples. After quality inspection based on trajectory length, minimum spacing, and curvature index, a training set containing scene, target, top view conditions, ground truth trajectory, and quality annotation is formed. By using multi-scale top-view encoding to fuse reference lines, vehicle state and target point information, a conditional vector field is constructed. The intermediate state velocity residual is minimized through flow matching. At the same time, offline strategy optimization is performed by combining rewards from collision, curvature, arrival, efficiency and comfort dimensions to obtain a generative planner for flow matching model training. Based on the perception information of LiDAR and camera, the current frame environment is detected and a two-dimensional grid environment map is generated. The current vehicle status, target point information and reference navigation line information are added to the two-dimensional grid environment map and input to the trained flow matching model. The initial path for detour and escape planning in the current unstructured scene is generated through iterative sampling. Using the generated initial path as a warm start, an optimization objective function is constructed that includes efficiency, smoothness, and line-hugging objectives. Hard constraints are applied for curvature, velocity, acceleration, jerk, and collision distance. The optimization objective function is solved using a quasi-Newton algorithm combined with an augmented Lagrange algorithm, and the final trajectory that satisfies the vehicle's kinematic feasibility and driving comfort is output.
2. The autonomous vehicle planning method based on flow matching for unstructured scenarios according to claim 1, characterized in that: The real unstructured scenarios are complex scenarios where traditional search-based planning methods fail and vehicles are stuck. These complex scenarios include construction sites, parking lots, temporary road detours, snow-covered areas, or gravel-covered areas.
3. The autonomous vehicle planning method based on flow matching for unstructured scenarios according to claim 2, characterized in that: The scene data is set to uniformly sample target points as follows: 400-600 target points containing location and orientation information are randomly sampled for each complex scene to cover the planning requirements of different locations and orientations within the scene; The offline, time-unrestricted hybrid A * The algorithm, specifically, is as follows: Set up a mixed A * The algorithm has a maximum solution time of 100 seconds, and a distance cost to the global reference path is added to the heuristic cost function of the algorithm. The global reference path is obtained through a lane-based global planning algorithm. If the current scenario is an unstructured scenario with no lane information, the global reference path is not added.
4. The autonomous vehicle planning method for unstructured scenarios based on flow matching according to claim 3, characterized in that: The multi-dimensional rewards specifically include: Status Rewards: Set collision penalty weights W collision =-100, Curvature Exceedance Penalty Weight W κ=-100, penalty weight for not reaching the target W miss =-100, the arrival judgment condition is that the Euclidean distance between the target point and the end point of the trajectory is ≤0.5m; Cumulative reward: The Bellman recursion is used to calculate the reward, which is Gt=rt+γ・Gt+1, where rt is the state reward at step t, γ is the discount factor and γ∈(0,1], and no discount is applied when γ=1.
5. The autonomous vehicle planning method for unstructured scenarios based on flow matching according to claim 4, characterized in that: The multi-scale top-view encoding fusion reference line is specifically implemented by taking the two-dimensional grid environment map, the vehicle status annotation map, and the reference navigation line annotation map as three-channel top-view inputs, extracting image features through the ResNet model, and embedding the cumulative reward value of the vehicle status, target point information, and ground truth trajectory to form a multi-dimensional conditional feature layer.
6. The autonomous vehicle planning method for unstructured scenarios based on flow matching according to claim 5, characterized in that: The flow matching model specifically involves: learning a time-dependent velocity field Vθ(t,x|c) to gradually transform the Gaussian noise distribution at t=0 into the true trajectory distribution at t=1; during training, a power function with an exponent of n is used to perform nonlinear sampling on time steps t∈[0,1], and the difference between the predicted velocity field value and the true path derivative is minimized through the mean square error loss function.
7. The autonomous vehicle planning method for unstructured scenarios based on flow matching according to claim 6, characterized in that: Based on perception information, the current frame environment is detected to generate a two-dimensional grid environment map. Specifically, obstacle distance data from LiDAR and semantic segmentation data from the camera are fused together, and obstacles and impassable areas are marked on the two-dimensional grid map. The grid resolution ensures that the obstacle boundary accuracy is ≤0.1m. The iterative sampling is set to 5 steps, and the velocity field is integrated using the numerical Euler method, iterating step by step from the Gaussian initialization state to the trajectory state at t=1.
8. The autonomous vehicle planning method for unstructured scenarios based on flow matching according to claim 7, characterized in that: The optimization algorithm used to solve the objective function is as follows: the outer layer uses the augmented Lagrange algorithm to transform constrained optimization into unconstrained optimization, and projects the inequality multipliers to non-negative values when updating the multipliers; the inner layer uses the L-BFGS quasi-Newton algorithm to minimize the objective function; the strict time budget for the solution is ≤5ms, and if the timeout occurs, the current most feasible solution is returned to ensure the planning frequency.
9. The autonomous vehicle planning method for unstructured scenarios based on flow matching according to claim 8, characterized in that: The application of curvature hard constraints specifically means that the curvature of any point on the trajectory is ≤1.379, and the proportion of trajectories with excessive curvature is ≤5%.
10. The autonomous vehicle planning method based on flow matching for unstructured scenarios according to claim 9, characterized in that: The output satisfies the final trajectory of the vehicle's movement and also includes: time reparameterizing the geometric path with the goal of minimizing jerk, satisfying the hardware upper limit constraints of speed, acceleration, and jerk; isolating and densifying the final trajectory for vehicle shape expansion collision verification, with a minimum safe distance ≥0.3m, and if the standard is not met, the vehicle will decelerate and back off, and finally output an executable trajectory in the form of spline coefficients or polynomial parameters.
Citation Information
Patent Citations
Strategy switching unmanned vehicle trajectory planning method and system
CN117008615A
Unstructured scene automatic driving track planning method based on key anchor point identification
CN118838327A