[ros-users] One node subscribes to multiple topics

kadir kadirfu at gmail.com
Mon Feb 7 20:20:20 UTC 2011

Hi folks,

Let's say I have two nodes; one is publishing "n" different messages to "n"
different topics and the other one subscribes to all of the topics. But I
know that -more or less- the publisher node publishes new messages to the
topics consecutively(I mean first to topic a, then to topic b, then c, and
so on). All the messages being published have the same sequence_cnt.

What I want from the listener node is that it polls these topics and read
the new incoming message in each topic one by one to ensure that received
messages have the same sequence_cnt to avoid checking each message if they
have same seq_cnt, or synching them.

Do you think it is necessary to create "n" number of callback functions to
make the listener node grab updated data in an event-based fashion or is it
better to use request-response based communication between these nodes? Does
ROS services corresponds to a polling operation?

I'm just wondering how would you approach in this case -of course it depends
on the application, but any suggestions-?
View this message in context: http://ros-users.122217.n3.nabble.com/One-node-subscribes-to-multiple-topics-tp2446644p2446644.html
Sent from the ROS-Users mailing list archive at Nabble.com.

More information about the ros-users mailing list