Track generation method and device for automatic driving and computer program product
By converting high-precision map data into discrete semantic directed graphs, combined with path predictor generation and screening, the problem of insufficient diversity and accuracy of trajectory generation in autonomous driving technology is solved, and the problem of lack of prior information is realized. Efficient trajectory generation has promoted the development of autonomous driving technology.
Patent Information
- Application Number
- CN202411230462.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-27
AI Technical Summary
In the existing autonomous driving technology, the trajectory generation method relies on historical trajectory fragments or clear starting and ending information, and is difficult to effectively apply in areas without complete prior information, and the generated trajectory diversity and accuracy are insufficient.
By obtaining high-precision map data, converting it into a discrete semantic directed graph, and combining the pre-trained path predictor to generate a path node sequence, combining motion parameters to generate an initial trajectory, and filtering it according to road boundaries and collision constraints to obtain the final vehicle Trajectory.
Rapidly generate a large number of reasonable trajectory samples under some information, improving the efficiency and accuracy of trajectory generation, enhancing the application range and flexibility of the autonomous driving system, and providing strong data support and testing tools for autonomous driving technology .
Smart Images

Figure CN119203736A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to an autonomous driving trajectory generation method, device and computer program product. Background Art
[0002] The current development of autonomous driving technology still faces many challenges, and data-driven methods are increasingly becoming a technological trend. Therefore, large-scale, high-precision data sets are particularly important for improving and perfecting the performance of autonomous driving systems.
[0003] As an important source of information, trajectory data carries important information about the interaction between autonomous vehicles and surrounding objects. The application of trajectory data in autonomous driving includes multiple key areas such as trajectory prediction, trajectory planning, simulation scene generation, and testing.
[0004] In practical applications, the acquisition of trajectory data encounters multiple bottlenecks. Especially when conducting in-depth research on specific geographical areas, the collection of large-scale trajectory data is particularly difficult, which limits the in-depth development and optimization of autonomous driving technology.
[0005] Existing trajectory generation technologies generally rely on historical trajectory fragments or clear start and end point information as input, which limits their application potential in areas lacking complete prior information. The basis of trajectory generation lies in path planning, and the effectiveness of path planning is directly related to the reasonable modeling of road topology. If the path is constructed based only on direct road connections, it is simple and easy, but it sacrifices the diversity of the path; on the contrary, if the direct connection and indirect adjacent relationships are fully considered to exhaust all possible paths, the generated path and its corresponding trajectory may be seriously out of touch with the actual situation, losing practicality and accuracy. Summary of the invention
[0006] The technical problem to be solved by the embodiments of the present invention is to provide a method, device and computer program product for generating trajectories for autonomous driving, so as to improve the conformity of the generated trajectories with the actual situation and the diversity of the data.
[0007] In order to solve the above technical problems, the present invention provides a method for generating a trajectory of an automatic driving system, comprising the following steps:
[0008] Acquire high-precision map data and an initial road node set of a target area, and convert the high-precision map data into a discrete semantic directed graph;
[0009] Inputting the discrete semantic directed graph and the initial road node set into a pre-trained path predictor to generate a path node sequence, and generating an initial trajectory in combination with the sampled motion parameters;
[0010] According to the road boundaries and collision constraints, the generated initial trajectory is screened to obtain the final vehicle trajectory.
[0011] Preferably, converting the high-precision map data into a discrete semantic directed graph specifically includes:
[0012] Discretizing the high-precision map data into a set of nodes with uniform length and resolution, each node representing a lane segment;
[0013] A feature vector is defined for each node to express the geometric and semantic information of the node, wherein the feature vector includes the node position coordinates, tangent angle and mark vector;
[0014] An adjacency matrix between nodes is constructed to represent the connection relationship between nodes, wherein the connection relationship includes sequential connection, reverse connection, left adjacent, right adjacent, and spatial adjacent.
[0015] Preferably, the step of obtaining an initial road node set of the target area specifically includes:
[0016] Get multiple snapshots of the target area at different times;
[0017] The road information is extracted from the snapshot and converted into an initial road node set.
[0018] Preferably, the step of inputting the discrete semantic directed graph and the initial road node set into a pre-trained path predictor to generate a path node sequence specifically includes:
[0019] Select the first node in the initial road node set as the current node;
[0020] Add the current node to the created node sequence;
[0021] The following steps are executed repeatedly until the termination condition is met:
[0022] Using a pre-trained path predictor, inputting the node sequence and the discrete semantic directed graph, predicting the probability distribution of transferring from the current node to its surrounding nodes;
[0023] According to the predicted probability distribution, a new node is sampled;
[0024] The sampled new node is set as the new current node and added to the end of the node sequence.
[0025] Preferably, the termination condition is that the new nodes obtained by sampling reach the region boundary or the length of the node sequence reaches a preset maximum value.
[0026] Preferably, after generating the path node sequence, the method further includes:
[0027] Each node in the path node sequence is used as a control point, and the Bezier curve parameter equation is used to interpolate each control point to generate a Bezier curve.
[0028] Preferably, combining the generated path node sequence with the sampled motion parameters to generate the initial trajectory specifically includes:
[0029] Determine the distribution of vehicle speed and acceleration based on target area information and prior knowledge;
[0030] The motion parameters are sampled from the uniform distribution of velocity and the Laplace distribution of acceleration;
[0031] According to the sampled motion parameters, the motion distance from the trajectory point to be generated to the starting point is calculated;
[0032] Through the Bezier curve parameter equation, the coordinates of the corresponding trajectory points are determined according to the calculated movement distance;
[0033] Repeat the above steps to generate corresponding trajectory points for each path node, which together constitute the initial trajectory of the vehicle.
[0034] Preferably, the generated initial trajectory is screened according to the road boundary and the collision constraint conditions to obtain the final vehicle trajectory, specifically including:
[0035] Perform kinematic characteristic checks on the generated initial trajectory, including checking whether the speed of the initial trajectory exceeds a preset threshold and whether the bending angle between adjacent trajectory point pairs exceeds a preset upper limit;
[0036] By assuming vehicle size and safety distance, each generated trajectory point is checked for collision to identify whether it collides with other trajectory points;
[0037] If a trajectory does not meet any of the conditions in the kinematic property check or the collision check, it will be removed from the generated initial trajectory.
[0038] Preferably, the path predictor is trained in the following manner:
[0039] Obtain trajectory data and high-precision maps of a specific area as input, and process the high-precision map into a discrete semantic directed graph with semantic feature information;
[0040] Match the trajectory points in the trajectory data with the discrete semantic directed graph one by one to obtain the node transfer information of the trajectory;
[0041] Taking the historical node sequence as the state and the next node around the current node as the demonstration behavior, the neural network is trained to minimize the loss expectation under the maximum likelihood estimation for the demonstration data set, and the path predictor is obtained.
[0042] The present invention also provides a trajectory generating device for automatic driving, comprising:
[0043] A data preprocessing module, used to obtain high-precision map data and an initial road node set of a target area, and convert the high-precision map data into a discrete semantic directed graph;
[0044] A path prediction module, for inputting the discrete semantic directed graph and the initial road node set into a pre-trained path predictor, generating a path node sequence, and generating an initial trajectory in combination with the sampled motion parameters;
[0045] The trajectory screening module is used to screen the generated initial trajectory according to the road boundary and collision constraints to obtain the final vehicle trajectory.
[0046] The present invention also provides a trajectory generating device for automatic driving, comprising:
[0047] one or more processors;
[0048] Memory;
[0049] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the trajectory generation method for autonomous driving.
[0050] The present invention also provides a computer program product, comprising computer instructions, wherein the computer instructions instruct a computer device to execute operations corresponding to the method.
[0051] The implementation of the present invention has the following beneficial effects: the present invention reduces the reliance on large-scale historical trajectory data by converting high-precision map data into a discrete directed graph containing rich semantic information, and combines it with a pre-trained path predictor, so that a large number of reasonable trajectory samples can be quickly generated even with only partial information, greatly improving the efficiency of trajectory sample acquisition. Secondly, trajectory samples can not only be used to generate autonomous driving simulation scenarios, but also provide rich data enhancement training resources for data-driven trajectory prediction algorithms. In particular, in the application of trajectory prediction algorithms, only relevant information about the target area needs to be input to quickly generate a large number of trajectory samples that are feasible for motion and conform to the road structure, thereby predictively improving the rationality of the prediction algorithm output. At the same time, the generated trajectory can also be directly converted into a simulation scene file, which is convenient for importing and testing autonomous driving algorithms in simulation software, further promoting the research and development and application of autonomous driving technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 It is a flowchart of a method for generating a trajectory for autonomous driving according to an embodiment of the present invention.
[0054] Figure 2 It is a schematic diagram of the implementation principle of a method for generating a trajectory for autonomous driving according to Embodiment 1 of the present invention.
[0055] Figure 3a It is a schematic diagram of the format of the Lanelet2 map used in the embodiment of the present invention.
[0056] Figure 3b Schematic diagram of the connection relationship between two Lanelets in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following descriptions of the embodiments refer to the accompanying drawings to illustrate specific embodiments in which the present invention may be implemented.
[0058] Please refer to Figure 1 As shown, the first embodiment of the present invention provides a method for generating a trajectory of an autonomous driving system, comprising the following steps:
[0059] Acquire high-precision map data and an initial road node set of a target area, and convert the high-precision map data into a discrete semantic directed graph;
[0060] Inputting the discrete semantic directed graph and the initial road node set into a pre-trained path predictor to generate a path node sequence, and generating an initial trajectory in combination with the sampled motion parameters;
[0061] According to the road boundaries and collision constraints, the generated initial trajectory is screened to obtain the final vehicle trajectory.
[0062] Through the above steps, it can be seen that the present invention realizes the effective prediction of the path node sequence of the target area by converting high-precision map data into a discrete semantic directed graph and combining it with a pre-trained path predictor. The present invention not only improves the efficiency and accuracy of trajectory generation, but also ensures the real feasibility and diversity of the generated trajectory by combining motion parameter sampling and a screening mechanism based on actual road constraints. In addition, the present invention can quickly adapt to new geographical areas without relying on large-scale historical trajectory data, greatly expanding the application scope and flexibility of the autonomous driving system, and providing strong data support and testing tools for the development of autonomous driving technology.
[0063] Specifically, in the embodiment of the present invention, high-precision map data of the target area is first obtained. The specific format is not limited, but the basic format requirements are to define basic geometric types such as points and polylines, relevant attribute information of road elements, lane structure and connection relationships, and to cover the area where the acquired trajectory is located. Common formats such as Lanelet2 format or OpenDrive format can meet the requirements, and the Lanelet2 format is taken as an example.
[0064] The Lanelet2 format specifies the basic elements, attribute types, relationship types, and hierarchical relationship representation methods of the map. Figure 3a As shown in Figure 1, the basic representation unit of the Lanelet2 map for road topology is Lanelet, which consists of a left boundary and a right boundary. It can be understood as a basic unit of a lane segment in a road. The road right relationship (i.e., the right and rules for vehicle driving) does not change within this basic unit. The relationship between a Lanelet and another Lanelet can be directly connected, adjacent to each other, intersecting, or separated, as shown in Figure 1. Figure 3b The relationship among A, B and C is shown in FIG.
[0065] For the area coverage requirement, assuming that the Lanelet2 map format is selected, its basic unit is Lanelet. For each point (x, y) in the spatial area P to which the trajectory belongs, there is at least one Lanelet in the input high-precision map that covers it, that is, the Lanelet in the map needs to completely cover the entire area where the trajectory is located to ensure that each point on the trajectory has corresponding map information:
[0066]
[0067] In the processing of high-precision maps, the embodiment of the present invention needs to process the original map format into a suitable discrete semantic graph format suitable for representing location, semantics and transfer relationships. The discrete semantic graph consists of nodes and edges, and each node represents a lane segment with a semantic attribute. Specifically, take the conversion of the Lanelet2 map as an example:
[0068] Node feature representation: The nodes in the discrete semantic graph should be sufficiently refined to represent the semantic location and attributes, and the nodes' connecting edges can also flexibly represent the position transfer relationship. Although the original Lanelet2 map provides the semantic information and connection relationship of the Lanelet, the length of each Lanelet is uncertain and may vary greatly, but the lane length represented by each Node should be close. Therefore, when the Lanelet is converted to a Node, it needs to be segmented / discretized; after segmentation, each Node uses multiple pose points (Pose) on its original Lanelet as the original feature vector, that is, for node v:
[0069]
[0070] The feature vector of each Pose It is expressed as:
[0071]
[0072] in, They represent the horizontal and vertical coordinates of the nth Pose of node v in the map, Represents the tangent angle of the nth Pose of node v, It is a two-dimensional flag vector, which indicates whether the nth Pose of node v is on the stop line or the crosswalk with 0 or 1. In this way, the feature vector of the node not only expresses its geometric information, but also expresses the relevant traffic element information. The maximum length of the Node representation is set to 5 meters, and the resolution of the Node is 1 meter.
[0073] The adjacency matrix representation of node connection relationship:
[0074] There are five types of connection relationships between nodes. According to the connection relationship and topological information provided by Lanelet2, the directed edge types between nodes are defined, including sequential connection, reverse connection, left adjacent, right adjacent and spatially adjacent. After the original Lanelet is discretized, the connection relationship between nodes can be derived from the original Lanelet connection relationship and the position relationship between nodes. For N nodes in a map area, Node node features, the corresponding node adjacency matrix can be expressed as Mat adj , where Mat adj Yes (N Node ×N Node ) matrix, Matadj (i,j) indicates the type of connection relationship from node i to node j; for example, setting 0 indicates non-adjacent, and 1 indicates that node i is directly connected to node j on the path (in this case, Mat adj (j,i) = -1, indicating that j can reverse to i), 2 indicates that the j node can be reached by turning left from the i node (-2 if it can be reached to the right), and 3 indicates that the two nodes have no semantic relationship but are adjacent in space.
[0075] In addition to obtaining the high-precision map data of the target area, this embodiment also needs to obtain an initial road node set, which is specifically achieved by obtaining a snapshot of the target area. It can be understood that a snapshot refers to the capture or record of road information in the target area at a specific moment. Through image processing, computer vision and other technologies, the road information in the snapshot can be extracted and converted into the initial road node set Node initial , as shown below:
[0076] Node initial ={Node1, Node2, ..Node m}
[0077] Among them, Node1, Node2, ...Node m are the road nodes extracted from the snapshot.
[0078] It should be noted that when obtaining snapshots, attention should be paid to the reasonable spatial and temporal distribution of the target area, covering the main road sections of the target area, and the distribution should be uniform to ensure the comprehensiveness and representativeness of the information. In addition, the snapshots should be obtained at certain intervals to capture the location diversity in the area, that is, at different times, the vehicles and traffic conditions on the road may be different. By obtaining snapshots at different times, a more comprehensive understanding of the road usage in the target area can be obtained.
[0079] The obtained discrete semantic directed graph and initial road node set will be used as the input of the pre-trained path predictor to perform iterative prediction to generate a path node sequence. The specific path node sequence generation process (Roll-out) is as follows:
[0080] First, initialize:
[0081] Select the initial road node set Node initial The first node Node1 in is used as the current node Node cur ;
[0082] Create a node sequence Node sequence , and add Node1 to it.
[0083] The following steps are executed repeatedly until the termination condition is met:
[0084] a. Execute current node prediction:
[0085] Using the pre-trained path predictor Predictor BC , enter the current node sequence Node sequence And discrete semantic directed graph, predicting from the current node Node cur The probability distribution P of transferring to its surrounding nodes transition :
[0086] P transitiom (Node cur →Node j |Node sequence )
[0087] b. Sampling new nodes:
[0088] According to the predicted probability distribution P transition , sample to get a new node Node new .
[0089] c. Update the current node and node sequence:
[0090] The new node Node new Set as the new current node cur , and add it to the node sequence Node sequence The end of:
[0091] Node new →Node cur
[0092] Node sequence ={Node1,Node2,…,Node i ,Node new}
[0093] The above Roll-out process will continue until the termination condition is met. There are two termination conditions: one is the newly sampled node Node new The first is the region boundary node, which means that the edge of the map has been reached and there are no more roads to explore; the second is that the length of the node sequence has reached the maximum length Max_Steps, which means that a long enough path has been generated and no further expansion is needed. Once any of these two conditions is met, the Roll-out process will stop and output the final node sequence Node sequence , the node sequence represents a possible generated path.
[0094] It should be noted that in the above iterative prediction process, the discrete semantic directed graph provides the connection relationship and semantic information between nodes. BC When predicting the probability distribution of the current node transferring to the surrounding nodes, the node that may be transferred to next is predicted based on the position of the current node in the discrete semantic directed graph and the attributes of the nodes and edges connected to it.
[0095] The generated path node sequence needs to meet the requirements of smoothness and transition. Therefore, the embodiment of the present invention uses Bezier curve interpolation to obtain smoothed path points as required. The Bezier curve is determined by the control point. Given a path node sequence Node sequence The position of each node (x i ,y i ), then each node can be regarded as a control point, and thus n+1 control points P0, P1, …, P n , where n = len(Node sequence )-1, the parameter of the Bezier curve is t, and its value range is [0, 1]. Each point on the Bezier curve (x i ,y i ) can be calculated by the following formula:
[0096]
[0097] in, is the Bernstein polynomial, which is defined as:
[0098]
[0099] The above formula describes a method for generating a parametric equation of a Bezier curve from a path node sequence. In subsequent trajectory generation, corresponding trajectory points can be generated along the Bezier curve.
[0100] When sampling motion parameters, we should first combine prior knowledge and some information of the target area to determine a reasonable and available motion parameter distribution, including the distribution of the speed and acceleration of the vehicle target; then sample the motion parameters, and calculate the motion distance at different times based on the sampled motion parameters; then substitute the motion distance at different times into the parametric equation of the Bezier curve to obtain the x and y coordinates at different times.
[0101] For example, suppose the time intervals at which trajectory points are generated are uniform and are dt apart:
[0102] Motion parameter distribution and sampling: In the absence of much prior information, the initial velocity v0 can be sampled from a uniform distribution, and the acceleration a i You can choose to sample from a Laplace distribution, that is
[0103] v0~Uniform(v min , v max )
[0104] a i ~Laplace(0,b)
[0105] Among them, v min ,v max are the given maximum and minimum velocities, b is the scale parameter of the given Laplace distribution;
[0106] Distance calculation: For the i-th trajectory point to be generated, its distance from the starting point is:
[0107]
[0108] Among them, v i =v0+a i-1 dt.
[0109] Compute trajectory points on a Bezier curve:
[0110] Assume t d is the parameter value corresponding to the distance d on the Bezier curve, which can be calculated by solving the following formula:
[0111]
[0112] in, and is the derivative of the Bezier curve; t can be solved by d The numerical solution of t d Substituting x(t) and y(t), we get the trajectory point x corresponding to the distance d. d ,y d .
[0113] For each path node in the generated path node sequence, the corresponding trajectory point (x i ,y i ), these trajectory points together constitute the initial trajectory of the vehicle.
[0114] It should be noted that the actual vehicle kinematic characteristics are not taken into account when generating the initial trajectory of the vehicle, so there may be some unreasonable trajectories. If multiple trajectories are generated simultaneously based on multiple initial nodes given by the snapshot, there may also be collisions between trajectories. For these situations, some prior knowledge should be combined to remove some unreasonable trajectories from all generated trajectory samples to ensure the real feasibility of the generated trajectory.
[0115] Kinematic characteristic inspection: including but not limited to, checking whether the speed is greater than a certain set threshold, and whether the bending angle between adjacent trajectory point pairs is greater than a certain upper limit;
[0116] Track point collision check: For the generated track point (x i ,y i ), check whether there is a collision with other trajectory points. The specific collision detection algorithm can consider the size of the assumed vehicle and a reasonable safety distance.
[0117] The training process of the path predictor in the present invention is further described below.
[0118] First, obtain the trajectory data and high-precision map of a specific area as input for subsequent steps, where the trajectory data and high-precision map need to adapt to each other and are both within a given time and space range:
[0119] Trajectory data: All trajectory data is within a given time range. The trajectory dataset can be expressed as:
[0120] S traj ={s i |i=1,2,3...}
[0121] Each trajectory s i It consists of a series of trajectory points:
[0122] s i ={(x i,j ,y i,j ,t i,j )|j=1,2,...,N i}
[0123] Where N i is the number of trajectory points of the ith trajectory, (x i,j ,y i,j , t i,j ) represents the trajectory s i The horizontal and vertical coordinates and timestamp of the j-th point; the trajectory points should satisfy the time and space constraints of the region:
[0124]
[0125] Where T represents the time range of the trajectory data, for example, T = [Y start , T end ]; P represents the spatial extent of the region, such as an area defined by a polyline boundary.
[0126] The high-precision map is processed in the same way as above, and is represented as a discrete semantic directed graph with semantic feature information consisting of path nodes with attributes and directed edges. The specific process will not be described here.
[0127] For the trajectories in the trajectory dataset, by matching their trajectory points one by one with the discrete semantic directed graph, we can obtain the node transfer information of the trajectory, that is, the node / connection edge sequence corresponding to each trajectory.
[0128] The present invention trains a path predictor based on a neural network Bc , the prediction transfer strategy π can be implemented in the directed node graph Trans , the input of the path predictor is the discrete processed map representation and the historical path node sequence, and the output of the path predictor is the probability of going from the current node to the next surrounding node, so the predicted transfer strategy π Trans It can be expressed as a conditional classification probability prediction:
[0129] π Trans =P(Node next |Node ist , Map representation )
[0130] Among them, Map representation is a discrete semantic directed graph And its characteristics, Node hist It is a sequence of historical path nodes on a discrete semantic directed graph. next It is the reachable node around the latest historical node.
[0131] Specifically, using the principle of behavioral cloning, train a neural network:
[0132] Assume that the agent has a state space Action Space There is a demonstration data set D consisting of a batch of (state, action) pairs expert ={(s1,a1),(s2,a2),...,(s N , a N )}, where s i is a state in the state space, represented by a historical node sequence in this embodiment, a i It is based on i The demonstration behavior made by is represented by the next node around the current node in this embodiment. The goal of behavior cloning can be expressed as learning a arrive Strategy π θ , so that for the demonstration data set, the expected loss under maximum likelihood estimation is minimized:
[0133]
[0134] Among them, θ represents Predictor BC The parameter to be optimized, L is the loss function that measures the difference between the actions under the policy and the expert actions. In the implementation of the path predictor, a neural network with variable input length is used.
[0135] Through the above process of using a neural network to train a path predictor based on a discrete semantic map, after obtaining the path predictor, for new areas that lack trajectory data but have high-precision maps and snapshot information, the initial road nodes can be input into the path predictor, and the reasoning-sampling iteration can be performed to generate node paths, so that a complete waypoint sequence with rationality and diversity can be obtained; using these road node sequences as a benchmark, combined with the reasonably assumed kinematic parameter distribution, a large number of trajectory combinations can be generated; for the generated trajectory combinations, some prior knowledge can be combined to screen out unreasonable parts, so that a large number of real and usable trajectories can be obtained.
[0136] It should be noted that the existing trajectory generation methods generally require input of historical trajectories or starting point and target point information when generating trajectories, and in many cases this information is not easy to obtain. The present invention designs a path predictor with variable input. Under the condition that the training is completed using the existing trajectory and map data, for the target area where the trajectory needs to be generated, only a small number of snapshots including the initial position point at different times and the reasonably assumed motion parameter distribution are needed to generate a large number of trajectories in a sampling manner. As mentioned above, the basis for generating trajectories is the path, and the path depends on the reasonable road topological connection relationship; if only the road direct connection is considered to generate the path, it does not have diversity; but considering the direct connection and adjacent relationships to traverse and generate all the paths, the generated paths and corresponding trajectories will lose the conformity with the actual situation. In this regard, the present invention designs a discretized semantic map representation method, through which the path predictor can predict the general path transfer law of general vehicles on the road expressed in the form of probability, and a large number of paths that conform to the actual distribution can be sampled based on the path predictor. The path generated based on this method and the trajectory obtained by subsequent processing not only conform to the real law, but also have data diversity.
[0137] The present invention can generate a large number of reasonable trajectories that conform to road behavior and kinematics when having partial information about the target area. These trajectories can be used to generate autonomous driving simulation scenarios, data-driven trajectory prediction algorithm data enhancement training and other applications; for example, when used in trajectory prediction algorithms, for the target area that the prediction algorithm needs to adapt to, input relevant information, and a large number of data samples can be generated. These trajectory samples are feasible and conform to the road structure, which foreseeably improves the rationality of the prediction algorithm output. When used in simulation scenarios, the generated trajectories can be directly converted into scene files for importing and testing autonomous driving algorithms in simulation software.
[0138] Corresponding to the method for generating a trajectory of an autonomous driving system described in the first embodiment of the present invention, the second embodiment of the present invention further provides a device for generating a trajectory of an autonomous driving system, including:
[0139] A data preprocessing module, used to obtain high-precision map data and an initial road node set of a target area, and convert the high-precision map data into a discrete semantic directed graph;
[0140] A path prediction module, for inputting the discrete semantic directed graph and the initial road node set into a pre-trained path predictor, generating a path node sequence, and generating an initial trajectory in combination with the sampled motion parameters;
[0141] The trajectory screening module is used to screen the generated initial trajectory according to the road boundary and collision constraints to obtain the final vehicle trajectory.
[0142] Corresponding to the method for generating a trajectory of an autonomous driving system described in the first embodiment of the present invention, the third embodiment of the present invention further provides a device for generating a trajectory of an autonomous driving system, including:
[0143] one or more processors;
[0144] Memory;
[0145] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the trajectory generation method for autonomous driving.
[0146] Corresponding to the method for generating trajectories for autonomous driving described in the aforementioned first embodiment of the present invention, a fourth embodiment of the present invention further provides a computer program product, including computer instructions, wherein the computer instructions instruct a computer device to perform operations corresponding to the method.
[0147] Preferably, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor. The processor is the control center of the device, and various parts of the device are connected using various interfaces and lines.
[0148] The memory mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory can also be other volatile solid-state storage devices.
[0149] It should be noted that the above-mentioned device may include but is not limited to a processor and a memory, which can be understood by those skilled in the art.
[0150] For the working principle and process of the above embodiment, please refer to the description of the above embodiment of the present invention, which will not be repeated here.
[0151] It can be seen from the above description that compared with the prior art, the beneficial effect of the present invention is that the present invention reduces the dependence on large-scale historical trajectory data by converting high-precision map data into a discrete directed graph containing rich semantic information, and combining it with a pre-trained path predictor, so that a large number of reasonable trajectory samples can be quickly generated even with only partial information, greatly improving the efficiency of trajectory sample acquisition. Secondly, trajectory samples can not only be used to generate autonomous driving simulation scenes, but also provide rich data enhancement training resources for data-driven trajectory prediction algorithms. In particular, in the application of trajectory prediction algorithms, only relevant information of the target area needs to be input to quickly generate a large number of trajectory samples that are feasible in motion and conform to the road structure, thereby predictively improving the rationality of the prediction algorithm output. At the same time, the generated trajectory can also be directly converted into a simulation scene file, which is convenient for importing and testing autonomous driving algorithms in simulation software, further promoting the research and development and application of autonomous driving technology.
[0152] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for generating trajectories for autonomous driving, characterized in that: The following steps are involved: Acquire high-precision map data and an initial road node set of a target area, and convert the high-precision map data into a discrete semantic directed graph; Inputting the discrete semantic directed graph and the initial road node set into a pre-trained path predictor to generate a path node sequence, and generating an initial trajectory in combination with the sampled motion parameters; According to the road boundaries and collision constraints, the generated initial trajectory is screened to obtain the final vehicle trajectory.
2. The method according to claim 1, characterized in that The converting the high-precision map data into a discrete semantic directed graph specifically includes: Discretizing the high-precision map data into a set of nodes with uniform length and resolution, each node representing a lane segment; A feature vector is defined for each node to express the geometric and semantic information of the node, wherein the feature vector includes the node position coordinates, tangent angle and mark vector; An adjacency matrix between nodes is constructed to represent the connection relationship between nodes, wherein the connection relationship includes sequential connection, reverse connection, left adjacent, right adjacent, and spatial adjacent.
3. The method according to claim 1, characterized in that The step of obtaining the initial road node set of the target area specifically includes: Get multiple snapshots of the target area at different times; The road information is extracted from the snapshot and converted into an initial road node set.
4. The method according to claim 1, characterized in that: The step of inputting the discrete semantic directed graph and the initial road node set into a pre-trained path predictor to generate a path node sequence specifically includes: Select the first node in the initial road node set as the current node; Add the current node to the created node sequence; The following steps are executed repeatedly until the termination condition is met: Using a pre-trained path predictor, inputting the node sequence and the discrete semantic directed graph, predicting the probability distribution of transferring from the current node to its surrounding nodes; According to the predicted probability distribution, a new node is sampled; The sampled new node is set as the new current node and added to the end of the node sequence.
5. The method according to claim 4, characterized in that The termination condition is that the new node obtained by sampling reaches the region boundary or the length of the node sequence reaches a preset maximum value.
6. The method according to claim 4, characterized in that After generating the path node sequence, it also includes: Each node in the path node sequence is used as a control point, and the Bezier curve parameter equation is used to interpolate each control point to generate a Bezier curve.
7. The method according to claim 1, characterized in that The generated path node sequence is combined with the sampled motion parameters to generate the initial trajectory, specifically including: Determine the distribution of vehicle speed and acceleration based on target area information and prior knowledge; The motion parameters are sampled from the uniform distribution of velocity and the Laplace distribution of acceleration; According to the sampled motion parameters, the motion distance from the trajectory point to be generated to the starting point is calculated; Through the Bezier curve parameter equation, the coordinates of the corresponding trajectory points are determined according to the calculated movement distance; Repeat the above steps to generate corresponding trajectory points for each path node, which together constitute the initial trajectory of the vehicle.
8. The method according to claim 1, characterized in that The generated initial trajectory is screened according to the road boundary and collision constraint conditions to obtain the final vehicle trajectory, specifically including: Perform kinematic characteristic checks on the generated initial trajectory, including checking whether the speed of the initial trajectory exceeds a preset threshold and whether the bending angle between adjacent trajectory point pairs exceeds a preset upper limit; By assuming vehicle size and safety distance, each generated trajectory point is checked for collision to identify whether it collides with other trajectory points; If a trajectory does not meet any of the conditions in the kinematic property check or the collision check, it will be removed from the generated initial trajectory.
9. The method according to claim 1, characterized in that: The path predictor is trained in the following way: Obtain trajectory data and high-precision maps of a specific area as input, and process the high-precision map into a discrete semantic directed graph with semantic feature information; Match the trajectory points in the trajectory data with the discrete semantic directed graph one by one to obtain the node transfer information of the trajectory; Taking the historical node sequence as the state and the next node around the current node as the demonstration behavior, the neural network is trained to minimize the loss expectation under the maximum likelihood estimation for the demonstration data set, and the path predictor is obtained.
10. A trajectory generation device for automatic driving, characterized in that: include: A data preprocessing module, used to obtain high-precision map data and an initial road node set of a target area, and convert the high-precision map data into a discrete semantic directed graph; A path prediction module, for inputting the discrete semantic directed graph and the initial road node set into a pre-trained path predictor, generating a path node sequence, and generating an initial trajectory in combination with the sampled motion parameters; The trajectory screening module is used to screen the generated initial trajectory according to the road boundary and collision constraints to obtain the final vehicle trajectory.
11. A trajectory generation device for automatic driving, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the one or more processors, and the one or more applications are configured to execute the trajectory generation method for autonomous driving as described in any one of claims 1 to 9.
12. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions instruct a computer device to execute operations corresponding to the method according to any one of claims 1 to 9.
Citation Information
Cited By
Intelligent driving track determination method and device based on visual model and medium
CN120451931A
A method, device, and medium for determining intelligent driving trajectory based on a vision model.
CN120451931B