Hi all,
I have created a custom mavlink message which is already successfully sent and received to QGC. However, I want to send the same message to a offboard device, but I am struggling to get this to work.
-
I have already tested the sending and receiving of the message using hardware to the ground station.
-
Currently, I am only testing the sending and receiving of the message to the offboard device using SITL.
I am using mavlink-router to route the UDP mavlink stream from Gazebo to the example program heartbeat-print.py
. I can successfully see the heartbeat from the python program, but if I change the message name of HEARTBEAT
to VALVE
in the following line:
m = mav.recv_match(type='HEARTBEAT', blocking=True)
I am unable to see the message being received. VALVE
is the name of the message, and I am able to see the message being sent using MavLink Inspector in QGC.
In /ROMFS/px4fmu_common/init.d-posix/rcS
I have added the following:
mavlink stream -r 1 -s VALVE -u $udp_gcs_port_local
underneath the QGC link
and
mavlink stream -r 1 -s VALVE -u $udp_offboard_port_local
underneath the API/offboard link to ensure that the message is being sent.
I have also built mavlink-router by ensuring the common.xml
file contains my custom message.
Please advise me, if there is something which I am missing or can attempt to try.