Skip to content

Vehicle.flush() not working as intended #276

Closed

Description

@jamesbellaero

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.

Activity

  1. hamishwillee commented on Aug 9, 2015

    @hamishwillee
    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?

  2. tcr3dr commented on Nov 9, 2015

    @tcr3dr
    Contributor

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

  3. modified the milestone: v2.0.0 on Nov 10, 2015
  4. hamishwillee commented on Nov 10, 2015

    @hamishwillee
    Contributor

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

  5. jamesbellaero commented on Nov 10, 2015

    @jamesbellaero
    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)
    .

  6. tcr3dr commented on Nov 10, 2015

    @tcr3dr
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions