Implementing a Model Predictive Control for a self-driving car

<p>The MPC considers the task of following a trajectory as an&nbsp;<a href="https://en.wikipedia.org/wiki/Model_predictive_control" rel="noopener ugc nofollow" target="_blank">optimization problem</a>&nbsp;in which the solution is the path the car should take. The idea is to simulate different actuator inputs (steering, acceleration and braking) and predict a resulting trajectory by selecting the one with the minimum cost. The car follows that trajectory and gets new input to calculate a new set of trajectories to optimize. The model utilizes the called &ldquo;receding horizon controller&rdquo; which performs a trajectory recalculation for every new state, since the defined trajectory is just an approximation.</p> <p><a href="https://medium.com/computer-car/udacity-self-driving-car-nanodegree-project-1-finding-lane-lines-9cd6a846c58c"><strong>Website</strong></a></p>