(sorry for the long post, I kept finding things as I was writing it… )
I am trying to evaluate relative position tracking using Optical Flow in Guided mode and had a strange issue in one of the flights.
The setup is quite basic:
- CubeOrange with Ardupilot v4.2.2, Auto-tuned
- HereFlow and separate RangeFinder is configured and fairly tuned (works well in Loiter etc.)
- Using separate EK3_SRC2 with OF+Barometer+Compass with RC switch
- Using MavProxy to basically do takeoff to e.g. 3m move forward 5m and then land:
arm throttle takeoff 3.0 message SET_POSITION_TARGET_LOCAL_NED 0 0 0 9 3576 5.0 0.0 0.0 0 0 0 0 0 0 0 0 long NAV_LAND 0 0 (or switch to Loiter and land manually)
This works fairly well and typically I get this kind of altitude curves
But in one flight, the drone unexpectedly descended while moving forward.
The rangefinder, barometer(s) and gps all indicates the drop in altitude, but for some reason that is not reflected in
I have tried getting my head around the various
XKF log messages and one thing that stood out is that EKF3 core 0 (blue) is the one that is off (and likely used), and it also has a very interesting “flatline” in the
XKF3.IPD at the very time it starts to descend and a brief activity right when it stops…
For the “good” flight, there were no such flatlines. There were some high innovations for core 1 in both cases though…
So then I looked at the IMUs and sure enough
IMU is way off compared to 0 and 1.
It looks ok:ish before takeoff though, so I’m guessing it is due to vibrations.
Interestingly, all IMUs seem to report as healthy (
- I’m guessing I should do an IMU calibration and look into notch filtering for the vibrations? Or could it be something else?
- What could have caused the flatline / freezing effect for EKF core 0? I.e. what caused the drone to disregard the barometer etc?
- Apart from the “freezing” issue, it seems that EKF core 1 (orange) is the most “off” compared to the others. Could it be that
IMUin this case, or is it always that
For some reason I cannot upload the log file (4MB) as I get “maximum size is 4.4MB” even when zipped to 1.9MB so I’ll try and upload it in a comment instead.