Disclosure of Invention
In view of the above, the invention aims to provide an automatic driving prediction-planning integrated method based on traffic heterograms, which effectively models multimode interaction in complex interaction scenes, efficiently fuses peripheral vehicle prediction information and ensures safe and reasonable motion planning of a vehicle through optimization solution. Compared with the traditional planning method, the method has more excellent prediction performance, safety and running efficiency.
In order to achieve the above purpose, the present invention provides the following technical solutions:
an automatic driving prediction-planning integration method based on traffic abnormal composition specifically comprises the following steps:
s1, modeling dynamic characteristics of an intelligent agent and interactive characteristics among traffic participants, and designing a lane graph node characteristic representation based on a graph convolution network;
S2, capturing interaction characteristics between the lane nodes and the intelligent agents through a graph attention mechanism by adopting an encoding-decoding architecture, and constructing a multi-intelligent agent track prediction model based on traffic abnormal composition after feature fusion;
And S3, designing an objective function and various constraints based on the future position information of the surrounding vehicle output by the track prediction model to perform optimization solution of the vehicle motion.
Further, the step S1 specifically includes the following steps:
s11, defining current traffic information including driving lane information Historical track information of n intelligent agents at t moment
Wherein t 0 is the historical track time length; The motion state information of the ith agent at the moment t, Respectively representing coordinate information of the current moment of the vehicle, speed components in the x and y directions and course angle information;
S12, for the node characteristics of the intelligent agent, adopting a method based on a cyclic neural network to dynamically encode three traffic participant types of vehicles, bicycles and pedestrians, wherein for the intelligent agent A i, the encoding dynamic characteristics are as follows:
Wherein f i t represents the dynamics characteristics of the vehicle after the vehicle history track information is encoded, and GRU (graph) represents encoding through a cyclic neural network;
S13, modeling the interaction characteristics of the agents through a graph neural network, and firstly, designing dynamic screening conditions for each agent to select neighbor nodes:
wherein, the For the screened circumference radius, V i t is the current speed of the target node, L vehicle is the length of the vehicle, and lambda R is an empirically selected constant value;
S14, after the graph structure data representation is constructed, a graph attention mechanism is introduced to further strengthen the interaction characteristics among the vehicle nodes, and firstly, for a target node i and a neighbor node j screened by the target node i, the splicing characteristics z i,j of the directed edges of the target node i are expected to be obtained:
zi,j=ReLU(Wa[hi‖ei,j‖hj])
Where h i,hj is the coding feature of the node, e i,j is the edge embedding feature from node i to node j, W a is the attention line transformation matrix, and II is the concatenation of features;
s15, after feature stitching of each edge of the target node is obtained, the attention score is obtained through normalization of softmax, and the feature of the target node is updated:
Wherein A i represents the updated target node characteristics, And the number of neighbors of the node i is represented, k represents the number of neighbor agent nodes in the screening range of the target node i, alpha i,j represents the importance degree of the node j to the node i, and W b is a full-connection layer.
Further, the step S2 specifically includes the following steps:
s21, based on the driving lane information defined in step S11 Converting the data into list data by a polynomial interpolation method, sampling an interpolation point every 1m as a lane node, and specifically representing as follows:
wherein m represents the number of lanes of the current scene, i is more than or equal to 1 and less than or equal to m, and j represents the total number of nodes of a single lane;
S22, based on the obtained lane node information, for the lane Adding a lane information matrix to expand lane node characteristics:
Wherein, l u,lv is a set of index values of the Lane nodes, lane pre matrix indicates that the Lane node with index l v is a preceding node of the corresponding Lane node with index l u, lane suc represents a subsequent node, lane left,Laneright represents a left adjacent node and a right adjacent node respectively;
s23, for the established position information relation, carrying out characteristic enhancement by utilizing a graph convolution idea, and updating the characteristics of the target node by using the following formula:
wherein, the As a feature of the node of the target lane,In order to perform the linear layer of feature mapping,The specific calculation mode is as follows:
wherein, the Is a full connection layer for performing linear transformation on target features;
S24, in the prediction task, the feature that only adjacent lane nodes are gathered for the target lane node is insufficient in the aspect of lane information characterization, and the relation needs to be further expanded between more distant nodes, so that the pre and the suc type nodes are expanded by k steps, and node feature update is changed into:
The lane node indexed by l v_k is the successor/successor kth node indexed by l u_k, and the k value is usually 6 within the effective range of the lane node sequence; A linear transformation layer corresponding to the expansion node;
s25, introducing an attention mechanism to model vehicle-lane interaction characteristics, and obtaining an agent characteristic A and lane node characteristics Under the condition of (1), traversing the intelligent body nodes and the lane nodes, screening out node pairs with the distance meeting the range requirement to obtain a corresponding index list, c i,cj, recording the distance information of each pair of nodes meeting the condition, carrying out linear transformation on the screened characteristic information to obtain an intelligent body inquiry characteristic query and a distance characteristic dist, further obtaining characteristic cascade connection of the intelligent body nodes and the interactive lane nodes by the distance information based on the information, and carrying out characteristic superposition:
Ctx=Wc(query‖dist‖ctx)
Wherein Ctx is the selected lane node feature, ctx is the fusion vector of the query feature, the distance feature and the lane node aggregation feature, and after being accumulated with the corresponding agent node feature, the vehicle lane interaction feature la, W l、Wc and the regularization layer Norm are obtained through the activation layer Relu All-connected layer for carrying out linear transformation on corresponding characteristics
S26, carrying out dimension processing on the interaction characteristics of the intelligent agent node i and the lane, fusing the interaction characteristics with the previous intelligent agent dynamic characteristics and the interaction characteristics, and decoding a future prediction track under the intelligent agent prediction time domain P:
Enc=fuse(f+A+LA)
And LA i is the vehicle lane interactive characteristic after the average pooling operation, and the comprehensive characteristic code Enc is obtained after the characteristic fusion by combining the obtained intelligent body dynamic characteristic f and the interactive characteristic A. Also obtaining future trajectories of agents through a cyclic neural network based decoder LSTM
Further, the step S3 specifically includes the following steps:
S31, defining a state quantity h and a control quantity u of a system by combining a bicycle model of the vehicle:
Where a in u represents acceleration of the vehicle, δ is steering angle of the front wheel, v_s is speed along the reference path in the arc coordinate system, s_v is relaxation factor, and variables in h are current position coordinates x, y and heading angle of the vehicle, respectively And a vehicle speed v;
s32, comprehensively considering key factors influencing automatic driving, and designing an objective function J (u t,ht,st) based on model predictive control:
J(ut,ht,st)=Jfollow(ht,st)+Jv(ht)+Ju(ut)+JLF(ht,st)
Wherein s t is the position coordinate of the vehicle t moment in an arc coordinate system, J follow(ht,st) is a path following objective function, J v(ht) is a speed maintaining objective function, J u(ut) is a control action amount objective function, J LF(ht,st) is a road potential field objective function, and the specific calculation formulas of the objective functions are as follows:
wherein, the AndRepresenting error values of the real vehicle position and the approximate vehicle position in the arc length direction and the vehicle side direction in path following respectively, w s and w l are weight matrixes,S t is the reference arc length coordinate at the vehicle position at the current moment, which is the state quantity of the vehicle at the moment t;
wherein, the The square term representing the variable is multiplied by a weight value, J v represents a tracking target speed term, v t is a self-speed at t moment, v ref represents a target speed, and J u is an objective function formed by control variables of a solver and comprises acceleration a t, steering angle delta t, arc speed v_s and relaxation factor s_v;
The method is characterized in that the method is an objective function designed based on road constraint, and is expected to normalize the movement of a vehicle in a lane and drive near the center line of the lane, and meanwhile, a lower cost value is given to an adjacent lane compared with the lane boundary to ensure that the possibility of lane changing of the vehicle is considered when the vehicle is in obstacle avoidance, wherein y L is the distance between the vehicle and the lane boundary, L width is the lane width, and w LF is a weight coefficient matrix of the term;
s33, when the objective function is optimally solved through model predictive control, partial variables in the objective function are required to be constrained, so that the objective function is ensured to be in a reasonable calculation range, and the specific constraints are as follows:
hmin≤ht≤hmax
umin≤ut≤umax
wherein h min、hmax、umin、umax and Upper and lower limits of the state quantity and the control quantity respectively,As the heading angle of the current vehicle,Heading angle for an approximate point of the vehicle on the reference path;
S34, in the planning step, after Zhou Che track prediction information is packaged and processed, the track prediction information is used as a dynamic obstacle and is constrained by a vehicle planning controller formed through a contour error model, and the predicted track of Zhou Che is defined as follows:
wherein, the For the output of the trajectory prediction model,The future motion trail j of surrounding vehicles is the number of neighbor intelligent agents in the screening range;
Next, the shape of the vehicle is enveloped by a circle with three centers on the vehicle center line, denoted as The ellipse is used to represent the surrounding vehicle, and for each dynamic obstacle information, the ellipse is used to represent the surrounding vehicleWhich represents the coordinates of the position thereof,Representing a rotation matrix, a j and b j represent major and minor axes of an envelope ellipse of the vehicle, based on which the obstacle avoidance constraints of the controller can be converted to zero intersection of the envelope circle footprint of the vehicle itself with the surrounding vehicle representing the ellipse footprint:
wherein, the In order to avoid the representation of the obstacle constraint,The difference between the center of the vehicle circle and the center of Zhou Che ellipse in the x, y direction is t epsilon [0, P ], P is the prediction time domain, alpha=a+r i and beta=b+r i are the union of the original surrounding vehicle ellipse and the vehicle circle, so as to approximate the minkowski sum of the surrounding vehicle ellipse, and r i is the radius of the vehicle envelope circle;
S35, based on the objective function and the constraint condition, in a prediction time domain P of a prediction network, the motion planning problem of the vehicle can be converted into a rolling optimization type secondary optimal planning problem, which can be expressed as:
wherein, the And after the optimal control sequence is obtained, finishing iterative updating of the self-vehicle state and the initial value of the solver through the vehicle model, and entering the next round of optimization solving.
The method has the advantages that the method is used for capturing the multi-mode interaction characteristics in the complex traffic task efficiently, simultaneously fusing the model predictive control theory, dynamically updating the system state by introducing the predictive information of the surrounding vehicles, and generating reasonable and safe motion planning for the own vehicle. Compared with the traditional planning method, the method has the advantages that the interactive modeling precision is remarkably improved, and the traffic efficiency and the behavior robustness are further optimized on the premise of ensuring the safety.
(1) The invention encodes the dynamic characteristics of the vehicle history characteristics based on the cyclic neural network and captures the behavior interaction between vehicles through a multi-head attention mechanism as the vehicle nodes. Meanwhile, a dynamic neighbor screening method is designed, and an interaction diagram among traffic participants is more efficiently constructed.
(2) The invention constructs a novel lane node information matrix based on the vehicle driving lane information, and designs a corresponding graph convolution mode to model and expand the driving characteristics of the lane. The attention mechanism is introduced to model interaction characteristics of vehicle nodes and weighted lane nodes, so that the vehicle is helped to better understand the current driving environment and make more accurate track behavior prediction.
(3) The invention introduces the output information of the interactive prediction model into the safety motion planning of the own vehicle through the thought of model prediction control, the own vehicle predicts the future state, supplements the prediction information as system state update, and designs an objective function and constraint conditions to solve the current optimal acceleration and steering angle of the vehicle. The prediction information is efficiently utilized, and meanwhile, safe and reasonable self-vehicle path planning can be made.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and other advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out in the specification.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the illustrations provided in the following embodiments merely illustrate the basic idea of the present invention by way of illustration, and the following embodiments and features in the embodiments may be combined with each other without conflict.
Referring to fig. 1-3, the invention provides an automatic driving prediction-planning integration method based on traffic heterograms, which firstly models the dynamic characteristics of an intelligent agent and the interactive characteristics among traffic participants, and designs a lane graph node characteristic representation based on a graph rolling network as shown in fig. 1. And secondly, capturing interaction between the lane nodes and the intelligent agents through an attention mechanism, and decoding and outputting the predicted track of the multi-intelligent agent after feature fusion. Finally, the prediction information is introduced through the system state establishment and real-time updating of the model prediction control, and the objective function and various constraints are designed to perform the optimization solution of the vehicle motion.
As shown in fig. 2, constructing a multi-agent trajectory prediction model based on traffic heterograms, specifically comprising the following steps:
s21, based on the driving lane information defined in step S11 Converting the data into list data by a polynomial interpolation method, sampling an interpolation point every 1m as a lane node, and specifically representing as follows:
wherein m represents the number of lanes of the current scene, i is more than or equal to 1 and less than or equal to m, and j represents the total number of nodes of a single lane;
S22, based on the obtained lane node information, for the lane Adding a lane information matrix to expand lane node characteristics:
Wherein, l u,lv is a set of index values of the Lane nodes, lane pre matrix indicates that the Lane node with index l v is a preceding node of the corresponding Lane node with index l u, lane suc represents a subsequent node, lane left,Laneright represents a left adjacent node and a right adjacent node respectively;
s23, for the established position information relation, carrying out characteristic enhancement by utilizing a graph convolution idea, and updating the characteristics of the target node by using the following formula:
wherein, the As a feature of the node of the target lane,In order to perform the linear layer of feature mapping,The specific calculation mode is as follows:
wherein, the Is a full connection layer for performing linear transformation on target features;
S24, in the prediction task, the feature that only adjacent lane nodes are gathered for the target lane node is insufficient in the aspect of lane information characterization, and the relation needs to be further expanded between more distant nodes, so that the pre and the suc type nodes are expanded by k steps, and node feature update is changed into:
Wherein, the lane node indexed by l v_k is the successor/successor kth node indexed by l u_k, the k value is usually 6 within the effective range of the lane node sequence, A linear transformation layer corresponding to the expansion node;
s25, introducing an attention mechanism to model vehicle-lane interaction characteristics, and obtaining an agent characteristic A and lane node characteristics Under the condition of (1), traversing the intelligent body nodes and the lane nodes, screening out node pairs with the distance meeting the range requirement to obtain a corresponding index list, c i,cj, recording the distance information of each pair of nodes meeting the condition, carrying out linear transformation on the screened characteristic information to obtain an intelligent body inquiry characteristic query and a distance characteristic dist, further obtaining characteristic cascade connection of the intelligent body nodes and the interactive lane nodes by the distance information based on the information, and carrying out characteristic superposition:
Ctx=Wc(query‖dist‖ctx)
Wherein Ctx is the selected lane node feature, ctx is the fusion vector of the query feature, the distance feature and the lane node aggregation feature, and after being accumulated with the corresponding agent node feature, the vehicle lane interaction feature la, W l、Wc and the regularization layer Norm are obtained through the activation layer Relu All are full-connection layers which perform linear transformation on corresponding characteristics;
S26, carrying out dimension processing on the interaction characteristics of the intelligent agent node i and the lane, fusing the interaction characteristics with the previous intelligent agent dynamic characteristics and the interaction characteristics, and decoding a future prediction track under the intelligent agent prediction time domain P:
Enc=fuse(f+A+LA)
And LA i is the vehicle lane interactive characteristic after the average pooling operation, and the comprehensive characteristic code Enc is obtained after the characteristic fusion by combining the obtained intelligent body dynamic characteristic f and the interactive characteristic A. Also obtaining future trajectories of agents through a cyclic neural network based decoder LSTM
As shown in fig. 3, the automatic driving planning method for fusing the prediction information specifically includes the following steps:
S31, defining a state quantity h and a control quantity u of a system by combining a bicycle model of the vehicle:
Where a in u represents acceleration of the vehicle, δ is steering angle of the front wheel, v_s is speed along the reference path in the arc coordinate system, s_v is relaxation factor, and variables in h are current position coordinates x, y and heading angle of the vehicle, respectively And a vehicle speed v;
s32, comprehensively considering key factors influencing automatic driving, and designing an objective function J (u t,ht,st) based on model predictive control:
J(ut,ht,st)=Jfollow(ht,st)+Jv(ht)+Ju(ut)+JLF(ht,st)
Wherein s t is the position coordinate of the vehicle t moment in an arc coordinate system, J follow(ht,st) is a path following objective function, J v(ht) is a speed maintaining objective function, J u(ut) is a control action amount objective function, J LF(ht,st) is a road potential field objective function, and the specific calculation formulas of the objective functions are as follows:
wherein, the AndRepresenting error values of the real vehicle position and the approximate vehicle position in the arc length direction and the vehicle side direction in path following respectively, w s and w l are weight matrixes,S t is the reference arc length coordinate at the vehicle position at the current moment, which is the state quantity of the vehicle at the moment t;
wherein, the The square term representing the variable is multiplied by a weight value, J v represents a tracking target speed term, v t is a self-speed at t moment, v ref represents a target speed, and J u is an objective function formed by control variables of a solver and comprises acceleration a t, steering angle delta t, arc speed v_s and relaxation factor s_v;
The method is characterized in that the method is an objective function designed based on road constraint, and is expected to normalize the movement of a vehicle in a lane and drive near the center line of the lane, and meanwhile, a lower cost value is given to an adjacent lane compared with the lane boundary to ensure that the possibility of lane changing of the vehicle is considered when the vehicle is in obstacle avoidance, wherein y L is the distance between the vehicle and the lane boundary, L width is the lane width, and w LF is a weight coefficient matrix of the term;
s33, when the objective function is optimally solved through model predictive control, partial variables in the objective function are required to be constrained, so that the objective function is ensured to be in a reasonable calculation range, and the specific constraints are as follows:
hmin≤ht≤hmax
umin≤ut≤umax
wherein h min、hmax、umin、umax and Upper and lower limits of the state quantity and the control quantity respectively,As the heading angle of the current vehicle,Heading angle for an approximate point of the vehicle on the reference path;
S34, in the planning step, after Zhou Che track prediction information is packaged and processed, the track prediction information is used as a dynamic obstacle and is constrained by a vehicle planning controller formed through a contour error model, and the predicted track of Zhou Che is defined as follows:
wherein, the For the output of the trajectory prediction model,J is the number of neighbor intelligent agents in the screening range for the future motion trail of surrounding vehicles;
Next, the shape of the vehicle is enveloped by a circle with three centers on the vehicle center line, denoted as The ellipse is used to represent the surrounding vehicle, and for each dynamic obstacle information, the ellipse is used to represent the surrounding vehicleWhich represents the coordinates of the position thereof,Representing a rotation matrix, a j and b j represent major and minor axes of an envelope ellipse of the vehicle, based on which the obstacle avoidance constraints of the controller can be converted to zero intersection of the envelope circle footprint of the vehicle itself with the surrounding vehicle representing the ellipse footprint:
wherein, the In order to avoid the representation of the obstacle constraint,The difference between the center of the vehicle circle and the center of Zhou Che ellipse in the x, y direction is t epsilon [0, P ], P is the prediction time domain, alpha=a+r i and beta=b+r i are the union of the original surrounding vehicle ellipse and the vehicle circle, so as to approximate the minkowski sum of the surrounding vehicle ellipse, and r i is the radius of the vehicle envelope circle;
S35, based on the objective function and the constraint condition, in a prediction time domain P of a prediction network, the motion planning problem of the vehicle can be converted into a rolling optimization type secondary optimal planning problem, which can be expressed as:
wherein, the And after the optimal control sequence is obtained, finishing iterative updating of the self-vehicle state and the initial value of the solver through the vehicle model, and entering the next round of optimization solving.
Finally, it is noted that the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made thereto without departing from the spirit and scope of the present invention, which is intended to be covered by the claims of the present invention.