Steve,
Re the hardware filtering for the MPU6k. I checked with Leonard and it seems like there was a miscommunication between he and Tridge when the filtering was first implemented. Here’s a patch that I think fixes the problem. What do you think?
https://github.com/rmackay9/PX4Firmware/commit/508ed12e2b603b7ff6c2893c88e34cdd8447971c
Re hanging the main loop off the INS, this is how we do it on the APM2. We don’t do it this way on the Pixhawk for two reasons (I think):
1. The interrupt pin isn’t connected on the mpu6k so we have to poll to see if there is new data (I’m not totally sure about this)
2. We have two IMUs and they update at different rates (1k for mpu6k, 800hz for lsm303d) so we would have to pick one or the other. According to Leonard, because of the filtering it doesn’t matter too much if we have an extra sample or not.
Re timing in general, I have at times spent time looking at the timing and especially on the APM2 trying to keep the main loops running reliably. The APM2 is pretty smooth and even but the Pixhawk is actually much worse. I don’t think the issue is the IMU so much as some other processes that are blocking the main CPU now and then. I have not determined exactly what those processes are but I think there’s more than one culprit.
Thanks for looking over all this. It’s very detailed stuff.
-Randy
--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is there a pin we're using in the original FMU design that is actually not needed by current software and could be repurposed for this?
#define MPU6000_ACCEL_DEFAULT_RATE 1000
#define MPU6000_GYRO_DEFAULT_RATE 1000 _accel_filter_x(MPU6000_ACCEL_DEFAULT_RATE, MPU6000_ACCEL_DEFAULT_DRIVER_FILTER_FREQ),
_accel_filter_y(MPU6000_ACCEL_DEFAULT_RATE, MPU6000_ACCEL_DEFAULT_DRIVER_FILTER_FREQ),
_accel_filter_z(MPU6000_ACCEL_DEFAULT_RATE, MPU6000_ACCEL_DEFAULT_DRIVER_FILTER_FREQ),
_gyro_filter_x(MPU6000_GYRO_DEFAULT_RATE, MPU6000_GYRO_DEFAULT_DRIVER_FILTER_FREQ),
_gyro_filter_y(MPU6000_GYRO_DEFAULT_RATE, MPU6000_GYRO_DEFAULT_DRIVER_FILTER_FREQ),
_gyro_filter_z(MPU6000_GYRO_DEFAULT_RATE, MPU6000_GYRO_DEFAULT_DRIVER_FILTER_FREQ), arb.x = _accel_filter_x.apply(x_in_new);
arb.y = _accel_filter_y.apply(y_in_new);
arb.z = _accel_filter_z.apply(z_in_new);
grb.x = _gyro_filter_x.apply(x_gyro_in_new);
grb.y = _gyro_filter_y.apply(y_gyro_in_new);
grb.z = _gyro_filter_z.apply(z_gyro_in_new);