0
$\begingroup$

Rosanswers logo

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.


Originally posted by angmota on ROS Answers with karma: 1 on 2011-11-23

Post score: 0


Original comments

Comment by angmota on 2011-11-24:
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.

Comment by joq on 2011-11-24:
How are you running the nodes? Is a single roscore running throughout?

Comment by felix k on 2011-11-23:
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?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by tfoote with karma: 58457 on 2011-11-25

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.