-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.11 reset icm20689 accel calibration? #14777
Comments
@dagar I didn't see a scale of 2 in my cases. Is that a different issue? I was reporting the case where I had to recalibrate the accelerometer on both vehicles that had a Firmware older than 2 months ago and I updated to master. I recalibrated because both vehicles showed a steep pitch angle when completely level in the attitude estimate represented by QGC's virtual horizon after updating. The quadrotor uses a pixhawk 4 mini
These are always the primary accelerometers and what I see is a clear change in x-axis offset which would also explain the pitch error. I do not know how the same calibration was considered perfectly level before since I flew both platforms a lot without issues or need to recalibrate the accel. As a solution to the offset problem I only see recalibration. Maybe it would have not even armed because of consistency checks but I didn't dare to try. |
The root cause appears to be this undocumented register applied to ICM devices in the old mpu6000 driver. This mpu6000 driver was used for the mpu6000, icm20602, icm20608g, icm20689 up until recently. |
I think the only question then is if we force recalibration of everything if the offset is this bad or can we get away with only clearing the single offset under the right conditions. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
After upgrade to 1.11, pre-flight check will tell users accel inconsistent, so may not cause un-safety? |
Yes, so this is more about trying to make the upgrade experience less unpleasant. |
I flash back to 1.10, shows accel is uncalibrated. |
I've decided to leave it alone. If the offset is sufficiently different and beyond the estimator bias limits you'll be unable to arm until you recalibrate. This is a good reminder that we should be a bit more discerning before letting undocumented magic "fixes" slip into the code base. https://github.com/PX4/Firmware/blob/6afa7e4368c4bb925b298f2f50aa3c50cdebdf71/src/drivers/imu/mpu6000/MPU6000.cpp#L666-L669 |
With the new icm20689 the
scale factoroffset comes out close to 0. Existing setups calibrated with PX4 v1.10 (the mpu6000 driver) seem to have an offset on one axis that's nearly 2.This is a bit hacky, but at param import time we can identify this in the parameters and reset the offset if it exists only on one axis and exceeds some arbitrary value.
FYI @MaEtUgR
The text was updated successfully, but these errors were encountered: