I’ve been testing the IRLOCK for a long time now in my hexacopter. It always seemed to work fine, but last time it almost crashed into a structure because the copter was not centering as smoothly as always.
Instead of centering in one axis, it kind of overshoot and never recovered from it, and it became even worse when the copter was about 30 cm from ground. Since it was really close to ground, the copter lost the IRLOCK beacon at that altitude and basically just landed in that position, which was really closed to another structure.
Looking at the logs, I saw that there’s always a tendency to correct the position by giving a speed of opposite sign (this way, the error always tends to 0). In this flight, however, near the end of it I can see that vY is positive as is pY, so the error never goes to 0. Is this a bug with the IRLOCK logic or is this something regarding the copter?
Finally, what should happend if the beacon is lost at a low altitude (as happened here)? Should the copter just land, should it move to the Home point according to GPS measurements, or should it go up again and try to find the beacon once more?
For reference, I’m using a LidarLite V3 as rangefinder. It has always worked fine with the IRLOCK as it tries to correct from about 20 m (I have made at least 20 successful landings with this setup).
I have attached the log file, I would be very grateful if someone from the IRLOCK code in Ardupilot could check it out.
Thank you for posting the log file.
It seems like the detection quality is descent (see image). And your rangefinder is functioning.
There is some logic in the controls which modifies the descent speed based on the current position error (pX/pY).
Also, there are actually two separate control algorithms. You may want to set PLND_EST_TYPE to 0 (raw sensor), instead of 1 (kalman filter). Some users have reported more ‘stable’ performance with the controls PLND_EST_TYPE = 0.
Indeed, my understanding is that the mini EKF is not working well with IRLock and should not be trusted. So PLND_EST_TYPE = 0 is a way to go.
Just for the note, it is important to use original IRLock, with the lens that they provide. Counterfeits or Pixy with a different lens will not work. Same goes with the marker.
I have tried both with PLND_EST_TYPE= 0 and = 1 and my best results have been enabling the EKF (=1). Because of what happened, I’ll give it one more try to the raw sensor measurements, and I hope this solves the issue.
Furthermore, I’m using the original IRLOCK with the original lens and beacon (MarkOne V1.1). I’m even using the case which is supposed to reduce interference with the IR detection.
I changed the parameter and my drone lost all GPS sats just before returning home to land. I know this may be unrelated, but I’ll attach the log file anyway. If someone can see anything there that could’ve made my GPS fail, I’ll be really grateful if you could point it to me. I’m even using 2 GPS, so it makes me wonder what could’ve made both fail.