Is the OSQP solver optimization done properly?

Hi, nice to meet you!
I’m using OSQP Solver for my autonomous driving project. First of all, OSQP Solver is very cool!

I’m developing QP based Path Planning logic.
I developed QP-based path generation logic with quadprog of MATLAB, and I am currently developing logic using OSQP in C environment.
However, while applying the OSQP Solver to my algorithm, a question arose. That is, I am not sure if the OSQP solver is working properly.

If you look at the picture below, you can see that the Objective cost increases with iteration. In my opinion, the objective value should decrease, but it is strange that it increases. Above all, it is strange that the increase in Ojbective is ultimately judged as Solved. If you look at the contents of this console, can you see that the optimization has been performed normally?

When I visualize the optimized result (path), it doesn’t seem like the optimization was performed properly. And looking at the console contents, I can’t tell if it’s been optimized properly. can you help me?

It is hard to know without seeing problem data or code to anayze, but seeing an increasing objective is not always indicative of a problem with the solver. The OSQP solver uses ADMM, which means initial iterates in the solver may not satisfy the constraints. The solver then works to both find points that satisfy the constraints and optimize the cost function. This means it may start at a point with lower cost but very bad constraint satisfaction, and then need to increase the cost value to get good constraint satisfaction.

Thank you for Reply.
I need to understand ADMM Algorithm more. It wasn’t enough. I didn’t know that OSQP Solver consider cost first at the beginning of itertation, then constraint. After understanding the ADMM Algorithm, I should try the OSQP Solver again. Thank you and have a nice day!

Yes, it can be a bit difficult to understand at first, but reading more about it is definitely useful. You can read about the version of ADMM implemented in OSQP in the main paper linked from OSQP - Citing OSQP (you can download that one freely from that site).