Servers by jDrones

PX4Flow (Optical Flow): Get raw data - array of optical flow vectors


(Michal) #1

If I understand px4flow docs (https://docs.px4.io/en/sensor/px4flow.html) correctly, it outputs mainly the general flow_x and flow_y numbers (and some values calculated from that).

Is it possible to get out of px4flow the array of vectors calculated across the grid of the image. Something like this (visualized):
OpticalFlow_Street
(image source: http://www.hizook.com/blog/2010/02/16/learning-estimate-robot-motion-and-find-unexpected-objects-optical-flow )


(James Pattison) #2

Whilst the hardware is the same, ArduPilot and PX4 use different firmware in the sensor: so make sure you have http://download.ardupilot.org/downloads/wiki/advanced_user_tools/px4flow-klt-06Dec2014.zip loaded (it is by default if you setup with MissionPlanner, and is an option in QGC I think).
The flow device outputs flow_x, flow_y and angular rate. If you want to get into the codebase, the source is here: https://github.com/priseborough/px4flow/tree/klt_flow which has some comments relevant for what you’re after (https://github.com/priseborough/px4flow/blob/41f4ac99142753422cdb9518802c4e27b1b9cd62/src/flow.c#L509)


(Michal) #3

Thanks, that’s relevant, we’ll look into it.