-
Notifications
You must be signed in to change notification settings - Fork 16.8k
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
Support configurable backend gyro and accel rates on Invensense sensors to support 8k gyros and fast-sampling on MPU6000 #14423
Conversation
549e84c
to
b1adb74
Compare
9fff833
to
a835753
Compare
I flew 9 packs on this on an MPU9250, MPU6000, ICM20689 - all great. I flew the MPU 6000 at 2kHz, 4kHz and 8Khz. All worked, although more noise was getting through at 8kHz and my motors were getting hot. |
Does this say that the MPU6000 is noisier than the others, or is there a difference in filtering? |
@kd0aij before this change it was impossible to try 8kHz because the accel and gyro rates had to be the same and accels only go up to 4kHz. With this change 8kHz is possible - I'm just remarking that it may not be advisable. @lthall thinks that its simply a case of 8kHz being too CPU hungry for my little copter and so the notch is not able to track the noise properly. |
Would be interesting to look at timing jitter and the load value in those logs then. |
a835753
to
5b29b83
Compare
Found a very subtle bug to do with the sensor rate update. Fixed now. |
5b29b83
to
7fa5fc3
Compare
I tested on a Pixhawk1 and it seems fine, with INS_GYRO_RATE=3 I see 8kHz gyro, 1kHz accels from mpu6k. Still see 750Hz from lsm303d |
Here is a log from a short hover: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the the extra debug? As discussed on the dev call this can go in after this. txs!
…ndependent from the accel rate allow fast sampling of gyros on MPU6000 and MPU6500
7fa5fc3
to
a5281e0
Compare
This PR decouples the accel and gyro backend sample rates so that they can run at different speeds. This allows gyro samples to be delivered more quickly than accel samples meaning that we can run gyros at 8k regardless of the maximum sensor rate for accels.
This also means that we can now support fast sampling on IMU's that only have fast sampling for gyros - e.g. the MPU6000.
Flown on a KakuteF7Mini v2 (MPU6000) @2khz and 8kHz