Hi,
Thanks for developing acados, I have been enjoying using it.
I am using the acados python interface and I am trying to understand the best development workflow when creating an MPC controller.
As I understand it, I first create an AcadosOcp
object which I can then turn into a AcadosOcpSolver
object. When this happens, c code is generated, but I can still interface with this code through python.
When I create the AcadosOcpSolver
object, compiling all the code takes a while (5+ minutes) which slows down progress when I am trying to iterate and debug my MPC.
-
Is there a way to re-use the compiled Casadi code? In general (for example) while developing code, my robot dynamics won’t change, but I will be iterating on the rest of the MPC, so waiting for the same code to be re-compiled takes a while.
-
I see that there is a
build
andgenerate
option in theAcadosOcpSolver
constructor that default to true. If I set these to false, I no longer need to wait for things to be compiled. Can I set these to false while developing? What happens under the hood - is the solver still being updated with my most recent changes, but everything just stays in python? -
Are there any other options to adjust these compilations/is there a better workflow for developing MPC with acados than what I have outlined here?
-
Once I have finished the MPC and happy with its performance, I will need to write code that interfaces with it. If I choose to do this in python is there a way to set a flag so I don’t have to wait for the solver to be re-compiled every time I test my code?
Thanks for the help!