Machine Setup

This page explains how to configure a new Ubuntu 18.04 machine for running lab software. We currently use ROS Melodic on Ubuntu 18.04. Some of our software may still be compatible with our previous platform (ROS Indigo on Ubuntu 14.04), but we do not support it.

These instructions only need to be done once per machine; see the development environment guide for setting up our development environment and building our software.

Install ROS

Install the full ROS distribution. See the official ROS installation instructions for more information and troubleshooting help.

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
$ sudo apt-get update && sudo apt-get install ros-melodic-desktop-full

If ROS was installed previously, you may have an old ROS repository key. Remove the key from your apt keyring. Details about the server breach can be found here.

$ sudo apt-key del 421C365BD9FF1F717815A3895523BAEEB01FA116

Install System Dependencies

Our development process makes heavy use of git, pip, wstool, and catkin-tools. To install these packages, run:

$ sudo apt-get install git python-pip python-catkin-tools python-wstool
$ sudo pip install -U pip  # upgrade outdated pip in Ubuntu packages
$ catkin --version         # check that Catkin is working properly
Issues with Anaconda

Anaconda may conflict with your ROS installation. For example, catkin build may fail and report that python-catkin-tools does not exist. The easiest fix is to use the system installation of Python instead of Anaconda. Change the PATH in your .bashrc file from "/home/anaconda3/bin:$PATH" to "$PATH:/home/anaconda3/bin". In a new shell, which python should now point to the system Python.

Add Apt Repositories

$ sudo apt-add-repository ppa:dartsim/ppa
$ sudo add-apt-repository ppa:personalrobotics/ppa
$ sudo apt-get update

Initialize rosdep

We use rosdep to install system dependencies used by our Catkin packages. To initialize rosdep and add our custom source entries, run:

$ sudo rosdep init
$ sudo wget -P /etc/ros/rosdep/sources.list.d https://raw.githubusercontent.com/personalrobotics/pr-rosinstalls/master/rosdep/10-pr.list
$ rosdep update

Configure Git

Before you make your first commit, please set your username and email address. You should also add the same email address to your Github account by running:

$ git config --global user.name 'John Smith'
$ git config --global user.email 'john.smith@example.com'

Optionally, you may want to enable credential caching. This allows Git to temporarily "remember" your password, which is invaluable when using wstool to checkout a large number of private Git repositories. To enable this, run:

$ git config --global credential.helper 'cache --timeout=900'

Finally, you may want to set the default behavior of the git push command. This is necessary to suppress a warning in the version of Git distributed for Ubuntu 18.04. To do so, run:

$ git config --global push.default simple