Vehicle motion and Coordinate System

Instead of using the global path and simulation coordinates to represent the vehicle motion, we use the Frénet Frame Method and switch to a dynamic reference frame. From a given global path segment surrounding the vehicle position, we fit a spline to generate what we call the reference path that is used for the following transformations. The reference frame Frénet frame is given by the tangential and normal vectors $\vec{t}$, $\vec{n}$ from the closest point to the vehicle along the arc length of this path. The resulting frame uses the S axis to represent the longitudinal displacement along this path, and the D axis to represent the lateral displacement.

This process allows the model to store the road geometry, surrounding traffic state, and vehicle trajectories using a parametric representation that limits computation and is convenient to manipulate and easy to execute in simulation.

The vehicle motion is represented by a {trajectory} that combines two independent polynomial functions $S(t)$ and $D(t)$ in the Frénet frame, and $T$ as the total time. Velocity and acceleration are the first and second derivatives, resulting in a vehicle's longitudinal and lateral state in the Frénet frame:

The vehicle state is always computed in the Frénet frame, and then translated to the Cartesian frame state at each simulation frame cycle over the same reference path.

Implementation Note: The motion "smoothness" can be increased with higher density in the reference path and the simulation rate. Higher rates (30-60Hz) result in a small delta time in updating the vehicle state and running transformations.

Our method does not require a controller, driver inputs (e.g., throttle, break), and a Vehicle Model, since we leverage the simulation nature of the model to output the final vehicle state in simulation coordinates as a direct result from the trajectory sub-functions at any point in simulation time.

This decision allows us to reduce the model complexity while respecting the dynamics and nonholonomic constraints of the vehicle. However, it requires a trajectory at all times (unless the vehicle is not moving) and relies on the trajectory generation process in finding $S$ and $D$ that approximate our model to how vehicles move in the real traffic. This is key in achieving our goal of mimicking human-driving behavior on the road and will be discussed in the Maneuver Layer (Section \ref{sec:maneuvermodels}).

The reference path must always exist with a fixed length, and can be extended beyond the global path even if the vehicle reaches the end of route. This extention is called padding and guarantees the vehicle always has a reference to project its movement and apply transformations to the surrounding traffic.