Difference between pages "Workstation Setup" and "Networking"

(Difference between pages)
Jump to: navigation , search
(Install Sawyer SDK)
 
(Dev Machine)
 
Line 1: Line 1:
  
 
<div class="title-block">
 
<div class="title-block">
<span style="font-size:120%;">'''This tutorial describes the setup of a development workstation'''</span>
+
<span style="font-size:120%;">'''The Sawyer Research Robot uses ROS to communicate with the user's Development Workstation.  This requires an ethernet network to be established between Sawyer and the Workstation with full bi-directional connectivity.  If you have trouble connecting to your Sawyer, see this page for our Recommended Network Setup and other common network debugging steps.'''</span>
 
</div>
 
</div>
 +
  
 
{{TOClimit|limit=2}}
 
{{TOClimit|limit=2}}
  
<div class="content-block">
 
== Required Hardware ==
 
* 1 Sawyer Robot
 
* 1 Development Workstation (Meeting [[System_requirements | Minimum System Requirements]])
 
</div>
 
<div class="content-block">
 
 
== Install Ubuntu ==
 
 
'''Current required version: Ubuntu 14.04'''
 
 
Follow the standard Ubuntu Installation Instructions for 14.04 (Desktop):
 
* Download the Installer Image file, by picking the "[http://releases.ubuntu.com/trusty/ Desktop CD]" image appropriate for your machine:
 
** [http://releases.ubuntu.com/trusty/ubuntu-14.04.4-desktop-amd64.iso 64-bit (AMD64) .iso image (recommended)] / [http://releases.ubuntu.com/trusty/ubuntu-14.04.4-desktop-i386.iso 32-bit (Intel x86) .iso image]
 
 
* Create an Ubuntu LiveUSB installer by burning the installer image onto a USB stick.
 
** [http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows Windows] / [http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx Mac OS X] / [http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu Ubuntu]
 
* Follow the [https://help.ubuntu.com/community/GraphicalInstall Ubuntu Installation Instructions]
 
 
 
</div>
 
  
 
<div class="content-block">
 
<div class="content-block">
 +
== Basics ==
 +
These Network Configuration settings are available in the [[Field Service Menu (FSM)]]
  
== Install ROS ==
+
=== Basic Requirements ===
 +
Sawyer must be connected to a development workstation which uses ROS over an ethernet network to communicate bi-directionally.
  
Current supported version: ROS Indigo
+
Sawyer's [[Robot Hostname|hostname]] can be configured using the [[Field Service Menu (FSM)]] if you do not like the one given out at the factory which matches its [[Serial Number|serial number]].
  
=== Configure Ubuntu repositories ===
+
=== Network address assignment ===
  
Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can follow [https://help.ubuntu.com/community/Repositories/Ubuntu the Ubuntu guide] for instructions on doing this.<br />
+
Sawyer supports IPV4 addressing for the following network configurations:
 +
* Automatic address assignment (“Automatic” mode)
 +
** If a DHCP server is present in the network, the DHCP server automatically assigns a network address to the robot, and may (or may not) assign a DNS server for host name resolution.
 +
** If no DHCP server is present, the robot will use the Autoip protocol to assign itself a link-local address in the 169.254.0.0/16 address block.
 +
** All assignments in this mode are automatic, and no options can be configured manually.
 +
* Manual address assignment from the Field Service Menu (“Manual” mode)
 +
** The user must specify a valid IPV4 address for the robot, and may optionally specify a network mask, default gateway address, and DNS server address. All network options are configured manually.
  
''Likely, they are already configured properly, and you only need to confirm the configuration.''
+
=== Host name resolution ===
  
=== Setup your sources.list ===
+
In all addressing modes, Sawyer provides link-local advertising of the robot’s host name as “<robot name>.local” using the Avahi mDNS service. Computers that are located in the same subnet as the robot and that support mDNS can always resolve the robot’s host name as “<robot name>.local” even if no other host name resolution service is present. Sawyer will also be able to communicate with these computers using their host names.
  
<syntaxhighlight lang="bash" enclose="div">
+
In “Automatic” addressing mode, Sawyer will be able to resolve external host names only if the network’s DHCP server supplies a DNS server address. If the DHCP server does not provide a DNS server address, Sawyer will only be able to communicate with external computers by their IP addresses.
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
 
</syntaxhighlight>
 
  
=== Setup your keys ===
+
In “Manual” addressing mode, Sawyer will be able to resolve external host names only if the user specifies a DNS server address (and a default gateway address if computers in a different subnet are involved). If the user does not provide a DNS server address, Sawyer will only be able to communicate with computers by their IP addresses. If the user does not provide a default gateway address, Sawyer will only be able to communicate with computers within the same subnet.
 
+
</div>
<syntaxhighlight lang="bash" enclose="div">
+
<div class="content-block">
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
+
== ROS Naming Conventions ==
</syntaxhighlight>
 
 
 
=== Verify Latest Debians ===
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get update
 
</syntaxhighlight>
 
  
=== Install ROS Indigo Desktop Full ===
+
Intera robots supports 3 ROS naming conventions.  These control how the ROS Master publishes the access information for the individual nodes published by the robot.  Regardless of how you connect to the robot, you will need to be able to reach it by the address configured by its ROS naming convention if you want to be able to interact with it. (i.e. if you can reach the robot by its IP, but it is configured with the ROS_HOSTNAME convention and you can't reach it by its hostname, then you will be unable to do meaningful work with the robot)
 
+
* '''ROS_HOSTNAME.local:''' This publishes the nodes at <code><robot hostname>.local</code>
<syntaxhighlight lang="bash" enclose="div">
+
** This is the least versatile, but the most stable configuration, and is our recommended when it is available.
$ sudo apt-get install ros-indigo-desktop-full
+
** This convention only works in a local setup, where your robot and development machine are on the same subnet, but will '''almost always''' work in that network configuration.
</syntaxhighlight>
+
** This will only break if
 
+
*** A naming conflict is introduced on the local network or
'''NOTE:''' You may get a prompt about 'hddtemp' during the installation. You can safely answer 'No'.
+
*** You manually change the hostname of the robot.
 
+
* '''ROS_IP:''' This publishes the nodes at the IP4 Address associated with the robot
=== Initialize rosdep ===
+
** This is the most versatile naming convention, but also the most fragile.
 
+
** It will work in any network configuration where you have connectivity to the robot, but will break if the IP of the robot changes
rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.
+
* '''ROS_HOSTNAME:''' This publishes the nodes at the hostname of the robot.
<syntaxhighlight lang="bash" enclose="div">
+
** This configuration has medium versatility and stability.
$ sudo rosdep init
+
** It only works if there is a working DNS running on your network, and pointed at the robot.
$ rosdep update
+
** This will only break if
</syntaxhighlight>
+
*** A naming conflict is introduced in the network or
 
+
*** If the the DNS-resolved hostname of the robot is changed, which can be done by the Server admin, but is unlikely to happen.
=== Install rosinstall ===
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get install python-rosinstall
 
</syntaxhighlight>
 
 
</div>
 
</div>
  
 
<div class="content-block">
 
<div class="content-block">
  
== Create Intera Development Workspace ==
+
== Network Configuration through a Router ==
 
 
=== Create ROS Workspace ===
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
$ mkdir -p ~/ros_ws/src
 
# ros_ws (short for ROS Workspace)
 
</syntaxhighlight>
 
 
 
=== Source ROS and Build ===
 
 
 
'''ROS Indigo (Supported)'''
 
  
=== Source ROS Setup ===
+
=== Recommended Network Configuration ===
  
<syntaxhighlight lang="bash" enclose="div">
+
The recommended network configuration is to connect your development workstation and your Sawyer to an all in one SOHO (Small Office/Home Office) router/firewall similar to the Linksys EA-Series routers. This type of router provides DHCP and other networking services, and has the benefit of keeping the network traffic off of your main network. It also allows the development workstation access to internet in particular, the Rethink Robotics github repo for code and documentation.
$ source /opt/ros/indigo/setup.bash
 
</syntaxhighlight>
 
  
=== Build ===
+
=== Router Configuration Diagram ===
  
<syntaxhighlight lang="bash" enclose="div">
+
[[File:Router_Config.png|800px]]
$ cd ~/ros_ws
 
$ catkin_make
 
</syntaxhighlight>
 
</div>
 
  
<div class="content-block">
+
* Sawyer and the user's computer can both be set to "Automatic" addressing mode, which will draw IP information directly from the router.
  
== Install Sawyer SDK Dependencies ==
+
=== Sawyer ===
  
ROS Indigo (Supported)
+
* Sawyer can be set to use either ROS_IP or ROS_HOSTNAME.local:
 +
*# ROS_HOSTNAME.local is our '''recommended''' ros naming protocol for the robot in this setup.  It is very stable in this network configuration, and would only need to be adjusted if you switch to a separate subnet from the robot.
 +
*#* If you can <code>ping <robot hostname>.local</code>, then the network is working correctly
 +
*# ROS_IP is the most reliable naming method, if you know that the robot is going to keep its .IP.  This naming protocol works across all network configurations as long as you have reliable routing to the robot.
 +
*#* If you can <code> ping <robot ip></code> then the network is working correctly.
 +
*#* '''Note:''' You can set the robot to use a Static IP if you are interested in using this naming convention because you are unsure of your future network configurations, but be sure to talk to your network administrator if you are hooking your router up to a larger network.
  
=== Install SDK Dependencies ===
+
=== Dev Machine ===
  
<syntaxhighlight lang="bash" enclose="div">
+
* In this network configuration, you will want to have your [[RSDK Shell|intera.sh]] script point to either:
$ sudo apt-get update
+
*# ROS_IP = "<your development machine's IPV4 Address>"
$ sudo apt-get install git-core python-argparse python-wstool python-vcstools python-rosdep ros-indigo-control-msgs ros-indigo-joystick-drivers ros-indigo-xacro ros-indigo-tf2-ros ros-indigo-rviz ros-indigo-cv-bridge ros-indigo-actionlib ros-indigo-actionlib-msgs ros-indigo-dynamic-reconfigure ros-indigo-trajectory-msgs
+
*#* Verify connectivity by attempting to <code>ping <your development machine's IPV4 Address></code>
</syntaxhighlight>
+
*# ROS_HOSTNAME = "<your development machine's hostname>.local"
 +
*#* Verify connectivity attempting to <code>ping <your development machine's hostname>.local</code>
  
</div>
+
=== Connect Directly To Corporate Or University Network ===
  
<div class="content-block">
+
Another viable networking configuration is to connect Sawyer directly to your corporate or university network. Here you need to make sure that a DHCP server is available, and that your name server can resolve Sawyer's hostname to an IP address. If you plan on using DHCP reservation using Sawyer's MAC address, you can get the MAC address by using [[TTY#TTY3 - Network Info Display|TTY3]].
  
== Install Sawyer Research Robot SDK ==
+
You can set Sawyer to use either "Automatic" addressing or a static IP configuration in this configuration.
  
=== Install Sawyer SDK ===
+
'''Note:''' If you want to set a static IP, you will need to talk to your network administrator to get an appropriate IP for you to assign, in order to avoid network collisions.
  
Checkout all required Github Repositories into your ROS workspace source directory:
+
=== Sawyer ===
Use git clone or download the packages directly from Github:
 
  
<syntaxhighlight lang="bash" enclose="div">
+
In this network configuration, you can use either ROS_IP or ROS_HOSTNAME ROS naming conventions
$ cd ~/ros_ws/src
+
* In this setup, we recommend using the ROS_HOSTNAME convention.  This will rely on your DNS and on not having someone else register a duplicate of your hostname (so pick a unique one), but will be very stable in this network configuration.
$ wstool init .
+
** If you can <code>ping <robot hostname></code> then the network is working.
$ git clone https://github.com/RethinkRobotics/sawyer_robot.git
+
* As mentioned in the previous section, ROS_IP is the most versatile ROS naming convention that works across the most network configurations, but is susceptible to automatic IP changes when a lease is exceeded.
$ wstool merge sawyer_robot/sawyer_robot.rosinstall
+
** If you can <code>ping <robot IP></code> then the network is working.
$ wstool update
 
</syntaxhighlight>
 
  
=== Source ROS Setup ===
+
=== Dev Machine ===
You must use ROS Indigo to use RSDK, use command below:
 
  
<syntaxhighlight lang="bash" enclose="div">
+
* In this network configuration, you will want to have your [[RSDK Shell|intera.sh]] script point to either:
# ROS Indigo
+
*# ROS_IP = "<your development machine's IPV4 Address>"
$ source /opt/ros/indigo/setup.bash
+
*#* Verify 2-way connectivity by [[SSH]]ing into the robot and attempting to <code>ping <your development machine's IPV4 Address></code>
</syntaxhighlight>
+
*# ROS_HOSTNAME = "<your development machine's hostname>"
 
+
*#* Verify 2-way connectivity by [[SSH]]ing into the robot and attempting to <code>ping <your development machine's hostname></code>
=== Build ===
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ catkin_make
 
</syntaxhighlight>
 
  
 
</div>
 
</div>
Line 161: Line 115:
 
<div class="content-block">
 
<div class="content-block">
  
== Configure Sawyer Communication/ROS Workspace ==
+
== Direct Network Configuration ==
This step describes the configuration and setup of your [http://wiki.ros.org/ROS/EnvironmentVariables ROS environment]. This section assumes you have linked your workstation to the robot via Ethernet.<br/>
 
 
 
See [[Networking | Network Setup]] for recommended network configurations.
 
 
 
=== intera.sh ROS Environment Setup ===
 
 
 
The intera.sh script is a convenience script which allows for intuitive modification of the core ROS environment components. This user edited script will allow for the quickest and easiest ROS setup.
 
 
 
Further information and a detailed description is available on the [[SDK_Shell]] page.
 
 
 
=== Copy the intera.sh script ===
 
 
 
The intera.sh file already exists in intera_sdk repo, copy the file into your ros workspace.
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cp ~/ros_ws/src/intera_sdk/intera.sh ~/ros_ws
 
</syntaxhighlight>
 
 
 
=== Customize the intera.sh script ===
 
 
 
Please edit the intera.sh shell script making the necessary modifications to describe your development PC.
 
 
 
Using your favorite editor ([https://wiki.gnome.org/Apps/Gedit gedit] used for example)
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ gedit intera.sh
 
</syntaxhighlight>
 
  
=== Edit the 'robot_hostname' field ===
+
If you do not have a DHCP server or other networking infrastructure, or would just prefer to connect your development workstation directly to Sawyer, you can do so using the following network configuration and steps.
Sawyer's hostname is defaulted as the controller's serial number. The serial number can be located on the back of the robot's controller box. <br/>
 
  
=== Edit the 'your_ip' field ===
+
=== Switch Configuration Diagram ===
  
Modify where 'your_ip' is either your computer's hostname or the IP address of your PC.
+
[[File:Switch_Config.png|600px]]
  
<syntaxhighlight lang="bash" enclose="div">
+
=== Robot ===
your_ip="192.168.XXX.XXX"
 
</syntaxhighlight>
 
  
Useful command for identifying your IP address:
+
In this setup, you will need to set your robot to use "Automatic" addressing, and can choose between ROS_IP and ROS_HOSTNAME.local for your ROS naming convention.
<syntaxhighlight lang="bash" enclose="div">
+
# ROS_HOSTNAME.local is our '''recommended''' ros naming protocol for the robot in this setup.  It is very stable in this network configuration, and would only need to be adjusted if you switch to a separate subnet from the robot.
$ ifconfig
+
#* If you can <code>ping <robot hostname>.local</code>, then the network is working correctly
# Result will be contained in the 'inet addr' field (Ubuntu) or 'inet' field (Gentoo Robot PC).
+
# ROS_IP is the most reliable naming method, if you know that the robot is going to keep its .IP.  This naming protocol works across all network configurations as long as you have reliable routing to the robot.
</syntaxhighlight>
+
#* If you can <code> ping <robot ip></code> then the network is working correctly.
 +
#* '''Note:''' You can set the robot to use a Static IP if you are interested in using this naming convention because you are unsure of your future network configurations, but be sure to talk to your network administrator if you are hooking your router up to a larger network.
  
<div class="toccolours mw-collapsible mw-collapsed">
+
=== Dev Machine ===
Alternatively, you may choose to use the hostname of your development PC rather than the PC's IP address.  For instructions, press Expand on the right.
 
<div class="mw-collapsible-content">
 
You may edit the 'your_hostname' field (only if not using 'your_ip'):
 
<syntaxhighlight lang="bash" enclose="div">
 
your_hostname="my_computer.local
 
</syntaxhighlight>
 
  
 +
* In this network configuration, you will want to have your [[RSDK Shell|intera.sh]] script point to either:
 +
*# ROS_IP = "<your development machine's IPV4 Address>"
 +
*#* Verify 2-way connectivity by [[SSH]]ing into the robot and attempting to <code>ping <your development machine's IPV4 Address></code>
 +
*# ROS_HOSTNAME = "<your development machine's hostname>.local"
 +
*#* Verify 2-way connectivity by [[SSH]]ing into the robot and attempting to <code>ping <your development machine's hostname>.local</code>
  
'''Important:''' This hostname must be resolvable to Sawyer. To test if your hostname is resolvable to Sawyer, please visit the development PC [[Hostname Validation]] page.
+
=== Avahi Configuration Steps: ===
  
'''Important:''' Only set either ROS_IP '''*OR*''' ROS_HOSTNAME.
+
These steps assume your ethernet connection to the robot is on <code>eth0</code>.
 +
* Shutdown Sawyer and disconnect ethernet cable.
 +
* Connect the laptop/workstation to Sawyer using a Category-5 ethernet cable.
 +
* Power up Sawyer.
 +
* Disable firewall on laptop if necessary:
 +
<source lang="bash">
 +
    $ sudo ufw disable 
 +
</source>
  
Setting of both ROS_IP and ROS_HOSTNAME will result in ROS_HOSTNAME taking priority, resulting in confusing environment setups. Comment out the unused method using the '#' as leading character.
+
* Turn off the Ubuntu Network-Manager to prevent interference:
 +
* Go to the Networking Icon drop-down menu in the top-right of the Desktop.
 +
* Make sure 'Enable Networking' is '''unchecked''' (if checked, select the option in the menu to disable)
  
</div>
+
* Check status of eth0:
</div>
+
<source lang="bash">
 +
    $ ifconfig eth0 
 +
</source>
 +
''You should not see any IP addresses under 'inet'.''
  
=== Verify 'ros_version' field ===
+
* Use Avahi to designate an IP address to eth0 (do not close the terminal after running avahi-autoipd):
 +
<source lang="bash">
 +
    $ sudo avahi-autoipd eth0 
 +
</source>
  
Verify that the the 'ros_version' field matches the ROS version you are running:
+
* Make sure an IP address is successfully claimed. eg:
 +
<source lang="bash">
 +
    Found user 'avahi-autoipd' (UID 104) and group 'avahi-autoipd' (GID 111).
 +
    Successfully called chroot().
 +
    Successfully dropped root privileges.
 +
    Starting with address 169.254.8.16
 +
    Callout BIND, address 169.254.8.16 on interface eth0
 +
    Successfully claimed IP address 169.254.8.16
 +
</source>
 +
''Keep this Terminal running in the background.''
  
This field will default to "indigo"
+
* Open a '''New Terminal''' to continue.
<syntaxhighlight lang="bash" enclose="div">
+
* Find the local hostname of the robot by running avahi-browse:
ros_version="indigo"
 
</syntaxhighlight>
 
 
 
=== Save and Close intera.sh script ===
 
 
 
Please save and close the intera.sh script.
 
 
 
=== Initialize your SDK environment ===
 
 
 
From this point forward, your ROS environment setup should be as simple as sourcing the intera.sh script from the root of your Catkin workspace:
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ ./intera.sh
 
</syntaxhighlight>
 
  
 +
<source lang="bash">
 +
    $ avahi-browse -a -r 
 +
</source>
 +
    The default local hostname of the robot is the [[Serial Number]] followed by local. Ex: '011303P0017.local'.
 
</div>
 
</div>
  
 
<div class="content-block">
 
<div class="content-block">
  
== Verify Environment ==
+
== Troubleshooting ==
 
 
A useful command for viewing and validating your ROS environment setup is:
 
<syntaxhighlight lang="bash" enclose="div">
 
$ env | grep ROS
 
</syntaxhighlight>
 
 
 
The important fields at this point: 
 
 
 
'''ROS_MASTER_URI''' - This should now contain your robot's hostname. 
 
 
 
'''ROS_IP''' - This should contain your workstation's IP address.
 
 
 
or
 
  
'''ROS_HOSTNAME''' - If not using the workstation's IP address, the ROS_HOSTNAME field should contain your PC's hostname.  Otherwise, this field should not be available.
+
See the [http://www.ros.org/wiki/ROS/NetworkSetup ROS Network Setup Guide] for common ROS network issues and helpful debugging steps to check your base ROS connectivity.
  
 
</div>
 
</div>

Revision as of 13:49, 7 December 2016

The Sawyer Research Robot uses ROS to communicate with the user's Development Workstation. This requires an ethernet network to be established between Sawyer and the Workstation with full bi-directional connectivity. If you have trouble connecting to your Sawyer, see this page for our Recommended Network Setup and other common network debugging steps.



Basics

These Network Configuration settings are available in the Field Service Menu (FSM)

Basic Requirements

Sawyer must be connected to a development workstation which uses ROS over an ethernet network to communicate bi-directionally.

Sawyer's hostname can be configured using the Field Service Menu (FSM) if you do not like the one given out at the factory which matches its serial number.

Network address assignment

Sawyer supports IPV4 addressing for the following network configurations:

  • Automatic address assignment (“Automatic” mode)
    • If a DHCP server is present in the network, the DHCP server automatically assigns a network address to the robot, and may (or may not) assign a DNS server for host name resolution.
    • If no DHCP server is present, the robot will use the Autoip protocol to assign itself a link-local address in the 169.254.0.0/16 address block.
    • All assignments in this mode are automatic, and no options can be configured manually.
  • Manual address assignment from the Field Service Menu (“Manual” mode)
    • The user must specify a valid IPV4 address for the robot, and may optionally specify a network mask, default gateway address, and DNS server address. All network options are configured manually.

Host name resolution

In all addressing modes, Sawyer provides link-local advertising of the robot’s host name as “<robot name>.local” using the Avahi mDNS service. Computers that are located in the same subnet as the robot and that support mDNS can always resolve the robot’s host name as “<robot name>.local” even if no other host name resolution service is present. Sawyer will also be able to communicate with these computers using their host names.

In “Automatic” addressing mode, Sawyer will be able to resolve external host names only if the network’s DHCP server supplies a DNS server address. If the DHCP server does not provide a DNS server address, Sawyer will only be able to communicate with external computers by their IP addresses.

In “Manual” addressing mode, Sawyer will be able to resolve external host names only if the user specifies a DNS server address (and a default gateway address if computers in a different subnet are involved). If the user does not provide a DNS server address, Sawyer will only be able to communicate with computers by their IP addresses. If the user does not provide a default gateway address, Sawyer will only be able to communicate with computers within the same subnet.

ROS Naming Conventions

Intera robots supports 3 ROS naming conventions. These control how the ROS Master publishes the access information for the individual nodes published by the robot. Regardless of how you connect to the robot, you will need to be able to reach it by the address configured by its ROS naming convention if you want to be able to interact with it. (i.e. if you can reach the robot by its IP, but it is configured with the ROS_HOSTNAME convention and you can't reach it by its hostname, then you will be unable to do meaningful work with the robot)

  • ROS_HOSTNAME.local: This publishes the nodes at <robot hostname>.local
    • This is the least versatile, but the most stable configuration, and is our recommended when it is available.
    • This convention only works in a local setup, where your robot and development machine are on the same subnet, but will almost always work in that network configuration.
    • This will only break if
      • A naming conflict is introduced on the local network or
      • You manually change the hostname of the robot.
  • ROS_IP: This publishes the nodes at the IP4 Address associated with the robot
    • This is the most versatile naming convention, but also the most fragile.
    • It will work in any network configuration where you have connectivity to the robot, but will break if the IP of the robot changes
  • ROS_HOSTNAME: This publishes the nodes at the hostname of the robot.
    • This configuration has medium versatility and stability.
    • It only works if there is a working DNS running on your network, and pointed at the robot.
    • This will only break if
      • A naming conflict is introduced in the network or
      • If the the DNS-resolved hostname of the robot is changed, which can be done by the Server admin, but is unlikely to happen.

Network Configuration through a Router

Recommended Network Configuration

The recommended network configuration is to connect your development workstation and your Sawyer to an all in one SOHO (Small Office/Home Office) router/firewall similar to the Linksys EA-Series routers. This type of router provides DHCP and other networking services, and has the benefit of keeping the network traffic off of your main network. It also allows the development workstation access to internet in particular, the Rethink Robotics github repo for code and documentation.

Router Configuration Diagram

Router Config.png

  • Sawyer and the user's computer can both be set to "Automatic" addressing mode, which will draw IP information directly from the router.

Sawyer

  • Sawyer can be set to use either ROS_IP or ROS_HOSTNAME.local:
    1. ROS_HOSTNAME.local is our recommended ros naming protocol for the robot in this setup. It is very stable in this network configuration, and would only need to be adjusted if you switch to a separate subnet from the robot.
      • If you can ping <robot hostname>.local, then the network is working correctly
    2. ROS_IP is the most reliable naming method, if you know that the robot is going to keep its .IP. This naming protocol works across all network configurations as long as you have reliable routing to the robot.
      • If you can ping <robot ip> then the network is working correctly.
      • Note: You can set the robot to use a Static IP if you are interested in using this naming convention because you are unsure of your future network configurations, but be sure to talk to your network administrator if you are hooking your router up to a larger network.

Dev Machine

  • In this network configuration, you will want to have your intera.sh script point to either:
    1. ROS_IP = "<your development machine's IPV4 Address>"
      • Verify connectivity by attempting to ping <your development machine's IPV4 Address>
    2. ROS_HOSTNAME = "<your development machine's hostname>.local"
      • Verify connectivity attempting to ping <your development machine's hostname>.local

Connect Directly To Corporate Or University Network

Another viable networking configuration is to connect Sawyer directly to your corporate or university network. Here you need to make sure that a DHCP server is available, and that your name server can resolve Sawyer's hostname to an IP address. If you plan on using DHCP reservation using Sawyer's MAC address, you can get the MAC address by using TTY3.

You can set Sawyer to use either "Automatic" addressing or a static IP configuration in this configuration.

Note: If you want to set a static IP, you will need to talk to your network administrator to get an appropriate IP for you to assign, in order to avoid network collisions.

Sawyer

In this network configuration, you can use either ROS_IP or ROS_HOSTNAME ROS naming conventions

  • In this setup, we recommend using the ROS_HOSTNAME convention. This will rely on your DNS and on not having someone else register a duplicate of your hostname (so pick a unique one), but will be very stable in this network configuration.
    • If you can ping <robot hostname> then the network is working.
  • As mentioned in the previous section, ROS_IP is the most versatile ROS naming convention that works across the most network configurations, but is susceptible to automatic IP changes when a lease is exceeded.
    • If you can ping <robot IP> then the network is working.

Dev Machine

  • In this network configuration, you will want to have your intera.sh script point to either:
    1. ROS_IP = "<your development machine's IPV4 Address>"
      • Verify 2-way connectivity by SSHing into the robot and attempting to ping <your development machine's IPV4 Address>
    2. ROS_HOSTNAME = "<your development machine's hostname>"
      • Verify 2-way connectivity by SSHing into the robot and attempting to ping <your development machine's hostname>

Direct Network Configuration

If you do not have a DHCP server or other networking infrastructure, or would just prefer to connect your development workstation directly to Sawyer, you can do so using the following network configuration and steps.

Switch Configuration Diagram

Switch Config.png

Robot

In this setup, you will need to set your robot to use "Automatic" addressing, and can choose between ROS_IP and ROS_HOSTNAME.local for your ROS naming convention.

  1. ROS_HOSTNAME.local is our recommended ros naming protocol for the robot in this setup. It is very stable in this network configuration, and would only need to be adjusted if you switch to a separate subnet from the robot.
    • If you can ping <robot hostname>.local, then the network is working correctly
  2. ROS_IP is the most reliable naming method, if you know that the robot is going to keep its .IP. This naming protocol works across all network configurations as long as you have reliable routing to the robot.
    • If you can ping <robot ip> then the network is working correctly.
    • Note: You can set the robot to use a Static IP if you are interested in using this naming convention because you are unsure of your future network configurations, but be sure to talk to your network administrator if you are hooking your router up to a larger network.

Dev Machine

  • In this network configuration, you will want to have your intera.sh script point to either:
    1. ROS_IP = "<your development machine's IPV4 Address>"
      • Verify 2-way connectivity by SSHing into the robot and attempting to ping <your development machine's IPV4 Address>
    2. ROS_HOSTNAME = "<your development machine's hostname>.local"
      • Verify 2-way connectivity by SSHing into the robot and attempting to ping <your development machine's hostname>.local

Avahi Configuration Steps:

These steps assume your ethernet connection to the robot is on eth0.

  • Shutdown Sawyer and disconnect ethernet cable.
  • Connect the laptop/workstation to Sawyer using a Category-5 ethernet cable.
  • Power up Sawyer.
  • Disable firewall on laptop if necessary:
    $ sudo ufw disable
  • Turn off the Ubuntu Network-Manager to prevent interference:
  • Go to the Networking Icon drop-down menu in the top-right of the Desktop.
  • Make sure 'Enable Networking' is unchecked (if checked, select the option in the menu to disable)
  • Check status of eth0:
    $ ifconfig eth0

You should not see any IP addresses under 'inet'.

  • Use Avahi to designate an IP address to eth0 (do not close the terminal after running avahi-autoipd):
    $ sudo avahi-autoipd eth0
  • Make sure an IP address is successfully claimed. eg:
    Found user 'avahi-autoipd' (UID 104) and group 'avahi-autoipd' (GID 111).
    Successfully called chroot().
    Successfully dropped root privileges.
    Starting with address 169.254.8.16
    Callout BIND, address 169.254.8.16 on interface eth0
    Successfully claimed IP address 169.254.8.16

Keep this Terminal running in the background.

  • Open a New Terminal to continue.
  • Find the local hostname of the robot by running avahi-browse:
    $ avahi-browse -a -r
   The default local hostname of the robot is the Serial Number followed by local. Ex: '011303P0017.local'.

Troubleshooting

See the ROS Network Setup Guide for common ROS network issues and helpful debugging steps to check your base ROS connectivity.