MPU6050_light icon indicating copy to clipboard operation
MPU6050_light copied to clipboard

Yaw angles are constantly drifting or increasing/decreasing rapidly

Open Jawad-RoboLearn opened this issue 2 years ago • 2 comments

Hello, I am using your library and sending IMU data over ROSSerial to my ground station.

Everything is going ok but yaw angle are constantly increasing/decreasing their values. Sometimes there is a drift. For e.g., if I just put the IMU at some horizontal surface, yaw angle try to increase/decrease.

  • Tell me one thing, for euler angles, we can use getAngle() right?
  • Is function getAngleAcc gives the euler angle rates?

B) Do you have some calibration offsets function in your library so I will add the value of offset for my MPU6050? As I have already calculated the offsets.

Jawad-RoboLearn avatar Feb 17 '22 02:02 Jawad-RoboLearn

I've had that problem too, have you tried resetting the board?

motedon avatar Feb 18 '22 04:02 motedon

Hello,

You might have a look at the documentation of the library, especially the section describing all the available methods. To answer your question, yes there is a method to define offsets, and it is highly recommanded to define offsets to avoid drifts. The yaw angle is obviously the less constrained since gravity cannot correct for this gyro drift. It is not an issue with the library, but a physical limitation that cannot be solved unless you have access to other data (e.g. magnetometer) to constrain this angle. A poor MPU6050 device or a wrong calibration will lead to strong drift on the yaw angle.

Cheers,

Romain

rfetick avatar Feb 20 '22 11:02 rfetick