Unfortunately, I am currently stuck at one point and would like to ask for your advice. (Matlab/Simulink Interface)
Problem: When simulating in Matlab (one trajectorie, as in “minimal_example” from “getting started”-Example), the simulation runs and the solver can find a final solution after a few steps (0, success in every step). If I now generate code and run the simulation in Simulink with the same input variables, the qp solver fails permanently (4).
Background info: Based on the “getting started” example, I have extended the pendulum model with constraints on x. I have prepared all settings for my model (Explicit. Added non-quadratic terms to the cost function =>external costs. NLP). Furthermore, I added parameters. Up to this point, everything works perfectly (incl. S-Function in Simulink).
I then replaced the pendulum model with my model. I still use an external cost function without terminal costs. After the first copy-paste battle, I also had a failed solver (4) in Matlab. However, this was because init_x and init_u were both still 0-vectors from the example. After I had replaced these with my actual initial states, the model ran in Matlab.
For Simulink, init_x can be added via the Simulink options (get_acados_simulink_opts), but init_u unfortunately cannot. Is this perhaps also the problem in Simulink? Do the initial vectors affect the codegen?
Side question: What is init_pi for? Unfortunately I have not found a lot on this.
Many thanks in advance, best regards
P.S. I am looking forward to the workshop next week!