after all the hassle I also have to conclude that PX4Flow just doesn't work on Erle Brain 2 with i2c and is not suited for position control using APM.
Here I list what I attempted:
* Of course, first I followed the steps in the documentation. The i2c address is correctly shown as 0x42, but I still don't get any usable data throught the i2c, at least nothing is displayed in flash logs.
* The sensor is working well, since I had no problems connecting it to my pixhawk autopilot and arduino board
* I attempted different i2c speed of the raspberry pi board, from 32000 to 400000
* I installed other versions of APM
* I tried different OS, "escarlata" and "frambuesa", same results
* I tried to install PX4 on frambuesa using the guide in the documentation. When the installation was finished, the board would crash each time at startup. I had to format the SD and reflash the OS.
* I extended the RAM with a SWAP file, since during a test RAM usage was somehow maxed out.
* I tried different GCS, MP, APM Planner and QGC.
I have tried more stuff than I listed here, but I can't remember all of them. I have yet to see one single case of PX4Flow working on Erle Brain.
For anyone reading this, feel free to suggest any new methods of troubleshooting