# Measurements of IMU (accelerometer and gyroscope) are drifted or with too much error

I placed my drone on a table (i.e, at rest) and save (using a ROS topic) the IMU readings:

As you can see, there's a lot of drift or error. I would expect the $$x$$ and $$y$$ acceleration to be 0 (I know about the drift, but this is not something that keeps growing, it just has a bias) and $$z$$ 9.8. What could happen? Before I measure everything, I called the topic flattrim. And I would expect also a better performance for the gyroscope

What can I do to make if work better?

The funny thing is that the velocities (I suppose it integrates the accelerometer readings) are noisy, but their mean is approximately 0:

The covariance matrix is 0 for everything

• What drone do you have? – Ralff May 22 '20 at 1:02
• @Ralff I have an AR.Drone 2.0 from Parrot – Unnamed May 26 '20 at 15:00

The acceleration raw data looks weird, because of the discrete jumps. For comparison here is raw data from a stationary MPU-9150 (MEMS IMU): The raw accelerometer and gyroscope data are not integrated, and thus should not experience integration drift. The roll and pitch are integrated quantities, which then follow a random walk, and could end up anywhere.

Other error sources may be the following: Depending on the dynamic range, you may see different quantization levels, such as in the gyro raw data. There might also be a slowly time-varying bias, such as in the y-axis of the accelerometers.