Skip to main content

This project will contain an opinionated but tidy way to talk to a Drone through PyMavLink using the PyFlightCoach Libraries

Setup the connection:

from droneinterface import Vehicle
vehicle = Vehicle.connect('tcp:127.0.0.1:5762')
>>> vehicle.get_GlobalPositionInt()
GlobalPositionInt(
    position=GPS(lat_=51.42 long_=-2.67 alt_=117.33, len=1),
    agl=0.055,
    velocity=Point(x_=-0.02 y_=-0.01 z_=0.0, len=1),
    heading=13.95565269894666,
    time_boot_ms=1840783
)

wait up to 1 second for a message:

>>> vehicle.next_heartbeat(1).type
MAV_TYPE(1=['mav_type_generic', 'mav_type_fixed_wing'])

Don't wait long enough:

>>> vehicle.next_heartbeat(1e-6)
droneinterface.scheduling.exceptions.Timeout: timeout after 1e-06 seconds waiting for message 0
>>> vehicle.get_state().data
            x         y     z        rw        rx        ry        rz             t        dt  ...         p         q        r        du        dv          dw   dp   dq   dr
0.0 -0.006941 -0.022264  0.01 -0.012416  0.989064  0.080289  0.123095  1.709667e+09  0.033333  ... -0.006507 -0.022492  0.00954 -0.567203 -1.919822  997.321415  0.0  0.0  0.0

[1 rows x 21 columns]
>>> 

subscribing to a higher messaging rate:

with vehicle.subscribe(vehicle.state.ids, 10):
    print(vehicle.next_state().data)

Metadata

Release files for droneinterface 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for droneinterface 0.0.4
File Size Uploaded Provenance Actions
droneinterface-0.0.4.tar.gz 14.3 kB Without provenance Details for droneinterface-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for droneinterface 0.0.4
File Interpreter ABI Platform Actions
droneinterface-0.0.4-py3-none-any.whl Python 3 none any Details for droneinterface-0.0.4-py3-none-any.whl

Total release size: 28.5 kB

Release files / droneinterface-0.0.4.tar.gz

Download URL droneinterface-0.0.4.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
306ebcd8e44c972cf373cd8a6e22e299900d322619a0259ad2a8ead3ca59579f
BLAKE2b-256 checksum
How to use checksums
f0478bb11809f4fa210e0a9c5ecee7a11adad2679f8194965b6aab43dfa87990
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / droneinterface-0.0.4-py3-none-any.whl

Download URL droneinterface-0.0.4-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f72a484d9287654c1de4c629307c9bacaba931d3637197b661be8feb10a4f79
BLAKE2b-256 checksum
How to use checksums
a6b1d674445d17879ab9c220a4f56d6b19302eef7ace6f5e85388684e5f41136
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Security for droneinterface 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page