ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I'm assuming you have a good reason to want to use foreign_relay instead of relying on the usual ROS infrastructure (ROS_IP, ROS_MASTER).
foreign_relay is a weird duck. First, you need to make sure you start *roscor on each machine before you start your other nodes. foreign_relay attempts to register with the remote master on start and if it is unable to do so, it will fail. Second, if I remember correctly, you need to get rid of the ROS_MASTER export on your computers because it's irrelevant and it confuses the nodes. You may even need to get rid of ROS_IP. This may solve your problem.
If not, try debugging using rostopic info. Look for topics in the /transport namespace published by foreign_relay nodes, see who's subscribing to them and who's publishing. You say that you see the topics but not the messages - it could very well be that you see the topics because foreign_relay is advertising them, but it's actually not making a connection with the remote foreign_relay node. The connection won't be made until you publish a message to a relayed topic, but most likely it's because the relays can't talk to one another.