Hi,
I am trying to integrate Casadi with a physics engine for solving a trajectory optimization problem. The physics engine has an API that gives me local liberalizations of its current state and input using finite difference. (I have no access to any analytical models of the system.)
So it will be like xdot = Ax+ Bu where A and B comes from the external physics engine for a given x and u. I want to put this function as a dynamic constraint at the collocation points. Is there a way to incorporate this external function to the Casadi computational graph?
Is this possible and if possible, could anyone please provide an example on how to handle this?
Best,
Michael