Trying to set 0 parameters for external functions. External function has 42 parameters

Hello there,

I tried creating an OCP with parametric cost functions, but when I tried to set the parameters using
AcadosOcp.set(), I got the following error:

acados_update_params: trying to set 0 parameters for external functions. External function has 17 parameters. Exiting.

I actually got the same one when I ran acados/examples/acados_python/tests/test_parametric_nonlinear_constrain_h.py.

Is that normal ?

Thanks a lot for your help.

Best,

Tudor

Hi Tudor,

the test definitely works for me and on our CI pipeline.
Did you modify the test in some way?
If so, can you clearly state what you modified?

Best,
Jonathan

Hi,

I did not modify the file, but I have actually built acados from a slightly older commit (44ddf35db7fa11f26dfc36d5c9b0f3e30343530e, posted on sept 28) as I had trouble building acados with the latest commit. Should I try to ?

Best,

Tudor

P.S.: I should mention I am using acados on a M2 Mac, so maybe there are some deeper bugs coming from that

It might really be specific to your system.
Somehow
value_.shape[0] is 0 for you in this line:

I hope you can debug this a bit further on your system.

I debugged the code to inspect value_.shape[0] and it is 42 just as it should be :frowning_face:. Could the arguments not be in the right order ?

I think this was the issue:

Please let me know if that solves it for you.

Yes everything runs as it should, thank you very much for your quick corrections :pray:

1 Like