MAVSDK-Python Mavlink Listener

Hello,

In C++ we can listen to raw mavlink messages come in: class MavlinkPassthrough · MAVSDK Guide

In python I do not see the same feature.

My question is: “is this because there is a large technical obstacle to overcome, or is it just because we have not done it”. Thank you

It’s an obstacle but not insurmountable :slight_smile:.

Basically, in C++, we just include the C headers to make it work. In Python we don’t have the equivalent.

So, we have two ways to do it:

  1. Generate .proto files for all mavlink messages and expose these in one passthrough plugin.
  2. Generate a “runtime” interface without type safety where you just do something like:
message.set_field("chan_1_raw", 1500)
...
passthrough.send_message(message)

I would like to do 2., probably using GitHub - Auterion/libmav and that way also support loading custom dialects.

1 Like