Optical flow - EKF2 IMU0 has stopped aiding

Hi guys,

I want to add a px4flow to my erlecopter. When i activate the optical flow APM starts printing the same messages:

[MAV 001:1] EKF2 IMU0 has stopped aiding
[MAV 001:1] EKF2 IMU0 is using optical flow

I’m using version 3.5 rc9 and lidar lite v3.

With a fresh install it happens, too.

Thank you for your time.

1 Like

Hello,

I have the message with px4flow as well, I allways considered it as being an informative status message generated from EKF.

Is it causing any malfunction or change of behavior of your flight ?

Hi,

I think yes, because the gyroscope starts to being a little sideways. I don’t know if thats normal. I didn’t test flight, yet!

Looking at code https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp

we see:
If GPS is not available and flow fusion has timed out, then fall-back to no-aiding

and then
We have commenced aiding, but GPS usage has been prohibited so use optical flow only

Have you disable GPS in EKF (http://ardupilot.org/copter/docs/parameters.html#ek2-gps-type-gps-mode-control) ?

Yes, of course! :slight_smile:

I think it’s better just to test flight?

Yes ,
you can make your test fly no problem, as long as you have tuned and aligned the opticalflow signal with the IMU (like showned in the wiki).

It switching modes is accpetable as long as the opticalflow does regain control (EKF2 IMU0 is using optical flow). Otherwise you might have an issue with the opticalflow signal, that we could see in the log.

Hi,

This seems wrong :smiley:

You have to adjust gain on both x and y (and make sure y is in phase with IMU)

Are you talking about FLOW_FXSCALE ?

yep
If OF.flowX is larger or smaller than OF.bodyX, then it can be adjusted by changing the FLOW_FXSCALER parameter

FLOW_FXSCALE = 200

FLOW_FXSCALE = -200

I think this is not supposed to happen.

Maybe i have the orientation wrong!?

You have to be carefull in the sequence you pick the values in graph, because it may affect the way the data is presented, and somtimes you have to right click to get the right scaling. You are on the right track, experiment more until you get good reading.
FYI ; my values are around 5 for scaling

I got this values:

But i can’t flight the drone, he always just go forward until it crashes.

I had the FLOW_FXSCALE = -200

Now it is = 0 and the graph is equals. Can you explain me why we have to change that scale if the graph is equals? That’s why the drone crashed? Because i set the value at -200?

This is my current graph with the scale equals 0.

Put values to zero and make sure flow Y is in phase with IMU Y

What values to zero? I just changed the scale parameter. Anyway, even in Alt Hold mode, the drone just went forward by itself. It can be because of optical flow, too?

I think it is matching Y

Looks good to me,
You should be able to take off in Loiter and ithe Quad must hold position if you are on a textured non reflective surface.

Hi @ppoirier,

Today we tested the copter. In alt hold with lidar it works fine. When we set px4flow, alt hold worked almost fine. Kind of instable, when we switched to land… controls stopped working and he crashed.

We tried in Loiter and we could not take off, the drone just felt sideways.

My charts are fine in X and Y.

Like @JD-ETH once said, i think nobody has ever managed to put px4flow working in erlebrain?

Dont believe urban legends … I make it work with a BeagleBone that is less powerfull than an ErleBrain :slight_smile:

Upload your log file , need to look at it