Publishing custom topic with mavros

Hello guys,

I am trying to publish my custom uORB topic to companion computer via mavros.
I found that there is a guide for custom message subscription via mavros(https://dev.px4.io/master/en/ros/mavros_custom_messages.html)
but not sure publication works the same way.
If I just change subscription script to publication scrip, would it be work?

Thank you in advance,
Best,
HG Lee

No that is not the case, please follow the ROS tutorials to understand what is going on http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber(c%2B%2B)