ROS compatibility with Acados

I am also planning to integrate Acados into ROS so that I can subscribe to sensor data and publish control signals of MPC for driving F1/10 car. So, when I am exporting C code, does ROS part interfere?
Does Acados work with ROS?

Hi @nirajbas94,

Admittedly, I didn’t user ROS myself yet.

But I know that it was used in at least two applications already.
Here, the generated C code was embedded into a ROS node.
This embedding into a ROS node is done outside of acados.
It would be great to document the workflow somehow in acados itself.

@tmmsartor knows much more about this.
One application that uses acados through ROS has a public Github repo:


1 Like

Hi Jonathan,
I have implemented MPC in acados using python 3.7. However I have ROS working with python 2.7 and it doesn’t support python 3.7 to the best of my knowledge. I was wondering if you have any workflow on how to use complied code of acados in python 2.7? Even simple guidelines would be helpful.

On top of that for embedded implementation on real robot, I would also like to use complied code from acados in c++. Please let me know if you have any guidelines for this as well.



Does “it” mean ROS here?
I am quite sure there are people using ROS with Python 3, e.g.

For porting your example to a C++ framework, please check out the files in c_generated_code.
It contains a main*.c file, and a Makefile that shows how to compile and link it against the shared libaries.
You can adapt the main file or perform similar calls to acados in your C++ code.


Hi Jonathan,

yes I meant ROS doesn’t work with Python 3.7

I tried this and several other guidelines on how to compile ROS packages for Python 3 but it’s not enough in my case as there are several other package not mentioned in this blog that are used by me and they can’t be readily compiled for Python 3.

Maybe this is my only option. Thanks again for your support!


@jay101 have you looked at the ROS crazyflie_controller node source code of the bcbarbara/crazyflie_nmpc repo? It is an excellent starting point on how to get an Acados controller running with ROS and C++.

I will be glad to help if you run with any issue after checking that repo.


Hi Guido,

I am following this repo to interface ROS and C++. If I run into any issues I will certain get in touch with you. Thanks a lot for extending your kind help!