Why doesn't the Navio+ or Navio2 support Optical Flow?

Randy’s post lists the things not supported by the Navio+ and one of them is the Optical Flow (i.e. PX4FLOW).
Unfortunately, he doesn’t give an explanation so does anyone know why it is not supported?

We are constanly adding support for new accessories and external LED and airspeed sensor mentioned by Randy are already functioning. We did not get around testing the optical flow, but from the first look it is supposed to work. In your flight tests it seems like it was returning data which ended up in the OF logs.

Yes, it returns data, but OF.flow, OF.body, and IMU.Gyro don’t match like in the wiki. Instead, I get this:

Looking at the PX4FLOW it is able to work at 400KHz I2C speed max, while Navio+ uses 1MHz. I would not suggest lowering it on Navio+ considering how crowded the bus is, on Navio2 you can lower it safely.

In that case, then I’m gonna install the Navio2, set the i2c.conf to β€œoptions i2c_bcm2708 baudrate=400000”, and test again with the PX4FLOW.

Btw, I guess I’ll have to use Master to build the ArduCopter.elf since Randy has not updated the Copter branch with Navio2 support, correct?

You can build from Master, the support has been there for a few weeks, but it has not been pulled to Copter 3.3

Igor,

With the Navio2 and diydrones/Master, the OF actually takes down the I2C bus a few seconds after booting up (just setting on the table). Below, you can see that it detects the connected devices, but a few seconds later the OF LEDs stop blinking and the RPi2b doesn’t list any divide anymore. I’m attaching the log in case you want to take a look at it.

1.BIN.NAV (580 KB)


pi@navio:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- 42 – -- – -- – -- – -- – -- – -- –
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – 77

pi@navio:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

The pixhawk has an external ublox gps, but the Navio has an internal one so I thinks it is causing to shut down the OF. Is there a way either through the code or via the logs that I can trace the moment where the OF shuts down or the I2C bus collapses?

There is no reason why having an internal GPS would cause OF to shut down. Do you have logic analyzer on hand?

Igor,

We have a Logic Analyzer 8, will that one work to troubleshoot the problem?

Sure! A very good LA. Can you hook it up to I2C lines, run APM with OF until I2C stops working and send us the log?

Will do. I’ll post them in a couple of days since I’m away from our lab today and tomorrow. Thanks Igor!

Hi Igor,

Please find attached the log from the Logic Analyzer. The last correct reading from OF occurs at 2s:478ms and the last START signal occurs at 2s:479ms, but a STOP signal is never received.

PX4FlowI2C.txt.nav (50.6 KB)
P4FlowProtocolResults.csv.nav (61.4 KB)

Were you ever able to get the PX4Flow working correctly with the Navio2? Was the error you were seeing APM ir kernel specific?

No, we did not. We actually had to switch to the PX4 flight stack and use the Pixhawk with a companion computer. Unfortunately, the Navio2 and the APM flight stack were not able to support the type of research payload platform we use for indoor test flights.

1 Like

@Al_B
Wow, that is fully equipped Quad copert.:grinning:
Some people try to run PX4 stack on Emlid. I would like to know your thoughts that is my curiosity.

[quote=β€œJiro_Hattori, post:16, topic:2008”]Some people try to run PX4 stack on Emlid. I would like to know your thoughts that is my curiosity.
[/quote]

I personally think that PX4 flight stack is a more robust platform for our type of research (i.e. autonomous navigation in GPS-denied environments at low-altitude operations), but the APM stack can be more suitable for other scenarios. The latest PX4 v1.4.1 release claims to support Emlid, but we haven’t try it yet.

1 Like

Thank you for the comment.
I’ve just started compiling PX4 on my Raspberry and get errors.
I will feedback if I could run.

You might get faster help if you post the errors/questions in the PX4 forum.

Just wanted to let people know that the PX4 Flow works fine with the Navio2. One can either connect it via UART or USB and setup the appropriate mavlink stream for it to work properly.
Once I have time I will be updating the documentation on the PX4 dev guide.

4 Likes