# Feasible Trajectories Generation for Autonomous Driving Vehicles
## 4 Trajectory Generation Subject to Constraints  
For a real vehicle, the steering angle is always limited from  
\[-\frac{\pi}{4}\leq\phi\leq\frac{\pi}{4} \tag{23}\]  
Once the vehicle moves from \([x_{0},y_{0},\theta_{0},\phi_{0}]\) to \([x_{T},y_{T},\theta_{T},\phi_{T}]\), it is assumed that the initial conditions of \([x_{0},y_{0},\theta_{0},\phi_{0}]\) are given and the final conditions \([\theta_{T},\phi_{T}]\) cannot be changed. The vehicle violates the constraint \(\phi\) because the distance from \([x_{0},y_{0}]\) to \([x_{T},y_{T}]\) is too short. By using iterations from computer programming, it is easy to determine the feasible trajectories with lower values of \(\phi\) and \(\dot{\phi}\) or the vehicle will move on smoother and safer curves. As mentioned in [1], the front wheel angle always has hard constraints. At a low vehicle velocity of less than 16 km/h, the vehicle can be driven with the maximum steering angle. However, in higher speeds, the steering angles allowed will be reduced from \(+/-45\) to \(+/-12\) degrees when the vehicle velocity reaches 40 km/h. At a vehicle speed higher 67 km/h, the steering angle is restricted to less than only \(+/-3.5\) degrees as shown in Figure 4.  
The vehicle speed always has to be controlled in a strict function of the steering angle due to safety purposes, therefore this paper proposes a new method for generating the vehicle's feasible trajectories subject to the hard steering angular constraints and the environmental conditions as follows:  
Figure 3: Vehicle body and the steering. The feasible trajectories \(x(t)\) and \(y(t)\) from starting points \(x(0)\) and \(y(0)\) to the destination point \(x(T)\) and \(y(T)\) for \(t=0\div T\) subject to Equation (23) and other constraints in [1] generated from Equations (10) and (11) can be modified by adding iterations to lengthen the trajectory distance. The programming calculation for each feasible trajectory must be verified online and then the steering angle \(\phi\) and other variables must be re-calculated to satisfy the objective constraints. If certain constraints are violated, the distance from the starting point to the destination point is too short to generate a safe and feasible trajectory. In this case, we must lengthen the trajectory distance, \(d_{0}=\sqrt{\left(x_{T}-x_{0}\right)^{2}+\left(y_{T}-y_{0}\right)^{2}}\) to a new, longer distance with a small amplification coefficient \(\rho\):  
\[d_{Ni}=\rho^{i}d_{0}\text{ with }\rho>1 \tag{24}\]  
Several iterations, \(i=1,2,3,\ldots n\) are required until the steering and other condition constraints are satisfied. Then, the new destination position of the vehicle will be:  
\[x_{TN}=\rho^{n}(x_{T}-x_{0}),\text{ and }y_{TN}=\rho^{n}(y_{T}-y_{0}). \tag{25}\]  
The following simulations are conducted with \(\rho=1.1\), and the vehicle parameters are the same as in previous simulations. By adding constraint (23) and other vehicle dynamic constraints, feasible trajectories are obtained in Figure 5. The steering angles are assumed to be limited to \(60^{\circ}\), \(45^{\circ}\), or \(30^{\circ}\) according to the vehicle and environment safety requirements. The minimum lengths of corresponding feasible trajectories are 15.0910 m, 32.3490 m, and 52.0983 m corresponding to the new destination points of \(x(T)=y(T)=10.000\), 23.579, and 34.5227, respectively. Figure 6 shows the steering angles during the time that the vehicle is moving along different trajectories with different maximum steering angles. The lower and smoother steering angles will lead to safer trajectories. According to the environmental limitations, the optimal trajectory can be selected based on the safest steering angle, the shortest distance, and the smallest tracking error, etc. Figure 4: Constraints of front wheel angle vs. the vehicle speed. Once we have calculated and selected an optimal feasible trajectory subject to constraints, we can again determine the steering angle by the vehicle velocity moving along this trajectory.