How to implement optical flow


I’m trying to implement optical flow (without px4flow). The idea is using companion system to calculate flow and send opt flow messages to px4. I see there are MSG_OPTICAL_FLOW and MSG_OPTICAL_FLOW_RAD messages defined, are there any articles describing the parameters these messages take? I wasn’t sure why there were two message formats and couldn’t find more details on the parameters (how to calculate integrated_x or integrated_y). Any help is appreciated!


This is already being done for the Snapdragon Flight board (and presumably others).

On the Snapdragon it’s done with the following repository:

There is another more generic optical flow repo. I don’t know on which hardware it’s being used: