Snapdragon flight and optical flow camera


I try to stabilize my snapdragon flight drone by optical flow camera. I follow this tutorial to do that:

mavlink start -u 14557 -r 1000000 -t -o 14558
mavlink stream -u 14557 -s HIGHRES_IMU -r 250

optical_flow -n 50 -f 30

However, it still cannot stabilize in the indoor environment. Why? Do I need to do more steps?

Or do I need to use PX4Flow to get the optical flow? I found that Snapdragon Flight demo utilizes PX4Flow in


Chong Huang

PX4Flow is a separate camera and ultrasonic sensor module. The solution described at the first web page you referenced ( uses a downward facing camera module built-in to the Snapdragon Flight board and an additional ultrasonic sensor.

Jim W.

Hi Jim,

Many thanks. If I want to implement indoor holding based on the built-in camera in Snapdragon Flight, do I need to code this function myself? Or I can directly call the related function inside PX4. Many thanks again!


Chong Huang

The documentation in the dev guide ( describes how to set up and use the built-in camera in conjunction with an external downward facing range sensor for optical flow based position estimation.
You wound’t need to write any code yourself, just follow the instructions in the guide.