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:
- Using
rostopic echo mavros/mymessage
androstopic 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 therqt_graph
tool does not show that my node is publishing to this topic. - Using
listener myuORBmessage
to confirm that the uORB topic is alive, as the output isnever published
rather thanTopic did not match any known topics
. - Placing a
PX4_INFO()
statement inside ofhandle_message()
function from mavlink_reciever.cpp to output the IDs of messages received. In my ROS node I am also publishing to themavros/actuator_control
topic and I see the correct value for that message, but not my custom one. - 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.
- 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.