Skip to content

Installation

Tyler Burnham edited this page Aug 31, 2016 · 2 revisions

The following page will list the full installation instructions.

Prerequisites

The following is a list of the software needed to install and run the code.

  1. Laptop - Kubuntu Trusty (14.04)
  2. Raspberry PI 2 - Ubuntu 14.04 LTS for ARM
  3. ROS - Jade Turtle
  4. Rosserial
  5. Rosserial - Version 0.7.1
  6. Rosserial_Python - Version 0.7.1
  7. Rosserial_Arduino - Version 0.7.1
  8. ROS OpenCV - Version 3.1
  9. ROS BridgeCV - Version 1.11.12

The following software is not required but was used in the installation and deployment of the code.

  1. SSH Server
  2. Vim
  3. Arduino IDE

Installing

Operating System

The following section describes the requirements of the Raspberry Pi 2 OS as well as the connected Laptop. Note: All the following steps must be completed for both installations.

Laptop

ROS is intended to work on linux based operating systems.
Note: Check the current installation page. This project was created in ROS Jade. On the installation page it says it only supports :

“Trusty (14.04), Utopic (14.10) and Vivid (15.04)”

This project was created and tested on Kubuntu Trusty (14.04).
Link to download: http://cdimage.ubuntu.com/kubuntu/releases/14.04/release/
Installation Guide: https://help.ubuntu.com/community/Installation

Raspberry Pi

For the Raspberry PI Ubuntu Trusty for ARM was installed.
Note: Check the current installation page. This project was created in ROS Jade. On the installation page, it says it only supports :

“Trusty (14.04), Utopic (14.10) and Vivid (15.04)”

This project was created and tested on Ubuntu 14.04 LTS for ARM.
Link to image download and installation guide: https://wiki.ubuntu.com/ARM/RaspberryPi

Installing SSH (For the Raspberry PI 2)

sudo apt-get install openssh-server

Finding IP Address of Raspberry PI 2

To find the IP address of the Raspberry PI following the following steps:

  1. Plug a screen into the HTMI port of the Raspberry PI 2 as well as a Keyboard
  2. Ensure the Raspberry Pi is connected to the network.
  3. Power on the Raspberry PI 2
  4. Login to the Raspberry PI 2 using the username and password provided in the credentials document.
  5. Run the command ifconfig -a
  6. Look for the line: inet addr:192.168.1.101 Bcast:10.0.127.255 Mask:255.255.224.0
  7. Note the inet addr. The following numbers are you IP Address.

Note: If you are using the same router the addresses start at 100. It is possible to guess the first few addresses and find it.

Connecting to the Raspberry PI 2

On the Laptop on the same network as the Raspberry PI:

  1. Open a Console
  2. Run the following Command: ssh [email protected]
    Where www.xxx.yyy.zzz represents the IP Address of the Raspberry PI found in the previous step.

Ros Jade

The following commands were taken from the ROS Installation Guide, please reference the link for the full installation procedure.
ROS Installation Guide: http://wiki.ros.org/jade/Installation/Ubuntu.

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://pool.sks-keyservers.net:80 --recv-key 0xB01FA116  
sudo apt-get update  
sudo apt-get install ros-jade-desktop-full  
sudo rosdep init  
rosdep update  
sudo apt-get install python-rosinstall  

Installing Vim

Vim Website: http://www.vim.org/download.php
The following steps are the easy installation method using apt-get

  1. Open a Console
  2. Run the Following Command: sudo apt-get install vim If asked type Y to install
  3. To setup vim run: vim ~/.vimrc
  4. Ensure the following lines are present… (Note to edit the file press (insert))
set number
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab

To save press (esc) then press (:) then type “wq” press (enter)

Installing Git

Git Installation Guide: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Follow the following steps to install Git:
Open a Console and type the following Command

sudo apt-get install git-all

If asked type Y to complete the installation

Cloning the Git Repo

This section walks through the process of cloning the code from Github.
GitHub Code: https://github.com/tylerburnham42/MercerSubProject
GitHub Cloning Guide: https://help.github.com/articles/cloning-a-repository/
Note: The code may need to be forked before it can be worked on

Follow the following steps to clone the Git Repo and configure the email:
Open a console and type the following commands:

cd ~
git clone https://github.com/tylerburnham42/MercerSubProject
cd ~/MercerSubProject
git fetch
git checkout master

To configure the correct email type the following with correct information

git config --global user.email "[email protected]"
git config --global user.name "FirstName LastName"

Add Setup.Bash to the BashRC

vim ~/.bashrc

Add these lines to the end:

source /opt/ros/jade/setup.bash
source ~/MercerSubProject/devel/setup.bash

Ros Serial

Ros Wiki Page: http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup
Rosserial GitHub Page: https://github.com/ros-drivers/rosserial
The software was built and tested on the following versions:

  • Rosserial - Version 0.7.1 (2015-07-06)
  • Rosserial_Python - Version 0.7.1 (2015-07-06)
  • Rosserial_Arduino - Version 0.7.1 (2015-07-06)

sudo apt-get install ros-jade-rosserial sudo apt-get install ros-jade-rosserial-arduino

cd ~/MercerSubProject
catkin_make
catkin_make install

Build Header Files

The following is necessary to recompile the header files. Run this on the first installation or whenever a new custom message used by the arduino is created. Follow the steps below to recompile:
Open the Console and type the following commands:

rm -r ~/sketchbook/libraries/ros_lib/
rosrun rosserial_arduino make_libraries.py ~/sketchbook/libraries

Install Ros OpenCV

The software was built and tested on the following versions:

  • Version 3.1

To install OpenCV use the following guide.
http://docs.opencv.org/3.0-last-rst/doc/tutorials/introduction/linux_install/linux_install.html

Install Ros Bridge_CV

The software was built and tested on the following versions:

  • Version 1.11.12

From: http://wiki.ros.org/cv_bridge

python <vison_opencv dir>/cv_bridge/setup.py build
python <vison_opencv dir>/image_geometry/setup.py build

Install Arduino IDE (Laptop Only)

The software was built and tested on the following versions:

sudo apt-get update && sudo apt-get install arduino arduino-core

Updating Ros Packages

To update all the ros packages:
Open a console
Run the following commands:

sudo apt-get update
sudo apt-get dist-upgrade

If asked type “Y” to complete the installation