dronekit / dronekit-python

DroneKit-Python library for communicating with Drones via MAVLink.
https://readthedocs.org/projects/dronekit-python/
Apache License 2.0
1.59k stars 1.44k forks source link

vehicle.commands.downloads timeout #1033

Open eminakgun opened 4 years ago

eminakgun commented 4 years ago

I process as the steps,

  1. clear out the mission vehicle.commands.clear() vehicle.commands.upload()
  2. I upload a mission from GCS
  3. Read the uploaded mission
    vehicle.commands.download()
    vehicle.commands.wait_ready()

    When called wait_ready(), it gets stuck sometimes. So I can not proceed. This issue tend to be more likely when number of waypoints are increased. I am running ArduPlane 3.9.11 and dronekit 2.9.2. It might be related to Plane version maybe?

eminakgun commented 4 years ago

Here what I found in the codebase indicating a fix related to downlaod method. https://github.com/dronekit/dronekit-python/blob/master/dronekit/__init__.py#L2964 # BIG FIXME - wait for full wpt download before allowing any of the accessors to work Can somebody explain what is meant here? Maybe I can figure out the solution and give a PR.

Btw I tried with Plane 4.0.5 firmware and looks fine tho. No errors. Maybe there are something mismatching MAVLink mission protocol or implemented differently. Any ideas?

eminakgun commented 4 years ago

I re-implemented and tested the mission download protocol properly. #1039