- Developed a PID controller for longitudinal throttle control and a Stanley controller for Lateral control in Python
- Leveraged Unreal Engine’s Carla Simulator for performing Simulations and controller tuning
- Controlled vehicle to follow a race track navigating through preset waypoints at certain desired speeds
Lateral Control algorithm: Stanley Controller
- Firstly, eliminate the heading error. Denoted ‘Psi’ in the formula below.
- Secondly, eliminate the cross-track error. This step is to find the point on the path that is the closest to the vehicle which is denoted as e(t). The steering angle can be corrected as follows,
- The last step is to obey the max steering angle bounds. So we can arrive at,
- One adjustment that is made is to add a softening constant to the controller to ensure the denominator is non-zero