Casadi (Extended) Kalman Filter

375 views
Skip to first unread message

Tobias Schöls

unread,
Mar 7, 2018, 10:44:12 AM3/7/18
to CasADi
Hi All,

for my project I need an extended Kalman Filter and I was wondering if somebody already implemented one in C++.

If not I was considering to write one in python and then generate it.

Cheers,

Tobi

Bruno Martins Lima

unread,
Mar 7, 2018, 12:10:13 PM3/7/18
to CasADi
Hi,

it should be really simple to implement your own since there are not many equations in EKF. It is important to construct casadi Functions to calculate A and C like so:

Func_A = Function('Func_A', {x, u}, {jacobian(ode,x)}, {'x', 'u'}, {'A'})
Func_C = Function('Func_C', {x, u}, {jacobian(outputEq,x)}, {'x', 'u'}, {'C'})

Then call the Functions each iteration. This is the Matlab syntax but it should not be hard to translate to C++.

Bye

Tobias Schöls

unread,
Mar 19, 2018, 8:42:55 AM3/19/18
to CasADi
Hi all,

since there did not seem to be an existing implementation I started my own implementation here (https://github.com/schoelst/casadi-ekf).

Feel free to use / contribute!

Disclaimer: This is work in progress..

Cheers,

Tobi
Reply all
Reply to author
Forward
0 new messages