AutoRallyNotebook

Active Safety for Autonomous and Semi-Autonomous Vehicles

Before: Starting point (Feb 2021)

After: [Spoiler Alert!] Results on more complex Race track (Dec 2021)

After introducing multi-shot receding horizon control with safety hard constraint.

Design Notebook / Progress log

Jan, 26

Team event: Subteams assigned

Jan, 27

Subteam event: First subteam meeting.

Todos

Jan, 28

Collected materials to study until more concrete stuff is available from Jacob.

Review MPC section from my Self-Driving car nanodegree material

https://www.udacity.com/self-driving-car

Notes: MPC controls both acceleration and steering based on Waypoints from traj. planning node.

Code: https://github.com/udacity/CarND-MPC-Project

Self-study material references:

Melanie Zeilinger: “Learning-based Model Predictive Control - Towards Safe Learning in Control”

Institute for Pure & Applied Mathematics (IPAM) - Intersections between Control, Learning and Optimization 2020

Notes:

Lecture video: https://www.youtube.com/watch?v=nO8r8XKlPgA&ab_channel=InstituteforPure%26AppliedMathematics%28IPAM%29

Learning-based Model Predictive Control - Towards Safe Learning in Control

Model Predictive Contouring Controller (MPCC) for Autonomous Racing developed by the Automatic Control Lab (IfA) at ETH Zurich

Notes:

  1. C++ implementation, Matlab Simulation
  2. Solver runs on remote PC, not embedded in the car
  3. algorithm seems similar to what jacob described

Video: ORCA - Nonlinear MPCC “How it works” Code: https://github.com/alexliniger/MPCC

Feb, 5

Received code and paper Falcone, 2007 from J. Knaup

Notes:

Feb, 7

Self-study material references:

MPC Implementation workshop by Mohamed W. Mehrez, PhD

Notes:

Code: https://github.com/MMehrez/MPC-and-MHE-implementation-in-MATLAB-using-Casadi/tree/master/workshop_github

Part 3 - MPC for trajectory tracking

Full playlist:

MPC and MHE implementation in Matlab using Casadi

Mathworks Matlab MPC toolbox

Notes: Very nice short video series to get started with MPC basics Video playlist

Matlab Documentation mainly, but still some generic MPC concepts are well-explained

MPC Toolbox About MPC:

Feb, 9

TODO

Feb, 10

Subteam event: meeting with J. Knaup

Feb, 14

Feb, 15

Team event: bi-weekly team meeting

Feb, 16

Todo: how to formulate faster progress on the track? traj. tracking?

Self-study material references:

TODO: review papers and send them to Jacob for discussion

Feb, 19

New info from Jacob:

Feb 20

Feb, 23

Managed to run the code from Jacob, LTVMPC results look really sad

Simulation Result

Feb, 26

Subteam event: meeting with Jacob

Notes:

Results are much better with speed set point 2.5m/s

run_vel2.5_1 run_vel2.5_2 run_vel2.5_3

Mar, 1

Team event: bi-weekly team meeting

Mar, 2

Mar, 4

Mar, 12

Notes on expirement with agressive target S

Simulation Result with cost function weight 5.0 on Vx only:

Simulation Result with cost function weight 5.0 on Vx only

Simulation Result with cost function weight 5.0 on Vx and 1.0 weight on S Simulation Result with cost function weight 5.0 on Vx and 1.0 weight on S

Simulation Result with cost function weight 3.0 on Vx and 1.0 weight on S Simulation Result with cost function weight 3.0 on Vx and 1.0 weight on S

Mar, 13

Mar, 15

Team event: bi-weekly team meeting

Mar, 16

Notes from expirements:

Mar, 17

Subteam event: meeting with Jacob

Mar, 20

Updated CVXGEN to multishot and cost term for dS = quad((Sterminal_target - Sinitial_target) - (Sterminal - Sinitial))

Notes from simulation expirements with multi-shot

Simulation Result multishot:

Simulation Result with multi-shot

Simulation Result multishot + dS term:

Simulation Result with Simulation Result multishot + dS term

Mar, 29

Team event: bi-weekly team meeting

Apr, 1

Provided snapshot of code, simulation data: param configuration and results

https://drive.google.com/file/d/1xYH4obNJ-CdsZgzQLf75BU93-yluHrvm/view?usp=sharing

Apr, 12

Seems execution time impacts the output greatly, TODO: rebuild envirnoment on a Core-i7 machine with clean ubuntu install to confirm.

Jacob created a private repo: https://github.gatech.edu/jknaup3/autorally_private-ahmed

TODO: clone and sync with this one

Apr, 14

Subteam event: meeting with Jacob

Apr, 19

Apr, 20

Much better results!

CCRF map ~ 5m sections:

CCRF m~ ap 5m sections:CCRF map 5m sections

deepracer-k1999-race-lines

https://github.com/cdthompson/deepracer-k1999-race-lines/

Original Track Calculated Race Line Numpy coordinates
NumPy: Canada_Training Python Code: Canada_Training.py
NumPy: reinvent_base.npy Python Code: reinvent_base.py
NumPy: reinvent2019.npy Python Code: reinvent2019.py

Apr, 23

CCRF raceline optimizer output

Apr, 24

Apr, 25

Results on J. Knaup’s machine - target velocity 5 m/s:

Weights: default baseline - Terminal weight = 0

Results on J. Knaup’s machine - target S:

Most imp. weights:

Vx 0
Vy 0.1
ey 0.1
Terminal S 50000
Terminal others weight * 1000

Apr, 26

Target speed 5 m/s without Vmax constraint

Target speed 5 m/s with Vmax constraint (Fn_max = 10.0)

Target speed 6 m/s with Vmax constraint (Fn_max = 10.0)

Conclusion