Hi, I am experiencing an issue when trying to set soft constraints on the control input after upgrading Acados to release v0.3.0. It seems that the cost on slack variables is handled separately at stage 0, but there are no setters for this stage in the MATLAB interface. This results in the following error:
Error using ocp_generate_c_code
error while reshaping cost.Zl_0 to dimension 1 4, got 0 0
Number of elements must not change. Use [] as one of the size inputs to automatically calculate the appropriate size for that dimension.
For instance, you can reproduce the error by adding the following lines in the linear_mpc example (example_closed_loop.m, line 84):
After my last reply, I realized, that there is no Jsbu_0, as it is assumed to be the same as Jsbu.
I changed that in my PR and you can not set Jsbu_0 in ocp_model.