Sample connection code doesn't recognize pymavlink functions

20 views
Skip to first unread message

ParrotPilot

unread,
May 6, 2024, 1:03:39 PMMay 6
to MAVLink
Capture.PNG

Using pymavlink to connect to a ANAFI USA Parrot drone. I see this is possible and supported. 

When creating the env I have followed the instructions in the quick start guide. However, when I copy in the sample connection code I'm noticing that the package recognizes the connection line, but subsequent lines for wait_heartbeat() and target_system/component are undefined (appear as white)

If I run the code the terminal just hangs until I force terminate with ctrl+c

I tried just using the connection line by itself in a try/except and it did work, but not the rest of the code. I also confirmed I'm using the correct IP for the drone.

I see the functions defined when I inspect pymavutil but for some reason there is no suggested methods when using dot-notation on the_connection.

However, I can get it to recognize wait_heartbeat() if I use mavutil.makefile.wait_heart() - which doesn't work as it expects an argument. 

Can anyone help clarify what is causing the issue? 

Windows 10
Python 3.12
VSCode - packages are installed properly
Parrot ANAFI USA drone - connecting via wifi, can successfully see the drone in QGC. 


ParrotPilot

unread,
May 6, 2024, 2:07:56 PMMay 6
to MAVLink
Please disregard this post. The issue stemmed from firewall permission issues for the UDP port. 

I solved the issue but setting inbound/outbound rules. 

DEVANK

unread,
Jul 16, 2024, 6:57:59 AM (6 days ago) Jul 16
to MAVLink
Hi, I am also facing similar issue. Can you help me ?

Hamish Willee

unread,
Jul 16, 2024, 11:20:24 PM (5 days ago) Jul 16
to MAVLink
The code is waiting for a heartbeat, and will wait forever until it gets one.

Working with a particular MAVLink generated language talking to a particular flight stack depends on the implementation of the language and the flight stack. You're best bet is to discuss this issue on the pymavlink gitter channel OR the parrot support channels. 

When you do that, provide more information about your specific problem. If it is "exactly the same" then maybe the problem is the same - the network is blocking the connection,
Reply all
Reply to author
Forward
0 new messages