Acados error status 2 on python interface

Hello,

I have been getting a lot of the following message “acados returned status 2. Exiting”. This usually happens when tuning the weights and the problem hyper parameters, so it feels like it is somewhat tied to the problem feasibility. Nevertheless, understanding what concretely this status entails would help me a great deal.

Are there any public materials where the statuses are explained?

Cheers,

Can

Hi Can,

the acados return values are:
0 – success
1 – failure
2 – maximum number of iterations reached
3 – minimum step size in QP solver reached
4 – qp solver failed

It is defined in this file:

Since you got 2, I would first consider increasing the number of iterations.

Cheers,
Jonathan

Hey Jonathan,

Thanks so much for the reply, this clears a lot. But I have a question regarding the maximum iterations. Is it still a relevant variable when doing the real time iteration with SQP? Because I thought that there is a fixed iteration size of 1 in RTI.

Another question is for the error outputs of the QP solvers. I have looked for a similar enum in the files but have failed to locate one. Can you also help me with “QP solver returned error status 3” similarly?

Thanks and Cheers,

Can

Hey Can,

you are welcome!

Indeed SQP_RTI should never return status 2, since always does 1 SQP Iteration.

The QP error status is different for each QP solver, it is defined in the QP solver Code itself which is located in /external/*.
Which one are you using?

Cheers,
Jonathan

Hey Jonathan,

I am currently using the full condensing version of qpOASES, but perhaps out of pure coincidence, I get the same error also when using partial condensing HPIPM, so I assumed that there was unified error for all the QP solvers.

Cheers,

Can

Hi Can,

in this case you can try to initialize the problem better.
If multiple QP solvers fail, it might be that your problem is infeasible or numerically ill-conditioned.
One can not really tell without having a closer look.

Since you wrote:

I want to mention that choosing weights of very different magnitude can easiliy lead to ill-conditioning.

Cheers!