I’m using PX4 autopilot v1.15.4 on a Pixhawk 6X, with a companion computer and a downward-facing camera for precision landing. The mission ends with a Return to Launch command. My configuration parameters are:
RTL_PLD_MD = 1 (Opportunistic)
PLD_SRCH_ALT = 5m
RTL_DESCEND_ALT = 7m
RTL_LAND_DELAY = 2s
The companion computer continuously sends the LANDING_TARGET MAVLink message. In the log, I see (at pos.z=-7.5):
0:03:00 INFO: [navigator] Precland: switching to horizontal approach
0:03:00 INFO: RTL: land at destination
But I never see the expected transition to descend, nor any WARN messages about target loss, or fallback behavior.
According to the code, after entering horizontal approach, the system should hold position (SETPOINT_TYPE_POSITION). However, the vehicle just continues descending immediately without waiting.
Do I read it right that it just does a normal RTL instead? Does this usually work but this time it did not, or is this a first try? And have you tested the same in SITL as well?
Thank you for your response.
Yes, it activates precision landing and in log I see corresponding set point position, but then immediately it does normal landing, set point to land, but corresponding to code it could not be just target loss or fallback, because in all ways there will be message about loss or fallback, and in log nothing. It looks like it just does normal RTL. It was first try, I tried different variants, but result always the same. But I did not tried in SITL yet.
Hey Richy, even i am working on precision landing a quadcopter with PX4 firmware. I am using IR Lock sensor for the same. Since the IR Lock drivers are not enabled by default, i have to start it manually in the MAVLink console everytime i reboot. Do you know way for the IR Lock driver to start automatically on reboot.
Hey Yeshes,
Sorry, at the moment I have no ideas how to enable the driver automatically on reboot.
But I found the following info: you can access the SD card of your Pixhawk (remove from FC and insert in PC), and under the /etc/ directory there should be a file called rc.txt or rcS (the startup script). Just add the line:
irlock start
Place it in an appropriate section—typically after other sensor initializations.
Hey @dakejahl . Thankyou for your inputs. It looks like the IR Lock drivers needed some time after boot to initialise. I hadnt given a delay for the same. It works perfectly after now. Thankyou.