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.
Step 1: Go to System -> Administration -> Software & Updates
Step 2: Check the checkboxes to repositories to allow “restricted,” “universe,” and “multiverse.”

Software and Updates
Step 3: Setup your sources.list
sudo sh -c ‘echo “deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main” > /etc/apt/sources.list.d/ros-latest.list’
Step 4: Setup your keys
wget http://packages.ros.org/ros.key -O – | sudo apt-key add –
Step 5: To be sure that your Ubuntu Mate package index is up to date, type the following command
sudo apt-get update
Step 6: Install ros-kinetic-desktop-full
sudo apt-get install ros-kinetic-desktop-full
Step 7: Initialize rosdep
sudo rosdep init
rosdep update
Step 8: Setting up the ROS environment variables
echo “source /opt/ros/kinetic/setup.bash” >> ~/.bashrc
source ~/.bashrc
Step 9: Create and initialize the catkin workspace
mkdir -p ~/catkin_workspace/src
cd catkin_workspace/src
catkin_init_workspace
cd ~/catkin_workspace/
catkin_make
Step 10: Add the catkin_workspace to your ROS environment
source ~/catkin_workspace/devel/setup.bash
echo “source ~/catkin_workspace/devel/setup.bash” >> ~/.bashrc
Step 11: Check the ROS environment variables
export | grep ROS

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

turtlesim
The error that you see in the last picture (libEGL warning: DRI2: failed to authenticate) is generally caused by the graphics memory allocation on the Raspberry Pi being too low.
Thank you very much, again, for a 🙂 ‘most excellent’ (: set of ROS/RPi install instructions and, as always, fantastic site. ~ very best2u’n’urs, curtis
Thank you for this nice tutorial
I have installed ROS Kinetic in Ubuntu Mate but in the end it gives me source command not found
Can you help me thank you
Your comment is awaiting moderation.
Hello,
Can you give me more details?
after executing the command ‘source ~/.bashrc’
the result is ‘source: command not found’
bash: /home/aroid/ros_catkin_ws/devel/setup.bash: No such file or directory
thats it…..
what i should do
Probably the quotation marks (“”) are the problem — use an editor like nano and check the last line of ~/.bashrc, remove any extra quotes. The last two lines in my bashrc are:
source /opt/ros/kinetic/setup.bash
source /home/pi/catkin_workspace/devel/setup.bash
While checking check boxes, authenticate is required asking for Password.How can I do next? Thank you~.
You have to insert your password?!
Thank you very much ! It is very useful.
Great!
Worked perfectly!
One of the best way to install a ROS Rasp.
Installation went very smoothly. Thanks!!
Rare to find a tutorial that as clear as this one. Worked correctly the first time.
Thank you.
Bonjour,
Merci beaucoup pour ce tuto fort simple et efficace.
Thierry
Great article! no errors whatsoever. Thank you so much!
i want to connect my kinect xbox with ros kinetic(ubuntu 16.04) in raspberry pi 3 to get a skeletal image.But it asks for OPENNI, when i enter this command ” sudo apt-get install ros-electric-openni-kinect ” it gives an error like unable to locate the package. would you give me a solution for this or any alternate for OPENNI to get a skeletal image using kinect+ubuntu 16.04+ ros+ raspberry pi
Excellent tutorial, thank you very much
worked as a charm.. thanks a lot mate
very nice tutorial just some minor comments.
1) change catkin_make to catkin_make -j2 to avoid the pi freezing.
2) change echo “source ~/catkin_workspace/devel/setup.bash” >> ~/.bashrc to echo “source ~/catkin_workspace/devel/setup.bash” >> ~/.bashrcD
Works flawless!! Thank you very much, it saved me a lot of time! 🙂
thanks its very good.if you put some sample work with kinect its become very nice
wget http://packages.ros.org/ros.key -O – | sudo apt-key add –
what is keys
Sadly, this command doesn’t work for my RPi3 running Raspbian Stretch:
sudo apt-get install ros-kinetic-desktop-full
It said ‘unable to locate package ros-kinetic-desktop-full’. 🙁
Smooth installation THank you
everything seems fine until I typed: roscore
The program roscore is currently not installed. You can install it by typing : sudo apt install python-roslaunch
Sorry to bother while installing ros an error message appears on 1 bad entry specified on list /etc/apt/sources.list.d/ros-latest.list (Component)