Precision Landing: receiving Mavlink Messages but drone is not taking orders

Copter 4.1.4

Hi,

I’m currently trying to implement Precision Landing on my DJI F450 which was tuned to use Ardupilot in it. To provide the Landing Target information, I’m using a RaspberryPi with Raspberry Pi Camera Module V2 and OpenCV with Aruco Marker. The Raspberry’s script connects with the drone via USB in Telem 2 and when it finds the marker, it sends a Mavlink Landing Target message with distance and angles information.

As you can appreciate in the log, the Mavlink messages have been send correctly at around 10 Hz (I know the distance to the target is not 100% accurate).

However, when I change it to Mode Land, the drone is landing vertically in default configuration and the marker is not reached.

Parameters are: PLND_ENABLED =1 (ENABLED) and PLND_TYPE = 1 (COMPANION COMPUTER). I’m not using a Rangefinder so, RNGFND1_TYPE = 0.

So the question is, am I missing something? Is there anything else I need to set in order to achieve the goal? I dived in https://github.com/ArduPilot/ardupilot/blob/master/ArduCopter/precision_landing.cpp and I don’t know if it’s correct but I feel like the update method is taking advantage of the Rangefinder. Is it possible that Precision Landing is not working due to not having one?

Previously, I tried this in SITL with the same configuration and it worked when the Aruco was far enough (drone followed the angles projected in SITL when the marker was held around 4 meters from the camera). This log belongs to that simulation, you can see that velocity in x and y axis is not zero.

I’ve seen other online tutorials and topics about this like Precision Landing Not Working (using MAVLINK_MSG_ID_LANDING_TARGET) but I’m not using DroneKit, so they are not that useful. I connect with the vehicle using vehicle = mavutil.mavlink_connection() and the landing target message is sent with vehicle.mav.landing_target_send().

Every help is appreciated, thank you in advance.

RNGFND1_TYPE must be 10 or something like that or it will not work.

Thank you! I will try it, do I need to send any more information through Mavlink about rangefinder in order to make it work?

You need to create a virtual “mavlink rangefinder” or use a proper rangefinder. You choose.

1 Like