Installation of Ubuntu MATE and ROS Kinetic on Raspberry Pi 2 and Pi 3
In this document, we will guide you on How to Install Ubuntu MATE 16.04.2 LTS and ROS Kinetic on Raspberry Pi.
Step1: Download the image for Ubuntu MATE
Official Download Link for Ubuntu MATE for Raspberry Pi
It comes packaged as an XZ archive so use 7 Zip to extract the IMG file.
Step2: Download and Install Win32 Disk Imager
Installing an OS onto a Raspberry Pi requires you to use another computer to write the image file onto a micro SD card. You must have a way to mount a micro SD card onto the computer using either an inbuilt or external USB reader.
- Insert your micro SD card and launch Win32 Disk Imager.
- Select your extracted Ubuntu Mate IMG file and change the Device to the drive letter of your micro SD Card.
- Click Write to begin the process.
- It will take about 10 minutes to write the image
Step 3: Eject the device safely in Windows, insert it into the Raspberry Pi 3 and power it on.
- Connect Raspberry Pi to Monitor or TV using HDMI cable.
- Select English as the Language and click Continue.
- Select “I don’t want to connect to a wi-fi network right now” and click Continue.
- Select an appropriate location on the map to set the timezone and system locale and click Continue
- Select an appropriate keyboard layout and click Continue.
- Enter an appropriate Name, Username and Computer name and then a password. Select “Log in automatically” and click Continue.
- The installer will now proceed to configure the system.
- When configuration is complete you will see the splash screen below.
- Go to the System Menu in the top left corner and select Preferences – Internet and Network – Network Connections.
- Select “Wired connection 1” under Ethernet and click the Edit button. Click on the “IPv4 Settings” tab at the top.
- Click on the Method drop-down list and select Manual.
- Enter an appropriate IP Address, a Netmask in CIDR notation and the Gateway address. Enter your networks DNS server address. Click Save. Click Close to finish.
How to install ROS Kinetic on Raspberry Pi 3 (Ubuntu Mate)
The ROS framework is compatible with a short list of Linux distributions. Neither the hardware side is not better. There are just few hardware architectures compatible with ROS. Raspberry Pi is one of the development boards compatible in terms of hardware with ROS.
So, I thought to install ROS Kinetic on the Raspberry Pi 3 running Ubuntu Mate. But only a certain version of Ubuntu Mate is compatible with ROS and Raspberry Pi 3, it is about the Ubuntu MATE for Raspberry Pi 3. This is an OS version released last year and include support for the WiFi and Bluetooth modules integrated into the Pi 3.
The OS version used by me on Raspberry Pi 3 is Ubuntu MATE 16.04.2.
The ROS version that I have installed is Kinetic Kame. Kinetic was released early last year and is compatible with Ubuntu Mate 16.04. I chose this version for two reasons:
- it will be officially supported for the next five years;
- it is the most complete version after Indigo;
The first step in installing ROS on Raspberry Pi 3 is called Mate. Ubuntu Mate. The operating system is simple to install. I followed the steps on the download page, and within minutes I managed to have a Pi 3 running Ubuntu Mate.
What you find below are the steps to install ROS Kinetic on the Raspberry Pi 3.
Step1 : Go to System -> Administration -> Software & Updates
Step2 : Check the checkboxes to repositories to allow “restricted,” “universe,” and “multiverse.”
Software and Updates
Step3 : Setup your sources. List
Step4 : Setup your keys
Step5 : To be sure that your Ubuntu Mate package index is up to date, type the following command
Step6 : Install ros-kinetic-desktop-full
Step7 : Initialize rosdep
Step8 : Setting up the ROS environment variables
Step9 : Create and initialize the catkin workspace
Step10 : Add the catkin_workspace to your ROS environment
Step11 : Check the ROS environment variables
The setup looks like in the picture
Check the ROS installation
- Open a new terminal and type: roscore
- Open a new terminal and type: rosrun turtlesim turtlesim_node
- ### Create a ROS Workspace
mkdir -p ~/catkin_ws/src
- ### Clone the ROS node for the Lidar in the catkin workspace src dir
- ### Build with catkin
- ### Set environment when the build is complete
- ### Launch demo with rviz
Rviz will pop-up and show a background grid. The “view” from the laser scanner will be marked in red. The laser scanner is positioned at the center of the grid, it has a range of roughly 15cm to 6 meters, so you’ll be able to see everything around it on its scanning plane within that range.