Copter doesn't fly with Optical Flow sensor

Hi, I have been trying to build an indoor flying quad for 9 months now. I have had successful flights with GPS but since we have switched to Optical Flow sensor the road has been all downhill. I first followed the wiki to install OpenMV Cam h7 as the optical flow sensor and was able to take off but the quad was never stable in Loiter mode. Then, we switched to PX4flow and things went worse and we had a crash. The MissionPlanner was reading 100 roll when quad was sitting on the ground. The altitude data failed as well.

We went to OpenMV but we got some sketchy log when the quad was on the ground. Can someone please have a look at it and let me know what am I missing here?

https://1drv.ms/u/s!AsWOA-Om6DUYlwLjbW65Ks27qDTY?e=0XqJy2

Are you using ArduCopter 4.0.7 ?

No, ArduCopter 4.0.6

@amilcarlucas Can I get some assistance here? Sorry for tagging you

I recently completed the install of the PX4FLOW sensor on my quad which works flawlessly with all AC 4.x versions so far.

Please check the following:

  • your copter needs to be well tuned and to fly stable in AltHold and Stabilize
  • Check your lidar rangefinder installation according to the wiki. Ensure that you get consistent readings between ground and ~>5 meters
  • do the flow sensor install and tuning exactly as described in the wiki
    Last but not least: double check the orientation of the flow sensor. (I had it first mounted in the wrong direction, which obviously doesn’t work)

Hi @mtbsteve, Thank you for your response.

I have done all the steps you mentioned.

Did you look at the log file I uploaded?

Also, is there a mode sequence which we are suppose to follow for switching modes?

By well tuned we mean you followed the Tuning Process Instructions — Copter documentation and after that tuned the dynamic notch filter according to the wiki

I think this is the tunning you need for the HF

https://ardupilot.org/copter/docs/common-optical-flow-sensor-setup.html#common-optical-flow-sensor-setup

Bye

YEs that is the tuning you should do after doing the ones mentioned above.

1 Like

Hi @mtbsteve,
Would you mind to share, where did you buy your PX4Flow optical sensor? Is it from CUAV brand or other? I have bought it from other China vendor, but it never worked. Some people advised it may be Window10 driver problem, but indeed I have tried many times and follow all the procedure, but still not working. And I found other people in this forum also have same problem… So I want to buy a new one, and really I want to make sure it is a good one. I am thinking about the CUAV PX4Flow, or Hereflow, or the new H7Plus from Open MV… Thank you.

Hi Tony, I bought it from a Chinese vendor on the internet. I had to follow the steps as described in the Arducopter wiki and to flash the px4flow firmware as described in there then it worked.

@mtbsteve, thank you for your information. I also have followed all the steps as in the document, but still not working. So I give up, may be I should buy a new one. So now the question is, which one is the most stable one? I consider to buy PX4Flow Cuav Ootical flow sensor, or HereFlow, or the new H plus OpenMv OF sensor.
Tks…

I can’t provide any advice for other devices since I am only using the PX4FLOW sensor. I replaced the original lens with a 3.6mm lens for better performance in lower light conditions.

@mtbsteve thank you , I understand that. By the way I also think to change the lens. Can you share where did you buy the better lens…? Regards,…

I bought it from here:
https://www.lensation.de/product-category/s-mount-lenses/

Hi! I have this kind of bouncing when I release the sticks, can you pls check the video?

I have worked with the flow_scale, and it improves, but no toa rock solid braking.

I will appreciate your comments.
thanks

Hi, I also had very bad flight behavior with an optical flow sensor. Mine is the CX-OF.
Almost no altitude control, very difficult to handle the craft.
I was able to have it fly well by lowering the value of EK2_FLOW_DELAY to around 5 millisec instead of the recommended 80 millisecs.
You might try to experiment a bit with this value.

1 Like

Thanks! I will.
In my case the drone keeps very well the altitude and position. The problem is just the braking. What rangefinder are you using?

I have found this video of your sensor, seems to work pretty well, may be your distance sensor is not good.

Hi, thanks, I have seen that video.
The interesting thing about this CX-OF sensor is that it doesn’t need a rangefinder in flowhold mode. It estimates the altitude optically. If you change altitude, the drone wobbles for a few seconds while adjusting;
Maybe the braking behavior has to do with the fact that the flow sensor looks a bit back (due to the leaning of the drone) while flying and that it wants to return to the position where you signalled it to stop. Mine also bounces back a bit when braking.

1 Like

We face the same issue using the same set of parameters in another indoor (B) place, we experience drop height and oscillate up and down slowly when roll or pitch.

We do not experience drop height if the flow sensor is disabled.

We are using LightWare SF20 / LW20 (Range finder) + PX4FLOW Optical Flow Camera Board without Sonar (alt-hold), no GPS.

The majority of the EK2 values remain default from reset. only the following parameters changed. we have done autotune successfully, with no issue flying outdoor and at another indoor place (A). CTUN’s BAlt (baroalt), DAlt (desired alt) and Alt do not track well.

EK2_RNG_M_NSE,0.4
EK2_RNG_USE_HGT,63
EK2_RNG_USE_SPD,6

FW: 4.0.7
FCU: CubeOrange
Flight mode: Alt-hold