Skip to content

DKPY as a standalone Python module? #188

Closed

Description

@tcr3dr

dronekit-python 1.0 is structured as a MAVProxy module. This had the following implications:

  • Leverages MAVProxy's routing capabilities (serial/udp/tcp)
  • Allows reuse of MAVProxy's object and state code
  • Runs as a component of MAVProxy's threading model

Given the successful first release, we're increasingly running into this friction:

There are now strong reasons to consider moving dronekit-python to run as a "top-level" library:

  • We avoid further complicating MAVProxy's process model by duplicating OS-level functionality.
  • We allow reuse of dronekit-python as the "object layer" that we expect it to be.
  • Mavlink routing becomes simpler, as a dronekit-python script becomes just another Mavlink endpoint.
  • We improve automated testing by allowing dronekit-python to be tested in isolation.

Having outlined the reasons, we're looking for discussion on:

  • How high-priority this is (what features are blocked by not having this implemented)
  • What risks we need to mitigate (duplication of code, etc.)
  • Outstanding technical questions

This is currently slated for the next major release of dronekit-python (v2.0.0).

Activity

  1. self-assigned this
    on Jul 9, 2015
  2. added this to the v2.0.0 milestone on Jul 9, 2015
  3. tcr3dr commented on Jul 9, 2015

    @tcr3dr
    ContributorAuthor

    One thing to note is that this is effectively blocked by #185. We want a capable test suite to prevent regressions from this transition.

  4. eliao commented on Jul 9, 2015

    @eliao

    I look forward to this day!

  5. mrpollo commented on Jul 9, 2015

    @mrpollo
    Member

    👍

    Another dependency we might want to look into either help with performance of replace is pymavlink https://github.com/mavlink/mavlink/tree/master/pymavlink

  6. hamishwillee commented on Jul 9, 2015

    @hamishwillee
    Contributor

    A bit pedantic, but "Naive use of dronekit-python" implies that the user can use DK in a less naive way to fix the problem. Perhaps "naive implementation" would be better.

    Another feature I see this helping with is debugging. You could start of debugging sessions (and would no longer need to instrument code to start a session). This should make it easier to integrate with standard IDEs.

    I think it might help with making it easier to write code to communicate with a script - passing in command line arguments and having the script wait on user input.

  7. changed the title [-]DKPY as a standalone Python module[/-] [+]DKPY as a standalone Python module?[/+] on Jul 10, 2015
  8. tcr3dr commented on Jul 17, 2015

    @tcr3dr
    ContributorAuthor

    Using pymavlink as a dependency directly is now being explored in the https://github.com/diydrones/dronekit-python/tree/tcr-nomp branch.

  9. tcr3dr commented on Oct 14, 2015

    @tcr3dr
    ContributorAuthor

    We've gone ahead with this! Merged into master.

  10. hamishwillee commented on Oct 14, 2015

    @hamishwillee
    Contributor

    Anyone reading this, note that we use "master" as the bleeding edge development branch. While the change has been merged, at time of writing DKPY2 (without mavproxy dependency) is in beta, and the published documents still reflect DKPY1.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions