With Pymavrest, you can easily monitor vehicle state (MAVLink messages) programmatically (using any programming language capable of doing HTTP POST/GET requests) or from your favorite browser, as a JSON object.
Here are the ready-to-use, key features:
Get all vehicular data at once.
Get a specific message by name or message id.
Get timestamp (wall clock, monotonic counter) or rate of messages at once, by name, message id.
Try to reconnect to master after some specific time if no message is received during some period.
Drop non-periodic messages after some specific time.
Whitelist & blacklist support of messages, if you only want or don’t want to see some specific messages.
Get all on-board parameters or a specific one.
This started as a self-paced project and it is still in its early phases, many more features will come.
Hope this will be useful to those who want to show vehicle state in some graphical interfaces or monitor vehicle state from different processes.
Feel free to comment down below, and if you want to see some features, face an issue, trouble using it, please create an issue on GitHub.
Happy coding
The documentation is in the README, there is also generic support for all MAVLink messages inside the autopilotmega dialect supported by rust-mavlink.
There is the swagger documentation webpage provided in /docs:
Nice work! Do you have a benchmark table or something closer to compare with mavlink2rest ?
It was initially projected with Rust for performance reasons, and also to provide the tool as a single binary, making it easier to integrate with embedded linux solutions.
Is there also a websocket for async mavlink messages (Like parameters) ?
Thanks.
I will try to implement your suggestions.
I did a quick hammering benchmark on my laptop (not a fancy one) like the one below (will do a comprehensive one later).
import requests
import time
time_max = 0
while True:
time_initial = time.monotonic()
data = requests.get("http://127.0.0.1:2609/get/message/all").json()
time_final = time.monotonic()
time_delta = time_final - time_initial
if time_delta > time_max:
time_max = time_delta
print(time_max)
I spawned this code 8 times and get at most 0.015 seconds on each client which gives a roughly 66Hz update rate, note that this endpoint contains all the telemetry data (maybe I reached the limits of requests module, IDK).
So seems like the API can handle 500Hz releasing all the data.
Of course, to compare I need to do this test with both pymavrest and mavlink2rest on the same device (especially on SBCs like RPi).
But basic functionality is there