LPE velocity correction vs position correction

@jgoppert. I haven’t checked back on the LPE development since last June (since at that time the jgoppert-lpe-default branch works well for me with minimum modifications). Now that I have some more free time, I’m looking into the new master and the commit history of the LPE and hopefully you can help clarify some of the changes.

  1. I see a few parameter change for the LPE_ACC_XY and such, (from like 0.0454 to 0.012), is that just a tuning for the filter (I assume there’s no hardware change, for example for new pixhawk versions? ) I’m using the px4fmu-v2

  2. I see a major change that you’re switching from position correction to velocity correction for optical flow (which the idea I really appreciate, since it makes it easier as I can use vision as the only position source and fuse both easier). But with flow only, (specifically from this commit on (including the current master) https://github.com/PX4/Firmware/commit/fe40e9cfaefac230cadde9862da0b9ee6987316d. Even if I handhold the drone still, the flow still drift significantly. I assume its not the flow itself thats causing the problem, since I’m able to get very stable flight with position correction from flow.

I will upload my parameters later and some plots, but if anything comes up right away let me know.

Thank you so much.

  1. Yes, just tuning.

  2. You should be able to walk a 1m square and see sharp lines, if not, something is probably off in your setup. Yes, if you could upload a ulg file that would be good. Enable the new logger with SYS_LOGGER=1

ok, so here’s a few plots. All the hand-held testing is done by taking off the propellers, arm the vehicles, walk or hold in some path then put it down, disarm. So the log is from arming to disarm.

I’m a bit unsure about how to share these plots, so if these links don’t work let me know.

Note with this version of the firmware, even if I saw global position init, flow init, the led never start flashing green (always the breathing blue) when land detector is disabled. While land detector is enabled, the green led start flashing right away (even when its on the ground). and keep flashing as I lift up.

To me, it seems like every time flow init, it has some weird initialization/correction going on as sometimes I can observe a jump when I look at the local_position_ned topic in mavlink.

  1. Lift it up and hold still (land detector enabled)

  2. Lift it up and hold still (no land detector)

  3. Walk forward and back (land detector enabled)

  4. Walk forward and back (land detector disabled)

  5. Real flight test (try to enter position control, not very stable, thus switched out right away)

Note the general trend seem to make sense (but the measurement definitely drift quite a bit). The real flight data I don’t quite understand the ramp up of x and y in the middle as I’m flying it in an area no more than 3m by 3m.

Anyway, I still cannot get a stable flight out of the new LPE. Let me know if I did anything wrong!

Thank you!!