thanks a lot for coming back to me.
Here is the code. Just run main.py. I am implementing Model Predictive Contouring Control (MPCC). I know for a fact, from a different implementation using a different solver framework, that the cost and algorithm as such works.
I have made some different observations, which are rather worrying regarding the correctness of my implementation in acados:
- The external cost function doesn’t do anything, if I multiply it with 0 I get the exact same result
- even though the cost function doesn’t do anything, the car still drives laps (probably in the nature of MPCC)
Can you please check out what I am doing wrong regarding the parametrized cost function I am using? I am pretty sure the crux in qpOases not working lies in my wrong implementation of the external cost function.The cost function is parametrized by the cost weights and by track linearization parameters, necessary for MPCC.