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

Nodes on different hosts don't communicate

asked 2011-10-20 14:47:16 -0500

130s gravatar image

updated 2011-10-20 16:14:40 -0500

In my environment, subscriber node on host-S can't get a message of publisher on host-P.

For example, in very simple tutorial like this, nodes don't exchange messages. As in the snapshot of rxgraph below, /rosout and /talker (publisher node) are visible. However they don't "shake hands".

Things suggested here are checked. netcat using the port numbers that are shown on rxgraph worked (of course after stopping nodes).

On web browser, opening http://%host-P's IP address%:11311/ returns following error:

Error response
Error code 501.
Message: Unsupported method ('GET').
Error code explanation: 501 = Server does not support this operation.

Environment:

Both: electric, inside of company's LAN 
Host-P: Ubuntu 11.04
Host-S: Ubuntu 10.10

Any comment would be appreciated. Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-10-20 18:26:28 -0500

Victor Lopez gravatar image

Take a look at this: http://www.ros.org/wiki/ROS/NetworkSetup

First of all ensure that you can ping each host from the other host. In order to communicate, one of the hosts must be running roscore, and the other one must have set ROS_MASTER_URI to use the other host's roscore.

For instance, export ROS_MASTER_URI=http://host-s:11311 must be set on host-p.

If this doesn't solve it, I've had success on similar situations by setting ROS_IP or ROS_HOST variables.

edit flag offensive delete link more

Comments

@Victor thanks. Like I've mentioned I already tried what's in that web page. But I'll try ROS_IP/ROS_HOST tomorrow.
130s gravatar image 130s  ( 2011-10-20 18:39:04 -0500 )edit
Now my nodes are communicating. Cause was I didn't set ROS_IP on publisher node (had only set ROS_IP on the subscriber node). For safety I think I just set ROS_IP on all nodes in use from now on. Thanks!
130s gravatar image 130s  ( 2011-10-21 13:45:22 -0500 )edit

Question Tools

Stats

Asked: 2011-10-20 14:47:16 -0500

Seen: 652 times

Last updated: Oct 20 '11