Noisy Local Pose with LPE

Hi,

I’m encountering the following issue with LPE.
As you can see, there’s weird noise in the local pose estimation.

outdoor flight scenario with flow sensor.

indoor with external vision estimation source - a geodetic tacheometer, flow sensor unplugged.

this happens with flow sensor and external vision enabled at the same time

@mhkabir I’m using a stable firmware uploaded with QGC, from around a few weeks ago, if that is what you mean by LPE version, I’m not sure…

Visually the vehicle flies fine, there is almost no noticeable twitching or anything, except for the last scenario with both flow and vision enabled, where it’s shaking terribly.

Not sure what you mean by “vision yaw fusion”, is that a configurable parameter?

Appreciate any feedback!

/cc @jgoppert Can you look into this quickly? I’m a bit overloaded this week, will only be able to look after Wednesday.

@art-mx Have you followed this : http://dev.px4.io/external-position.html ?
Visual yaw fusion :
Set the system parameter ATT_EXT_HDG_M to 1 or 2 to enable external heading integration. Setting it to 1 will cause vision to be used, while 2 enables mocap heading use.

You can also try setting the vision std deviations lower to make LPE track it like ground truth. I used something like 0.001 when using a Leica TotalStation.

With the vision and flow on at the same time with very low variances basically it is bouncing back and forth from the raw reading of vision and the raw reading from flow at each update. This can be fixed increasing the noise on either the flow or the vision. Another alternative would be to add states to the estimator to estimate the offset between the flow and vision, but this will take some time.

Hi guys,
thanks for your responses,

@mhkabir I’ve set the ATT_EXT_HDG_M parameter to 0, knowing that i’m not getting any orientation data form vision estimates. Does it still make sense to have it enabled?

The vision standard deviation is set to 0.01, which is the lowest possible value to set. As is the flow sensor, so i’ll try again with lower deviation values for it.

@jgoppert What about the noise in the fist and the second plot, where I either use flow or vision separately? I suppose it shouldn’t be like that? Vibration levels seem to be low, according to the log, any other ideas?

That should be the way forward :slight_smile:

@art-mx I suspect that there’s also a heading issue, since you’re not fusing heading from vision. How are you defining the geodetic tracker’s frame origin? It should be aligned to magnetic north, since the tracker doesn’t provide any attitude. I’ve seen something similar to what’s happening to you when heading wasn’t fused and the frames weren’t aligned (since flow is transformed using the compass heading, to NED).

art-mx, what version of software are you running for px4, there is a now a low pass filter on the local position estimate (LPE_X_LP, LPE_Z_LP), that cuts all frequencies above 5 hz, but it looks like you definitely have some frequencies above that with your vision/flow corrections

@mhkabir We’re aligning the leica’s frame of reference using “free stationing” - that gives absolutely precise orientation to North.
Btw, is a slight frame misalignment a big issue? The magnetometer onboard isn’t a very precise sensor anyway, is it?

@jgoppert I’ll have to check that, but I’m using the default stable version that came with QGC around a month ago.

Seems like for now the best idea is to flash the stable version from github manually? I’ll do that and let you know if it worked.

Unrelated question: Why does disabling LPE_INTEGRATE cause terrible flight behaviour and drift even when there are flow of vision corrections available?

We’re aligning the leica’s frame of reference using “free stationing” - that gives absolutely precise orientation to North.
Btw, is a slight frame misalignment a big issue? The magnetometer onboard isn’t a very precise sensor anyway, is it?

Yes, this is correct.
Your frames should be just fine, so that’s solved.

Please flash master and let us know what happens. Not much should change, and it won’t fix your issue, but at least we’ll be on the same page. Development is moving so fast that it is hard to track the “default stable version that came with QGC around a month ago”