mavlink / MAVSDK-Python

MAVSDK client for Python.
https://mavsdk.mavlink.io
BSD 3-Clause "New" or "Revised" License
313 stars 219 forks source link

Get HEARTBEAT message from MAVSDK #715

Open ShafSpecs opened 2 months ago

ShafSpecs commented 2 months ago

I am not sure if this is shipped with MAVSDK, as I didn't see any related docs online. How do we retrieve heartbeat messages (0)? And is there anyway to listen to custom (yet valid and sent) MAVLink messages

Side question for maintainers: If heartbeat isn't supported, is it a thing of creating a .proto file for it? Or it is more complicated?

Thanks ๐Ÿ˜Š!

julianoes commented 2 months ago

Not possible in Python at the moment. That's until I make the passthrough plugin work through grpc/protobuf, something I have planned: https://github.com/mavlink/MAVSDK/issues/1459

julianoes commented 2 months ago

Also, what information of the heartbeat message do you actually need?

ShafSpecs commented 2 months ago

Also, what information of the heartbeat message do you actually need?

System status. That's the most critical, I would like to collect timestamps as well using the inboard computer. But the status is the most critical

ShafSpecs commented 2 months ago

That's until I make the passthrough plugin work through grpc/protobuf, something I have planned: https://github.com/mavlink/MAVSDK/issues/1459

Would read up the technicalities of the issue referenced when I get back. But at a glance, I prefer the interface method. When sending raw mavlink messages, the checks for validity are done by the vehicle on the fly, not at compile time.

And using interface means whenever a new mavlink feature comes up, mavsdk doesnโ€™t require a full minor release or smthg

ShafSpecs commented 2 months ago

What is Mavlink passthrough please? Sending raw mavlink messages, I assume. I had started writing hypothetical APIs and how it would work, when I didn't know how the passthrough plugin would look like in practice ๐Ÿ˜….

Btw, do you know pymavlink? A great example of keeping it low-level with higher-level utilities and safeguards