A library for the MAVLink protocol
Project description
Libmav Python
Native python bindings for the libmav library.
Installation
pip install libmav
Example usage
import libmav
# Create a message set from a mavlink xml file
message_set = libmav.MessageSet('<PATH TO common.xml>')
# You can also add additional messages here with inline xml
message_set.add_from_xml_string('''
<mavlink>
<messages>
<message>
...
</message>
</messages>
</mavlink>''')
# Create a message from the message set
message = self.message_set.create('MY_PROTOCOL_MESSAGE')
# Set fields of the message individually
message['my_numeric_field'] = 1
message['my_char_array_field'] = 'Hello world'
message['my_float_array_field'] = [1.0, 2.0, 3.0]
message['my_int_array_field'] = [4, 5, 6]
# Get fields individually
my_num = message['my_numeric_field']
my_string = message['my_char_array_field']
my_float_array_field = message['my_float_array_field']
# You can also use pythonic things like list comprehensions
# This creates a list of all the values in my_float_array_field multiplied by 2
my_float_array_field = [x * 2 for x in message['my_float_array_field']]
# Set fields from a dict
message.set_from_dict({
'my_numeric_field': 1,
'my_char_array_field': 'Hello world',
'my_float_array_field': [1.0, 2.0, 3.0],
'my_int_array_field': [4, 5, 6]
})
# Get fields as python dict
message_dict = message.to_dict()
# Connect to a TCP server
conn_physical = libmav.TCPClient('192.168.1.12', 14550)
conn_runtime = libmav.NetworkRuntime(self.message_set, heartbeat, client_physical)
connection = conn_runtime.await_connection(2000)
# Check if connection is still alive
if not connection.alive():
print('Connection lost, waiting for reconnect...')
connection = conn_runtime.await_connection(2000)
# Send a message
connection.send(message)
# Receive a message, timeout 1s
received_message = connection.receive("HEARTBEAT", 1000)
# Receive a message, no timeout
received_message = connection.receive("HEARTBEAT")
# Receive a message as the result of a message we send
# This avoids the race condition between us sending and then waiting for reception
expectation = connection.receive("PARAM_VALUE")
connection.send(our_param_request_message)
received_message = connection.receive(expectation, 1000)
# Connect to a Serial port
conn_physical = libmav.TCPClient('/dev/ttyUSB0', 14550)
conn_runtime = libmav.NetworkRuntime(self.message_set, heartbeat, client_physical)
Install from source
Prerequisites
- A compiler with C++11 support
- Pip 10+ or CMake >= 3.4 (or 3.14+ on Windows, which was the first version to support VS 2019)
- Ninja or Pip 10+
Just clone this repository and pip install. Note the --recursive
option which is
needed for the pybind11 submodule:
git clone --recursive https://github.com/Auterion/libmav-python.git
pip install ./libmav-python
With the setup.py
file included in this project, the pip install
command will
invoke CMake and build the pybind11 module as specified in CMakeLists.txt
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
libmav-0.0.1.tar.gz
(322.6 kB
view hashes)
Built Distributions
Close
Hashes for libmav-0.0.1-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 138b023f1836594b272780ce710bf65d5eafea709fe964818ed764a11659bde2 |
|
MD5 | 0be0ea0527c3681e62e15f506f87cf80 |
|
BLAKE2b-256 | 2240ae9c98f722ed78280b88596b93c1005b3f52eb4c68d1eff9cdaaba9476ce |
Close
Hashes for libmav-0.0.1-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56c83af785dc055e29c21ee5fd34ec16c23a684e71f882972177050b7e29ad11 |
|
MD5 | cc80162035670e2a2d86c262addad593 |
|
BLAKE2b-256 | 6082b7a2a2ee891dc910f3c927d5a37d00618b6e52e4ffc1080478538e1fca1c |
Close
Hashes for libmav-0.0.1-cp311-cp311-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ad2c7b8085e77e29932f191d16351fb861e563e962d5345bcd9f13e443c3836 |
|
MD5 | c908391c12cf70d80c880cd37a4dbb66 |
|
BLAKE2b-256 | d51f70c13ef62b8c7ebccfdce66e8673e190dd336a3b3e9c6c8afb62d1149943 |
Close
Hashes for libmav-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af66a7dd8aeb4f99935f2eb2195f50c3d4d50ea05e9172fb513c6ea62f44ced6 |
|
MD5 | 287f8d30a4436f01c3c8c415c037deae |
|
BLAKE2b-256 | 378a7429ca98ab121e16a1f74ef2d81a72c6272f7f73173e44acc6ae749f5983 |
Close
Hashes for libmav-0.0.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1502ccc22587291f6e454d6813c7634ecb8ec0955225c5c57eb16f9b040347b |
|
MD5 | aae9bb73419fcd9b7c804364c28cc53d |
|
BLAKE2b-256 | b2d7916f9ebee815d1a3c87d9a22816b585aeae5158e7fb559afbbd3b008fa62 |
Close
Hashes for libmav-0.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6064258978f12af2ffada6cdd4db274448fd06b5f9aecb4416cef2bf70adfa67 |
|
MD5 | f629a090d4193b19934a5fc612d37048 |
|
BLAKE2b-256 | 2d92322daaecff9ad9a4042348200918cd2835532f4791908bd47202bf8cefb4 |
Close
Hashes for libmav-0.0.1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6306e88ba793c02e4ce2cf220476102453dff8bdb5fc5a9ee2197be80cd62c13 |
|
MD5 | 20fa9788541c504555056de6f540397e |
|
BLAKE2b-256 | 3603d8fc4b72c6b98486728559a6ff20918c544e2d3f091d2b142cee3830856a |
Close
Hashes for libmav-0.0.1-cp311-cp311-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b56d1bad0230381062fea8a95e26b9b440054bbae0d5b240b92f6ecede4c00cb |
|
MD5 | 44ec2b49760613cdcb0e95183c41f8d0 |
|
BLAKE2b-256 | 8d67ae9eb3389adc119a00cc4582e21817aba7bc37b6f892c61823df2b46e2f1 |
Close
Hashes for libmav-0.0.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e33a586f7cc4f38276283f01dad4548357a2a2705aa622414ce14cfc5acf6a7d |
|
MD5 | c9d72d596bc39500d1a5f27dff82be5e |
|
BLAKE2b-256 | 52542214f87be6cf8fc66b2de95402342d6c2b013d83b1cf18c5b81a7d14fd5f |
Close
Hashes for libmav-0.0.1-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ccba184d81fa3ceb89bce65849c907fa5536eb77738914df574f3ef5b387b92 |
|
MD5 | 40ee5f57edfae5fffb550f20e6cc0a5d |
|
BLAKE2b-256 | 8819c063292074ec60d3fda7ef8baf28c1e0e76cf0f4aad81ad0882df59cc7d5 |
Close
Hashes for libmav-0.0.1-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 207e5df096717be8607a5ee3176de54e7242a833a6da15ef52a3a7cb754fc874 |
|
MD5 | c89232f152c9e9ae3d9bb0e5ce3177dd |
|
BLAKE2b-256 | c4c4bc57983ea114f61a7e23918c8ff9a188dc6c26a71c99969a9bb25f7f232b |
Close
Hashes for libmav-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbf014ce59ec769b4816ecc14131a67c9ed03aadff4d5ac06b1e463018691ab9 |
|
MD5 | b6ac3bbe38374de9c17f28edca354de9 |
|
BLAKE2b-256 | f8b4c1a15d5e6d7e25429a4a4ddb40c4c0c4245fee25c91e70863445b4971190 |
Close
Hashes for libmav-0.0.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2df87e1486fcbb0d93c5e244745c6a5d022e9ff4204efa99cd66b5fc13e0a98c |
|
MD5 | 43e9ad04a8390b74b551dfc64d2cb57e |
|
BLAKE2b-256 | 56bcccc0b2b61d245f4d0d2ac737ffcf9be73b9a4df96d2644a1b7f1a6e7e694 |
Close
Hashes for libmav-0.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90cb64847ba0f8da3666ba7584a2f981c9b42fded311aa771b67a17e2da371cc |
|
MD5 | 4382c6651479063c9bc4092801233932 |
|
BLAKE2b-256 | 44aac9221c83876dc03a65039f8a2a9549e746cb6c1688ebe14f8c4e57cf80e0 |
Close
Hashes for libmav-0.0.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0641220a66522b2feeb0b4fe33d44f5ffbe8a49534ece5d30d978b1243807a48 |
|
MD5 | a24d122cc21ae10bd8e2949e22910ff5 |
|
BLAKE2b-256 | 7c075270a45fb0693b9160e13af09fc405c2fe6799b76ddddc06011c053b3377 |
Close
Hashes for libmav-0.0.1-cp310-cp310-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d35eda101e351a723b66725f3353593671b15f56616c5b06e072fac40bff1823 |
|
MD5 | 59d95fed25fc076fb15041301240159b |
|
BLAKE2b-256 | b855787fe4463ae7e2c4fdfc31636e3458c5bde80959054f10db30b0f63fa828 |
Close
Hashes for libmav-0.0.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb8f306e2af0bfda242f9bac4b2bfcfed9e8ec6c80384e92e16c468b39619e8d |
|
MD5 | 438e86a733d0c3697682a0e34eb52065 |
|
BLAKE2b-256 | a7fa0d2814b348ece3a6e21b54322178f0811b960f5304981c6cee88e3de570a |
Close
Hashes for libmav-0.0.1-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 248a822381dba93f843506a725ccd428e7344033649e1fe062009a4ac87cfeac |
|
MD5 | 6ae9c824ae5fd2bfaa68c55a799c7847 |
|
BLAKE2b-256 | 849847f3ce40016447ae0a98cc89b94dc71fb3f661bae5eb2be42d22e683958f |
Close
Hashes for libmav-0.0.1-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 524bc29a9e1074ae9487a06ad2de26cd24925bbabb3edaeab1d3d0c8abad3d4f |
|
MD5 | b3d4a7a8014bd70a3efae446c90c90af |
|
BLAKE2b-256 | 82720563470b8601af9bc0cf3139106c52cfcce466abb5ef48bd90af28ddfb59 |
Close
Hashes for libmav-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a0158c8ddb81bfe9f33f5c90d5bfde290219664136e23901e14f45991ce1308 |
|
MD5 | c2ce7a4436de58b651f364291f40e22b |
|
BLAKE2b-256 | 2d38055a371dfbde0b0cdb62dba598ced8552bcd6e763f7c8072f9b1dd524bf3 |
Close
Hashes for libmav-0.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75e6efdb6b70cc108f735276c63f406b9e4adaa789a46704e41c551788d36b33 |
|
MD5 | 3a48885709cef53d843ff47cbd7816be |
|
BLAKE2b-256 | 8cba8a11b0e6b64e5681366f86acb1d4349f16ed36859b8451150caeb569779c |
Close
Hashes for libmav-0.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e67ce2e1b77aa6125972d01eae344d2d86f0ae85676f26888606e431a43225cc |
|
MD5 | fe23abb763b7c21c92816a6ee876897f |
|
BLAKE2b-256 | 711ffdc10cbaae01c311a7b45a72591b68c17bd696b68c18cac66b86e348bd32 |
Close
Hashes for libmav-0.0.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f620161ef06747c2510805d55d6cc22a7c67d7f13dabaf819dffbaf597fd274 |
|
MD5 | af757865f5fa8883bc8b2718c7068f2a |
|
BLAKE2b-256 | dc4cca814f82ebdfff7483673fe63445a7faa4f30df503973cf4ce687c391cf1 |
Close
Hashes for libmav-0.0.1-cp39-cp39-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a367be0bf6645da36b8fe15375625081cf60af52d0511f4d07cdf99c566048e |
|
MD5 | 47b05beaba96607952ef73e97bffe547 |
|
BLAKE2b-256 | 63fcd28078e9bd538cc05324cbb7c0352ff4d2158aa3a567fbe7105931c388e7 |
Close
Hashes for libmav-0.0.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e00004cdf71de519f154a00d603e728c2befc86cb6e5e4372c787456a3a8ce2 |
|
MD5 | de1f50b273637f2ba7bee9ef9163cfdb |
|
BLAKE2b-256 | ba68a649c9e0ef8e13ec5b36ff173f515cf908468423a0250c4ad8c47e668a29 |
Close
Hashes for libmav-0.0.1-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 981af680b807eb8ff0553fc97f45f714802bb6c905f53f938fa098e2dde97753 |
|
MD5 | cc6c431cbe4df6874e211adea7f26619 |
|
BLAKE2b-256 | 58321470bbff593248ec7171f43ca3e845638d9f1c72d97caebda491c3e2e60d |
Close
Hashes for libmav-0.0.1-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | addad70b24698a69f1da09702a66caf7c6d5d487d1ad8162bf051b0858475a42 |
|
MD5 | 2934a553536be3c909062f058983e4e3 |
|
BLAKE2b-256 | f828a97afd3192e06b447e118854c34e3f119491eada8049281158ef24f5edc7 |
Close
Hashes for libmav-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aee82dd2bbd21e1abd125152be10e27629486b23ac440048637c6fb6585913d2 |
|
MD5 | f5d3329f1dc6b55803436f77e83077d3 |
|
BLAKE2b-256 | 87aa7e907ee55bacf7c08e0276ee2a095977cd053282c6499aab0097f8413ba2 |
Close
Hashes for libmav-0.0.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a50a66f77a56cda92e3b11998d5c8b855aeb7ce09968bed4619ce6e53db41f4d |
|
MD5 | 8f0cb30482f29d151aebc9375e0d2962 |
|
BLAKE2b-256 | 955c86044cfeb794ee5d6bab2eb78ffaff8a509d1a015194c6200a2b24cd13c8 |
Close
Hashes for libmav-0.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc30193f8e0083f3954cee4d66667ef350eaaf68ecee3a6b54ac4bba19ad0e6a |
|
MD5 | a66635b92b05209986f9959594c50c58 |
|
BLAKE2b-256 | 7ea2ff7b404969d50cffc304bf356fe6b0944f58ede194d7adc833e81337c542 |
Close
Hashes for libmav-0.0.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4162749077f4cb587a84885d844aa39ed0a03311f8914805c784b3b0e675fe92 |
|
MD5 | c52d3b63da057997e41588541b683e94 |
|
BLAKE2b-256 | a6c9fb950def31b1a70de55015158c509144fc20b961c981de5924049f6f0e24 |
Close
Hashes for libmav-0.0.1-cp38-cp38-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3370d7038417cbf1b2345d32a38cf77eec0fd9d2ea07f925fa1efe90d726464 |
|
MD5 | 24ad07c89f36a760c56417122d4222d7 |
|
BLAKE2b-256 | 3ced6ad6747f1df60d53d9f3c32d7b62830ba0fee5670e96833056f2aa3a798d |
Close
Hashes for libmav-0.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73ccd597349d2c52b566514e4a85504440d33b2bffeddc8b67df727f673344b9 |
|
MD5 | b5c8da8e0d9437070026c5bfc2e523dd |
|
BLAKE2b-256 | 27a5f833a67fdb809fb43d6b47efbb25f00e44f54c3f81e3be55b4d61dfb2c01 |
Close
Hashes for libmav-0.0.1-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bcabaf029ddcd141ae52f4d17f130127da2b97f3c543ce86a7de78a339586fc |
|
MD5 | 5b54e4446208d3094cb5ea59bd067671 |
|
BLAKE2b-256 | 33d942ac5f4faad89ea3b4245a2f499261eeae6a12ba4d413539d434ae193463 |
Close
Hashes for libmav-0.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11d8f4fba71d0b5fef6125c36c33fc83e8b560141327b5b0cb9c170f9e41d3eb |
|
MD5 | 1f6f5c1631451e7824751689e7759a92 |
|
BLAKE2b-256 | 2f3c8a9c236b3af41bc9674e8927cdaf6f446ed0790141ee0b310e85deacbf84 |
Close
Hashes for libmav-0.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f590cbbac895776d389efad1b8805a434c60896082513dbd26ad2f06497c5320 |
|
MD5 | 1253eff795b8836354d76813213767f6 |
|
BLAKE2b-256 | d6d6400e4a2c96837d7ff5d04f666ad22e832ad8856183e349c0a516969a6be4 |
Close
Hashes for libmav-0.0.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c34805e6a31496ddece27ef8986334aa4b8ad0b7eedfd07fa3f0a886d2b99f42 |
|
MD5 | 468c68146e89163040f92b8764c17192 |
|
BLAKE2b-256 | 5b7330ee535ec29672a8279b97dcce5aa7e5403d43a3a268f845d462b64552f4 |
Close
Hashes for libmav-0.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27783e65369b35ed14038d14adce3b3674dcedcdea70170b119ee6b5fa9f394f |
|
MD5 | b19833f4476e635de42a485bd34f77ba |
|
BLAKE2b-256 | f12648c60e425e0a7c885d5ecc6d32e5ce71e41acb46e78a372dc8b60ad8e38e |
Close
Hashes for libmav-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc7312ce823ddb377b8822fff7f7a61b8d548f900fd41a5b9009fb75d104287 |
|
MD5 | f16eee0261fba922d4142615b78089ff |
|
BLAKE2b-256 | 21a4db0a5d6b8b5c669ac90fbbebd259fc03f951c94b8405df434bb65b8d38c3 |