PX4FLOW spikes on data output

The specific PX4Flow firmware is for ArduPilot and I still recommend that you use Mission Planner to test , set and calibrate.

1 Like

Using the officially recommanded documentation doesn’t change anything. I am still observing spikes at the optical flow output. It seems to be generated by the erroneous body rates.

I suspect there is incompatibility between rapsberry pi 3 and the ardupilot or Erle Firmware. Has there been use cases with rapsberry pi 3 and Px4Flow? Attached is the bin file.

4 13-06-2017 19-20-04.bin (2.0 MB)

Just test with px4flow (remove lidar lite for the moment)

We tried and we were getting same results. However, we are getting some interesting results with the current beta :3.5rc7. still far from being correct but at least no spikes anymore http://forum.erlerobotics.com/t/arducopter-3-5-beta-testing/2936/10

1 Like

With the ardupilot beta (3.5.0 RC 7) we were able to read the log.

Yes it still requires calibration and set yaw, but good thing it is reading legitimate value!


Great !!
Keep us updated with the flight test. :slight_smile:

One more little tweek , you can adjust the optical flow delay to get a very accurate correlation between the PX4FLOW and the FC IMU; I have good results by adding 20 Millisecs.





Thanks for the suggestion, we will test it when we fly.

After setting to the correct direction and having similar amplitude at the gyro measurement, We are finally reading data from the log.(On APM Planner it has very low stream rate somehow and one can’t really see what’s going on)

However, the EKF 2 kept switching between optical flow, even though I don’t seem to be using it.

Log here:

Parameter attached tooFatMan_15_06.param (10.5 KB)

Looking at your parameter file, there are a lot of stuff missing, are you using mission planner for setting params ?
Please save parmater file from Mission Planner and submit again.

Ok I will switch to Mission Planner. It has became super slow somehow in parameter transfer, and it takes 10 minutes to finish getting parameters…

This really not normal, you connect UDP using the appropriate port ?
If you go in command shell : and Ping the ErleBrain, = you should get a steady Ping back around few millisecs
Other test, launch manually using Ethernet

Finally finished downloading those.

ParamList0615.param (12.8 KB)

I will check the ping now:

Ping seems fine, time < 1ms for all package sent.

Ahhhh Much better :slight_smile:

Ok now according to instruction,
Set the EK2_GPS_TYPE parameter to 3 to make the EKF ignore GPS and use the flow sensor

And this RNGFND_TYPE,-1 should be set to 15


The error message disappeared!

However, the update rate of the flow measurement is still extremly low, updates every 2 seconds. On the logs they seem to be update way faster.

I think there is something weird going on between the board and the GCS.

My LidarLitev3 shows a constant offset, however changing offset (V) doesn’t seem to affect anything(not analog). Is there a way to offset the measured value?

So here I can confirm PX4flow would theoretically work on Erle brain 3 in ardupilot 3.5.0 rc7. However, the ardupilot would occasionally crash for no reason, and this is stopping me from taking it out for a test fly.

Hopefully we could resolve this soon.

Lidar Lite V3 as a minimum reading distance of approx 25 cm, so you have to adjust parameters accordingly.

One las word of caution == allways check the rangefinder and pxflow reading using the GCS before flight.
Take a look at my picture (the one I demonstrated RPI could read px4flow…:wink: ) , you will see all the necessary parameters are displayed == this is where Mission Planner gets pretty usefull

I think you have everything to succeed now. Good Luck

1 Like

Sorry to disappoint but the same issue is happening… The parameters are set correctly and the yaw orientation is correct. I will update the newer beta for now.

Also the erle keeps crushing. I will prepare another log and post it under the beta issue thread.

We are getting real frustrated…

The seemingly legitimate value comes unfortunately from the gyroscope measurement compensation. The flow value is still just spiking: not going compeletely up to couple thousands anymore, but nevertheless very similar pattern.

Have you tested px4flow with the erle yet?

Hi dears,
I configured the Px4flow module following the ardupilot wiki and tested it in loiter mode. The test results were also acceptable and almost stable. My flight controller is pixhawk4 with 4.0.7 copter firmware.
in auto mode with a mission, the vehicle has some additional drift, and it passed the point of the home and did not land (lost it).

  • It should be noted that the px4flow calibration was suitable.
  • The test ground is asphalt.

Is there a way to improve performance or solve the problem?
Do you know a better lens for Px4flow? (itself is narrow)

Log file :
Upload files for free - Auto Test.BIN - ufile.io
ardupilot wiki:

Did you follow these steps:

  1. Tuning Process Instructions — Copter documentation

  2. Managing Gyro Noise with the Static Notch and Dynamic Harmonic Notch Filters — Copter documentation

These steps will improve the performance of the vehicle.

You should switch to “STABALIZE” or “ALT_HOLD” flight mode when you see that loiter mode is not behaving properly, so that you do not loose your vehicle.

Thanks dear @amilcarlucas
My loiter using px4flow is good, But my problem is in rtl mode that loses its home.
vehicle flight is appropriate.