Parallel computing method and device for automatic driving track planning and storage medium
Through a multi-layer decision-making framework and GPU parallel computing, the blindness problem of the sampling process in autonomous driving trajectory planning is solved, the sampling efficiency and rationality are improved, the stability and real-time performance of trajectory planning are ensured, and it is suitable for complex dynamic scenarios.
Patent Information
- Application Number
- CN202510842638.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-10-03
AI Technical Summary
Existing autonomous driving trajectory planning methods are blind in the sampling process, resulting in low sampling efficiency, waste of resources, and difficulty in effective management and optimization. In particular, the stability and rationality of trajectory planning cannot be guaranteed in complex dynamic scenarios.
By adopting a multi-layer decision framework and sampling strategy, combined with GPU parallel computing, a high-quality trajectory set is generated through trajectory parameter configuration, candidate behavior calculation, anchor point calculation, node search and trajectory evaluation, thus enhancing the vehicle's planning ability in complex dynamic scenarios.
It improves the sampling efficiency and rationality, ensures the real-time performance of large-scale sampling and evaluation, enhances the ability to interact with dynamic obstacles, and ensures the stability and rationality of trajectory planning.
Smart Images

Figure CN120743355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of autonomous driving and intelligent robotics, and in particular to a parallel computing method and storage medium for autonomous driving trajectory planning using a graphics processing unit (GPU) for parallel acceleration. Background Art
[0002] Currently, the commonly used algorithms in the industry are generally divided into three categories: search, sampling, and optimization. The path curvature generated by the search-based method is discontinuous and the heuristic function is difficult to design, resulting in relatively low search efficiency. It is generally suitable for low-speed static environments. The sampling-based method is limited by the sampling scale and the rationality of the sampling trajectory and is difficult to cope with complex scenarios. Optimization algorithms can usually generate smoother and more feasible trajectories. However, they are highly sensitive to initial values and may fall into local optimal solutions. In recent years, more and more research has been devoted to combining search, sampling, and optimization methods to leverage the advantages of various algorithms through hybrid strategies. However, the scale of sampling has been limited by the real-time requirements of the program. There is an urgent need for an efficient trajectory planning method to increase the scale of sampling.
[0003] Prior art CN111338335A proposes a method for local vehicle trajectory planning in structured road scenarios. Based on the vehicle's current motion state vector in the reference coordinate system, it generates sets of longitudinal and lateral sampled trajectories for different speed ranges. To reduce algorithmic time consumption, six circular collision circles arranged in three rows and two columns are constructed for approximate collision detection. However, the generation and evaluation of these sampled trajectories remains very time-consuming, and CPU hardware resources often limit the sampling or evaluation process, forcing sparse sampling.
[0004] The existing technology CN109885891A is based on the vehicle coordinate system, and the space I=[κ0,x f ,y f ,θ f ,κ f ] performs uniform sparse sampling. A large number of trajectories are generated on the GPU based on a model prediction method, and trajectory costs are calculated in parallel to accelerate the computation. The CPU normalizes the trajectory costs, selects the trajectory with the lowest cost as the optimal trajectory, and matches the optimal trajectory with a speed value. While GPU-accelerated computation is used, the sampling process is blind, the cost evaluation is simplistic, and the paper lacks a description of the interactive decision-making process with dynamic obstacles, focusing more on low-speed static scenarios.
[0005] The blindness in the sampling process of existing methods not only leads to low sampling efficiency and waste of resources, but also makes this blindness difficult to effectively manage and optimize, which affects the stability of trajectory planning during the evaluation process.
[0006] Due to limited CPU resources, program time increases as the sampling scale reaches a certain level (CPUs generally have 4-16 cores, while GPUs may have thousands). Therefore, the parallel planning trajectory cost calculation solution provides an efficient and scalable method to accelerate the trajectory planning process in autonomous driving.
[0007] The current sampling methods lack interactive calculations with dynamic obstacles, resulting in a lack of guarantee for the rationality of the evaluated trajectory. Summary of the Invention
[0008] To address the aforementioned issues with existing technical solutions, the present invention establishes a decision-making framework at different levels and introduces a multi-layer sampling strategy to ensure that high-quality trajectory sets can be generated under different speeds and environmental conditions, thereby enhancing the vehicle's planning capabilities in complex dynamic scenarios.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: a parallel computing method for autonomous driving trajectory planning, comprising the following steps:
[0010] S1, the step of trajectory parameter configuration, using spline interpolation to generate sampling trajectories;
[0011] S2, the step of calculating candidate behaviors, which calculates the currently allowed candidate behaviors in advance based on the current driving behavior and the actual road conditions;
[0012] S3, the anchor point calculation step, calculates the anchor points in the drivable area according to the conflicting obstacles and planning tasks, and performs discretization processing;
[0013] S4, the node search step, uses a search algorithm to generate trajectory parameters. By gradually expanding the nodes, all sampling paths connecting each node are found. The trajectory parameters corresponding to each sampling path constitute a complete trajectory.
[0014] S5, GPU parallel computing step, uses the parallelization capability of GPU to accelerate the calculation;
[0015] S6, the steps of post-trajectory evaluation, specifically include:
[0016] Behavior urgency assessment: Based on real-time environmental data and obstacle dynamics, combined with obstacle uncertainty, the urgency of the current behavior switch is assessed;
[0017] Behavior outcome analysis: predicting the outcomes of different switching behaviors, including the impact on the vehicle itself and surrounding traffic participants;
[0018] Comprehensive decision-making: After the evaluation is completed, the system will comprehensively consider the urgency of the current behavior and the various consequences after the switch, and select the optimal candidate trajectory through a weighted algorithm or decision tree method.
[0019] Furthermore, in S3, the following steps are included:
[0020] S3.1, a step of identifying a drivable area, identifying a drivable area of the vehicle based on environmental information;
[0021] S3.2, conflict detection step: within the drivable area, a path prediction is performed based on the vehicle's planned task. Potential conflicts are then identified and evaluated. The conflict evaluation compares the current obstacle position with the predicted path to determine if a conflict exists. If a conflict exists, a preliminary estimate of the feasibility of resolving the conflict is made.
[0022] S3.3, the step of calculating sampling points, after the conflict situation is evaluated, generates sampling anchor points, discretizes the trajectory horizontally and vertically based on the anchor points, and generates sampling points for each layer.
[0023] Furthermore, in S4, the following steps are included:
[0024] S4.1, starting point setting: Use the current position of the vehicle as the search starting point and perform depth-first search;
[0025] S4.2, Node Selection and Filtering: Based on the drivable area, conflict assessment results, planning tasks, and trajectory rationality, the generated sampling points are screened and those reasonable points that meet the conditions are retained;
[0026] S4.3, Path backtracking: When the end point is reached, all valid sampling path parameters are obtained through the backtracking process.
[0027] Furthermore, in S3.3, the generation of sampling points takes into account the following factors:
[0028] Reasonableness and safety: Ensure that the generated sampling points can avoid obstacles and meet driving safety requirements;
[0029] Discretization method: Use the discretization method to convert the continuous road path into a series of discrete sampling points, which can be uniformly spaced or adaptively sampled based on curve characteristics.
[0030] Furthermore, the step of identifying the drivable area in S3.1 includes:
[0031] Obstacle detection: Use sensors to detect and identify surrounding static and dynamic obstacles;
[0032] Driving area division: Determine the vehicle's driving area based on the location of obstacles, the planning task obtained from the calculation results of step S2, and the road information.
[0033] Furthermore, in S2, the vehicle behaviors are divided according to different driving tasks, including but not limited to the following categories: lane keeping, lane borrowing, and lane changing; for example, when the two lanes have the same priority, if the average traffic speed of the target lane is lower than the average traffic speed of the own lane, then there is no need to sample the lane changing behavior unless there is a special requirement; there may be one or more candidate lane changing behaviors.
[0034] Furthermore, S5 includes the following steps:
[0035] S5.1, data encoding step, GPU initialization and encoding of trajectory parameters, behavior, reference line and obstacle information to adapt to the parallel data processing format of GPU;
[0036] S5.2, GPU parallel computing steps, including:
[0037] Trajectory discretization: In each thread, the trajectory is discretized based on time to generate trajectory points for subsequent processing and evaluation;
[0038] Trajectory evaluation: In their respective threads, the generated trajectory points are evaluated.
[0039]
[0040] sumCost = traj plan +lon decition +lat decition
[0041] In autonomous driving, the planned trajectory is given in the form of discrete points;
[0042] Where n represents the number of trajectory points;
[0043] Comfort_cost is specifically calculated by calculating the weighted sum of the change in jerk at all path points, the change in jerk at all speed points, and the lateral acceleration at all trajectory points.
[0044] efficiency_cost is the average speed of all trajectory points;
[0045] length_cost is the cumulative length of all trajectory points;
[0046] The collision_cost is as shown in the formula, where x is the distance between the trajectory and the obstacle, and c and c1 are adjustable parameters;
[0047] diff_s_cost is the minimum value after calculating the size of the space selected in the st graph corresponding to all speed points in st (s_max–s_min). For the explanation of the st graph, please refer to the attached figure in the manual;
[0048] v_cost is the cost of calculating the speed estimate of the space selected in the ST graph corresponding to all speed points in ST, that is, the cost linearly related to the speed of the preceding vehicle. For an explanation of the ST graph, see the attached figure in the specification;
[0049] direction_cost calculates the cumulative change in direction of all trajectory points relative to the reference line. For example, if the trajectory turns left and then right, the direction change is 2;
[0050] diff_l_cost calculates the offset of all trajectory points relative to the reference line.
[0051] Decision costs are introduced into the evaluation process to enhance the ability to interact with dynamic obstacles. During this process, an ST graph is constructed for obstacles that interfere with the ego vehicle on each trajectory to evaluate the longitudinal decision cost of the trajectory. The cost function of the longitudinal decision takes into account the size and efficiency of the space corresponding to the trajectory. The lateral decision is comprehensively evaluated using the amplitude and direction of the trajectory's lateral changes.
[0052] S5.3, sampling output step, obtains the trajectory point set of all trajectories and their corresponding cost sizes, and uses the sorting algorithm to calculate the optimal trajectory corresponding to each candidate behavior.
[0053] The present invention also provides a parallel computing device for autonomous driving trajectory planning, comprising:
[0054] The trajectory parameter configuration module uses spline interpolation to generate sampling trajectories;
[0055] The candidate behavior calculation module calculates the currently allowed candidate behaviors in advance based on the current driving behavior and the actual road conditions;
[0056] Anchor point calculation module, which calculates anchor points within the drivable area based on conflicting obstacles and planning tasks, and performs discretization processing;
[0057] The node search module uses a search algorithm to generate trajectory parameters. By gradually expanding nodes, it searches for all sampling paths connecting each node. The trajectory parameters corresponding to each sampling path constitute a complete trajectory.
[0058] GPU parallel computing module, which uses the parallelization capability of GPU to accelerate computing;
[0059] The post-trajectory evaluation module is used to complete the following tasks:
[0060] Behavior urgency assessment: Based on real-time environmental data and obstacle dynamics, combined with obstacle uncertainty, the urgency of the current behavior switch is assessed;
[0061] Behavior outcome analysis: predicting the outcomes of different switching behaviors, including the impact on the vehicle itself and surrounding traffic participants;
[0062] Comprehensive decision-making: After the evaluation is completed, the system will comprehensively consider the urgency of the current behavior and the various consequences after the switch, and select the optimal candidate trajectory through a weighted algorithm or decision tree method.
[0063] Furthermore, the GPU parallel computing module includes:
[0064] Data encoding module, GPU initialization and encoding of trajectory parameters, behavior, reference lines and obstacle information to adapt to the GPU's parallel data processing format;
[0065] Parallel computing module, performs the following tasks:
[0066] Trajectory discretization: In each thread, the trajectory is discretized based on time to generate trajectory points for subsequent processing and evaluation;
[0067] Trajectory evaluation: In their respective threads, the generated trajectory points are evaluated.
[0068]
[0069] sumCost = traj plan +lon decition +lat dection
[0070] In autonomous driving, the planned trajectory is given in the form of discrete points.
[0071] Where n represents the number of trajectory points;
[0072] Comfort_cost is specifically calculated by calculating the weighted sum of the change in jerk at all path points, the change in jerk at all speed points, and the lateral acceleration at all trajectory points.
[0073] efficiency_cost is the average speed of all trajectory points;
[0074] length_cost is the cumulative length of all trajectory points;
[0075] The collision_cost is as shown in the formula, where x is the distance between the trajectory and the obstacle, and c and c1 are adjustable parameters;
[0076] diff_s_cost is the minimum value after calculating the size of the space selected in the st graph corresponding to all speed points in st (s_max–s_min). For the explanation of the st graph, please refer to the attached figure in the manual;
[0077] v_cost is the cost of calculating the speed estimate of the space selected in the ST graph corresponding to all speed points in ST, that is, the cost linearly related to the speed of the preceding vehicle. For an explanation of the ST graph, see the attached figure in the specification;
[0078] direction_cost calculates the cumulative change in direction of all trajectory points relative to the reference line. For example, if the trajectory turns left and then right, the direction change is 2;
[0079] diff_l_cost calculates the offset of all trajectory points relative to the reference line.
[0080] Decision costs are introduced into the evaluation process to enhance the ability to interact with dynamic obstacles. During this process, an ST graph is constructed for obstacles that interfere with the ego vehicle on each trajectory to evaluate the longitudinal decision cost of the trajectory. The cost function of the longitudinal decision takes into account the size and efficiency of the space corresponding to the trajectory. The lateral decision is comprehensively evaluated using the amplitude and direction of the trajectory's lateral changes.
[0081] The sampling output module obtains the trajectory point set of all trajectories and their corresponding cost sizes, and uses the sorting algorithm to calculate the optimal trajectory corresponding to each candidate behavior.
[0082] The present invention also discloses a computer-readable storage medium containing a computer program, which, when executed by one or more processors, implements any of the above-mentioned parallel computing methods for autonomous driving trajectory planning.
[0083] The present invention has the following advantages:
[0084] 1. Sampling efficiency and rationality of sampling.
[0085] 2. Improve the rationality of evaluation.
[0086] 3. Large-scale sampling and evaluation to ensure the real-time nature of the program.
[0087] 4. It is scalable without significantly increasing the time required. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 This is a flow chart of a parallel computing method for autonomous driving trajectory planning according to the present invention;
[0089] Figure 2 A schematic diagram of the process of calculating candidate behaviors of the present invention;
[0090] Figure 3A schematic diagram of GPU parallel computing of the present invention;
[0091] Figure 4 Schematic diagram of ST of the present invention. DETAILED DESCRIPTION
[0092] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0093] like Figure 1 As shown, a parallel computing method for autonomous driving trajectory planning includes the following steps:
[0094] S1, the trajectory parameter configuration step, uses spline interpolation to generate sampling trajectories. Based on the curve's starting state and its characteristics, the rationality of the generated trajectory at the specified end state can be inferred. Data mining can be performed based on large amounts of data to determine the rationality distribution of the trajectories. The vehicle's lateral sampling trajectory can be represented by a quintic polynomial, while the longitudinal sampling trajectory can be represented by a quartic polynomial. This choice of polynomial ensures the smoothness of the generated trajectory. The rationality distribution of the trajectory maximizes the rationality of the sampled trajectory during sampling.
[0095] S2, the step of calculating candidate behaviors, the vehicle's behavior can be divided according to different driving tasks, including but not limited to the following categories: lane keeping, borrowing lanes and lane changing. Based on the current driving behavior and the actual road conditions, the currently allowed candidate behaviors are calculated in advance; for example, if the two lanes have the same priority, if the average traffic speed of the target lane is less than the average traffic speed of the vehicle's lane, then there is no need to sample the lane changing behavior unless there is a special requirement. There may be one or more candidate lane changing behaviors. Figure 2 For example, if the upstream module indicates that the vehicle needs to exit the ramp in the rightmost lane while it is in the leftmost lane (driving task), there is a white dashed line in front of the vehicle (traffic regulations), there are no stationary vehicles in the target lane (obstacle interaction), and there is no risk of road interruption between the ego lane and the target lane (road factor), then the candidate actions include lane keeping and right lane change. Driving style affects when to initiate the right lane change.
[0096] S3, the anchor point calculation step, assumes that an obstacle has three lateral decisions: follow, avoid left, and avoid right. The number of possible obstacles is 3n. If blind sampling is performed under such high complexity, only a relatively optimal solution can be sampled in interactive scenarios. Based on the conflicting obstacles and the planning task, the anchor point is calculated within the drivable area and discretized.
[0097] S4, the node search step, uses a variety of search algorithms to generate trajectory parameters. By gradually expanding the nodes, all sampling paths connecting each node are found. The trajectory parameters corresponding to each sampling path constitute a complete trajectory. The node search eliminates unreasonable sampling points.
[0098] S5, GPU parallel computing step. In complex scenarios, even after anchor sampling and multiple rounds of pruning, the number of remaining trajectories may still be large. The parallelization capability of the GPU is used to accelerate the calculation.
[0099] S6, the steps of post-trajectory evaluation, specifically include:
[0100] Behavior urgency assessment: Based on real-time environmental data and obstacle dynamics, combined with obstacle uncertainty, the urgency of the current behavior switch is assessed;
[0101] Behavior outcome analysis: predicting the outcomes of different switching behaviors, including the impact on the vehicle itself and surrounding traffic participants;
[0102] Comprehensive decision-making: After the evaluation is completed, the system will comprehensively consider the urgency of the current behavior and the various consequences after the switch, and select the optimal candidate trajectory through a weighted algorithm or decision tree method.
[0103] In some embodiments, in S3, the following steps are included:
[0104] S3.1, a step of identifying a drivable area, identifying a drivable area for the vehicle based on environmental information; the step of identifying a drivable area includes:
[0105] Obstacle detection: Use sensors (such as lidar, cameras, etc.) to detect and identify static and dynamic obstacles in the surrounding area;
[0106] Driving area division: Determine the vehicle's driving area based on the location of obstacles, combined with the planning task (calculated in step S2) and road information (such as lane lines, traffic signs, etc.).
[0107] S3.2, the conflict detection step, performs path prediction within the drivable area based on the vehicle's planned tasks (such as borrowing, lane changing, lane keeping, etc.). Path prediction takes into account the current maneuver (such as changing lanes or overtaking) and predicts the future path based on the current vehicle state.
[0108] Then, it identifies whether there is a potential conflict and performs a conflict assessment. The conflict assessment compares the current obstacle position with the path prediction to evaluate whether there is a conflict. If a conflict exists, it preliminarily estimates the rationality of resolving the conflict.
[0109] S3.3, the step of calculating sampling points, after the conflict situation is evaluated, generates sampling anchor points, discretizes the trajectory horizontally and vertically based on the anchor points, and generates sampling points for each layer. The generation of sampling points takes into account the following factors:
[0110] Reasonableness and safety: Ensure that the generated sampling points can avoid obstacles and meet driving safety requirements;
[0111] Discretization method: Use the discretization method to convert the continuous road path into a series of discrete sampling points, which can be uniformly spaced or adaptively sampled based on curve characteristics.
[0112] In some embodiments, in S4, the following steps are included:
[0113] S4.1, starting point setting: Use the current position of the vehicle as the search starting point and perform depth-first search;
[0114] S4.2, Node Selection and Filtering: Based on the drivable area, conflict assessment results, planning tasks, and trajectory rationality, the generated sampling points are screened and those reasonable points that meet the conditions are retained;
[0115] S4.3, Path backtracking: When the end point is reached, all valid sampling path parameters are obtained through the backtracking process.
[0116] In some embodiments, since the number of remaining trajectories may still be large even after anchor sampling and multiple rounds of pruning in complex scenes, the powerful parallelization capability of the GPU is used to accelerate the calculation. Figure 3 As shown, step S5 first discretizes the path and velocity curve on the CPU to form a set of sampled trajectories. Then, the trajectory parameters, behavior, reference line, and obstacle information are GPU-encoded (copied to the GPU). The cost of each trajectory is evaluated on the GPU, and the cost result is copied back to the CPU. The specific steps include:
[0117] S5.1, data encoding step, the GPU initializes and encodes the trajectory parameters, behavior, reference line and obstacle information to adapt to the GPU's parallel data processing format; the corresponding information of each trajectory is obtained using the thread number as the index.
[0118] S5.2, GPU parallel computing steps, including:
[0119] Trajectory discretization: In each thread, the trajectory is discretized based on time to generate trajectory points for subsequent processing and evaluation;
[0120] Trajectory evaluation: In their respective threads, the generated trajectory points are evaluated.
[0121]
[0122] sumCost = traj plan +lon decition +lat dection
[0123] In autonomous driving, the planned trajectory is given in the form of discrete points;
[0124] Where n represents the number of trajectory points;
[0125] Comfort_cost is specifically calculated by calculating the weighted sum of the change in jerk at all path points, the change in jerk at all speed points, and the lateral acceleration at all trajectory points.
[0126] efficiency_cost is the average speed of all trajectory points;
[0127] length_cost is the cumulative length of all trajectory points;
[0128] The collision_cost is as shown in the formula, where x is the distance between the trajectory and the obstacle, and c and c1 are adjustable parameters;
[0129] diff_s_cost is the minimum value after calculating the size of the space selected in the st graph corresponding to all speed points in st (s_max–s_min). For the explanation of the st graph, please refer to the attached figure in the manual;
[0130] v_cost is the cost of calculating the speed estimate of the space selected in the ST graph corresponding to all speed points in ST, that is, the cost linearly related to the speed of the preceding vehicle. For an explanation of the ST graph, see the attached figure in the specification;
[0131] direction_cost calculates the cumulative change in direction of all trajectory points relative to the reference line. For example, if the trajectory turns left and then right, the direction change is 2;
[0132] diff_l_cost calculates the offset of all trajectory points relative to the reference line.
[0133] The cost evaluation of current mainstream sampling is different. The mainstream sampling method can only be based on traj due to the blindness of sampling. planEvaluating sampled trajectories takes into account the physical characteristics of the trajectory itself, using the trajectory curve derivative to calculate comfort, the trajectory's average speed to calculate efficiency, the trajectory's length to calculate passability, and the distance to obstacles to calculate safety. However, this single evaluation method is very one-sided in real-world environments. In a longitudinally decoupled planning framework, the resulting path significantly influences speed decisions.
[0134] Decision costs are introduced into the evaluation process to enhance the ability to interact with dynamic obstacles. During this process, an ST graph is constructed for obstacles that interfere with the ego vehicle on each trajectory to evaluate the longitudinal decision cost of the trajectory. The cost function of the longitudinal decision takes into account the size and efficiency of the space corresponding to the trajectory. The lateral decision is comprehensively evaluated using the amplitude and direction of the trajectory's lateral changes.
[0135] S5.3, sampling output step, obtains the trajectory point set of all trajectories and their corresponding cost sizes, and uses the sorting algorithm to calculate the optimal trajectory corresponding to each candidate behavior.
[0136] The present invention also provides a parallel computing device for autonomous driving trajectory planning, comprising:
[0137] The trajectory parameter configuration module uses spline interpolation to generate sampling trajectories. Based on the curve's starting state and its characteristics, the rationality of the generated trajectory at a specified end state can be inferred. Data mining based on large amounts of data allows us to determine the rationality distribution of trajectories. The vehicle's lateral sampling trajectory is represented by a quintic polynomial, while the longitudinal sampling trajectory is represented by a quartic polynomial. This choice of polynomial ensures the smoothness of the generated trajectory. The rationality distribution of the trajectory maximizes the rationality of the sampled trajectory during sampling.
[0138] The candidate behavior calculation module categorizes vehicle behaviors into the following categories based on different driving tasks: lane keeping, lane borrowing, and lane changing. This module pre-calculates the currently permitted candidate behaviors based on the current driving behavior and road conditions. For example, if the average speed of the target lane is lower than the average speed of the ego lane, lane changing sampling is not required unless there is a specific requirement. There may be one or more candidate lane changing behaviors.
[0139] The anchor point calculation module assumes that an obstacle has three lateral decisions: follow, avoid left, or avoid right. The number of possible obstacles is 3n. Blind sampling under such high complexity will only yield a relatively optimal solution in interactive scenarios. Based on the conflicting obstacles and the planning task, anchor points are calculated within the drivable area and discretized.
[0140] The node search module uses a variety of search algorithms to generate trajectory parameters. By gradually expanding nodes, it searches for all sampling paths connecting each node. The trajectory parameters corresponding to each sampling path constitute a complete trajectory.
[0141] GPU parallel computing module: In complex scenarios, even after anchor sampling and multiple rounds of pruning, the number of remaining trajectories may still be large. This module uses the parallelization capabilities of the GPU to accelerate computing.
[0142] The post-trajectory evaluation module is used to complete the following tasks:
[0143] Behavior urgency assessment: Based on real-time environmental data and obstacle dynamics, combined with obstacle uncertainty, the urgency of the current behavior switch is assessed;
[0144] Behavior outcome analysis: predicting the outcomes of different switching behaviors, including the impact on the vehicle itself and surrounding traffic participants;
[0145] Comprehensive decision-making: After the evaluation is completed, the system will comprehensively consider the urgency of the current behavior and the various consequences after the switch, and select the optimal candidate trajectory through a weighted algorithm or decision tree method.
[0146] Furthermore, the GPU parallel computing module includes:
[0147] In the data encoding module, the GPU is initialized and the trajectory parameters, behavior, reference lines, and obstacle information are encoded to adapt to the GPU's parallel data processing format; the corresponding information of each trajectory is obtained using the thread number as the index.
[0148] Parallel computing module, performs the following tasks:
[0149] Trajectory discretization: In each thread, the trajectory is discretized based on time to generate trajectory points for subsequent processing and evaluation;
[0150] Trajectory evaluation: In their respective threads, the generated trajectory points are evaluated.
[0151]
[0152] sumCost = traj plan +lon dection +lat decition
[0153] In autonomous driving, the planned trajectory is given in the form of discrete points.
[0154] Where n represents the number of trajectory points;
[0155] Comfort_cost is specifically calculated by calculating the weighted sum of the change in jerk at all path points, the change in jerk at all speed points, and the lateral acceleration at all trajectory points.
[0156] efficiency_cost is the average speed of all trajectory points;
[0157] length_cost is the cumulative length of all trajectory points;
[0158] The collision_cost is as shown in the formula, where x is the distance between the trajectory and the obstacle, and c and c1 are adjustable parameters;
[0159] diff_s_cost is the minimum value after calculating the size of the space selected in the st graph corresponding to all speed points in st (s_max–s_min). For the explanation of the st graph, please refer to the attached figure in the manual;
[0160] v_cost is the cost of calculating the speed estimate of the space selected in the ST graph corresponding to all speed points in ST, that is, the cost linearly related to the speed of the preceding vehicle. For an explanation of the ST graph, see the attached figure in the specification;
[0161] direction_cost calculates the cumulative change in direction of all trajectory points relative to the reference line. For example, if the trajectory turns left and then right, the direction change is 2;
[0162] diff_l_cost calculates the offset of all trajectory points relative to the reference line.
[0163] The cost evaluation of current mainstream sampling is different. The mainstream sampling method can only be based on traj due to the blindness of sampling. plan The sampled trajectories are evaluated by considering the physical characteristics of the trajectories themselves, using the derivative of the trajectory curve to calculate comfort, the average speed of the trajectory to calculate efficiency, the trajectory length to calculate passability, and the distance to obstacles to calculate safety. However, this single evaluation method is very one-sided in actual environments.
[0164] Under the longitudinal decoupled planning framework, path results will greatly affect speed decisions.
[0165] Decision costs are introduced into the evaluation process to enhance the ability to interact with dynamic obstacles. During this process, an ST graph is constructed for obstacles that interfere with the ego vehicle on each trajectory to evaluate the longitudinal decision cost of the trajectory. The cost function of the longitudinal decision takes into account the size and efficiency of the space corresponding to the trajectory. The lateral decision is comprehensively evaluated using the amplitude and direction of the trajectory's lateral changes.
[0166] The sampling output module obtains the trajectory point set of all trajectories and their corresponding cost sizes, and uses the sorting algorithm to calculate the optimal trajectory corresponding to each candidate behavior.
[0167] The present invention also discloses a computer-readable storage medium containing a computer program, which, when executed by one or more processors, implements any of the above-mentioned parallel computing methods for autonomous driving trajectory planning.
[0168] In the present invention, various types of spline curves may be used to connect the curves between two nodes, or multiple types of spline curves may be used simultaneously to enrich the diversity of sampling.
[0169] This method improves sampling efficiency and rationality by calculating anchor-based sampling points. It also determines the rationality of trajectory distribution based on a large amount of data, and then performs layer-by-layer node pruning. It also introduces cost evaluation at the evaluation layer to improve evaluation rationality. It also leverages the powerful parallelization capabilities of GPUs to accelerate computation.
[0170] The present invention has the following advantages:
[0171] 1. Sampling efficiency and rationality of sampling.
[0172] 2. Improve the rationality of evaluation.
[0173] 3. Large-scale sampling and evaluation to ensure the real-time nature of the program.
[0174] 4. It is scalable without significantly increasing the time required.
[0175] The prior art CN112810630A uses longitudinal and transverse sampling of the endpoint position to obtain a position sampling set and a speed sampling set. The sampling points are traversed from the position sampling set to heuristically estimate the trajectory length; the sampling speeds are traversed from the speed sampling set to estimate the target time, thereby calculating the trajectory equation; and finally, the integrity of the trajectory is judged based on the trajectory time length. Although it and the present invention both use the same sampling method, the sampling and evaluation processes are quite different. Specifically, it only uses a fifth-order polynomial to fit the curve, which is different from the present invention. It uses the form of x(t) and y(t) to generate the trajectory, which is not large in number and is only suitable for autonomous driving in simple scenarios. The present invention generates a trajectory in the form of sampling l(s) and s(t), which can display the endpoint of the specified trajectory. The present invention also designs the calculation, expansion, and pruning of sampling points. The subsequent cost calculation and GPU parallelization also serve the unique sampling method of the present invention.
[0176] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A parallel computing method for autonomous driving trajectory planning, characterized in that: The following steps are involved: S1, the step of trajectory parameter configuration, using spline interpolation to generate sampling trajectories; S2, the step of calculating candidate behaviors, which calculates the currently allowed candidate behaviors in advance based on the current driving behavior and the actual road conditions; S3, the anchor point calculation step, calculates the anchor points in the drivable area according to the conflicting obstacles and planning tasks, and performs discretization processing; S4, the node search step, uses a search algorithm to generate trajectory parameters. By gradually expanding the nodes, all sampling paths connecting each node are found. The trajectory parameters corresponding to each sampling path constitute a complete trajectory. S5, GPU parallel computing step, uses the parallelization capability of GPU to accelerate the calculation; S6, the steps of post-trajectory evaluation, specifically include: Behavior urgency assessment: Based on real-time environmental data and obstacle dynamics, combined with obstacle uncertainty, the urgency of the current behavior switch is assessed; Behavior outcome analysis: predicting the outcomes of different switching behaviors, including the impact on the vehicle itself and surrounding traffic participants; Comprehensive decision-making: After the evaluation is completed, the system will comprehensively consider the urgency of the current behavior and the various consequences after the switch, and select the optimal candidate trajectory through a weighted algorithm or decision tree method.
2. The parallel computing method for autonomous driving trajectory planning according to claim 1, characterized in that: In S3, the following steps are included: S3.1, a step of identifying a drivable area, identifying a drivable area of the vehicle based on environmental information; S3.2, conflict detection step: within the drivable area, a path prediction is performed based on the vehicle's planned task. Potential conflicts are then identified and evaluated. The conflict evaluation compares the current obstacle position with the predicted path to determine if a conflict exists. If a conflict exists, a preliminary estimate of the feasibility of resolving the conflict is made. S3.3, the step of calculating sampling points, after the conflict situation is evaluated, generates sampling anchor points, discretizes the trajectory horizontally and vertically based on the anchor points, and generates sampling points for each layer.
3. The parallel computing method for autonomous driving trajectory planning according to claim 2, characterized in that: In S4, the following steps are included: S4.1, starting point setting: Use the current position of the vehicle as the search starting point and perform depth-first search; S4.2, Node Selection and Filtering: Based on the drivable area, conflict assessment results, planning tasks, and trajectory rationality, the generated sampling points are screened and those reasonable points that meet the conditions are retained; S4.3, Path backtracking: When the end point is reached, all valid sampling path parameters are obtained through the backtracking process.
4. The parallel computing method for autonomous driving trajectory planning according to claim 2, characterized in that: In S3.3, the generation of sampling points takes into account the following factors: Reasonableness and safety: Ensure that the generated sampling points can avoid obstacles and meet driving safety requirements; Discretization method: Use the discretization method to convert the continuous road path into a series of discrete sampling points, which can be uniformly spaced or adaptively sampled based on curve characteristics.
5. The parallel computing method for autonomous driving trajectory planning according to claim 2, characterized in that: The steps for identifying the drivable area in S3.1 include: Obstacle detection: Use sensors to detect and identify surrounding static and dynamic obstacles; Driving area division: Determine the vehicle's driving area based on the location of obstacles, the planning task obtained from the calculation results of step S2, and the road information.
6. The parallel computing method for autonomous driving trajectory planning according to claim 1, characterized in that: In S2, vehicle behaviors are divided into the following categories according to different driving tasks: lane keeping, lane borrowing, and lane changing. For example, if the two lanes have the same priority, if the average traffic speed of the target lane is lower than the average traffic speed of the ego lane, then there is no need to sample lane changing behavior unless there is a special requirement. There may be one or more candidate lane-changing behaviors.
7. The parallel computing method for autonomous driving trajectory planning according to claim 1-6, characterized in that: S5 includes the following steps: S5.1, data encoding step, GPU initialization and encoding of trajectory parameters, behavior, reference line and obstacle information to adapt to the parallel data processing format of GPU; S5.2, GPU parallel computing steps, including: Trajectory discretization: In each thread, the trajectory is discretized based on time to generate trajectory points for subsequent processing and evaluation; Trajectory evaluation: In their respective threads, the generated trajectory points are evaluated. collisionCost=c1*e c*x sumCost=traj plan +lon decition +years decition In autonomous driving, the planned trajectory is given in the form of discrete points; Where n represents the number of trajectory points; Comfort_cost is specifically calculated by calculating the weighted sum of the change in jerk at all path points, the change in jerk at all speed points, and the lateral acceleration at all trajectory points. efficiency_cost is the average speed of all trajectory points; length_cost is the cumulative length of all trajectory points; The collision_cost is as shown in the formula, x is the distance between the trajectory and the obstacle, c and c1 are adjustable parameters; diff_s_cost is the minimum value after calculating the size of the selected space in the st graph corresponding to all velocity points in st (s_max–s_min); v_cost is the cost of calculating the speed estimate of the selected space in the st graph corresponding to all speed points in st, which is linearly related to the speed of the preceding vehicle; direction_cost calculates the cumulative change direction of all trajectory points relative to the reference line; diff_l_cost calculates the offset of all trajectory points relative to the reference line; Decision costs are introduced into the evaluation process to enhance the ability to interact with dynamic obstacles. During this process, an ST graph is constructed for obstacles that interfere with the ego vehicle on each trajectory to evaluate the longitudinal decision cost of the trajectory. The cost function for longitudinal decisions takes into account the size and efficiency of the space corresponding to the trajectory. The lateral decision is comprehensively evaluated using the amplitude and direction of the trajectory's lateral changes. S5.3, sampling output step, obtains the trajectory point set of all trajectories and their corresponding cost sizes, and uses the sorting algorithm to calculate the optimal trajectory corresponding to each candidate behavior.
8. A parallel computing device for autonomous driving trajectory planning, characterized in that: include: The trajectory parameter configuration module uses spline interpolation to generate sampling trajectories; The candidate behavior calculation module calculates the currently allowed candidate behaviors in advance based on the current driving behavior and the actual road conditions; Anchor point calculation module, which calculates anchor points within the drivable area based on conflicting obstacles and planning tasks, and performs discretization processing; The node search module uses a search algorithm to generate trajectory parameters. By gradually expanding nodes, it searches for all sampling paths connecting each node. The trajectory parameters corresponding to each sampling path constitute a complete trajectory. GPU parallel computing module, which uses the parallelization capability of GPU to accelerate computing; The post-trajectory evaluation module is used to complete the following tasks: Behavior urgency assessment: Based on real-time environmental data and obstacle dynamics, combined with obstacle uncertainty, the urgency of the current behavior switch is assessed; Behavior outcome analysis: predicting the outcomes of different switching behaviors, including the impact on the vehicle itself and surrounding traffic participants; Comprehensive decision-making: After the evaluation is completed, the system will comprehensively consider the urgency of the current behavior and the various consequences after the switch, and select the optimal candidate trajectory through a weighted algorithm or decision tree method.
9. The parallel computing device for autonomous driving trajectory planning according to claim 8, characterized in that: The GPU parallel computing module includes: Data encoding module, GPU initialization and encoding of trajectory parameters, behavior, reference lines and obstacle information to adapt to the GPU's parallel data processing format; Parallel computing module, performs the following tasks: Trajectory discretization: In each thread, the trajectory is discretized based on time to generate trajectory points for subsequent processing and evaluation; Trajectory evaluation: In their respective threads, the generated trajectory points are evaluated. sumCost=traj plan +lon decition +years decition Decision costs are introduced into the evaluation process to enhance the ability to interact with dynamic obstacles. During this process, an ST graph is constructed for obstacles that interfere with the ego vehicle on each trajectory to evaluate the longitudinal decision cost of the trajectory. The cost function for longitudinal decisions takes into account the size and efficiency of the space corresponding to the trajectory. The lateral decision is comprehensively evaluated using the amplitude and direction of the trajectory's lateral changes. The sampling output module obtains the trajectory point set of all trajectories and their corresponding cost sizes, and uses the sorting algorithm to calculate the optimal trajectory corresponding to each candidate behavior.
10. A computer-readable storage medium containing a computer program, characterized in that When the computer program is executed by one or more processors, the parallel computing method for autonomous driving trajectory planning according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
An intelligent vehicle GPU parallel acceleration trajectory planning method
CN109885891A
Vehicle local trajectory planning method in structured road scene
CN111338335A
Automatic driving vehicle trajectory planning method and system
CN112810630A