I try to stabilize my snapdragon flight drone by optical flow camera. I follow this tutorial http://dev.px4.io/optical_flow.html to do that:
mavlink start -u 14557 -r 1000000 -t 127.0.0.1 -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 https://developer.qualcomm.com/hardware/snapdragon-flight
PX4Flow is a separate camera and ultrasonic sensor module. The solution described at the first web page you referenced (http://dev.px4.io/optical_flow.html) uses a downward facing camera module built-in to the Snapdragon Flight board and an additional ultrasonic sensor.
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!
The documentation in the dev guide (http://dev.px4.io/optical_flow.html) 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.