3 ms·
Thanks for giving it a try! I'm using a low pass filter on the raw sensor data to minimize any jittery input. The code I'm using is as follows: alpha = 0.1
by folli 10y ago
Thanks for giving it a try!
I'm using a low pass filter on the raw sensor data to minimize any jittery input.
The code I'm using is as follows:
alpha = 0.1;
output = previous_output + alpha * (new_input-previous_output);
If anyone knows a better way to get a stable and also current read-out, I would be more than interested!
- nitrogen 10y agoI haven't implemented one myself, but Kalman filters are frequently used for this. Search HN's history to find several (presumably) good introductions.
- folli 10y agoAwesome! I'll check it out
- rawnlq 10y agoKalman filters can get really complicated (EKF, UKF, adaptive, etc etc) and needs to be tuned with the correct covariances. Complementary filters works well enough and is very simple to implement even if you're a noob (e.g., high pass on accelerometer and low pass on gyro).
- duerrp 10y agoThere's a lot of libraries that do the hard work for you though... Anyway, if an EKF is too much effort, you could also try the "Madgwick" filter: Madgwick, S. O., Harrison, A. J., & Vaidyanathan, R. (2011). Estimation of imu and marg orientation using a gradient descent algorithm. In Proceedings of the IEEE International Conference on Rehabilitation Robotics
- folli 10y agoThe Madgwick filter seems to be popular for gyroscope applications, this might be very helpful. Thanks!
- skeletonjelly 10y agoI'm no expert, but when I had to make a cursor on the screen from Kinect hand location data I used what's called an exponential weighted average using output from an exponential moving average function on the raw data. http://stackoverflow.com/questions/7947352/exponential-moving-average http://stackoverflow.com/questions/7947352/exponential-movin... http://blogs.interknowlogy.com/2011/10/27/kinect-joint-smoothing/ http://blogs.interknowlogy.com/2011/10/27/kinect-joint-smoot... Worked pretty well!
- folli 10y agoThat sounds very helpful! I'll give it a close read and see what I can come up with.
- 8note 10y agoi think i small windowed median filter would do a good job in this case
- folli 10y agoI tried a small windowed mean filter, which gave really bad results. I'll try implementing the median filter.