Custom message from ROS topic to PX4 autopilot

Hello All,

I am attempting to create a custom message that can be published from a ROS node, communicated via MAVLink, and then uploaded as a uORB topic for use with the PX4 autopilot. I have followed the instructions for Custom MAVLink and Custom uORB message generation. To test my implementation I am running a SITL simulation using Gazebo with ROS. My debugging steps have been:

  1. Using rostopic echo mavros/mymessage and rostopic list to confirm that my message is being published by my ROS node, which it is based on the output from these commands. Oddly using the rqt_graph tool does not show that my node is publishing to this topic.
  2. Using listener myuORBmessage to confirm that the uORB topic is alive, as the output is never published rather than Topic did not match any known topics.
  3. Placing a PX4_INFO() statement inside of handle_message() function from mavlink_reciever.cpp to output the IDs of messages received. In my ROS node I am also publishing to the mavros/actuator_control topic and I see the correct value for that message, but not my custom one.
  4. After reading some old questions (~2017) about this topic I did try adding my custom message to the stream list in mavlink_main.cpp, but that did not fix the problem.
  5. I was unsure of what dialect value to use in my MyMessage.xml file so I have tried using both 1 and 3 as dialect value 2 is being used by another xml file and dialect value 0 is being used by common.xml.

Based on these steps it appears that my custom message is being published correctly from my ROS node, but it never enters the handle_message() function to then be passed off to the handler function written to publish the data to a uORB topic. I would really appreciate and advice on this problem. Thanks in advance.