Difference between revisions of "Workstation Setup"

Jump to: navigation , search
Line 8: Line 8:
 
* 1 Development Workstation (Meeting [[System_requirements | Minimum System Requirements]])
 
* 1 Development Workstation (Meeting [[System_requirements | Minimum System Requirements]])
 
</div>
 
</div>
 +
<div class="content-block">
 +
== Step 1: Install Ubuntu ==
  
== Step 1: Install Ubuntu ==
 
 
'''Current required version: Ubuntu 14.04'''
 
'''Current required version: Ubuntu 14.04'''
  
Line 16: Line 17:
 
** 32-bit (Intel x86): http://releases.ubuntu.com/trusty/ubuntu-14.04.3-desktop-i386.iso
 
** 32-bit (Intel x86): http://releases.ubuntu.com/trusty/ubuntu-14.04.3-desktop-i386.iso
 
** 64-bit (AMD64): http://releases.ubuntu.com/trusty/ubuntu-14.04.3-desktop-amd64.iso
 
** 64-bit (AMD64): http://releases.ubuntu.com/trusty/ubuntu-14.04.3-desktop-amd64.iso
 +
 +
* Create an Ubuntu LiveUSB installer by burning the installer image onto a USB stick.
 +
** Windows: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows
 +
** Mac OS X: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx
 +
** Ubuntu: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu
 +
* Follow the Ubuntu Installation Instructions here: https://help.ubuntu.com/community/GraphicalInstall
  
  
 +
</div>
 +
 +
<div class="content-block">
 
== Step 2: Install ROS ==
 
== Step 2: Install ROS ==
  
'''Current recommended version: ROS Indigo'''
+
'''Current supported version: ROS Indigo'''
  
 
== Install ROS Indigo ==
 
== Install ROS Indigo ==
Line 63: Line 73:
 
$ sudo apt-get install python-rosinstall
 
$ sudo apt-get install python-rosinstall
 
</syntaxhighlight>
 
</syntaxhighlight>
</tab>
+
</div>
<tab name="ROS Hydro">
 
 
 
== Install ROS Hydro ==
 
 
 
'''Important Note:''' Due to being deemed "End of Life", no further updates to Debian packages can be made for Baxter's Hydro ROS packages. The final Baxter release in the Hydro Debian packages for Baxter RSDK 1.1.1. Please consider using ROS Indigo, Long Term Support, instead.
 
 
 
=== Configure Ubuntu repositories ===
 
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 />
 
''Likely, they are already configured properly, and you only need to confirm the configuration.''
 
 
 
=== Setup your sources.list ===
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
 
</syntaxhighlight>
 
 
 
=== Setup your keys ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
 
</syntaxhighlight>
 
 
 
=== Verify Latest Debians ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get update
 
</syntaxhighlight>
 
 
 
=== Install ROS Hydro Desktop Full ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get install ros-hydro-desktop-full
 
</syntaxhighlight>
 
 
 
'''NOTE:''' You may get a prompt about 'hddtemp' during the installation. You can safely answer 'No'.
 
 
 
=== Initialize rosdep ===
 
rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo rosdep init
 
$ rosdep update
 
</syntaxhighlight>
 
 
 
=== Install rosinstall ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get install python-rosinstall
 
</syntaxhighlight>
 
</tab>
 
<tab name="ROS Groovy (RSDK 1.0 Compatible)">
 
== Install ROS Groovy ==
 
 
 
'''Important Note:''' Due to being deemed "End of Life", no further updates to Debian packages can be made for Baxter's Groovy ROS packages. The final Baxter release compatible with Groovy is RSDK 1.0.0. Please consider using ROS Indigo, Long Term Support, instead.
 
 
 
=== Configure Ubuntu repositories ===
 
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 />
 
''Likely, they are already configured properly, and you only need to confirm the configuration.''
 
 
 
=== Setup your sources.list ===
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
 
</syntaxhighlight>
 
 
 
=== Setup your keys ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
 
</syntaxhighlight>
 
 
 
=== Verify Latest Debians ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get update
 
</syntaxhighlight>
 
 
 
=== Install ROS Groovy Desktop Full ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get install ros-groovy-desktop-full
 
</syntaxhighlight>
 
 
'''NOTE:''' You may get a prompt about 'hddtemp' during the installation. You can safely answer 'No'.
 
 
 
=== Initialize rosdep ===
 
rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo rosdep init
 
$ rosdep update
 
</syntaxhighlight>
 
 
 
=== Install rosinstall ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get install python-rosinstall
 
</syntaxhighlight>
 
 
 
  
 +
<div class="content-block">
 
== Step 3: Create Baxter Development Workspace ==
 
== Step 3: Create Baxter Development Workspace ==
 
=== Create ROS Workspace ===
 
=== Create ROS Workspace ===
Line 163: Line 85:
  
 
=== Source ROS and Build ===
 
=== Source ROS and Build ===
<tabs>
 
  
<tab name="ROS Indigo (Recommended)">
+
'''ROS Indigo (Supported)'''
 +
 
 
=== Source ROS Setup ===
 
=== Source ROS Setup ===
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
Line 176: Line 98:
 
$ catkin_make install
 
$ catkin_make install
 
</syntaxhighlight>
 
</syntaxhighlight>
</tab>
+
</div>
 
 
<tab name="ROS Hydro">
 
=== Source ROS Setup ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ source /opt/ros/hydro/setup.bash
 
</syntaxhighlight>
 
=== Build and Install ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ catkin_make
 
$ catkin_make install
 
</syntaxhighlight>
 
</tab>
 
 
 
<tab name="ROS Groovy">
 
=== Source ROS Setup ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ source /opt/ros/groovy/setup.bash
 
</syntaxhighlight>
 
 
 
=== Build and Install ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ catkin_make
 
$ catkin_make install
 
</syntaxhighlight>
 
  
 +
<div class="content-block">
 
== Step 4: Install Baxter SDK Dependencies ==
 
== Step 4: Install Baxter SDK Dependencies ==
(This step not required if you are setting up your workstation on Baxter over SSH)
 
  
="ROS Indigo (Recommended)"
+
="ROS Indigo (Supported)"
  
 
=== Install SDK Dependencies ===
 
=== Install SDK Dependencies ===
Line 215: Line 111:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
</div>
  
 +
<div class="content-block">
  
 
== Step 5: Install Baxter Research Robot SDK ==
 
== Step 5: Install Baxter Research Robot SDK ==
 
'''Current recommended installation: 1.2.0 Source'''
 
 
"1.2.0 Workstation Source (Recommended)"
 
  
 
=== Install Baxter SDK ===
 
=== Install Baxter SDK ===
Line 248: Line 142:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
"1.2.0 On-Robot Source"
+
</div>
 
 
=== Install Baxter SDK ===
 
Using the [http://wiki.ros.org/wstool wstool] workspace tool, we will checkout all required [https://github.com/RethinkRobotics Baxter Github Repositories] into your ROS workspace source directory.
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws/src
 
$ wstool init .
 
$ wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter/master/baxter_sdk.rosinstall
 
$ wstool update
 
</syntaxhighlight>
 
 
 
=== Source ROS Setup ===
 
<syntaxhighlight lang="bash" enclose="div">
 
# ROS Indigo
 
$ source /opt/ros/indigo/setup.bash
 
</syntaxhighlight>
 
 
 
=== Build and Install ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ catkin_make
 
$ catkin_make install
 
</syntaxhighlight>
 
 
 
 
 
"1.1.1 Indigo Debian"
 
=== Install Baxter SDK ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get update
 
$ sudo apt-get install ros-indigo-baxter-sdk
 
</syntaxhighlight>
 
 
 
 
 
 
 
=== Install Baxter SDK ===
 
Using the [http://wiki.ros.org/wstool wstool] workspace tool, we will checkout all required [https://github.com/RethinkRobotics Baxter Github Repositories] into your ROS workspace source directory.
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws/src
 
$ wstool init .
 
$ wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter/release-1.0.0/baxter_sdk.rosinstall
 
$ wstool update
 
</syntaxhighlight>
 
 
 
=== Source ROS Setup ===
 
<syntaxhighlight lang="bash" enclose="div">
 
# ROS Groovy
 
$ source /opt/ros/groovy/setup.bash
 
</syntaxhighlight>
 
 
 
=== Build and Install ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ catkin_make
 
$ catkin_make install
 
</syntaxhighlight>
 
  
 +
<div class="content-block">
  
 
== Step 6: Configure Baxter Communication/ROS Workspace ==
 
== Step 6: Configure Baxter Communication/ROS Workspace ==
Line 312: Line 151:
 
'''The current recommended environment setup: Baxter.sh ROS Environment Setup'''
 
'''The current recommended environment setup: Baxter.sh ROS Environment Setup'''
  
"Baxter.sh ROS Environment Setup (Recommended)">
+
"Baxter.sh ROS Environment Setup (Recommended)"
  
  
Line 356: Line 195:
 
# Result will be contained in the 'inet addr' field (Ubuntu) or 'inet' field (Gentoo Robot PC).
 
# Result will be contained in the 'inet addr' field (Ubuntu) or 'inet' field (Gentoo Robot PC).
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
  
 
<div class="toccolours mw-collapsible mw-collapsed">
 
<div class="toccolours mw-collapsible mw-collapsed">
Line 393: Line 230:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
</div>
  
</tab>
+
<div class="content-block">
<tab name="Standard bashrc ROS Environment Setup">
 
It will be necessary to enable communication between the development PC and the robot. This section largely follows [http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment ros.org's Installation and Configuration of ROS Environment page].
 
 
 
To do so, we will edit our [http://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html ~/.bashrc] script which is evoked with new shell instances.
 
 
 
==== Customize your ~/.bashrc ====
 
 
 
Please edit the ~/.bashrc to set the ROS environment variables necessary for communication with Baxter.
 
 
 
Using your favorite editor ([https://wiki.gnome.org/Apps/Gedit gedit] used for example)
 
<syntaxhighlight lang="bash" enclose="div">
 
$ gedit ~/.bashrc
 
</syntaxhighlight>
 
 
 
At the bottom of your ~/.bashrc script add the following:
 
 
 
==== Source ROS setup.bash ====
 
A ROS environment script is packages will all standard ROS installation. This script will set the standard basic ROS environment variables.
 
 
 
Please add the following to the bottom of your ~/.bashrc script.
 
 
 
If using ROS Indigo:
 
<syntaxhighlight lang="bash" enclose="div">
 
source /opt/ros/indigo/setup.bash
 
</syntaxhighlight>
 
 
 
 
 
==== Set ROS_MASTER_URI ====
 
 
 
[http://wiki.ros.org/ROS/EnvironmentVariables#ROS_MASTER_URI ROS_MASTER_URI] - Allows the development PC to locate the master. This will typically be the hostname of the robot.
 
 
 
Please add the following to the bottom of your ~/.bashrc script.
 
<syntaxhighlight lang="bash" enclose="div">
 
export ROS_MASTER_URI=http://baxter_hostname:11311
 
</syntaxhighlight>
 
Where 'baxter_hostname' is the [[Robot_Hostname hostname of your robot]
 
 
 
==== Set ROS_IP *OR* ROS_HOSTNAME ====
 
It will be necessary for other processes to be able to communicate to and from your development PC. For this reason, setting [http://wiki.ros.org/ROS/EnvironmentVariables#ROS_NAMESPACE ROS_IP or ROS_HOSTNAME] advertises your node for networked communication.
 
 
 
Please add the ROS_IP (only if not using ROS_HOSTNAME):
 
<syntaxhighlight lang="bash" enclose="div">
 
export ROS_IP='192.168.XXX.XXX'
 
</syntaxhighlight>
 
Modifying where 'your_ip' is the IP address of your PC.
 
 
 
Useful command for identifying your IP address:
 
<syntaxhighlight lang="bash" enclose="div">
 
$ ifconfig
 
# Result will be contained in the 'inet addr' field (Ubuntu) or 'inet' field (Gentoo Robot PC).
 
</syntaxhighlight>
 
 
 
'''Important:''' Only set either ROS_IP '''*OR*''' ROS_HOSTNAME.
 
 
 
Alternatively, you may choose to use the hostname of your development PC.
 
 
 
Please edit the ROS_HOSTNAME field (only if not using ROS_IP):
 
<syntaxhighlight lang="bash" enclose="div">
 
export ROS_HOSTNAME='your_hostname'
 
</syntaxhighlight>
 
Modifying where 'your_hostname' is the hostname of your PC.
 
 
 
'''Important:''' This hostname must be resolvable to Baxter. To test if your hostname is resolvable to Baxter, please visit the development PC [[Hostname Validation]] page.
 
 
 
==== Save and Close ~/.bashrc ====
 
Please save and close your ~/.bashrc
 
 
 
==== Initialize your SDK environment ====
 
From this point forward, your ROS environment setup should be preconfigured upon startup of all new terminals (shells). '''Important:''' You will still need to source your development workspace (~/ros_ws/devel/setup.bash) setup script when compiling code from source in your [http://wiki.ros.org/catkin/workspaces Catkin workspace] - following our setup this will be ~/ros_ws.
 
 
 
Please close your current terminal, and reopen a new terminal instance.
 
 
 
  
 
== Step 7: Verify Environment ==
 
== Step 7: Verify Environment ==
Line 485: Line 251:
 
'''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.
 
'''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.
  
 +
</div>
  
 
== ''Next Step'' ==
 
== ''Next Step'' ==
 
We will verify your network setup in the next section.
 
We will verify your network setup in the next section.
<span style="font-size:130%;">[[Hello_Baxter | '''Hello Baxter!''']]</span>
+
<span style="font-size:130%;">[[Hello_Robot | '''Hello Robot!''']]</span>

Revision as of 14:07, 21 October 2016

This tutorial describes the setup of a development workstation

Required Hardware

Step 1: Install Ubuntu

Current required version: Ubuntu 14.04

Follow the standard Ubuntu Installation Instructions for 14.04 (Desktop):


Step 2: Install ROS

Current supported version: ROS Indigo

Install ROS Indigo

Configure Ubuntu repositories

Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can follow the Ubuntu guide for instructions on doing this.

Likely, they are already configured properly, and you only need to confirm the configuration.

Setup your sources.list

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'

Setup your keys

$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

Verify Latest Debians

$ sudo apt-get update

Install ROS Indigo Desktop Full

$ sudo apt-get install ros-indigo-desktop-full

NOTE: You may get a prompt about 'hddtemp' during the installation. You can safely answer 'No'.

Initialize rosdep

rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.

$ sudo rosdep init
$ rosdep update

Install rosinstall

$ sudo apt-get install python-rosinstall

Step 3: Create Baxter Development Workspace

Create ROS Workspace

$ mkdir -p ~/ros_ws/src
# ros_ws (short for ROS Workspace)

Source ROS and Build

ROS Indigo (Supported)

Source ROS Setup

$ source /opt/ros/indigo/setup.bash

Build and Install

$ cd ~/ros_ws
$ catkin_make
$ catkin_make install

Step 4: Install Baxter SDK Dependencies

="ROS Indigo (Supported)"

Install SDK Dependencies

$ sudo apt-get update
$ sudo apt-get install git-core python-argparse python-wstool python-vcstools python-rosdep ros-indigo-control-msgs ros-indigo-joystick-drivers

Step 5: Install Baxter Research Robot SDK

Install Baxter SDK

Using the wstool workspace tool, we will checkout all required Baxter Github Repositories into your ROS workspace source directory.

$ cd ~/ros_ws/src
$ wstool init .
$ wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter/master/baxter_sdk.rosinstall
$ wstool update

Source ROS Setup

'''You must use ROS Indigo to use RSDK 1.2.0. Use command below.'''
# ROS Indigo
$ source /opt/ros/indigo/setup.bash

Build and Install

$ cd ~/ros_ws
$ catkin_make
$ catkin_make install

Step 6: Configure Baxter Communication/ROS Workspace

This step describes the configuration and setup of your ROS environment. This section assumes an already configured Network Setup.

The current recommended environment setup: Baxter.sh ROS Environment Setup

"Baxter.sh ROS Environment Setup (Recommended)"


The baxter.sh script is a convenient 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 baxter.sh page.

Download the baxter.sh script

$ wget https://github.com/RethinkRobotics/baxter/raw/master/baxter.sh
$ chmod u+x baxter.sh

Customize the baxter.sh script

Please edit the baxter.sh shell script making the necessary modifications to describe your development PC.

Using your favorite editor (gedit used for example)

$ cd ~/ros_ws
$ gedit baxter.sh

Edit the 'baxter_hostname' field

Baxter's hostname is defaulted as the robot's serial number. The serial number can be located on the back of the robot, next to the power button.

Alternatively, you can find your robot's hostname by plugging a USB keyboard into the back of Baxter and pressing Ctrl+Alt+F3.

# Specify Baxter's hostname
**baxter_hostname="baxter_hostname.local"**

Edit the 'your_ip' field

Modify where 'your_ip' is the IP address of your PC.

**your_ip="192.168.XXX.XXX"**

Useful command for identifying your IP address:

$ ifconfig
# Result will be contained in the 'inet addr' field (Ubuntu) or 'inet' field (Gentoo Robot PC).

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.

You may edit the 'your_hostname' field (only if not using 'your_ip'):

***your_hostname="my_computer.local***

Important: This hostname must be resolvable to Baxter. To test if your hostname is resolvable to Baxter, please visit the development PC Hostname Validation page.

Important: Only set either ROS_IP *OR* ROS_HOSTNAME.

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.

Verify 'ros_version' field

Verify that the the 'ros_version' field matches the ROS version you are running:

This field will default to "indigo"

***ros_version="indigo"***

Save and Close baxter.sh script

Please save and close the baxter.sh script.

Initialize your SDK environment

From this point forward, your ROS environment setup should be as simple as sourcing the baxter.sh script from the root of your Catkin workspace:

$ cd ~/ros_ws
$ . baxter.sh

Step 7: Verify Environment

A useful command for viewing and validating your ROS environment setup is:

$ env | grep ROS

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.

Next Step

We will verify your network setup in the next section. Hello Robot!