Tutorial: Installing Ubuntu, Xenomi, ROS in Raspberry PI 3 - lesc-utfpr/misc GitHub Wiki

Overview

Author: Evandro Sestrem

This is a brief tutorial on how to install and run the Robot Operating System (ROS) (versions 1 and 2) on a Raspberry PI 3 model B running Ubuntu 16.04 with Xenomai 3.06. The tutorial includes the installation and setup of Ubuntu 16.04, Xenomai 3.06 and ROS. Some of these steps are well described in other places (we indicated the links we followed when we created this tutorial).

Ubuntu Image

1- download the Ubuntu Image for Raspberry PI: https://ubuntu-mate.org/download/

Ubuntu without Xenomai:

Enabling Xenomai Kernel

  1. sudo apt-get install subversion
  2. svn checkout https://github.com/thanhtam-h/rpi23-4.9.80-xeno3/trunk/prebuilt
  3. cd prebuilt
  4. chmod +x deploy.sh
  5. ./deploy.sh (your Raspberry can reboot automatically here)
  6. cd /usr/src/linux-headers-4.9.80-v7-xeno3+/
  7. sudo make -i modules_prepare
  8. sudo nano /boot/cmdline.txt
  9. Add below texts to the end of single-line in /boot/cmdline.txt file:
    isolcpus=0,1 xenomai.supported_cpus=0x3

Ubuntu with Xenomai:

Installing ROS 1

To install ROS 1, follow the path described in: http://wiki.ros.org/kinetic/Installation/Ubuntu

Installing ROS 2

At the time this tutorial was written, ROS 2 must be compiled manually in order to install it on Raspberry PI. The Rasberry PI3 does not have enough memory to compile, to avoid this problem:

  1. reboot your Raspberry PI
  2. add swap memory with a pen-drive

Adding swap memory

  1. plug in USB drive to your raspberry pi3
  2. check device name using: sudo fdisk -l (you may see your usb device as /dev/sda1)
  3. sudo mkswap /dev/sda1
  4. sudo swapon /dev/sda1

Compiling ROS 2:

  1. Follow the path described in https://github.com/ros2/ros2/wiki/Linux-Development-Setup Before starting the compilation step (i.e. colcon build --symlink-install), to save memory, close all applications that are not needed, such as browser or another terminal windows.

References:

http://www.simplerobot.net/search/label/rpi23
https://hackmd.io/s/BysaB355-

⚠️ **GitHub.com Fallback** ⚠️