-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vehicle.commands.download() timeout when called multiple times on a telemetry link brokered by MAVProxy #688
Comments
fix a bug in SpookyUtils.mapPerExecutor/mapPerWorker that causes some executor/worker(s) to be ignored integration test can now specify numCoresPerWorker. default local-cluster test env change to 2 cores per worker add tests to ensure new SpookyUtils and BeaconRDD are working LocationLocal now cast to LocationGlobalRelative when used in move avoid manually set homeLocation and localReference in python code to sniff out dronekit/dronekit-python#688 minor refactoring
I can verify that I am having this same problem. If after calling cmds.download() in DroneKit, I go to MavProxy and see "No waypoint load started" as a response to that requestion, then I issue a mp command "wp list" DroneKit unblocks, receives the download and continues. This isn't a problem with a direct connection or SITL. This is causing me to be super stuck at the moment with no workaround. |
I get this issue as well. In addition, sometimes calling @peterbarker Any help here would be appreciated. I am able to connect to Mission Planner from MAVProxy, but I cannot run a drone kit connection. I can provide any information you need for debugging the issue. Thank you for the help! |
Some additional information that we discovered in our application: On SITL or direct serial connection, this wasn't a problem. On a radio connection, this was a huge problem. We also found that if we had a ground station (Mission Planner) using the same connection as DroneKit, we could get it to work. It was assumed that something in the exchange of data from Mission Planner through DroneKit was satisfying Wait Ready statements. Also, while the documentation for Vehicle.commands.wait_ready and Vehicle.wait_ready implies that the first just waits for a mission to be downloaded, it appears they both hang in the identical way. Also, the docs suggest doing a Vehicle.commands.wait_ready after a vehicle.commands.download, however a review of the code on GitHub suggests that the wait_ready has been added to the downloads function, and doesn't need to be added again. |
@custeve If you don't mind elaborating, how did you connect DroneKit and Mission Planner using the same connection? I can try to do this tomorrow to see if it fixes the problem on my end as well. |
Run through MavProxy. Connect mavproxy with one input and two outputs, something like: mavproxy.py --master={path to your radio, like /dev/ttyUSB0} --out=udpbcast:{ip of your mission planner pc}:14550 --out=udp:0.0.0.0:14551 Then, in DroneKit, connect to 0.0.0.0:14551 and in mission planner connect to 14550. Depending on your network and machine setup, you may have to experiment with your udp ins and udp outs. See the mavproxy docs for me. |
Interestingly, I was not able to get a UDP broadcast to work. I have been using Mission Planner and my script using TCP ports without any issues, however. Each of my tests included the following setup:
When I was ran my script in Python 3 (version 3.6.2), setting @custeve Are you running Python 2 or Python 3? |
Using Python 2 fixed this issue. Once I switched back to Python 2 and added the |
I still get this error with my UAV if I use Python 3. Will this be fixed soon? It is forcing me to continue to use Python 2. |
I only test it on Python 2 and got the error, DK's support for Python 3 is still beta (though it should be supported and Python 2 should be dropped). |
@DarkmatterVale DK isn't getting any great resource. However if "someone" puts in a PR to fix this we'll certainly review it. |
I am still seeing this error intermittently on the SITL tests in Python 3. |
I think I figured it out. |
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:
This will connect with the vehicle and then wait until all the main messages have been received up to timeout_in_seconds |
I set timeout=180, and then still |
Having same problem in Python 2 with continuous wait_ready calls when waiting home_location to arrive to DK. I have serial connection through pixhawk cube. All modules up to date. |
anyone solved this? im having the same issue |
I tried to re-request the next waypoint when timeout occured and worked fine. Dronekit does not implement MAVLink's mission protocol properly. I will create a PR but I don't think it will be merged. |
@eminakgun could you please elaborate on what you meant by "re-request the next waypoint"? |
#1039 is the implementation here. |
When calling Vehicle.commands.download() and Vehicle.commands.wait_ready() repeatedly through MAVProxy, the wait_ready() always fail after a number of trials:
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.
The text was updated successfully, but these errors were encountered: