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

ros not communicating over sub-network

asked 2013-07-19 11:52:47 -0600

gregoiregentil gravatar image

updated 2013-07-22 05:42:00 -0600

dornhege gravatar image


I have a PC running Ubuntu 12.04 with three subnets with two physical adapters:

eth0      Link encap:Ethernet  HWaddr XXX
          inet addr:  Bcast:  Mask:

lo        Link encap:Local Loopback  
          inet addr:  Mask:

wlan0     Link encap:Ethernet  HWaddr YYY
          inet addr:  Bcast:  Mask:

eth0 is a private subnet. wlan0 is an Internet-connected subnet. I have ros Groovy on this PC which is acting as the server. It runs "roscore" which reports:

started roslaunch server http: // laptop:45332 
ros_comm version 1.9.44
 * /rosdistro
 * /rosversion
auto-starting new master
process[master]: started with pid [13818]
ROS_MASTER_URI=http: // laptop:11311

I have a device connected over eth0 with the IP I have run on this device:

export ROS_MASTER_URI=http: //

I can publish a message from this device ( to the PC ( But I cannot publish any message from the PC ( to the device (

It seems that ros on the PC doesn't use the 192.168.11.x subnet and it uses only the 192.168.10.x.

Last important point, in the Ubuntu connection settings for eth0 (192.168.11.x), I have checked the box "Use this connection for resources on this network".

Any idea what I could do to fix this problem?

Many thanks in advance.

edit retag flag offensive close merge delete


Can the device ping your pc by its name? ("laptop") Try setting ROS_IP to the IPs on both sides and use the IPs in the ROS_MASTER_URI.

Ben_S gravatar image Ben_S  ( 2013-07-22 05:19:56 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-22 03:59:33 -0600

thebyohazard gravatar image

In the past when I had problems like this, they went away when I used names instead of ips on all computers. I'd imagine your device knows the name and ip of the PC, but the PC doesn't know something about the device. Check out this page if you can't edit /etc/hosts files on both machines to make sure they know what to call each other.

edit flag offensive delete link more

answered 2013-07-22 06:22:17 -0600

gregoiregentil gravatar image

Yes, adding names to /etc/hosts on both sides fixed the problem. Thanks.

edit flag offensive delete link more

Question Tools


Asked: 2013-07-19 11:52:47 -0600

Seen: 696 times

Last updated: Jul 22 '13