I believe flow_hold is not necessary in 4.0, just adjust the optical flow and make EKF2 use optical flow instead of GPS.
FlowHold is also not necessary, as loiter will use optical flow instead of GPS if EKF2 is adjusted accordingly.
In Copter I missed it also. But when I choose the right Flow Sensor at FLOW_TYPE it was working
How to make sure it works?
It is substituted by FLOW_TYPE to specify the kind of sensor, as well as enable it.
I have selected the correct flow_type, which is 4, corresponding to CXOF, but I cannot confirm whether it is working.
You can follow instruction from PX4FLOW wiki, the info under “Testing the sensor” and “Calibrating the sensor” should apply for every optical flow sensor supported.
to make it short, just disable the gps and look if he hold position
EK2_GPS_Typ to 3
Thanks, I checked all the corresponding setting parameters to ensure that they correspond one-to-one, and I also looked up the data to monitor whether the optical flow camera is working, and there is no data change.
I’m not sure if the traditional helicopter firmware has blocked the function of the Flow camera. It needs to be confirmed by the developer!
you are right. theire is something not working. Im using the PX4flow and never had any problems.
Now i get the Message “Bad Opflow health”
and no Data
FLOW_TYPE to 1
It’s best to post a dataflash log if it doesn’t appear to be working. With a log we can check the parameters and also see if the sensor is providing any data.
OK, I will submit a log later!
Dataflash log in here: https://drive.google.com/open?id=1u68zZzeL5zk-Actb2zs_XFI3ODFPW-YC
I start again with default settings of 4.0.0_dev and put step by step my settings. Last one was optical flow and suddenly no Problems any more. Like before
To use Loiter mode with optical flow a range finder is required. For some reason this log doesn’t seem to include any of the PARM messages so I can’t see if the RNGFND1_TYPE parameter has been set or not but I can definitely see that there isn’t any range finder data.
At the risk of being a little annoying, the requirement for a rangefinder is mentioned in the Additional Notes section on the setup page for each flow sensor.
A range finder is not required to use FlowHold mode but I need to warn you that FlowHold is very sensitive to timing and response of the vehicle so it’s not as robust as Loiter.
Okay, thanks to Randy, I added common sense after adding the rangefinder. Yesterday, a friend installed the sonar again and did get the data of opt m xy. I immediately purchased the VL53L1X module, I hope it can be successful!
Hello Randy，I received the laser ranging module VL53L1X today and immediately installed it on my K120 super small helicopter. After following the settings of the instructions, I successfully obtained the data of the rangefinder. At the same time, I finally detected the Opt m XY Data, and then test flight indoors, maintaining Althold very well. However, position maintenance based on optical flow is not effective and the aircraft will slowly drift to the side of the wall, and I have to manually control it back to the hovering safe range. I checked the parameter settings again. I only know that 4.0rc2 and 3.6.11 have different parameters for the Flow_ series. I don’t know if the optical flow is correctly identified in 4.0rc2, or why it is not affected？
if you have a dataflash log we can have a look. By the way, optical flow sensors often don’t work well under florescent lights because they flash at about 50hz ~ 60hz which show up as black images in the camera.
Tested again this afternoon and finally got a certain effect. Although the overall performance is not ideal, it is verified that the optical flow can work normally!
Regarding dataflash, because KakuteF7mini’s on-board flash log record is not very stable, there is no valid data to view in the recorded log, so the extracted dataflash is not useful.
Ah, the tiny heli! Very nice!