[Documentation] [TitleIndex] [WordIndex

Hydro Full Install on Debian from source

There are no precompiled binaries of ROS for Debian, while it seems that most of the dependencies are being pulled into the main repositories there are still some missing so compiling requires that the dependencies be made from source as well. This tutorial goes through an example of doing this for a machine running Debian Wheezy.

Configure your Debian repositories Setup your computer to accept software from packages.ros.org:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu wheezy main" > /etc/apt/sources.list.d/ros-latest.list'

Set up your keys:

wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -

Refresh:

sudo apt-get update

Prerequisites

Install bootstrap dependencies :

sudo apt-get install python-rosdep python-rosinstall-generator python-wstool build-essential

Next ensure rosdep has been initialized:

sudo rosdep init
rosdep update

Create a catkin Workspace

In order to build the core packages, you will need a catkin work-space. Create one now:

mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws

Next we will want to fetch the core packages so we can build them. We will use wstool for this. Select the wstool command for the particular variant you want to install: Desktop-Full Install: ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception

rosinstall_generator desktop_full --rosdistro hydro --deps --wet-only > hydro-desktop-full-wet.rosinstall
wstool init -j8 src hydro-desktop-full-wet.rosinstall

This will add all of the catkin or wet packages in the given variant and then fetch the sources into the ~/ros_catkin_ws/src directory. The command will take a few minutes to download all of the core ROS packages into the src folder. The -j8 option downloads 8 packages in parallel. The time out is fairly quick, so if you have download cuts out restart it with the following

wstool update -j 4 -t src

Resolving Dependencies

Before you can build your catkin work-space you need to make sure that you have all the required dependencies. We use the rosdep tool for this:

rosdep install --from-paths src --ignore-src --rosdistro hydro -y -r --os=debian:wheezy

This will look at all of the packages in the src directory and find all of the dependencies they have. Then it will recursively install the dependencies.

Once all of the dependencies below are installed you should be able to run rosdep install excluding the -r option without errors by makeing sure all your dependencies are listed in the base.yaml.

Dependencies not available in the Debian Repositories

At the time this article was written (11/2013) the packages for the following libraries did not exist in the Debian stable repository. Collada and Point cloud needed to be downloaded from their respective developers and compiled. Bullet and Python kitchen are available in the testing/experimental repositories and directions are given to back-port them. Please update this tutorial by removing these steps if you notice that they become available in stable.

One place to do this is in a external folder in your catkin work-space. Also install checkinstall.

mkdir ~/ros_catkin_ws/external_src
sudo apt-get install checkinstall

Experimental Dependencies

If you are running Debian wheezy instead of testing or unstable, you need to get some packages that are only available there. These packages in stable and testing/unstable are often not binary compatible so they need to be back-ported as in the following directions.

Get the unstable source in your apt repository lists.

sudo sh -c 'echo "deb-src http://ftp.us.debian.org/debian unstable main contrib non-free" >> /etc/apt/sources.list'

Add the wheezy-backports repository in your apt repository lists.

sudo sh -c 'echo "deb http://ftp.us.debian.org/debian wheezy-backports main" >> /etc/apt/sources.list'
sudo apt-get update

Installing python-kitchen

apt-get install python-kitchen

Installing Bullet

cd ~/ros_catkin_ws/external_src
mkdir backports
cd backports
sudo apt-get build-dep libbullet-dev
sudo apt-get -b source libbullet-dev
sudo dpkg -i *.deb

Installing Point Cloud

Install the point cloud libraries from a PPA

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 19274DEF
sudo echo "deb http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu maverick main" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install libpcl-all

Install Collada Dom

Download the collada-dom compressed file (tarball) from the official website.

cd ~/ros_catkin_ws/external_src
mv ~/Downloads/collada-dom-2.4.0.tgz .
tar -xzf collada-dom-2.4.0.tgz
cd collada-dom-2.4.0
sudo apt-get install libxml2-dev
cmake .
make
sudo checkinstall make install

When check-install asks for documentation you need to update the package name from "collada-dom" to "collada-dom-dev" otherwise the rosdep install wont find it.

Installing Gazebo

Player Dependency

Download: http://sourceforge.net/projects/playerstage

Implement this fix: http://sourceforge.net/mailarchive/forum.php?thread_name=From_noreply%40sourceforge.net_Sat_Jul_07_17%3A37%3A11_2012&forum_name=playerstage-developers (In our case, filepath is ~/ros_catkin_ws/external_src/player-3.0.2/server/drivers/shell/readlog.cc)

cd ~/ros_catkin_ws/external_src
mv ~/Downloads/player-3.0.2.tar.gz .
tar -xzf player-3.0.2.tar.gz
#fix players libz bug
cd player-3.0.2/
cmake .
make
sudo checkinstall make install

sdformat dependency

Download sdformat via Mercurial. So install Mercurial if you do not have it already:

sudo apt-get install mercurial

cd ~/ros_catkin_ws/external_src
hg clone https://bitbucket.org/osrf/sdformat sdformat
cd sdformat
cmake .
make
sudo checkinstall make install

Build Gazebo

Install build dependencies:

sudo apt-get install build-essential libtinyxml-dev libtbb-dev libxml2-dev libqt4-dev pkg-config  libprotoc-dev libfreeimage-dev libprotobuf-dev protobuf-compiler libboost-all-dev freeglut3-dev cmake libogre-dev libtar-dev libcurl4-openssl-dev libcegui-mk2-dev libopenal-dev

cd ~/ros_catkin_ws/external_src
hg clone https://bitbucket.org/osrf/gazebo gazebo
cd gazebo
hg up gazebo_1.9
cmake .
make
sudo checkinstall make install

Building Ros

Finally run the build and install command. To install somewhere other than your home directory use the --install-space option.

cd ~/ros_catkin_ws
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
echo "source ~/ros_catkin_ws/install_isolated/setup.bash" >> ~/.bashrc

Note: You might want to select a different CMake build type (e.g. RelWithDebInfo or Debug, see http://cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_BUILD_TYPE).

Now you have to reboot.

Report a Bug

<<TracLink(REPO COMPONENT)>>


2024-11-16 14:39