psmoveservice / PSMoveService

A background service that communicates with the psmove and stores pose and button data.
Apache License 2.0
591 stars 148 forks source link

Implement a Kalman filter for sensor fusion #69

Closed HipsterSloth closed 8 years ago

HipsterSloth commented 8 years ago

Right now we are using a simple LowPass filter on the position data we get from the tracker. On psmoveapi I made a simple Kalman filter for smoothing, but it didn't leverage the accelerometer so it felt laggy:

https://github.com/HipsterSloth/psmoveapi/blob/master/src/tracker/psmove_kalman_filter.cpp

We already have a framework in place for filtering here:

https://github.com/cboulay/PSMoveService/blob/master/src/psmoveservice/Filter/PositionFilter.h

We need to create a new kalman filter that plugs into our filter framework and leverages the other sensor data to make a better prediction of position.

Other helpful links: Pictorial of kalman filters- http://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/ Tutorial of extended kalman filters (with TinyEKF implementation)- http://home.wlu.edu/~levys/kalman_tutorial/

HipsterSloth commented 8 years ago

Closing this issue as a dupe of Issue #13