I want to use IR-Lock to achieve precision landing, but encountered a few problems.
I modified the default value of _enabled and _type in AC_Precland to avoid modifying parameters on GCS. However,
after I loaded my firmware, I found that PLND_ENABLED is still 0, i.e. disabled. But when I use another pixhawk, my firmware works. So, what could be the problem with the first pixhawk hardware?
After I set PLND_ENABLED and PLND_TYPE, MP hud displays ‘Bad Vision Position’.
This does not disppear when I connect Pixycam5 to pixhawk through I2C.
I’ve tested that Pixycam works fine, and the i2c connection is accordant with ardupilot document.
So what’s the problem? Wrong pixycam firmware or something?
Not sure if I understand your problem.
I followed the instructions in the AC wiki and just set:
IR Lock works seamless.
You need to install a special firmware on your pixy. You find that on the IR -Lock homepage.
The document says
For Developers: If you would like to compile the source code for yourself, you will need to modify one of the submodule files. Simply replace the irlock.cpp file with this file (https://cdn.shopify.com/s/files/1/0599/7905/files/irlock.cpp?2161534595122538968). The irlock.cpp file is located in the following location: ardupilot\modules\PX4Firmware\src\drivers\irlock
But this is actually older than the current branch. And if I replace this file, error occurs in compilation.
And can you tell me the verion of that special firmware? Or the version of your pixymon, it can also give me some hints.
Here you go:
Go to the IR lock software/firmware section of the page.
Hope it helps.
I tried but failed to access this address. So I found a v1.0.2beta elsewhere and loaded it.
It didn’t work when I set a signature. So I change back to my original firmware v2.0.12.
Problem solved. It’s a cold solder joint…
hi guys, i seem to be having problems as well. It seems that my irlock is not working with the pixhawk. Previously i tried on 3.3.3 and it works. When i check the logs, there were no values.
Hi everyone! This is Thomas from IR-LOCK. Sorry for being late to the thread.
Thanks for the update. I am glad you found the cause of the problem. If you have flight logs, feel free to post them (or send them to email@example.com). It would be great to see more logs for the latest release.
Which sensor firmware and pixhawk firmware are you trying now? The precision landing feature should be working in the latest 3.4 release. Here is a video of a 3.4-rc5 test. As you already mentioned, you can revert back to our previous firmware, but that should not be necessary.
I am running on 3.4 RC6 and also saw that IRLock is not working. I have much larger logs with flying (look the same) but for simplicity performed a test on a bench where I put the drone into loiter above an IRLock beacon and armed it and spun props. I’ve verified using PixyMon that the drone can see and detect the beacon and that the health of the IRCam is 1 when it is attached and 0 when it is not attached on the drone. However, it seems like the PL algorithms aren’t being run as all of the associated PL telemetry (other than Health) remains at 0. Note the drone was not flying at any point, it was stationary but props were spun up in loiter mode (i.e. see armed EV for confirmation).
81.BIN (381.6 KB)
Could this be an issue specific to RC6?
Just ran the 3.3 IRLock modded firmware and it looked like it worked and was running the PL algs. No modification to hardware/software configuration aside from the new firmware change from 3.4RC6 -> 3.3 IRLock custom.
87.BIN (2.1 MB)
Could there be some new configuration parameter in RC6 that must be set to enable this stuff that we may have missed other than PLAND_ENABLE (1) and PLAND_TYPE (2)?
Thank you for all of the detailed information. Did you try the ‘Land’ mode, or did you only check ‘Loiter’? I am not sure if the developers want to include the precision land feature in the ‘Loiter’ mode.
Thank you for the reply. I have actually tested out the IR lock on the 3.3.3 modified version that is provided by IR-Lock and everything works fine. The reason why I upgraded to 3.4rc6 is because there are several sensors on my copter I am testing requires it to be in 3.4. I have not tried it in RC 5 tho. My problem is the same @lenorin . Heal is 1 but the rest are all 0.
looking forward to get this sorted out.
@Murdanny_Mukhtar when you flew did you fly it in Land mode or just Loiter? If you flew it in Land I will not bother retesting my rig. I’m in a similar situation where I need 3.4 code for some of my sensors so reverting is not really an option for forward progress.
Hi, I have just got my IR-Lock sensor and beacon today! Thanks Thomas! Now I have a question, my use case requires that I fly to an specific waypoint. Once I get there, the copter has to descend to a certain altitude using the IR-Lock sensor, let’s say 5 meters height. Then it stops and drop a package.
Would this be ever possible with current firmware, builds?
As Thomas suggested, it looks like you only flew in Loiter mode, not in Land. We don’t currently support using the IRLock in Loiter mode so that was a change that’s in Thomas’s group’s modified firmware that hasn’t made it into master.
This isn’t the only problem though, in the “PL” dataflash log messages it seems the sensor in healthy (“Heal” param is 1) but it never sees a target. I’m not sure why.
It looks like there’s no sonar on this vehicle, we highly recommend attaching a Lidar or sonar although that isn’t mentioned on the wiki so I will add that now. My understanding is that it can work without one but I haven’t tested it recently without a sonar/lidar and I think the distance to the target is quite critical to get good performance.
The target was definitely in sight of the IRLock camera during that test. I verified it using the PixyMon binary without any change to the configuration. If that is a problem I would say that is the smoking gun of a real bug potentially (loiter mode or no)?
I do not fly with a sonar/rangefinder in this configuration, but I do have a sensor that gives me extremely accurate altitude, so that problem is less of an issue, although I do appreciate the heads up.
Do you know what could cause the lack of target detection? PixyMon paints the target very reliably.
Ok, I’m not sure. I’ve asked Jonathan if he can join the conversation here.
@lenorin I used loiter to position myself above the beacon and came down in land mode.
I have not flown yet RC6, but for what it is worth I can confirm that IR Lock works fine in Land mode on RC5 along with Lidar.