Motion Planning for Autonomous Driving with Real Traffic Data Validation

Accurate trajectory prediction of surrounding road users is the fundamental input for motion planning, which enables safe autonomous driving on public roads. In this paper, a safe motion planning approach is proposed based on the deep learning-based trajectory prediction method. To begin with, a trajectory prediction model is established based on the graph neural network (GNN) that is trained utilizing the INTERACTION dataset. Then, the validated trajectory prediction model is used to predict the future trajectories of surrounding road users, including pedestrians and vehicles. In addition, a GNN prediction model-enabled motion planner is developed based on the model predictive control technique. Furthermore, two driving scenarios are extracted from the INTERACTION dataset to validate and evaluate the effectiveness of the proposed motion planning approach, i.e . , merging and roundabout scenarios. The results demonstrate that the proposed method can lower the risk and improve driving safety compared with the baseline method.


Introduction
Currently, autonomous vehicles are attracting more and more attention from both industry and academics due to their potential to improve traffic efficiency and safety [1].However, the real-world traffic situation is particularly complex, and the safety issue remains a barrier to the development of autonomous vehicles [2].In particular, safely navigating in complicated situations, such as roundabouts, is challenging for autonomous driving.If an autonomous vehicle attempts to move through a roundabout, it first ought to accurately anticipate the future trajectory of the road users nearby (e.g., vehicles and pedestrians) [3][4][5].In this way, the autonomous vehicle can make safe motion planning and prevent potential collisions with surrounding road users.Therefore, the trajectory prediction of the surrounding road users and motion planning are the two critical issues of autonomous driving [6][7][8].Currently, most of the studies have studied both separately.Nevertheless, from a holistic perspective, the functions of the two are closely integrated, making it necessary to study them together.
Trajectory prediction is paramount to planning motions in the presence of other road users.However, this is a particularly difficult task because the motion of road users is multi-modal and relies on other actors.Over the past few decades, numerous algorithms have been proposed and developed in the field of trajectory prediction.Presently, motion prediction approaches can roughly be divided into three categories, namely, physics-based [9,10], maneuver-based [11], and interaction-aware methods [12][13][14].Physics-based trajectory prediction method identifies each traffic participant on the road as an independent individual and predicts its trajectory using its kinematic or dynamic features.The bulk of this type of prediction approach disregards interactions with other road users and traffic regulations, so the prediction performance is not ideal [15].Besides, the maneuver-based is to make a choice of policy and make predictions based on this policy, but this approach also ignores the interaction features between other road users [16,17].Recent studies display that the interaction-aware method which incorporates the interactive knowledge of driving behavior and performs better than the previous two methods has become a highly popular trajectory prediction method [18].To forecast an agent's trajectory accurately, most interaction-aware approaches employ deep learning techniques.Recurrent Neural Networks (RNN) and Graph Neural Networks (GNN) are the two commonly used trajectory prediction neural networks.In Ref. [19], to encapsulate the dynamics of agents and represent interaction by transferring information among the agents with a predefined distance, a social long shortterm memory (LSTM) model, i.e., a conventional RNNbased prediction model was presented.Nonetheless, no consideration was given to the spatial interaction of the surrounding agents.To solve this issue, another work [12], the convolutional social pooling technique was proposed.In detail, convolutional neural networks (CNN) are used to extract the interaction information between vehicles on the highway.However, for complex scenarios such as a roundabout, this method cannot accurately grasp the behavior interaction features of agents, and thus, the prediction performance is bad.In contrast to LSTM, GNN is suited for modeling interaction due to its unique nature.In Ref. [13], A GNN-RNN-based trajectory prediction method is proposed, where vehicles' dynamics features are extracted from their historical tracks using RNN, and the inter-vehicular interaction is represented by a directed graph and encoded using the graph attention networks.However, it focuses on singleagent trajectory prediction and only focuses on vehicles, without considering other types of agents such as pedestrians.To tackle this issue, an improved scheme called GRIP++ where both fixed and dynamic graphs are utilized for trajectory predictions of different types of traffic agents including vehicles and pedestrians [16].Furthermore, a heterogeneous graph attention network is built for multi-agent trajectory prediction, which can deal with the heterogeneity of the target agents and traffic participants involved [18].Given the effectiveness of GNN in the task of trajectory prediction, GNN will be used in this paper to provide prediction results for downstream planners.Note that the focus of this paper is not to improve forecasting accuracy, but to study how to integrate prediction results with the motion planner better.
On the other hand, the motion planning technique, as previously discussed, is another key for autonomous vehicles to accomplish autonomous driving tasks, which poses a significant impact on driving safety.Heuristic path planning algorithms include the A * algorithm [20], the Dijkstra algorithm [21], and others [22].This type of algorithm attempts to find a path between a set of nodes by computing the lowest cost evaluation value from each node to the destination.Because these nodes are discontinuous, they must be smoothed further before being used in practice.To achieve a smooth and dynamic feasible trajectory, optimization-based approaches such as model predictive control (MPC) [23,24], and artificial potential field (PF) [25,26] are commonly utilized.At present, optimization-based methods are widely applied for motion planning, especially the MPC technique.The reason is that this method could explicitly define the collision and dynamics constraints, which converts the motion planning task into the optimal control issue.While these techniques have been successfully utilized in autonomous driving demonstrations, motion planning issues remain challenging in highly interactive environments such as roundabouts and merging scenarios.Previous studies often assume other road users maintain constant velocity or follow given trajectories, which can be accurately accessed by autonomous vehicles.However, this assumption can hardly be held.In practice, the future behavior of other road users is generally required to be obtained by prediction models.It can be found that it is particularly important to combine prediction results and the motion planner appropriately.In addition, learningbased approaches, such as reinforcement learning and imitation learning [27][28][29], are widely used to solve the motion planning problem.However, the downside of these techniques is that it is notoriously difficult to ensure safety.Thus, this paper will adopt an optimization-based method, i.e., MPC, to design the motion planner since it is well-suited for processing the output information of the trajectory prediction model.
Currently, integrating neural network predictors with planners has gradually attracted attention.For example, a mathematical control framework based on MPC encompassing an RNN architecture was proposed [30].Similarly, an MPC-based motion planning algorithm that incorporates a GNN predictor was built to achieve cooperation-aware lane change [31].Recently, Ref. [32] presented an interaction-aware planner that utilizes a neural network-based predictor and analytically integrates it with MPC.However, these works mainly focus on how to improve lane change efficiency through interactionaware prediction, and only consider vehicles, without considering pedestrians, etc.This paper tries to investigate whether neural network-based predictors could improve planning safety with real traffic data validation.The main contributions and the technical advancements are summarized as follows.A GNN network is established and trained for the trajectory prediction of road users including vehicles and pedestrians on the INTERACTION dataset [33].Then, hard collision avoidance constraints are designed based on the prediction results.More importantly, an MPC-based motion planning method that takes into account the collision avoidance constraints of surrounding road users is proposed.Finally, two driving scenarios, merging and roundabout scenarios are extracted and reconstructed from the INTERACTION dataset for validation and evaluation of the proposed method.
The rest of this paper is organized as follows.Section 2 presents the overall architecture of the motion planning framework with the GNN-based trajectory prediction model.Section 3 demonstrates the specific process of GNN-based motion prediction.Section 4 provides the design for the MPC-based motion planning approach.The INTERACTION dataset is used to evaluate the proposed motion prediction model, and two cases are carried out to verify the proposed motion planning method in Section 5.The conclusion and future work are given in Section 6.

Motion Planning Framework with Graph Neural Network-Based Prediction Model
Figure 1 demonstrates the conceptual framework of motion planning with the GNN-based trajectory prediction model in this paper.The framework is mainly composed of two layers, including the trajectory prediction part, and the motion planning part that plans motion based on the predicted future trajectories of the surrounding road users.Firstly, to accurately capture the interaction features among road users, the GNN is utilized in this work.In detail, each road user is modeled as a node in the graph.The historical dynamic information of road users, i.e., position, velocity, and heading angle are processed by the RNN encoder, which is also used as the node features.The interaction features are represented as edge attributes among nodes.Then, the dynamic features and interaction features are fed to the LSTM decoder to generate the final prediction trajectory.
To achieve safe motion planning, the MPC technology is utilized to handle the predicted trajectory.Specifically, collision avoidance constraints are designed based on the future trajectory of surrounding road users.In addition, the traffic rules including speed limits, and road boundary limits are also considered.More importantly, the target driving path, target speed, and control efforts are processed in the objective function.In this way, the motion planning issue could be converted into an optimization problem with multiple constraints.Finally, two challenging cases, including roundabout and merging scenarios are extracted from the realistic driving logs, i.e., the INTERACTION dataset.

Graph Neural Network-Based Trajectory Prediction Model
The driving environment is dynamic, and it is crucial for autonomous vehicles to accurately predict the future motion of nearby road users.This section aims to establish a prediction model that could simultaneously forecast the future trajectory of surrounding road users near the ego vehicle (the ego vehicle is referred to as the controlled autonomous vehicle).According to Refs.[16,18], the GNN is suitable to model and process the interaction among road users.Each road user is modeled as a node in the GNN.A directed graph is usually represented by G = (V , E) , where that there are n road users that need to be predicted), and E ⊂ V × V is the set of directed edges.Each node con- tains its node feature, and each directed edge contains an edge feature.
The input to the prediction model is X t , which is com- posed of the trajectory history of all predicted road users in the target region.
where X t is a collection of historical state informa- tion for all road users; rep- resents the historical states of the road user i at time t ; contains positions x , y , heading angle ϕ , and velocity v of the road user i , and t h represents the observation horizon.
The output of the prediction model is the future position of all agents, which is denoted as where Y t is the set of future state information of all agents; is the future trajectory of road user i ; t f means prediction horizon.
The details of the implementation are listed below.To begin with, the historical states of each road user need to be processed to extract the dynamic features.Currently, the RNN is commonly utilized to process the sequence information, which is utilized to encode the historical information of each road user.
where r i t is the extracted dynamic feature of the road user i at the time t .The dynamic feature r i t also serves as the node i 's features, which are denoted as Therefore, the node feature has been obtained via Eq.( 4), i.e., each road user's dynamic feature.
The edge features are defined as follows.An edge from node j to node i means that the node i 's behavior is influ- enced by the node j and the edge feature is the relative measurement of the node j to node i , e.g., position, veloc- ity v , and yaw angle ϕ .A set of edge attributes is denoted by: The output of the GNN layer is a new set of node features: (1) (2) ( Currently, there are two variants of GNN, namely, the graph convolutional network (GCN) model and the graph attention network (GAT) model [17].The GAT model, which is based on attention mechanisms, can consider the degree of influence of different road users on the predicted one.According to Ref. [18], the attention score of the node j to node i can be calculated as: where a is a single-layer feed-forward neural network; LeakyRelu is the activation function; N i means the neighbors of the node i .Thus, the feature of the node i is updated by calculating a weighted sum of edge-integrated node features over its surroundings.
where σ is the sigmoid function, and the symbol || means the concatenation operator, FC is the fully connected layer.
Finally, the LSTM-based decoder is utilized to predict the final future trajectory of the road user i by consider- ing individual dynamics hi and its interaction with other road users h i , i.e.,

Vehicle Kinematics Model
To depict the motion of the controlled autonomous vehicle, i.e., ego vehicle, a kinematic bicycle model (front-wheel-only) is employed while considering the computing cost and modeling accuracy.The kinematic equations are formulated as follows [34]: where β is the slip angle; l f and l r denote the distance from the front and rear axles of the vehicle to the center of gravity, respectively; x and y mean the positions; v indicates the speed along the vehicle body direction; ϕ is the heading angle.Set the state variable x = [x, y, ϕ, v] T and control input u = [a, δ] T , a is the acceleration, and δ is the steering angle.Thus, the vehicle model depicted in Eq. ( 11) can be briefly denoted ẋ = z(x, u) for the subse- quent discussion.

Collision Avoidance Constraints Design Considering Different Road User's Type
When operating on public roads, the autonomous vehicle must avoid collisions with other road users.In this paper, two main types of road users are considered, namely, vehicles and pedestrians.For different types of road users, we need to design different constraints.Therefore, we need to self-adapt the constraints according to their types.For example, pedestrians are the type of road users with low walking speeds, but high behavioral uncertainty.First of all, a set of circles are utilized to approximate the occupied region of the ego vehicle, i.e., T is the ego vehi- cle' states at the time t , and O i means the area of the circle with a given radius r ego .The number of required circles and their radius should be selected according to the shape parameters of the ego vehicle, and refer to Refs.[35,36] for details (in this paper, n = 3 ).Similarly, for the other road users, we use the equation of an ellipse to describe the area they occupy.The key parameters, including the semi-major axis and the semi-minor axis, will be adjusted based on the road users' shape parameters and their types.In addition, the orientation of road users should also be considered.The rotation matrix (the counterclockwise rotation angle is positive) is represented as: Specifically, if a road user i 's state at the time t is x s i t = [x s i , y s i , ϕ s i ] T , the collision avoidance constraints can be denoted as: where x t means the ego vehicle's states at the time t , including x and y ; x s i t = [x s i , y s i , ϕ s i ] T is the road user i 's state at the time t , where x s i , y s i are the positions; ϕ s i is the heading angle; R is the rotation matrix; a s i and b s i are the length and width of the vehicle i ; T 0 is the time headway factor; ε is a smaller positive value; ∀t ∈ [0, •  ( [0, t f ] are given by the prediction model via Eq.( 10), and the heading angle ϕ s i can be obtained by differentiation operations.Furthermore, considering that pedestrians have high behavioral uncertainty, it would be better to use the circle to describe the area they occupy.Therefore, if the road user's type is pedestrian, set a s i = b s i .

Traffic Rules Constraints and Actuator Saturation Constraints
Traffic Rules Constraints: In general, autonomous vehicles need to obey traffic rules on public roads, such as speed limits.The speed constraint is set as where v min and v max represent the minimal and maxi- mum allowed vehicle speeds, respectively.In addition, autonomous vehicles must not deviate from road boundaries, i.e., off-road.To make sure the vehicle stays inside the lines of the road, the limit on the lateral offset distance from the reference path (i.e., contour error) of the autonomous vehicle is imposed, i.e., where W road left and W road right indicate the boundaries of the road.
Actuator Saturation Constraints: The input variables should be restricted to consider the actuator saturation.
where a min and a max represent the minimal and maxi- mum allowed acceleration that the vehicle can reach.δ min and δ max are the minimal and maximum steering angles, respectively.

MPC-Based Motion Planner Design
Objective function: we assume that there is a high-level planner that gives a reference velocity v ref and reference path.Because, a route planner, usually, exists for autonomous driving systems to give a reasonable global driving path and optimal driving speed based on the current traffic flow.Then, the objective function is defined as follows to allow the autonomous vehicle to track the reference velocity while following the reference path: where e c t and e l t represent contour error and lag error, respectively.The contour error gauges the ego vehicle's (14) lateral departure from the reference path, whereas the lag error quantifies the longitudinal displacement of the ego vehicle from the reference path, and for details, refer to Ref. [35].In addition, t represents the ego vehicle's current progress on the reference path.q c , q l , q v , q a , q δ are the weight factors.At each stage, the MPC planner calculates the optimal control command to minimize the current cost.With a prediction horizon t f , the motion planning problem is constructed as a receding horizon trajectory optimization problem.The optimization issue is finally established as follows: where t is the control frequency; U min and U max are the lower and upper bounds of the control variables, corresponding to Eq. ( 16).So far, the motion planning problem has been transformed into the optimal control problem in the predictive time domain.The optimal problem is solved by the FORCESPRO solver [37]

Experiment Results and Discussion
Three cases are constructed based on the INTERAC-TION dataset for validation and evaluation.The ADE@3s of the prediction algorithm for the roundabout and merging scenario is 0.278 m and 0.320 m, respectively.In addition, collision avoidance with surrounding vehicles in the merging scenario, collision avoidance with surrounding pedestrians in the roundabout scenario, and collision avoidance with surrounding vehicles in the roundabout scenario are constructed.

Experiment Settings
During the experiment, to reproduce the original traffic scene in the dataset as much as possible, one of the vehicles in the selected scene is replaced to test the effectiveness of the proposed motion planner.The original driving path of the replaced vehicle in this scene segment is used as the reference path of the autonomous vehicle, and the maximum driving speed of the replaced vehicle is used as the target driving speed.Note that this is fundamentally different from the trajectory tracking control issue.The proposed planner does not need to track the speed trajectory of the vehicle being replaced.Instead, the planner ( 18) needs to achieve obstacle avoidance by controlling acceleration and steering angle based on the prediction results of the prediction model.The autonomous vehicle is allowed to deviate from the reference trajectory within a certain range.
To evaluate the performance of the proposed method, the following metric is utilized, i.e., driving safety.In detail, a driving safety metric that determines whether the ego vehicle is safe is obtained by detecting whether the optimal solution to the optimization problem (18) can be solved correctly at each time.This can be achieved via the solver, i.e., the exit_flag of the FORCESPRO solver at each time step.The reason is that collision avoidance is processed as a hard constraint in the optimization (18).In other words, if the optimal solution can be found, then it means that this constraint can be satisfied.Table 1 summarizes the parameters of the autonomous vehicle and the controller.In addition, the proposed method, called GNN-MPC is also compared to the MPC with the constant-velocity prediction model (Referred to as CV-MPC).

Case 1: Collision Avoidance with Surrounding Vehicles in the Merging Scenario
Figures 2 and 3 show a merging scenario in which the ego vehicle needs to safely cross a road that changes from two-lane to one-lane.This case is extracted from the INTERACTION dataset, i.e., the DR_USA_Roundabout_ FT-vehicle _track_14 file.In this case, vehicle #19 in the DR_USA_Roundabout_FT-vehicle _track_14 file is replaced by the motion planners utilized in the paper.Specifically, its driving path is set as the reference path for the planners.And the planners need to predict the future trajectories of surrounding road users to decide the acceleration and steering angle.The desired driving velocity is set as 8 m/s (i.e., v ref = 8 m/s) in this case, and the distance that the ego vehicle can deviate from the reference path is set to 0.5 m (i.e., W road left = W road right = 0.5 m).Three keyframes of the planned results outputted by CV-MPC and GNN-MPC planners are given in Figures 2  and 3, respectively.From the results, it can be found that road user vehicle #18 and vehicle #21 are the most significant agents affecting the safe completion of the merging behavior of the ego vehicle.The CV-MPC and GNN-MPC both predict that vehicle #21 will yield the ego vehicle (the red vehicle in the figures).Therefore, they choose to insert the ego vehicle between vehicle #18 and vehicle #21 to complete the merging maneuver.The driving velocities of CV-MPC, GNN-MPC, and the human driver (i.e., the original velocity profile of the vehicle #19 in the dataset) are given in Figure 4.More importantly, the safety metric, namely, the exit_flag of the FORCESPRO solver is also shown.It can be discovered that the exit_flag at each time step is normal for both planners.In other words, collision avoidance constraints can be satisfied.Furthermore, acceleration and steering angle are demonstrated in Figure 5, which means actuator saturation constraints are also met.In summary, these results show that both CV-MPC and GNN-MPC can handle this case successfully.Note that this case is primarily intended to verify the validity of the CV-MPC and GNN-MPC planners.In this case, the two key traffic participants vehicle #18 and vehicle #21 perform straight-line driving, and both planners can make good predictions about their behavior.

Case 2: Collision Avoidance with Vehicles and Pedestrians in the Roundabout Scenario
Roundabout is a complex scene for autonomous vehicles to make safe planning.When driving in the roundabout scenario, the future trajectory of surrounding road users needs to be accurately predicted.Figures 6, 7 Figures 8 and 9 show the planning result of avoiding pedestrians.In this scene, there are two pedestrians #14 and #15 in front of the ego vehicle.From Figure 8a, it can be found that CV-MPC predicts that the pedestrians will yield the ego vehicle at timestep 113, i.e., the ego vehicle can drive away from this area before the pedestrians reach the conflict point.However, by the time the ego vehicle reaches the conflict area, the pedestrians are approaching the conflict point, as shown in Figure 8b.Figures 8c and 10 demonstrate that the CV-MPC chooses to accelerate away, which puts the vehicle at risk of collision with pedestrians.For the GNN-MPC, as shown in Figures 9 and 10, it predicts the pedestrians will not yield the ego vehicle and selects to decelerate to avoid collision with them.Finally, the control inputs are given in Figure 11, which shows that the acceleration and steering angle can be limited to the desired range.From Figure 12, it can be found that the CV-MPC fails in this case.The reason is that it predicts the future trajectory of vehicle #135 deviates significantly from the actual trajectory.The planned results of GNN-MPC are given in Figure 13, which illustrate that it can accurately

Figure 1
Figure 1 The motion planning framework with graph neural network-based prediction model cos ϕ sin ϕ − sin ϕ cos ϕ .

, 8 and 9 demonstrateFigure 4 Figure 5 Figure 6 Figure 7 Figure 8
Figure 4 Comparison of driving velocity and safety performance in Case 1

Figures 12 and 13 Figure 9 Figure 10
Figures 12 and 13  show another collision avoidance case with multiple surrounding vehicles in the roundabout scenario.This case is also extracted from the INTERAC-TION-DR_USA_Roundabout_FT-vehicle_tracks_30 file.In this case, vehicle #119 in the DR_USA_Roundabout_ FT-vehicle_track_30 file is replaced by the motion planners utilized in the paper.Likewise, its driving path is set as the reference path for the planners.And the planners need to predict the future trajectories of surrounding

Figure 11 Figure 12 Figure 13 Figure 14 Figure 15
Figure 11 Comparison of acceleration and steering angle in Case 2

Table 1
Parameters of autonomous vehicles and the planner