Hello!
I have the setup shown below:
I need to occasionally send some data from the CC to the GCS. Since I haven’t found a way to do this using MAVROS, I tried creating a small Python script with pymavlink
to forward the data using the NAMED_VALUE_FLOAT
message.
However, I haven’t been able to make it work. These are the options I’ve tried:
1.- Since MAVROS is connected to /dev/ttyACM0
, I can’t connect directly to it via pymavlink
—they conflict over the port.
2.- I tried using MAVLink Router with the command mavlink-routerd -e 127.0.0.1:14551 -e 127.0.0.1:14550 /dev/ttyACM0
. I can connect to the data with MAVROS using port 14550, and I can send MAVLink NAMED_VALUE_FLOAT
messages with pymavlink
on port 14551. Even with this setup, the messages do not arrive at QGC.
The only way I made it work was using the command mavlink-routerd -e 127.0.0.1:14550 /dev/ttyACM0
, then connecting MAVROS to port 14550 and pymavlink
directly to the serial port. This only worked if I set mavutil.mavlink_connection(device, source=1, source_system=1)
in pymavlink
. This solution seems very sketchy, so I’m asking for your advice.
Can anyone guide me through this problem? I’m sure my setup is quite typical, but I haven’t found any resources online.
Thanks!