A gyro is read too slowly for the main loop rate
What ArduPilot says:
- Gyro N rate NHz < loop ratex1.8 NHz
- Gyro N rate NHz < loop rate*1.8 NHz
An IMU has to deliver gyro samples at least 1.8 times as fast as the main loop runs (SCHED_LOOP_RATE). The message gives the gyro (counting from 0), the rate it really delivers and the rate needed. With a slower gyro the attitude controller would be fed the same sample twice.
What to do, most likely first
SCHED_LOOP_RATEwas raised above what this IMU can keep up with.CheckDivide the last number in the message by 1.8: that is your loop rate. Compare the middle number with it.
FixSet
SCHED_LOOP_RATEback to the vehicle's default and reboot.The IMU can run faster, but fast sampling is not switched on for it.
Check
INS_FAST_SAMPLEhas no bit for that IMU, orINS_GYRO_RATEis 0 (1 kHz).FixSet the IMU's bit in
INS_FAST_SAMPLEand raiseINS_GYRO_RATEone step, then reboot. This costs processor time: on a small board lower the loop rate instead.
Parameters to look at
| Parameter | What it is |
|---|---|
SCHED_LOOP_RATE | Scheduling main loop rate |
INS_FAST_SAMPLE | Fast sampling mask |
INS_GYRO_RATE | Gyro rate for IMUs with Fast Sampling enabled |
Where to do it:Parameter Compare & Migrate
The code that sends it
Gyro N rate NHz < loop ratex1.8 NHz
libraries/AP_InertialSensor/AP_InertialSensor.cpp AP_InertialSensor::pre_arm_check_gyro_backend_rate_hz() · Open in ArduPilot Copter-4.6.3
Gyro N rate NHz < loop rate*1.8 NHz
libraries/AP_InertialSensor/AP_InertialSensor.cpp AP_InertialSensor::pre_arm_check_gyro_backend_rate_hz() · Open in ArduPilot Copter-4.7.1