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)
    http://review.px4.io/plot_app?log=13893edc-676c-4aa7-a4f1-5300274aa978

  2. Lift it up and hold still (no land detector)
    http://review.px4.io/plot_app?log=31244d4a-0c90-4ca3-9e22-9fd929004e75

  3. Walk forward and back (land detector enabled)
    http://review.px4.io/plot_app?log=1be9b696-5708-4dde-8b28-b1d17c3a4ccd

  4. Walk forward and back (land detector disabled)
    http://review.px4.io/plot_app?log=590c90fd-c8a3-407d-8430-65485baf6425

  5. Real flight test (try to enter position control, not very stable, thus switched out right away)
    http://review.px4.io/plot_app?log=b1361b56-e2c6-4e84-a175-69c8056922fc

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!!