OF calibration parameters

Hello everyone,

I have been trying to calibrate an optical flow sensor (HereFlow) for the last days. The sensor is already working, and after following the steps shown in https://ardupilot.org/copter/docs/common-optical-flow-sensor-setup.html I have been able to obtain good results in the X axis but not in Y.

You can notice from the image, the OF sensor is not located at a certain distance from the cube, approximately 15,6 cm. After filling all the corresponding parameters in MissionPlanner in order to locate the sensor within the frame and applying them I am still getting an offset in the Y postion as I have mentioned above.

Just to make sure I was not changing the wrong parameters, I started to change the FLOW_POS_X and added extremely high numbers just to check if the logs showed any difference and then tried to find notably differences in the offset but it seems like it is barely changing.

The parameters I initially used were FLOW_POS_X = 0.156 , FLOW_POS_X = and FLOW_POS_Z = 0.056. (LOG35).

Tried changing the X distance trying different parameters like 0.4 , 0.7, 1, -1… but that was not changing nothing at all in my plots.

At the end I tried combinations changing all the possible parameters including FLOW_ORIENT_YAW, but I’m still not able to get any better results in the Y axis.

Here is the table with all the different tests I have tried:

Test 10 should correspond to the real distance values in my drone.

The plots I am obtaining right now in the X and Y axis with good lighting conditions are the following:

After exposing all this information I would like to ask:

  • What is exactly the meaning of the parameters OF.BodyX/Y OF.flowX/Y
  • Are the values showed in the graphs good enough or do they need to be improved? As you can check from the logs there is an offset between OF.BodyX/Y and IMU.GyrX/Y that appears to be changed only when the FLOW_ORIENT_YAW is different to 0, but it just redistributes the total amount of offset between X and Y depending on the value of the FLOW_ORIENT_YAW, can never get both of them to 0

Best regards.

Link to the logs: Dropbox - logs - Simplify your life
(These logs were created in bad lighting condition indoors since their only purpose was comparing the differences between OF.bodyY and IMU.GyrY / OF.bodyX and IMU.GyrX )