Solve the OCP in C interface

Hello,
I’ve generated C code from Matlab interface.
I want to implement the NMPC in ROS, and I am following this work:

In order to solve the OCP, she uses the function:
acados_solve();
When I compiled that, I get an error:
“error: ‘acados_solve’ was not declared in this scope”

In fact, I’ve searched this function in the directory “c_generated_code” that is created after code generation from matlab interface and this function doesn’t exist.

I also search this function in acados/include and acados/interfaces/acados_c and this function doesn’t exist either.

It only exists in acados/experimental directory.

What function I have to use in order to solve the ocp?
Where is that function? (to set the #include)

Thanks in advance

Hi Antonio,

there have been a few changes to the templates.
Now, the corresponding file is called:
acados_solver_<model_name>.c
and the function is
<model_name>_acados_create

The most relevant changes to the templates since then are in this PR:

Cheers,
Jonathan

1 Like