I am interested in implementing an NMPC with the acados Python interface with Gaussian process based dynamics, similar to what is discussed in this CasADi blog post: https://web.casadi.org/blog/tensorflow/. It involves defining custom callbacks in CasADi. Does acados support defining the cost function and/or dynamics using such callback functions?
The acados Python interface relies on two important CasADi features.
the AD capabilities
C code generation
These features are not supported for CasADi callbacks.
Unfortunately, it is thus not straight forward to implement what you described.
The last part of the blog post shows how the reverse AD of tensorflow can be interfaced to the CasADi callback.
However, acados typically uses the forward AD, as far as I know.
And extending this to also support C code generation of the derivatives seems not easy too.