@HjorturG wrote:
Hi everyone.
I'm trying to use an on board Raspberry Pi with dronekit python API and camera to land on a target. I am using a Pixhawk with Copter 3.4 with precision landing enabled and set to Companion Computer. I found this example (https://github.com/squilter/target-land) and based my code on that.
I took off manually in stabilized mode, hovered over the target, saw that the raspberry code found the target and started sending the MAVLINK messages to the Pixhawk with the landing target position but when I flipped to LAND mode the drone just landed like normal without adjusting it's position over the target. I know the raspberry/pixhawk connection works since I can do autonomous take offs and stuff using dronekit with the drone in GUIDED mode, it's just not listening to the landing_target message while in LAND mode and I don't know why it's not working like in the example I linked. Am I doing something wrong or is the MAVLINK message structured incorrecty?
Is the precision landing maybe still disabled in the 3.4-rc1 Quad but the variables still show up in the parameters in Mission Planner?
The log seems to show the precision landing variables but the drone was not doing anything? The Heal variable was 1 the whole flight.
MAVLINK message:
def send_land_message(x, y):
msg = vehicle.message_factory.landing_target_encode(
0, # time_boot_ms (not used)
0, # target num
0, # frame
(x-horizontal_resolution/2)*horizontal_fov/horizontal_resolution,
(y-vertical_resolution/2)*vertical_fov/vertical_resolution,
0, # altitude. Not supported.
0,0) # size of target in radians
vehicle.send_mavlink(msg)
vehicle.flush()
Posts: 2
Participants: 2