Skip to content

Commit

Permalink
README updated
Browse files Browse the repository at this point in the history
  • Loading branch information
fetty31 committed Aug 19, 2023
1 parent 42813f8 commit 509249c
Show file tree
Hide file tree
Showing 9 changed files with 96,993 additions and 13 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
</li>
<li>
<a href="#approach">Approach</a>
<ul>
<li><a href="#lateral-mpc">Lateral MPC</a></li>
<li><a href="#time-dependant-mpc">Curvature MPC</a></li>
<li><a href="#space-dependant-mpc">Spatial MPC</a></li>
</ul>
</li>
<li>
<a href="#workflow">Workflow</a>
</li>
</ol>
</details>
Expand Down Expand Up @@ -65,7 +63,7 @@ Here's a quick explanation of this project branches:
* Handles steering commands.
* Lower tuning complexity.
* Must have a velocity profile as input for the whole horizon length (prediction horizon).
* A longitudinal controller must run in paralel, following as close as possible the given velocity profile.
* A longitudinal controller must run in parallel, following as close as possible the given velocity profile.
* `spatial` : space-dependant Non Linear MPC. Here a coupled (lateral+longitudinal dynamics) autonomous controller is specified. The main characteristics of this controller are:
* High computational load (30ms)
* Curvature based.
Expand All @@ -88,12 +86,22 @@ As said before, this pkg depends on [Embotech](https://www.embotech.com/products

# Approach

Here the theoretical approach of each branch will be summarized. For more information read [TRO](docs/TRO.pdf), [Lateral MPC]() and [Curvature MPC](https://drive.google.com/file/d/1rntZJFIQ_4R1oglZBTvtA23OXXG3SWAU/view?usp=drive_link) papers.
For specific information on how these controllers work read [TRO](docs/TRO.pdf), [Lateral MPC](docs/KIT_lateral_MPC.pdf) and [Curvature MPC](docs/curvature_MPC.pdf) papers.

For the sake of simplicity the different controllers are named after their more important characteristic. However, all the specified MPC controllers are curvature-based and follow a simplified non linear bicycle model.

## Lateral MPC
# Workflow

In order to solve the Non Linear Optimization Problem (NLOP) stated in [solver declaration](solver/FORCES_problem.m) the following procedure must be followed (in this order):

* __Initial conditions__: the initial conditions for all the state/control variables must be computed. Usually the only unkown initial conditions are the path tracking variables `n` & `mu` so they must be calculated using the actual car state and the planned trajectory.

* __Real time parameters & variable boundaries__: the value of all the used real time parameters (or constant variables) must be given to the NLOP. A value for each parameter for each horizon stage must be set, meaning an array of __m__ x __n__ (where __m__ == number of parameters and __n__ == horizon length) must be filled. The same logic is applied to the boundaries array.

* __Memory buffer__: FORCESPRO's solver enable us to control the RAM used by the solver and set memory buffers to be used by the c-generated solver software. _We don't really need this tool so we let FORCESPRO full control on that aspect._

* __Solve__: a call to the solver declaration must be made in order to solve the NLOP. It takes as arguments the __m__ x __n__ parameters array & boundaries array, a pointer to the memory handler, an array to fill with the found solution, an array to fill with solving procedure information and a reference to the Algorithmic Differentiation (AD) function (usually c-generated by FORCESPRO). _If a self-developed AD tool is wanted, a reference to the c++ function should be given instead of the default one._

## Time dependant MPC
* __Get Solution__: after the NLOP is solved, the given empty solution array will be filled with a solution for each optimization variable for each horizon stage. _It becomes handy to copy this solution to some other data structures in order to work with the given solutions easily._

## Space dependant MPC
* __Progress Prediction__: finally, a progress (s) prediction should be computed using the NLOP solution in order to use this information when setting the curvature values for the next solver call (next iteration). _Basically, knowing the progress for each predicted state we can look for the closest planner points for each state and pick their curvature values for the next iteration. This heuristic procedure tends to help the NLOP convergence._
Loading

0 comments on commit 509249c

Please sign in to comment.