Skip to content
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.flush() not working as intended #276

Closed
jamesbellaero opened this issue Aug 7, 2015 · 5 comments
Closed

Vehicle.flush() not working as intended #276

jamesbellaero opened this issue Aug 7, 2015 · 5 comments

Comments

@jamesbellaero
Copy link

There are two issues with the flush method that I have found:

  1. When I add waypoints and call flush(), the entire mission requires about .25 seconds per waypoint to write in lab conditions. If I attempt to set the vehicle to auto or download the waypoints before all of them are written, the Pixhawk will not receive the full mission and 're-request' the waypoints it missed. When flying, this caused the quad to crash since it got set to auto without home being written properly and came down.
    To get around this issue, I call time.sleep(vehicle.commands.count/2) immediately after calling vehicle.flush(). However, if flush() worked properly it would automatically wait until receiving confirmation from the quad that all waypoints had been written before continuing, much like wait_valid() does.
  2. After downloading waypoints from the Pixhawk with vehicle.commands.download() and vehicle.commands.wait_valid(), the Pixhawk no longer has a loaded mission, meaning that I can't set it to auto while armed, etc. To reupload the mission I have to actually change a command in the CommandSequence.
    I would have figured that simply calling flush() would handle the reupload without me having to change anything, but it doesn't.

These are important issues which need to be solved before lots of people start using Dronekit in real applications. Either fix the flush method add new methods to achieve the required functionality.

@hamishwillee
Copy link
Contributor

@jamesbellaero Thanks for this. It is a duplicate of #227.

@tcr3dr I agree with @jamesbellaero that this is a critical defect. It has certainly cost me a LOT of time when writing examples. I am not sure of the correct solution - do you think we could get some time on it in the coming week?

@tcr3dr
Copy link
Contributor

tcr3dr commented Nov 9, 2015

See #227 and #439 for a test case that should indicate that upload completes without issue, as well as re-downloading commands.

@tcr3dr tcr3dr modified the milestone: v2.0.0 Nov 10, 2015
@hamishwillee
Copy link
Contributor

@jamesbellaero As @tcr3dr says above, we think this is fixed in dkpy2.0. Can you please confirm?

@jamesbellaero
Copy link
Author

I'm not currently in the position to do so as I'm back in school from my
internship. Once we get our test setup completed in my student group I'll
let you know.
On Nov 9, 2015 8:26 PM, "Hamish Willee" notifications@github.com wrote:

@jamesbellaero https://github.com/jamesbellaero As @tcr3dr
https://github.com/tcr3dr says above, we think this is fixed in
dkpy2.0. Can you please confirm?


Reply to this email directly or view it on GitHub
#276 (comment)
.

@tcr3dr
Copy link
Contributor

tcr3dr commented Nov 10, 2015

Thanks @jamesbellaero. When you're able to recreate it, feel free to re-open this issue or submit a new one—we are committed to ironing out the bugs in DroneKit Python for this next release and would love your input.

@tcr3dr tcr3dr closed this as completed Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants