Follow the official instructions in ROS wiki:
The next instructions cover this installation process plus some useful additions for Raspberry Pi:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install ros-indigo-ros-base
apt-cache search ros-indigo # to find available packages
sudo apt-get -y install python-rosdep
sudo rosdep init
sudo apt-get -y install python-rosinstall
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
The following package is added in a full tutorial for RPi setup with ROS ( https://github.com/hivebio/ministat-1/wiki/MasterController ):
sudo apt-get -y install ros-indigo-rosbridge-server
And return now to the oficial instalation instructions:
mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src/ catkin_init_workspace cd ..
sudo apt-get install build-essential -y # Fix for the case in which the C++ compiler is not found catkin_make source ~/catkin_ws/devel/setup.bash
[also from https://github.com/hivebio/ministat-1/wiki/MasterController] Get rosserial, a package for ROS communications with small embedded systems (like our slave microcontrollers) which are too lightweight to support the standard ROS TCP/IP messaging.
cd ~/catkin_ws/src/ git clone https://github.com/chuck-h/rosserial.git cd rosserial/ git checkout indigo-devel cd ~/catkin_ws catkin_make install
As a complementary source, in the following post there are TWO images of ROS installed in Raspberry Pi2:
- Raspberry Pi 2, basic ROS INDIGO image 1GB compressed, 16GB uncompressed. raspbian 2015-05-05, updated on 2015-05-019, pi2 overclock from the raspi-config menu [user: pi password: raspberry]
Raspberry Pi 2, FAT ROS INDIGO image 1GB compressed, 16GB uncompressed. ubuntu arm 14.04.02 [user: ubuntu password: ubuntu]
See the full post to get all the details of the customizations of both images.
... And periodically check Maurilio's blog as he wishes to provide more ROS images.