Multi-machine talker/listener SROS tutorial

This tutorial will demonstrate how to separate the three process trees required for a talker/listener demo (roscore, talker, listener) on separate machines. Difficulties in doing this typically are due to network and DNS configuration. Note that all machines need local builds of SROS. This tutorial will assume that the machines we have are named MACHINE1, MACHINE2, and MACHINE3, and that SROS has been built and installed in ~/sros/install on each of them. Furthermore, this machine assumes that avahi (aka mDNS) is running on all machines, or through some other means (e.g., /etc/hosts entries) they can find each other on the LAN. Depending on how your network and DNS are configured, the ROS_HOSTNAME settings which explicitly append the .local domain may be unnecessary, but they are included here because that's a common situation.

Machine 1: roscore

ssh MACHINE1
cd ~/sros
source install/setup.bash
sroscore --keyserver

Machine 2: talker

ssh MACHINE2
cd ~/sros
source install/setup.bash
export ROS_HOSTNAME=`hostname`.local
export ROS_MASTER_URI=http://MACHINE1.local:11311
srosrun rospy_tutorials talker

Machine 3: listener

ssh MACHINE3
cd ~/sros
source install/setup.bash
export ROS_HOSTNAME=`hostname`.local
export ROS_MASTER_URI=http://MACHINE1.local:11311
srosrun rospy_tutorials listener

Commentary

Note that the default invocation of sroscore --keyserver provides encryption but will give out keys to anybody who asks, and should not be considered secure. Once keys have been distributed through an initial run, the unsecured keyserver can be disabled. On machine 1:

ssh MACHINE1
cd ~/sros
source install/setup.bash
sroscore

Wiki: sros/Tutorials/TalkerListenerDifferentBoxes (last edited 2016-06-17 19:01:16 by ruffsl)