MPCC on f1tenth car using ACADOS

Hello :wave:

I am trying to implement a Model Predictive Contouring Control (MPCC) algorithm on the f1tenth car test platform using the ACADOS python interface.
I’m facing some issues with the solver’s behavior after adding my track constraints, with

QP solver returned error status 3 in SQP iteration 2, QP iteration 10.

this error showing up during the very first iteration.

My OCP looks something like this:

but without the del u and del v terms.
The Ec and El are error values are calculated dynamically using parameters which I set before every iteration of solving the OCP.

My constraints are given by a set of linear inequalities:

where (x,y) denote the position of my car at time step k and (xl, yl) and (xr, yr) denote the track bounds at time step k.

When my constraints are not included the solver seems to be able to find an optimal solution, but when I include these constraints the solver just breaks. I am not sure what exactly could be wrong here. Any help on where to start looking, or otherwise would be greatly appreciated.

I can provide additional information if necessary.

Just to add to this is there a way to view which specific constraint is being violated in acados? Like a flag of some sort?

I had a similar question a few days ago and this was @FreyJo’s answer: Running single functions of the auto-generated code via C-interface - #2 by FreyJo

What I ended up doing is to just extract the states of the solution and evaluate the constraint functions to get the residuals of the constraints. That way, I could easily identify what state was causing problems and narrow down my problem.

@lukasfro that’s great. I’ll give this a go. Thank you for the reply.