C generated files compilation error

Hi :wave:
I am using python interface but i need to use C generated files as I want to use ROS
when I compile the generated C files I get that error :
acados_solver_sfunction_Spatialbicycle_model.c:48:10: fatal error: simstruc.h: No such file or directory
48 | #include “simstruc.h”

I hope to hear from you soon

Hi @12ahmed52 ,

and welcome to acados-community!

It sounds like a missing include directory. Usually you need this only if you want to create some code for MATLAB/Simulink. Do you really need a sfunction for ROS?

Are you able to run some default Python examples?

Bye

1 Like

Thank you for your response,

All I need is to use the generated C files from the python interface.

Yes I can run python examples

So my problem is that I cannot compile the C generated files because of the missing include file struc.h

So how can I fix that ?

Thanks in advance

Hi,

what your error message tells is, that you try to compile a s-function. A s-function is a specific to MATLAB/Simulink.

So actually you don’t need it imo. [But I’m not using the Python-interface… Maybe someone else can give a comment to that.]

And are you able to run/compile these also in ROS?

Bye

1 Like

Thank you,

So is the solution to comment this fields in the C generated files ?

I don’t know why the C generated files from python includes this file as it is required for matlab only

Yes, it is not needed in Python.
Someone might use Python for prototyping though and want to use the generated solver in a Simulink environment, just like you want to use the prototyped solver in ROS.

1 Like