Covariance matrix IMU

X-Series and R-Series Actuators
Post Reply
istvanbor
Posts: 12
Joined: Thu Jul 09, 2020 4:11 am

Covariance matrix IMU

Post by istvanbor » Wed Aug 26, 2020 4:34 am

Hello!

I am trying to calculate the odometry from the IMU data with the robot localization package, but I am stuck with the covariance/variance matrix in the IMU msg. Is this some data declared in the HEBI datasheet, relative to the sensors or should I determine the matrix somehow? If it's declared in the datasheet can you redirect me to it ? :)

Many thanks:
Istvan
User avatar
dave_rollinson
HEBI Official
Posts: 41
Joined: Tue Dec 31, 2019 11:58 am

Re: Covariance matrix IMU

Post by dave_rollinson » Wed Aug 26, 2020 11:43 am

Istvan,

Thanks for the question. We have received this question a few times in the past. Sorry in advance for the long response.

Odometry from IMUs:
Obtaining position estimates from IMUs is really tough to do in practice. The IMUs we use (either the MPU-6500 or the ICM-20602 from TDK) do not have the precision, accuracy, and calibration you would need to make this work well. At best, any odometry estimate will work for only a few seconds.

The reason behind this is that you need to separate out a large gravitational acceleration from a small linear acceleration (which with the IMU alone is not observable), and then double-integrate this noisy signal to obtain a position reading. Most of the work in robotics research literature that we have seen attempting this uses IMUs fused with additional sensors like joint angles / wheel odometry to help detect, slip, etc. IMUs are a key part of AR/VR systems but they're always paired with external tracking from vision / LiDAR / etc.

Covariance / State Estimation:
If you're referring the quaternion pose estimate that gets reported in actuator feedback, we unfortunately do not have good estimates for covariance. The onboard pose estimator in the actuators is a simplified complementary filter, not a full Kalman filter. This means that the filter does not produce, or is tuned with, an estimated covariance for orientation, linear acceleration, or other model parameters. However, the complementary filter still performs well because it runs at a very high rate, 1kHz in the actuator’s real-time control loop.

Sensor Noise:
That said there are other things that can be done with IMUs, especially fused with other sensors, and sometimes making as accurate a model as possible is useful. The raw sensors themselves do have measurable Gaussian-ish noise that can be characterized. We have generally found the following:
- Gyros (X/Y/Z) have a standard deviation of about 0.001 rad/sec
- Accelerometers (X/Y/Z) have a standard deviation of about 0.015 m/sec

The IMU performance can vary somewhat actuator to actuator, so if you want the most accurate estimate of uncertainty we recommend characterizing each actuator. This can done by taking and analyzing a short ~10 sec log (you can use Scope) while the actuators or assembled system are perfectly still. It helps to have things on the floor if possible, as even sturdy tables can wobble enough to influence the accelerometer readings.

Hope this helps,
-Dave
istvanbor
Posts: 12
Joined: Thu Jul 09, 2020 4:11 am

Re: Covariance matrix IMU

Post by istvanbor » Fri Aug 28, 2020 3:32 am

Thank you very much! It did help. However I already have wheel odometry and it's working fine, and I want to fuse my LIDAR,wheel odom and IMU data to a combined odometry with the robot_localization package :)

Many thanks:

Istvan
Post Reply