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

station running roscore cannot listen to rostopics from other stations

asked 2011-07-06 15:59:59 -0500

Nash gravatar image

updated 2011-09-03 15:25:25 -0500

kwc gravatar image

We have an issue communicating with rostopics and are looking for a work-around (or at least explanation of the issue).

Suppose station A is running roscore and station B has mapped its ros master uri to station A. Both station A and station B can see the full list of rostopics. If station B publishes a topic, station A can subscribe to it, but it never receives any messages (for instance 'rostopic echo <topic_name>' never has output). If station A subscribes to it, 'rostopic info' will show station A as a subscriber and station B as a publisher.

However, station A can publish messages to itself and can also receive service requests from station B.

Do you know why station A cannot receive messages from station B? Does this seem like a network issue or is this an inherent/intended ROS feature?

In response to mwise_wg, setting the ROS_IP of station A to itself didn't change the behavior. Same with setting ROS_HOSTNAME on station A to it's own name. roswtf returns "ERROR Could not contact the following nodes: * /rostopic_3179_1..." and "ERROR The following nodes should be connected but aren't:

edit retag flag offensive close merge delete

Comments

Anything peculiar in each node's respective log for roscpp debug messages?
Daniel Stonier gravatar image Daniel Stonier  ( 2011-07-06 17:57:42 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2011-07-06 16:08:24 -0500

mmwise gravatar image

try

roswtf

It sounds like you need to set the ROS_HOSTNAME/ROS_IP on station A.

edit flag offensive delete link more

Comments

Setting the ROS_IP of station A to itself didn't change the behavior. Same with setting ROS_HOSTNAME on station A to it's own name. roswtf returns "ERROR Could not contact the following nodes: * /rostopic_3179_1..." and "ERROR The following nodes should be connected but aren't:"
Nash gravatar image Nash  ( 2011-07-06 16:30:31 -0500 )edit
Both machines need to have set ROS_IP. Alternately both must be able to ping the others hostname (not only ip).
dornhege gravatar image dornhege  ( 2011-07-06 22:14:08 -0500 )edit
Thanks, it worked when we set the ROS_IP to its respective station's IP adress
Nash gravatar image Nash  ( 2011-07-07 13:17:54 -0500 )edit
2

answered 2011-07-07 13:16:28 -0500

Nash gravatar image

So we finally got it to work. We set the ROS_MASTER_URI on stations B and C to station A and had the ROS_HOSTNAME/ROS_IP to its respective stations.. once we changed that, station A was able to listen and receive messages from other stations.

edit flag offensive delete link more

Comments

So if i understood, on slave machines you set ROS_HOST as their IP adress and ROS_MASTER_URI as the URI of the Master machine. On the master machine you set ROS_HOST and ROS_MASTER_URI as master 's IP/URI. Still not working for me but I think it's because of some firewall. The thing is ,both machines can ping with each other

Mehdi. gravatar image Mehdi.  ( 2014-03-25 20:22:22 -0500 )edit

Question Tools

Stats

Asked: 2011-07-06 15:59:59 -0500

Seen: 2,723 times

Last updated: Jul 07 '11