Can a node publish different types on one topic?
I am new to ROS and just started studying. I am stuck with using custom message types. I would like to know is it possible to publish two different data type to single topic? Or do we need to publish separately?
Hi, you can publish even more than two data types but it depends on what you want to send.
their is no need to publish two types of msgs from single topic, just make another publisher its easy, any number of msgs u can publish, but from single topic i'm hearing first time.
if you advertise a topic like node.advertise<camerainfo>("camera_info", 1); , so in CameraInfo class, there is more than one data types are available like uint32, string etc.
HI, did you find a solution?
Can you specify what exactly you want to publish? Or add some piece of code to understand the need.