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?
Originally posted by Edu on ROS Answers with karma: 11 on 2017-01-05
Post score: 1
Original comments
Comment by Akhilesh on 2017-01-05:
Hi, you can publish even more than two data types but it depends on what you want to send.
Comment by dinesh on 2017-01-05:
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.
Comment by Akhilesh on 2017-01-06:
if you advertise a topic like node.advertise("camera_info", 1); , so in CameraInfo class, there is more than one data types are available like uint32, string etc.
Comment by Kenn on 2017-07-17:
HI, did you find a solution?
Comment by Akhilesh on 2017-07-18:
Can you specify what exactly you want to publish? Or add some piece of code to understand the need.