beagleboard / librobotcontrol

Robotics Focused library for embedded Linux computers. Mirror of https://git.beagleboard.org/beagleboard/librobotcontrol
https://beagleboard.org/librobotcontrol
MIT License
196 stars 157 forks source link

IMU data not stable #160

Open ansarid opened 5 years ago

ansarid commented 5 years ago

When running rc_test_dmp -t after calibrating, the Z axis value will slowly increase over time.

Running on a BeagleBone Blue and Debian 9.5 2018-10-07 4GB SD IoT

StrawsonDesign commented 5 years ago

yes, this is called gyro drift and is natural. You could pass the data through a high-pass filter to stop the number growing, but that doesn't fix gyro drift.

The MPU API has a built-in crossover filter for fusing in the magnetometer data to help stop drift. Enable this with the -m option to rc_test_dmp.

Also make sure the sensor is calibrated by running rc_calibrate_gyro and rc_calibrate_mag