0
$\begingroup$

Rosanswers logo

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:


Originally posted by Nash on ROS Answers with karma: 207 on 2011-07-06

Post score: 2


Original comments

Comment by Daniel Stonier on 2011-07-06:
Anything peculiar in each node's respective log for roscpp debug messages?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

try

roswtf

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


Originally posted by mmwise with karma: 8372 on 2011-07-06

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Nash on 2011-07-07:
Thanks, it worked when we set the ROS_IP to its respective station's IP adress

Comment by dornhege on 2011-07-06:
Both machines need to have set ROS_IP. Alternately both must be able to ping the others hostname (not only ip).

Comment by Nash on 2011-07-06:
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:"
$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by Nash with karma: 207 on 2011-07-07

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by Mehdi. on 2014-03-25:
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

$\endgroup$

Your Answer

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