Setting up ROS Hydro on the Raspberry PI 2

From Lofaro Lab Wiki
Jump to: navigation, search

Install repository

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu raring main" > /etc/apt/sources.list.d/ros-latest.list'
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get upgrade

Install the dependencies

$ sudo apt-get install python-pip
$ sudo pip install rosdistro
$ sudo pip install wstool

Install setup tools

$ cd ~/Downloads
$ wget https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.6.tar.gz
$ tar xvf setuptools-1.1.6.tar.gz
$ cd setuptools-1.1.6
$ sudo python setup.py install

Install stdeb

$ sudo apt-get install python-stdeb

Install dependencies

$ sudo pip install rosdep
$ sudo pip install rosinstall-generator
$ sudo pip install wstool
$ pip install -U rospkg
$ sudo apt-get install python-rosdep python-rosinstall-generator build-essential

This downloads all the packages, and takes a couple hours.

$ mkdir ~/ros_catkin_ws
$ cd ~/ros_catkin_ws
$ rosinstall_generator ros_comm --rosdistro hydro --deps --wet-only > hydro-ros_comm-wet.rosinstall
$ wstool init -j8 src hydro-ros_comm-wet.rosinstall
$ sudo rosdep init
$ rosdep update
$ rosdep install  --from-paths src --ignore-src --rosdistro hydro -y --os=debian:wheezy

Now the rosdep fails :

Package sbcl is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it:

 sbcl-source sbcl-doc

E: Package 'sbcl' has no installation candidate ERROR: the following rosdeps failed to install

 apt: command [sudo apt-get install -y sbcl] failed

Apparently the roslisp package uses sbcl, which is not available for the pi, so we have to remove that.

$ cd src
$ wstool rm roslisp
$ rm -rf roslisp
$ cd .. 
$ rosdep install  --from-paths src --ignore-src --rosdistro hydro -y --os=debian:wheezy

That worked! Now it's time to try building it:

$ ./src/catkin/bin/catkin_make_isolated --install

Success!!!!

Make sure you reference the newly created install:

$ echo "source ~/ros_catkin_ws/install_isolated/setup.bash" >> .bashrc
$ source .bashrc

Installing new packages

$ cd ~/ros_catkin_ws/src
$ roslocate info turtlesim | rosws merge -
$ rosws update
$ cd ..
$ rosdep install  --from-paths src --ignore-src --rosdistro hydro -y --os=debian:wheezy
$ ./src/catkin/bin/catkin_make_isolated --install