question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vehicle.commands.download() timeout when called multiple times on a telemetry link brokered by MAVProxy

See original GitHub issue

When calling Vehicle.commands.download() and Vehicle.commands.wait_ready() repeatedly through MAVProxy, the wait_ready() always fail after a number of trials:

  File "/usr/local/lib/python2.7/dist-packages/dronekit/__init__.py", line 2650, in wait_ready
    return self._vehicle.wait_ready('commands', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/dronekit/__init__.py", line 2182, in wait_ready
    timeout)
dronekit.APIException: wait_ready experienced a timeout after 30 seconds.

The above error is guaranteed to be thrown when running the following integration test:

https://gist.github.com/tribbloid/13d1bb022c0b681a9ee4a65f1067376e

I don’t know if its a DK issue or MAVProxy issue. So I’ll just submit a failed test to both projects. Please resolve it if DK is not the culprit.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tizianofiorenzanicommented, Jul 9, 2018

Assuming that your connection string is ok, sometimes you just need to extend the timeout period to get rid of the issue. Here is what I do:

  1. vehicle = connect(…, wait_ready=None) --> or do not set wait_ready
  2. vehicle.wait_ready(True, timeout=<timeout_in_seconds>)

This will connect with the vehicle and then wait until all the main messages have been received up to timeout_in_seconds

0reactions
eminakguncommented, Jun 26, 2020

#1039 is the implementation here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Link timeout, no heartbeat in last 5 seconds - ArduCopter
Hello guys, Am getting this warning message every time I try to run my python code. This is my script on my raspberry...
Read more >
dronekit/dronekit-python - Gitter
I have the opposite problem where half the time I power up the FC I can't connect to it. Randomly half the time...
Read more >
Connecting to a Vehicle - DroneKit-Python
The connection to the vehicle (or multiple vehicles) is set up within the DroneKit script. Scripts import and call the connect() method.
Read more >
Dronekit python vehicle connection timeout - Stack Overflow
Turns out the issue was that because we were connected over serial telemetry at a baud rate of 57600 it takes ~2 minutes...
Read more >
Pymavlink · GitBook - ArduSub
ArduSub communicates with a protocol called MAVLink. ... is possible to create a python script to read sensor data and send commands to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found