openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 85 supported car makes and models.
[ ] Instantaneous acceleration limits control to consider regulation for maximum lateral acceleration.
[x] Modify the planner acceleration limits in turns to make sure car does not exceeds lateral acceleration limits specified in regulation.
[x] In case of instantaneous lateral acceleration being greater than maximum allowed, set max acceleration limit to be a value to provide a smooth deceleration on turns.
[ ] Research an appropriate value for a smooth deceleration in turns when going too fast.
[ ] Add UI elements to visualise this for testing purposes. Perhaps also on reply ui.
[ ] Add tests.
[ ] Consider turns ahead prediction for limiting acceleration in a way that braking should be done before entering a turn when the speed is too hight to comply with maximum lateral acceleration.
[ ] Calculate lateral acceleration on path ahead based on path poly by path planner.
[ ] Limit acceleration accordingly to ensure entering turns ahead at a speed that will not produce a lateral acceleration grater than maximum allows.