ROS on Raspberry Pi
ROS is an amazing system for running robots. At Raspberry Valley, we learn ROS the typical way: with a notebook setup and ROS on Raspberry Pi. Now typically, your notebook should run Ubuntu (On the Pi we run Ubuntu Mate).
This page describes the installation of ROS on Raspberry Pi. For installing ROS on Windows (via WSL), see our guide here, for installing on Ubuntu 16.04 see the official ROS Wiki guide.
ROS Installation on Raspberry Pi - Kinetic
The process of installing ROS on Raspberry Pi depends on which release you wish to target. We will install Kinetic in this guide, but you can similarly install other distros (as long as your Ubuntu version is supported).
The installation process is well documented on the ROS Wiki - Install Kinetic on Ubuntu and the process basically correspond to what we are going to do on Ubuntu Mate. The guide is basically a copy from the ROS wiki, included here for convenience.
- Install Ubuntu Mate on your Pi (our page details how)
- Setup your sources (to accept packages from 'packages.ros.org')
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) 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 the package index
sudo apt update
- Install the full Desktop package. Granted, some apps are too heavy for your Pi, but you don't have to use them. On the other hand, if you have limited space, figure out which package is acceptable for you from the official guide
sudo apt install ros-kinetic-desktop-full
- Initialize rosdep
sudo rosdep init
rosdep update
- Setup the environment (your terminal opens up with the settings below, so you don't have to type so much)
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
- Install remaining dependencies (optional but recommended)
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
Links
- Install ROS Kinetic on Ubuntu 16.04 - the guide applies to Raspberry Pi installation as well