Difference between revisions of "Workstation Setup"

Jump to: navigation , search
(Required Hardware)
(Install Intera Robot SDK)
 
(148 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
 
  
 
<div class="title-block">
 
<div class="title-block">
This tutorial describes the setup of a development workstation
+
<span style="font-size:120%;">'''This tutorial describes the setup of a development workstation'''</span>
 
</div>
 
</div>
  
 +
{{TOClimit|limit=2}}
  
 +
<div class="content-block">
 +
 +
== Required Hardware ==
 +
* Sawyer Robot & Developer Workstation
 +
=== Workstation Requirements ===
 +
* A development workstation capable of running '''Ubuntu 16.04 LTS''' and '''ROS Kinetic''' (or '''Ubuntu 14.04 LTS''' and '''ROS Indigo'''), with the following minimum specifications:
 +
** Intel i5 or above
 +
** 4GB Memory or above
 +
** At least 7 GB of free disk space
 +
** Ethernet port
 +
** If any visualization (RViz) or simulation (Gazebo) is required for your application, a [http://gazebosim.org/tutorials?tut=guided_b1&cat=#Systemrequirements '''dedicated NVidia graphics card'''] with proprietary NVidia drivers is recommended
  
 +
</div>
  
 
<div class="content-block">
 
<div class="content-block">
== Required Hardware ==
 
* 1 Sawyer Robot
 
* 1 Development Workstation (Meeting [[System_requirements | Minimum System Requirements]])
 
</div>
 
  
== Step 1: Install Ubuntu ==
+
== Install Ubuntu ==
'''Current required version: Ubuntu 14.04'''
+
 
 +
 
 +
<tabs>
 +
<tab name="Ubuntu 16.04 (Recommended)">
 +
Follow the standard Ubuntu Installation Instructions for '''16.04''' (Desktop):
 +
* Download the Installer Image file, by picking the "[http://releases.ubuntu.com/xenial/ Desktop CD]" image appropriate for your machine:
 +
** [http://releases.ubuntu.com/xenial/ubuntu-16.04.3-desktop-amd64.iso 64-bit (AMD64) .iso image (recommended)] / [http://releases.ubuntu.com/xenial/ubuntu-16.04.3-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]
 +
</tab>
  
Follow the standard Ubuntu Installation Instructions for 14.04 (Desktop):
+
<tab name="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:
 
* Download the Installer Image file, by picking the "[http://releases.ubuntu.com/trusty/ Desktop CD]" image appropriate for your machine:
** 32-bit (Intel x86): http://releases.ubuntu.com/trusty/ubuntu-14.04.3-desktop-i386.iso
+
** [http://releases.ubuntu.com/trusty/ubuntu-14.04.5-desktop-amd64.iso 64-bit (AMD64) .iso image (recommended)] / [http://releases.ubuntu.com/trusty/ubuntu-14.04.5-desktop-i386.iso 32-bit (Intel x86) .iso image]
** 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.
 +
** [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]
 +
</tab>
 +
</tabs>
  
== Step 2: Install ROS ==
+
</div>
 +
 
 +
<div class="content-block">
 +
 
 +
== Open Terminal App ==
 +
Search your computer for the Terminal package, and open it:
  
'''Current recommended version: ROS Indigo'''
+
[[File:terminal.png|500px]]
  
== Install ROS Indigo ==
+
The rest of the workstation setup tutorial will take place in by typing commands in this terminal prompt.
 +
</div>
  
 +
<div class="content-block">
 +
== Install ROS ==
 +
<tabs>
 +
<tab name="ROS Kinetic for Ubuntu 16.04 (Recommended)">
 
=== Configure Ubuntu repositories ===
 
=== 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 />
 
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 />
  
Line 37: Line 72:
  
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
+
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list'
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
=== Setup your keys ===
 
=== Setup your keys ===
 +
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
+
$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Verify Latest Debians ===
+
=== Update to Latest Software Lists ===
 +
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get update
 
$ sudo apt-get update
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Install ROS Indigo Desktop Full ===
+
=== Install ROS Kinetic Desktop Full ===
 +
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ sudo apt-get install ros-indigo-desktop-full
+
$ sudo apt-get install ros-kinetic-desktop-full
 
</syntaxhighlight>
 
</syntaxhighlight>
  
'''NOTE:''' You may get a prompt about 'hddtemp' during the installation. You can safely answer 'No'.
+
=== Initialize rosdep ===
  
=== 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.
 
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">
 
<syntaxhighlight lang="bash" enclose="div">
Line 65: Line 102:
  
 
=== Install rosinstall ===
 
=== Install rosinstall ===
 +
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get install python-rosinstall
 
$ sudo apt-get install python-rosinstall
 
</syntaxhighlight>
 
</syntaxhighlight>
 
</tab>
 
</tab>
<tab name="ROS Hydro">
 
  
== Install ROS Hydro ==
+
<tab name="ROS Indigo for Ubuntu 14.04">
  
'''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 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 />
 
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.''
 
''Likely, they are already configured properly, and you only need to confirm the configuration.''
  
Line 82: Line 119:
  
 
<syntaxhighlight lang="bash" enclose="div">
 
<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'
+
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
=== Setup your keys ===
 
=== Setup your keys ===
 +
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
+
$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Verify Latest Debians ===
+
=== Update to Latest Software Lists ===
 +
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get update
 
$ sudo apt-get update
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Install ROS Hydro Desktop Full ===
+
=== Install ROS Indigo Desktop Full ===
 +
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ sudo apt-get install ros-hydro-desktop-full
+
$ sudo apt-get install ros-indigo-desktop-full
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 103: Line 143:
  
 
=== Initialize rosdep ===
 
=== 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.
 
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">
 
<syntaxhighlight lang="bash" enclose="div">
Line 110: Line 151:
  
 
=== Install rosinstall ===
 
=== Install rosinstall ===
 +
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get install python-rosinstall
 
$ sudo apt-get install python-rosinstall
 
</syntaxhighlight>
 
</syntaxhighlight>
 
</tab>
 
</tab>
<tab name="ROS Groovy (RSDK 1.0 Compatible)">
+
</tabs>
== Install ROS Groovy ==
+
</div>
  
'''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.
+
<div class="content-block">
  
=== Configure Ubuntu repositories ===
+
== Create Development Workspace ==
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 />
+
<tabs>
''Likely, they are already configured properly, and you only need to confirm the configuration.''
+
<tab name="ROS Kinetic for Ubuntu 16.04 (Recommended)">
 
+
=== Create ROS Workspace ===
=== Setup your sources.list ===
 
  
 
<syntaxhighlight lang="bash" enclose="div">
 
<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'
+
$ mkdir -p ~/ros_ws/src
 +
# ros_ws (short for ROS Workspace)
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Setup your keys ===
+
=== Source ROS and Build ===
<syntaxhighlight lang="bash" enclose="div">
+
 
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
+
'''ROS Kinetic'''
</syntaxhighlight>
 
  
=== Verify Latest Debians ===
+
=== Source ROS Setup ===
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get update
 
</syntaxhighlight>
 
  
=== Install ROS Groovy Desktop Full ===
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ sudo apt-get install ros-groovy-desktop-full
+
$ source /opt/ros/kinetic/setup.bash
 
</syntaxhighlight>
 
</syntaxhighlight>
 
'''NOTE:''' You may get a prompt about 'hddtemp' during the installation. You can safely answer 'No'.
 
  
=== Initialize rosdep ===
+
=== Build ===
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">
 
<syntaxhighlight lang="bash" enclose="div">
$ sudo apt-get install python-rosinstall
+
$ cd ~/ros_ws
 +
$ catkin_make
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
</tab>
  
 
+
<tab name="ROS Indigo for Ubuntu 14.04">
== Step 3: Create Baxter Development Workspace ==
 
 
=== Create ROS Workspace ===
 
=== Create ROS Workspace ===
  
Line 168: Line 198:
  
 
=== 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">
 
$ source /opt/ros/indigo/setup.bash
 
$ source /opt/ros/indigo/setup.bash
 
</syntaxhighlight>
 
</syntaxhighlight>
=== Build and Install ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ catkin_make
 
$ catkin_make install
 
</syntaxhighlight>
 
</tab>
 
  
<tab name="ROS Hydro">
+
=== Build ===
=== Source ROS Setup ===
+
 
<syntaxhighlight lang="bash" enclose="div">
 
$ source /opt/ros/hydro/setup.bash
 
</syntaxhighlight>
 
=== Build and Install ===
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ cd ~/ros_ws
 
$ catkin_make
 
$ catkin_make
$ catkin_make install
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
</tab>
 
</tab>
 +
</tabs>
  
<tab name="ROS Groovy">
+
</div>
=== Source ROS Setup ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ source /opt/ros/groovy/setup.bash
 
</syntaxhighlight>
 
  
=== Build and Install ===
+
<div class="content-block">
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ catkin_make
 
$ catkin_make install
 
</syntaxhighlight>
 
  
== Step 4: Install Baxter SDK Dependencies ==
+
== Install Intera SDK Dependencies ==
(This step not required if you are setting up your workstation on Baxter over SSH)
 
  
="ROS Indigo (Recommended)"
+
<tabs>
 +
<tab name="ROS Kinetic for Ubuntu 16.04 (Recommended)">
 +
=== Install SDK Dependencies ===
  
=== Install SDK Dependencies ===
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get update
 
$ 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
+
$ sudo apt-get install git-core python-argparse python-wstool python-vcstools python-rosdep ros-kinetic-control-msgs ros-kinetic-joystick-drivers ros-kinetic-xacro ros-kinetic-tf2-ros ros-kinetic-rviz ros-kinetic-cv-bridge ros-kinetic-actionlib ros-kinetic-actionlib-msgs ros-kinetic-dynamic-reconfigure ros-kinetic-trajectory-msgs ros-kinetic-rospy-message-converter
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
</tab>
  
 +
<tab name="ROS Indigo for Ubuntu 14.04">
 +
=== Install SDK Dependencies ===
  
 +
<syntaxhighlight lang="bash" enclose="div">
 +
$ 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 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 ros-indigo-rospy-message-converter
 +
</syntaxhighlight>
 +
</tab>
 +
</tabs>
  
== Step 5: Install Baxter Research Robot SDK ==
+
</div>
  
'''Current recommended installation: 1.2.0 Source'''
+
<div class="content-block">
  
"1.2.0 Workstation Source (Recommended)"
+
== Install Intera Robot SDK ==
  
=== Install Baxter SDK ===
+
<tabs>
 +
<tab name="Intera 5.3 ROS Kinetic for Ubuntu 16.04 (Recommended)">
 +
=== Download the SDK on your Workstation ===
  
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.
+
Checkout all required Github Repositories into your ROS workspace source directory:
 +
Use git clone or download the packages directly from Github:
  
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws/src
 
$ cd ~/ros_ws/src
 
$ wstool init .
 
$ wstool init .
$ wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter/master/baxter_sdk.rosinstall
+
$ git clone https://github.com/RethinkRobotics/sawyer_robot.git
 +
$ wstool merge sawyer_robot/sawyer_robot.rosinstall
 
$ wstool update
 
$ wstool update
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
=== Source ROS Setup ===
 
=== Source ROS Setup ===
 +
To use ROS Kinetic to use RSDK, use command below:
 +
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
'''You must use ROS Indigo to use RSDK 1.2.0. Use command below.'''
+
# ROS Kinetic
# ROS Indigo
+
$ source /opt/ros/kinetic/setup.bash
$ source /opt/ros/indigo/setup.bash
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Build and Install ===
+
=== Build ===
 +
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ cd ~/ros_ws
 
$ catkin_make
 
$ catkin_make
$ catkin_make install
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
</tab>
 +
<tab name="Intera 5.3 ROS Indigo for Ubuntu 14.04">
 +
=== Download the SDK on your Workstation ===
  
"1.2.0 On-Robot Source"
+
Checkout all required Github Repositories into your ROS workspace source directory:
 
+
Use git clone or download the packages directly from Github:
=== 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">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws/src
 
$ cd ~/ros_ws/src
 
$ wstool init .
 
$ wstool init .
$ wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter/master/baxter_sdk.rosinstall
+
$ git clone https://github.com/RethinkRobotics/sawyer_robot.git
 +
$ wstool merge sawyer_robot/sawyer_robot.rosinstall
 
$ wstool update
 
$ wstool update
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
=== Source ROS Setup ===
 
=== Source ROS Setup ===
 +
To use ROS Kinetic to use RSDK, use command below:
 +
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
# ROS Indigo
+
# ROS Kinetic
 
$ source /opt/ros/indigo/setup.bash
 
$ source /opt/ros/indigo/setup.bash
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Build and Install ===
+
=== Build ===
 +
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ cd ~/ros_ws
 
$ catkin_make
 
$ catkin_make
$ catkin_make install
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
</tab>
  
 +
</tabs>
  
"1.1.1 Indigo Debian"
+
</div>
=== Install Baxter SDK ===
 
<syntaxhighlight lang="bash" enclose="div">
 
$ sudo apt-get update
 
$ sudo apt-get install ros-indigo-baxter-sdk
 
</syntaxhighlight>
 
  
 +
<div class="content-block">
  
 +
== Configure Robot Communication/ROS Workspace ==
 +
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/>
  
=== Install Baxter SDK ===
+
'''Important Note:''' Connect to the robot via the ethernet port on the outside of the Controller. Connecting to the ethernet port inside the Controller door will not work (this is a diagnostic port that is only accessible by Rethink Employees).
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">
+
[[File:Ethernet_Port.png]]
$ 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>
 
  
 +
See [[Networking | Network Setup]] for recommended network configurations.
  
== Step 6: Configure Baxter Communication/ROS Workspace ==
+
=== intera.sh ROS Environment Setup ===
This step describes the configuration and setup of your [http://wiki.ros.org/ROS/EnvironmentVariables ROS environment]. This section assumes an already configured [[Networking | Network Setup]].
 
  
'''The current recommended environment setup: Baxter.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.
  
"Baxter.sh ROS Environment Setup (Recommended)">
+
Further information and a detailed description is available on the [[SDK_Shell]] page.
  
 +
=== Copy the intera.sh script ===
  
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.
+
The intera.sh file already exists in intera_sdk repo, copy the file into your ros workspace.
 
 
Further information and a detailed description is available on the [[baxter.sh]] page.
 
 
 
==== Download the baxter.sh script ====
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ wget https://github.com/RethinkRobotics/baxter/raw/master/baxter.sh
+
$ cp ~/ros_ws/src/intera_sdk/intera.sh ~/ros_ws
$ chmod u+x baxter.sh
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==== Customize the baxter.sh script ====
+
=== Customize the intera.sh script ===
  
Please edit the baxter.sh shell script making the necessary modifications to describe your development PC.
+
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)
 
Using your favorite editor ([https://wiki.gnome.org/Apps/Gedit gedit] used for example)
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ cd ~/ros_ws
 
$ cd ~/ros_ws
$ gedit baxter.sh
+
$ gedit intera.sh
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==== Edit the 'baxter_hostname' field ====
+
=== Edit the 'robot_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.
+
Your robot's hostname is defaulted as the '''Controller's Serial Number''' and NOT the Robot's Serial Number. The serial number can be located on the back of the robot's controller box. Unless you intend to modify the default [[Networking]] configuration, leave the ".local" suffix on the end of the Controller's Serial Number in the '''robot_hostname.local''' field.<br/>
  
Alternatively, you can find your robot's hostname by plugging a USB keyboard into the back of Baxter and pressing Ctrl+Alt+F3.
+
=== Edit the 'your_ip' field ===
<syntaxhighlight lang="bash" enclose="div">
 
# Specify Baxter's hostname
 
**baxter_hostname="baxter_hostname.local"**
 
</syntaxhighlight>
 
  
==== Edit the 'your_ip' field ====
+
Modify where 'your_ip' is either your computer's hostname or the IP address of your PC. We advise against using WiFi connections between your robot and workstation.
Modify where 'your_ip' is the IP address of your PC.
 
  
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
**your_ip="192.168.XXX.XXX"**
+
your_ip="192.168.XXX.XXX"
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 359: Line 361:
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
 
$ ifconfig
 
$ ifconfig
# 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).
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
  
 
<div class="toccolours mw-collapsible mw-collapsed">
 
<div class="toccolours mw-collapsible mw-collapsed">
Line 369: Line 369:
 
You may edit the 'your_hostname' field (only if not using 'your_ip'):
 
You may edit the 'your_hostname' field (only if not using 'your_ip'):
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
***your_hostname="my_computer.local***
+
your_hostname="my_computer.local
 
</syntaxhighlight>
 
</syntaxhighlight>
  
'''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:''' This hostname must be resolvable to Sawyer. To test if your hostname is resolvable to Sawyer, please visit the development PC [[Hostname Validation]] page.
  
 
'''Important:''' Only set either ROS_IP '''*OR*''' ROS_HOSTNAME.
 
'''Important:''' Only set either ROS_IP '''*OR*''' ROS_HOSTNAME.
Line 380: Line 381:
 
</div>
 
</div>
 
</div>
 
</div>
==== Verify 'ros_version' field ====
+
 
 +
=== Verify 'ros_version' field ===
 +
 
 
Verify that the the 'ros_version' field matches the ROS version you are running:
 
Verify that the the 'ros_version' field matches the ROS version you are running:
  
This field will default to "indigo"
+
This field will default to "indigo". To use another ROS version, update:
 +
<tabs>
 +
<tab name="ROS Kinetic for Ubuntu 16.04 (Recommended)">
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
***ros_version="indigo"***
+
ros_version="kinetic"
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
</tab>
==== Save and Close baxter.sh script ====
+
<tab name="ROS Indigo for Ubuntu 14.04">
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:
 
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ cd ~/ros_ws
+
ros_version="indigo"
$ . baxter.sh
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
 
</tab>
 
</tab>
<tab name="Standard bashrc ROS Environment Setup">
+
</tabs>
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.
+
=== Save and Close intera.sh script ===
  
==== Customize your ~/.bashrc ====
+
Please save and close the intera.sh script.
  
Please edit the ~/.bashrc to set the ROS environment variables necessary for communication with Baxter.
+
=== Initialize your SDK environment ===
  
Using your favorite editor ([https://wiki.gnome.org/Apps/Gedit gedit] used for example)
+
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">
 
<syntaxhighlight lang="bash" enclose="div">
$ gedit ~/.bashrc
+
$ cd ~/ros_ws
 +
$ ./intera.sh
 
</syntaxhighlight>
 
</syntaxhighlight>
  
At the bottom of your ~/.bashrc script add the following:
+
</div>
  
==== Source ROS setup.bash ====
+
<div class="content-block">
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.
+
== Verify Environment ==
  
If using ROS Indigo:
+
A useful command for viewing and validating your ROS environment setup is:
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
source /opt/ros/indigo/setup.bash
+
$ env | grep ROS
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
The important fields at this point: 
  
==== Set ROS_MASTER_URI ====
+
'''ROS_MASTER_URI''' - This should now contain your robot's hostname. 
  
[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.
+
'''ROS_IP''' - This should contain your workstation's IP address.
  
Please add the following to the bottom of your ~/.bashrc script.
+
or
<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 ====
+
'''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.
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):
+
Try to get rostopic list from robot by typing following command:
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
export ROS_IP='192.168.XXX.XXX'
+
$ rostopic list
 
</syntaxhighlight>
 
</syntaxhighlight>
Modifying where 'your_ip' is the IP address of your PC.
 
  
Useful command for identifying your IP address:
+
You can see the rostopic list from the command line output similar as following:
<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.
+
[[File:Rostopic_list.png|400px]]
  
Alternatively, you may choose to use the hostname of your development PC.
+
</div>
  
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.
+
<div class="content-block">
  
==== Save and Close ~/.bashrc ====
+
== Setup Rviz ==
Please save and close your ~/.bashrc
 
  
==== Initialize your SDK environment ====
+
We can also setup Rviz to view robot model, start Rviz from a properly initialized environment using:
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.
+
<syntaxhighlight lang="bash" enclose="div">
 +
$ rosrun rviz rviz
 +
</syntaxhighlight>
  
 +
Set the Fixed Frame as <code>/base</code>
  
== Step 7: Verify Environment ==
+
Info: The ‘Fixed Frame’ provides a static, base reference for your visualization. Any sensor data that comes in to rviz will be transformed into that reference frame so it can be properly displayed in the virtual world.
  
A useful command for viewing and validating your ROS environment setup is:
+
[[File:Rviz_Fixed_Frame.png|600px]]
<syntaxhighlight lang="bash" enclose="div">
 
$ env | grep ROS
 
</syntaxhighlight>
 
  
The important fields at this point: 
+
Add robot model into Rviz by clicking add button, then select robot model in the list, press OK to add.
  
'''ROS_MASTER_URI''' - This should now contain your robot's hostname. 
 
  
'''ROS_IP''' - This should contain your workstation's IP address.
+
[[File:Rviz_Add_Model.png|300px]]
  
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.
+
Now you can visualize your robot on Rivz! Next : [[Hello Robot]]
  
  
== ''Next Step'' ==
+
</div>
We will verify your network setup in the next section.
 
<span style="font-size:130%;">[[Hello_Baxter | '''Hello Baxter!''']]</span>
 

Latest revision as of 23:22, 14 August 2018

This tutorial describes the setup of a development workstation

Required Hardware

  • Sawyer Robot & Developer Workstation

Workstation Requirements

  • A development workstation capable of running Ubuntu 16.04 LTS and ROS Kinetic (or Ubuntu 14.04 LTS and ROS Indigo), with the following minimum specifications:
    • Intel i5 or above
    • 4GB Memory or above
    • At least 7 GB of free disk space
    • Ethernet port
    • If any visualization (RViz) or simulation (Gazebo) is required for your application, a dedicated NVidia graphics card with proprietary NVidia drivers is recommended

Install Ubuntu

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

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

Open Terminal App

Search your computer for the Terminal package, and open it:

Terminal.png

The rest of the workstation setup tutorial will take place in by typing commands in this terminal prompt.

Install ROS

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 xenial main" > /etc/apt/sources.list.d/ros-latest.list'

Setup your keys

$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

Update to Latest Software Lists

$ sudo apt-get update

Install ROS Kinetic Desktop Full

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

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

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

$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

Update to Latest Software Lists

$ 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

Create Development Workspace

Create ROS Workspace

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

Source ROS and Build

ROS Kinetic

Source ROS Setup

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

Build

$ cd ~/ros_ws
$ catkin_make

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

$ cd ~/ros_ws
$ catkin_make

Install Intera SDK Dependencies

Install SDK Dependencies

$ sudo apt-get update
$ sudo apt-get install git-core python-argparse python-wstool python-vcstools python-rosdep ros-kinetic-control-msgs ros-kinetic-joystick-drivers ros-kinetic-xacro ros-kinetic-tf2-ros ros-kinetic-rviz ros-kinetic-cv-bridge ros-kinetic-actionlib ros-kinetic-actionlib-msgs ros-kinetic-dynamic-reconfigure ros-kinetic-trajectory-msgs ros-kinetic-rospy-message-converter

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 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 ros-indigo-rospy-message-converter

Install Intera Robot SDK

Download the SDK on your Workstation

Checkout all required Github Repositories into your ROS workspace source directory: Use git clone or download the packages directly from Github:

$ cd ~/ros_ws/src
$ wstool init .
$ git clone https://github.com/RethinkRobotics/sawyer_robot.git
$ wstool merge sawyer_robot/sawyer_robot.rosinstall
$ wstool update

Source ROS Setup

To use ROS Kinetic to use RSDK, use command below:

# ROS Kinetic
$ source /opt/ros/kinetic/setup.bash

Build

$ cd ~/ros_ws
$ catkin_make

Download the SDK on your Workstation

Checkout all required Github Repositories into your ROS workspace source directory: Use git clone or download the packages directly from Github:

$ cd ~/ros_ws/src
$ wstool init .
$ git clone https://github.com/RethinkRobotics/sawyer_robot.git
$ wstool merge sawyer_robot/sawyer_robot.rosinstall
$ wstool update

Source ROS Setup

To use ROS Kinetic to use RSDK, use command below:

# ROS Kinetic
$ source /opt/ros/indigo/setup.bash

Build

$ cd ~/ros_ws
$ catkin_make

Configure Robot Communication/ROS Workspace

This step describes the configuration and setup of your ROS environment. This section assumes you have linked your workstation to the robot via Ethernet.

Important Note: Connect to the robot via the ethernet port on the outside of the Controller. Connecting to the ethernet port inside the Controller door will not work (this is a diagnostic port that is only accessible by Rethink Employees).

Ethernet Port.png


See 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.

$ cp ~/ros_ws/src/intera_sdk/intera.sh ~/ros_ws

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 (gedit used for example)

$ cd ~/ros_ws
$ gedit intera.sh

Edit the 'robot_hostname' field

Your robot's hostname is defaulted as the Controller's Serial Number and NOT the Robot's Serial Number. The serial number can be located on the back of the robot's controller box. Unless you intend to modify the default Networking configuration, leave the ".local" suffix on the end of the Controller's Serial Number in the robot_hostname.local field.

Edit the 'your_ip' field

Modify where 'your_ip' is either your computer's hostname or the IP address of your PC. We advise against using WiFi connections between your robot and workstation.

 your_ip="192.168.XXX.XXX"

Useful command for identifying your IP address:

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

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 Sawyer. To test if your hostname is resolvable to Sawyer, 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". To use another ROS version, update:

 ros_version="kinetic"
 ros_version="indigo"

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:

$ cd ~/ros_ws
$ ./intera.sh

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.

Try to get rostopic list from robot by typing following command:

$ rostopic list

You can see the rostopic list from the command line output similar as following:

Rostopic list.png


Setup Rviz

We can also setup Rviz to view robot model, start Rviz from a properly initialized environment using:

$ rosrun rviz rviz

Set the Fixed Frame as /base

Info: The ‘Fixed Frame’ provides a static, base reference for your visualization. Any sensor data that comes in to rviz will be transformed into that reference frame so it can be properly displayed in the virtual world.

Rviz Fixed Frame.png

Add robot model into Rviz by clicking add button, then select robot model in the list, press OK to add.


Rviz Add Model.png


Now you can visualize your robot on Rivz! Next : Hello Robot