0

Rosanswers logo

Hello,

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

eth0      Link encap:Ethernet  HWaddr XXX
          inet addr:192.168.11.2  Bcast:192.168.11.255  Mask:255.255.255.0

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0

wlan0 Link encap:Ethernet HWaddr YYY inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0

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
SUMMARY
PARAMETERS
 * /rosdistro
 * /rosversion
NODES
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 192.168.11.3. I have run on this device:

export ROS_MASTER_URI=http: // 192.168.11.2:11311

I can publish a message from this device (192.168.11.3) to the PC (192.168.11.2). But I cannot publish any message from the PC (192.168.11.2) to the device (192.168.11.3).

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.


Originally posted by gregoiregentil on ROS Answers with karma: 3 on 2013-07-19

Post score: 0


Original comments

Comment by Ben_S on 2013-07-22:
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.

1 Answers1

0

Rosanswers logo

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.


Originally posted by thebyohazard with karma: 3562 on 2013-07-22

This answer was ACCEPTED on the original site

Post score: 1