Skip to content

ARUSfs/MW208_Raceline_Optimization

 
 

Repository files navigation

MW208 Raceline Optimization

Cambios ARUSDV

Simplemente se han eliminado todos los archivos que no son estrictamente necesarios y se ha creado el script 'calculateTrajectory.m' para resumir el proceso de cálculo de la solución. Además se ha añadido el circuito de FSG para trabajar en un contexto FS. Os dejo con el texto original explicando el algoritmo:

Concept

My main idea consisted of two parts: first, create a minimum curvature trajectory and then develop a velocity profile based around it. This method is generally used by almost every paper written on this topic, at least as a starting point. I also calculated the velocity profile of the shortest path around the given track to show how bad the lap times are for it compared to the min curvature one. I also validated most of my results with data and literature I found online.

Trajectory Generation

For this section, I followed a global approach for both the shortest path and min curvature trajectory. The methodology I stuck to is outlined in this paper, Race Driver Model.

I converted this entire subject into a quadratic programming (QP) problem and solved it with the help of the 'quadprog' function in MATLAB. I also derived the equations for H and B matrices myself in terms of the coordinates of the track edges. Then I substituted these matrices in the QP solver along with the constraints that restrict the trajectory within the boundaries. I also added another condition that requires the starting point to be the same as the end one. The reasoning behind this was to create a loop rather than a broken track at the end.

As soon as the solver is executed, it automatically outputs the results, making the solving time almost negligible. It usually takes around 11-12 iterations to find the result. Unfortunately, quadprog doesn't have the functionality to output the result of every iteration, making me incapable of rendering the really cool animated GIFs.

Some of the drawbacks and improvements to my method have been mentioned in this paper Minimum curvature trajectory planning and control for an autonomous race car. One critical simplifying assumption I made was neglecting the 2x'y' term in my curvature definition. This leads to a slightly suboptimal solution but significantly reduces the effort for calculating the H and B matrices. One improvement would be to use an iterative QP routine that replaces the reference line with the solution of the previous QP iteration.

Shortest Path Trajectory Minimum Curvature Trajectory

For comparison - Raceline uploaded by TUMFTM for Silverstone track

Any feedback or suggestions are welcome!

About

Raceline optimization for MW 208 project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%