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

Several publishers on a single topic. How does it work?

asked 2011-11-23 22:07:57 -0500

angmota gravatar image

updated 2011-11-24 02:03:06 -0500

I would like to know how the communication works when two or more publishers are sending messages on the same topic.

I have one subscriber to an "x" topic, but it seems that the communication exists only with the node that published firstly until this node is stopped or killed and then the communication with the second publisher in the queue starts automatically. Is this the expected behaviour?

I would rather get one single message from the first publisher and afterwards another single message from the second publisher and so on. Is this possible? How can I approach this? Thank you.


Knowing that the behaviour that I wanted was the expected one, I realised that my problem was related with the queue size of my subscriber, which was smaller than the number of publishers.

edit retag flag offensive close merge delete

Comments

What you want is the behaviour it should have. Could you explain which programming language library you are using, how you are initializing your subscriber, to help find the cause?
felix k gravatar image felix k  ( 2011-11-23 22:15:17 -0500 )edit
How are you running the nodes? Is a single roscore running throughout?
joq gravatar image joq  ( 2011-11-23 23:47:49 -0500 )edit
Thank you felix. I was just wondering if the behaviour that I was getting was the expected one or not. I realised of my newbie mistake.
angmota gravatar image angmota  ( 2011-11-24 02:08:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-11-25 07:15:40 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

From the comments @angmota:

Knowing that the behaviour that I wanted was the expected one, I realised that my problem was related with the queue size of my subscriber, which was smaller than the number of publishers.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-11-23 22:07:57 -0500

Seen: 397 times

Last updated: Nov 25 '11