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

ROS network issues

asked 2016-07-03 14:28:51 -0600

uwleahcim gravatar image

updated 2016-07-03 14:34:04 -0600

I have 2 computers running ROS and I'm trying to connect them via an Ethernet cable. Both machines are also connected to the Internet via wireless connection.

An intel NUC as the master at 10.0.0.2 An Tegra-k1 as the client at 10.0.0.3

NUC (Master at 10.0.0.2)

export ROS_IP=10.0.0.2
export ROS_HOSTNAME=10.0.0.2
export ROS_MASTER_URI=http://10.0.0.2:11311
roscore

Tegra (Client at 10.0.0.3)

export ROS_IP=10.0.0.3
export ROS_HOSTNAME=10.0.0.3
export ROS_MASTER_URI=http://10.0.0.2:11311
roscore

roscore output from Master

... logging to /home/ubuntu/.ros/log/e8292188-4152-11e6-9eb6-00c2c6b4df39/roslaunch-nuc-16093.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://10.0.0.2:40088/
ros_comm version 1.12.2


SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.2

NODES

auto-starting new master
process[master]: started with pid [16104]
ROS_MASTER_URI=http://10.0.0.2:11311/

setting /run_id to e8292188-4152-11e6-9eb6-00c2c6b4df39
process[rosout-1]: started with pid [16119]
started core service [/rosout]

roscore output from Client

... logging to /home/ubuntu/.ros/log/014001fe-4154-11e6-85b6-60601f199a6b/roslaunch-tegra-ubuntu-3583.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://10.0.0.3:35762/
ros_comm version 1.11.19


SUMMARY
========

PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.19

NODES

WARNING: ROS_MASTER_URI [http://10.0.0.2:11311] host is not set to this machine
auto-starting new master
process[master]: started with pid [3594]
ROS_MASTER_URI=http://10.0.0.3:11311/

setting /run_id to 014001fe-4154-11e6-85b6-60601f199a6b
process[rosout-1]: started with pid [3607]
started core service [/rosout]

I have have multiple network interfaces on both machines

ifconfig output from Master

eno1      Link encap:Ethernet  HWaddr b8:ae:ed:e9:81:d9  
          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::d43d:9fd2:6b7e:6161/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1070691 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2245 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1478861461 (1.4 GB)  TX bytes:234854 (234.8 KB)
          Interrupt:16 Memory:df200000-df220000 

enx00e08f007010 Link encap:Ethernet  HWaddr 00:e0:8f:00:70:10  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:93462668 errors:0 dropped:0 overruns:0 frame:0
          TX packets:93462668 errors:0 dropped ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-07-03 14:57:38 -0600

ahendrix gravatar image

You only need to run one roscore, on the master. Nodes and launch files that you run on your client will connect to this roscore; you shouldn't run a roscore on the client.

After setting up the environment and starting roscore on the master, you should be able to do rostopic list on both master and client to confirm that the network is working.

edit flag offensive delete link more

Comments

You're correct. For some reason I kept thinking you had to launch ROS nodes on both ends to get them communicating.

uwleahcim gravatar image uwleahcim  ( 2016-07-03 15:04:54 -0600 )edit

Now that I have the machines talking to each other, I noticed the performance of passing topics is asymmetrical. In this case my client has no problem streaming topics from the master. However, the other way around I'll constantly lose messages and images will just stall out.

uwleahcim gravatar image uwleahcim  ( 2016-07-03 19:29:35 -0600 )edit

It sounds like your network bandwidth or your ability to send or receive images is not the same on both computers. I'd suggest that you try debugging a bit, and if you can't figure it out, ask a new question and carefully describe your setup.

ahendrix gravatar image ahendrix  ( 2016-07-04 04:16:55 -0600 )edit

Using Tegra K1 and intel NUC. Both have 1Gb ethernet. Both have wifi interfaces, which are connected to the internet and operate on 192.168.2.xx 255.255.255.0 network (all info in ifconfig above). Anyways I got the system to work by disabling wifi and rebooting and deleting & re-adding connections.

uwleahcim gravatar image uwleahcim  ( 2016-07-04 08:42:59 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-07-03 14:28:51 -0600

Seen: 2,842 times

Last updated: Jul 03 '16