Setup Your Environment

This page will walk you through getting your laptop setup for the course. A few high-level notes, all programming for this course should be done on your laptop. There will be some additional computing equipment provided for the class (Raspberry Pis), however, you should not need to modify any of this equipment.

Some of the components below are listed as recommended (instead of required). You should take these recommendation to mean *highly* recommended. If you decide to deviate from these recommendations you may run into issues later in the course. If you stick with the recommended toolset things will be much smoother.

Operating System

You are required to use Ubuntu. The reason you must use Ubuntu is that it is the official supported OS of ROS (Robot Operating System) which we will be using as our robot programming environment. The ROS installation page lists other platforms as "experimental". You don't want to have operating system difficulties block you from learning the fun stuff (robotics), so please stick with Ubuntu!

The specific version of Ubuntu that I am recommending is 12.04. The reason for this is that it plays nicely with campus wireless and it supports ROS Hydro (which is the version of ROS that I will be using). Ubuntu 14.04 might also be workable, however, please see the ROS section for some caveats.

A note about virtual machines: please do not use a virtual machine for this course. I have not had any luck getting the nVidia graphics cards to play nicely with any virtual machine I have tried so far. The 3-d acceleration of the graphics cards are needed for doing things like running 3-d robot simulators.

Installation Instructions: follow these instructions (must be on Olin internal network to access). I will be having a Linux install party for those that need additional help.

If you are unfamiliar with using Linux, you may find this useful for some of the basics.

Robot Operating System (ROS)

You are required to use ROS as your robotic development environment for this course. Developed at Stanford, matured at Willow Garage, and now managed by the Opensource Robotics Foundation, ROS has become the standard robotics development environment in academia as well as (some) corporate settings. ROS is a beautiful system and we will be delving into its details extensively in this course.

I am recommending that you use ROS Hydro. I have been working with ROS Hydro all summer in preparation for this course and will be using it during the class. You can use Indigo (the latest version) if you are brave, however, if something winds up being incompatible down the line it will be your responsibility to figure out a workaround. Note, that if you use Indigo you should use Ubuntu 14.04.

Installation Instructions: see this page for complete instructions (note: you should do the "Desktop-Full" install).

Programming Language

I am requiring that you use Python 2.7 for the bulk of the course (you may deviate if needed when you go into more open-ended project-based work). ROS has the best support for both C++ and Python (and lesser support for other languages, e.g. MATLAB + Java). C++ would also probably work, but if you use C++ it will make collaborating on team projects difficult. It will also be hard for you to follow along with examples in class.

Installation Instructions: Python should be installed by default with Ubuntu. Some additional packages that you might can be obtained by running the following commands.

Pip (Python package manager):

$ sudo apt-get install python-pip python-dev build-essential  $ sudo pip install --upgrade pip  $ sudo pip install --upgrade virtualenv

Scikit-learn (Machine learning package):

$ sudo apt-get install python-sklearn
$ sudo pip install -U scikit-learn

Text Editor

This is totally up to you. I tend to use vim when I program for myself, but I will be using Sublime Text 2 in the context of this class.

Version Control

You are required to use Git for version control. Git is not necessarily the only game in town, but it has great sites for repository hosting and having everyone using the same version control system will make distributing class examples as well as collaborating on group projects *much* easier.

Installation Instructions:

$ sudo apt-get install git-core

I will not be "teaching" how to use Git as part of the class. However, I will of course be able to help if you run into trouble. If needed, we may schedule an out of class tutorial on how to use Git. For now, please checkout the free eBook "AmGit" by Allen Downey:

Additional Steps to Interface to the Neatos

Installing gstreamer-1.0 (to stream video data from the Raspberry Pi's camera):

$ sudo add-apt-repository ppa:gstreamer-developers/ppa $ sudo apt-get update
$ sudo apt-get install gstreamer1.0*
$ sudo apt-get install gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev

Wireless Network Setup: the Raspberry Pis will be connected to a hidden Olin network. You will have to connect to this network using your laptop in order to connect to the robot. The SSID and password for this wireless network will be given out in class (and note posted on this website for obvious security reasons). IMPORTANT NOTE: this network is *only* for doing work for this class.

Forking the CompRobo Github Repository

Create a fork of this Github repository. See the "Version Control" section to some links on how to use Git.

Once you have forked the repository, make sure you clone it to your laptop. In the directory of your cloned repository do the next steps.

Add an upstream to the original repository:

$ git remote add upstream https://github.com/paulruvolo/comprobo2014.git

Note: to fetch changes to the upstream repository and merge them into your fork, use these commands:

$ git fetch upstream $ git merge upstream/master

Install ROS

Consult this tutorial (make sure to do the desktop-full install)

Install Additional ROS Packages (from binaries)

$ sudo apt-get install ros-hydro-turtlebot ros-hydro-turtlebot-apps ros-hydro-turtlebot-viz ros-hydro-turtlebot-simulator ros-hydro-kobuki-ftdi

Setup your Catkin Workspace

Consult this tutorial

Adding ROS Packages from your GitHub to your Catkin Workspace

To link the ROS Packages from GitHub to your workspace we will be using symlinks. Symlinks allow a directory to basically live in two places on the filesystem. In this case the directory containing the ROS package will live both in your GitHub repository (so you can use git for version control) and in your catkin workspace (so you can run your packages within ROS). The commands below show how to link the packages that are in the base comprobo2014 repository, however, you should repeat these steps for any additional packages you create in the class (note: for these next steps I assume you created your catkin workspace in ~/catkin_ws. If you put the workspace somewhere else, you should adjust accordingly).

$ ln -s path-to-your-github-repo/src/gscam ~/catkin_ws/src
$ ln -s path-to-your-github-repo/src/neato_robot ~/catkin_ws/src
$ ln -s path-to-your-github-repo/src/neato_simulator ~/catkin_ws/src

Installing Additional ROS Packages from Source

There are a few other ROS packages that we will be using in this class that do not have prebuilt binaries available for installation (i.e. you can't simply install them via apt-get). In order to access these packages, all you have to do is clone the appropriate github repository in your ~catkin_ws/src directory and then build the ROS packages (see next step). Even if there is a prebuilt binary available, you may want to build your own so you can insert additional debugging statements or modify the code in some way. The two packages we will be adding initially are hector_mapping and teleop_twist_keyboard.

$ cd ~/catkin_ws/src
$ git clone https://github.com/ros/cmake_modules.git
$ git clone https://github.com/tu-darmstadt-ros-pkg/hector_slam
$ git clone https://github.com/trainman419/teleop_twist_keyboard

Building the ROS Packages in your Catkin Workspace

$ cd ~/catkin_ws
$ catkin_make
$ catkin_make install