ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Is it possible to subscribe the same topic twice?

asked 2019-09-14 00:47:06 -0500

kane_choigo gravatar image

Hi, i'm working on ROS kinetic with Ubuntu 16.04.

I just wonder whether I can subscribe same topic by two or more Subscribers.

For example, once i run turtlebot bringup pkg, many other topics should be published.

In this situation, can i subscribe the same Odom topic at node_A and node_B simultaneously??

Thanks in advance. :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-09-14 01:19:18 -0500

billy gravatar image

Yes. Multiple nodes can subscribe to the same topic. Multiple nodes can publish to the same topic.

I believe that each subscriber gets it's own buffer so there is no worry that one subscriber will get one message and the other subscriber will miss it - and if I'm wrong about that, I'm sure someone will be along shortly to correct me.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-09-14 00:47:06 -0500

Seen: 845 times

Last updated: Sep 14 '19