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

when "subscriber" node launch before "publisher",can't get the messag

asked 2015-08-31 02:07:23 -0500

cros gravatar image

there days I meet a problem,when I launch the "subscriber" node before "publisher" node ,sometimes the message can't be subscribed, but sometimes can get ,that's very strange. Does anyone also meet the same problem ever, if you know why and how to solve it,please tell me.thank you very much.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-08-31 03:27:43 -0500

updated 2015-08-31 03:29:39 -0500

Well then there might be a problem with the communication. That would mean the master can not contact the node after launch.

Normally it works like this:

  • Subscriber -> Master (register topic, XMLRPC Node Port)
  • Master -> Subscriber (ok - Already Available Publlishers)
  • Publisher -> Master (register topic - XMLRPC Node Port)
  • Master -> Publisher (ok)
  • Master -> Subscriber (Publisher Update - newly available Publisher)

Publisher - Subscriber communication

  • Subscriber -> Publisher (on XMLRPC - getTopic)
  • Publisher -> (ok , topic port)
  • Subscriber connects to topic port...and receives messages

Somehow your node probably not gets the Publisher Update or the Subscriber can not contact the publisher or its topic port.

Does rqt_graph get the node or is there a red circle for it, if there is a red circle, the node does not respond on it's xmlrpc port.

One thing I know that could happen when the nodes are on different computers... there could be a problem with your name resolution (/etc/hosts - DNS) That they do not find each other or just one finds the other.

Check that you can ping the computers hostnames.

ping hostname

If not put their IP-Adresses and hostnames in /etc/hosts.

edit flag offensive delete link more


thank you for your answer

cros gravatar image cros  ( 2015-08-31 03:49:48 -0500 )edit

You're welcome, btw. did it help?

cyborg-x1 gravatar image cyborg-x1  ( 2015-08-31 09:02:26 -0500 )edit

Question Tools

1 follower


Asked: 2015-08-31 02:07:23 -0500

Seen: 426 times

Last updated: Aug 31 '15