PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.5k stars 13.51k forks source link

[Bug] Gyro data inconsistent after update to `v1.14.0` from `v1.13.3` #22281

Open TOTON95 opened 1 year ago

TOTON95 commented 1 year ago

Describe the bug

After updating the firmware from v1.13.3 to v1.14.0 and recalibrating all on-board sensors, the autopilot (a mRo Control Zero H7) is showing these alarms even after calibrating the sensors multiple times.

To discard any HW problems I tried to rollback (v1.13.3) and calibrated the sensors, which did not present any problems at all.

Additionally, v1.14.0 threw estimation errors depending of the axis I moved it to and as the gyro problems, it didn't show in v1.13.3.

To Reproduce

  1. Upload v1.14.0 to a mRo Control Zero H7 board
  2. Perform sensor calibration
  3. Manipulate the board in all sensors
  4. Observe
  5. Repeat steps 1, 2, 3, 4 but for v1.13.3

Expected behavior

Gyro data should not be inconsistent and estimation errors per axis

Screenshot / Media

image

Flight Log

v1.14.0

https://logs.px4.io/plot_app?log=1bf7a352-97bf-4f64-9bcc-097a1db283c2

v1.13.3

https://logs.px4.io/plot_app?log=1dafbd4d-25af-4ed0-b9ed-c0e1c240f144

Software Version

Flight controller

mRo Control Zero H7

Vehicle type

None

How are the different components wired up (including port information)

Just the USB interface is connected to the AP

Additional context

No response

n-snyder commented 1 year ago

Perhaps my experience with this issue may help as well. Recently, we upgraded to PX4 git commit 0db6b6eda0dbd1840c8abee8424ab4a6e200490 and began having a problem. After installing the firmware and performing IMU/gyro calibrations, we began getting the gyro inconsistency error prearm message. This has been confirmed on three different Control Zero H7 full cable kit boards.

After trial and error, I found two ways to reduce/eliminate the error. First, by reducing the number of MAV_X_CONFIG connections. Our default setup is having a 115.2 kbaud connection on MAV_0, a 921.6 kbaud on MAV_2, and a 115.2 kbaud on MAV_3. By eliminating MAV_1 and MAV2, the error goes away. Alternatively, the GYRO_RATE_MAX can be increased from its default of 400 to 2000, which significantly reduces the number or inconsistency errors.

The problem with these "solutions" is that they either reduce the number of peripheral devices which are needed by the customer, or in the case of the IMU_GYRO_RATE_MAX, it begins to cause sampling irregularity of sensor data in ULOG downloads.