A Guide For Understanding And Implementing Optimal Control For Autonomous Vehicles