I have a 5 inch drone with a Arducopter 4.6.3, a compass only, so no GPS and a Matek 3901-L0X.
This is specific for indoor use.
The rangefinder is working and the optical flow sensor opt_m_x, opt_m_y and opt_qua is producing data.
ALT_HOLD is working I think when using the rangefinder. I’m not 100% sure, because I don’t know how to check this.
But when I try to enable loiter I get this message:
Mode change to LOITER failed: requires position
Why, and how to troubleshoot this?
Set home here => Set EKF origin here
I tried a lot already:
Is there a way to check if EKF3 is using the optical flow sensor and the rangefinder, or why not?
Good infomation is hard to come by, just like the decision making process in EKF3 why and when something does or doesn’t work.
As, @rmackay9 said, just ensure your rangefinder min distance parameter would be lower than what the actual value it is displaying while the drone is on the ground. I would suggest to just set it to 1cm
Yes, I tried 1cm, because it says it’s 3cm from the ground measured. It shouldn’t really matter when I switch from ALT_HOLD to POS_HOLD approx. 1 meter from the ground, it still says the same, no posistion estimate.
My colleague is unable to confirm the issue he faced and why he switch from speedybeeV4 to MicoAir743v2. he was able to fly indoors with Microair MTF-01 Optical flow & 8m Range 2IN1 Sensor. H7 MCU, SD card slot, more external expansion ports, and overall price are the attractive points he made the switch.
I don’t know whether it makes relevant or not, change the mode to loiter and lift the drone manually for about 1 m and try to arm. Set the EKF home location manually from MP. I had the same issue and I did it and it started to take off in opt flow mode.
Hi, I tried your suggestion, didn’t work unfortunately, the flow quality (opt_qua) never gets above 50 it’s always around 40-45 even on 1m height. I think this is the problem, according to ChatGPT it should be >100 before EKF would try to use it.
As I don’t have another reference I can’t tell for sure, could you please tell me your flow quality on average?
where did you place your optical flow sensor? Is it center of the drone gravity? or was it offset from the drone CG? Usually I am unable to mount directly CG of the drone. I have to input the position offset (FLOW_POS_n) and calibrate the FLOW_FnSCALER. I am also curious how does Mateksys recommends -800 scaler for both directions.
We normally don’t recommend setting RK3_SRC1_POSZ = 2 (Rangefinder). It’s not necessary for the EKF to use rangefinder for altitude in order for it to use the rangefinder for the optical flow based horizontal velocity estimate.
I think providing an updated onboard log would be a good idea.
@Siva_Sudhamsu_Gunti’s suggesting of picking up the vehicle is almost certainly related to the rangefinder being out-of-range which can be resolved by changing RNGFND1_MAX_CM.
What Siva_Sudhamsu_Gunti is showing in his log is significant different than what I see, his average value is 127, way above 100, my value never gets above 50. If this is a value between 1 and 255, than it’s pretty bad I guess.
Can you confirm the minimum value of the opt_qua should be, should this be above 100 for the EKF to start considering using this?
I also see this in the log:
Test: OpticalFlow = FAIL - FAIL: insufficient roll data pointsa
To me all data is pointing towards a crappy optical flow sensor. I have another exact same sensor, I will replace the one on the drone with that one this weekend.
OK, I changed the Matek 3901-L0X for the second one I had lying around, but the same problem once again, low optical flow quality. I took the drone outside for optimal light, but this didn’t help much, here is the log:
I want to get another sensor, anyone got a 100% working option to advise?
I didn’t have a great experience with the Matek 3901. I was never able to get it to perform as I had hoped.
I have had good luck with the MTF-01P - Optical&Range Sensor - MicoAir Tech . I followed the manufacturers website to get it set up, and then the ardu wiki for the tuning. All worked as expected.
The log shows the compass and barometer sensors are unhealthy and there’s a text output from the EKF saying “Need Alt Estimate” which is very unusual. It might be good to revert to using a GPS and see if the simpler setup can be made to work (I suspect it will not work)
I am just speculating and wondering whether it is due to the code for the STM32 F4 chipset. My colleague runs into a similar issue with another optical flow sensor, the Need for position estimation. But the warming message is gone if lifted to around 1m.
I have seen this als, when I power of the drone and back on again the problem is gone, I suspect it could be due to the lack of processing power of the F405.
Logging is also an issue I see parts missing in the graphs, I think I order a TBS Lucid H7 FC and a MTF-01P, would that be a good recommended setup?