Installing ROS Indigo Igloo on Gentoo Linux


Installation instructions for ROS Indigo Igloo on Gentoo Linux.

  • Category: Tutorials
  • Date: August 2014

Since the new ROS release, Indigo Igloo, does not include installation instructions for Gentoo Linux yet, I have used the instructions to build from source to create a tutorial for installing the newest ROS release on my favorite Linux distribution.

  1. All commands in these instructions will be executed as root (or prefixed with sudo if preferred).

  2. ROS Indigo Igloo (henceforth just Indigo) has to be built using Python 2.7, so use eselect to select the Python 2.7 interpreter. Currently, make.defaults defines PYTHON_TARGETS="python2_7 python3_3", so the Python 2.7 interpreter should be listed.

    $ eselect python list
    Available Python interpreters:
    [1]   python2.7 *
    [2]   python3.3
    [3]   python3.4
    $ eselect python set 1
    
  3. A few of the dependencies require specific USE flags that are not automatically enabled.

    $ mkdir -p /etc/portage/package.use/
    $ echo "sys-libs/zlib minizip" >> /etc/portage/package.use/ros
    $ echo "dev-libs/boost python" >> /etc/portage/package.use/ros
    
  4. Next, use emerge to install a few support packages.

    $ emerge -qvu zlib pyyaml git cmake subversion gentoolkit setuptools layman
    
  5. Some of the dependencies for Indigo are not in the standard portage tree, so add and use an overlay.

    $ layman -a lorelei
    $ echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf
    
  6. Next, the bulk of the dependencies for Indigo that can be found in portage and the overlay will be installed.

    $ emerge -qvu dev-cpp/eigen media-gfx/assimp media-libs/freeimage dev-libs/poco dev-python/nose dev-cpp/gtest dev-libs/tinyxml app-arch/lz4 media-libs/opencv media-libs/qhull dev-libs/log4cxx dev-python/shiboken dev-python/pyside dev-games/ogre dev-cpp/yaml-cpp dev-python/netifaces dev-python/empy dev-libs/boost
    
  7. I noticed that Indigo would only compile against the stable version of dev-python/sip, which consequently requires the stable version of dev-python/PyQt4. If you are using the unstable portage tree (for example, ~amd64), then make sure to specify the stable versions of these two packages. Otherwise, emerge these two packages normally.

    $ emerge -qv =dev-python/sip-4.15.3 =dev-python/PyQt4-4.10.3-r2
    
  8. Next, fetch collada-dom, console-bridge, urdfdom, and urdfdom-headers from external repositories.

    $ cd /usr/local/src
    $ svn co https://collada-dom.svn.sourceforge.net/svnroot/collada-dom/trunk collada-dom
    $ git clone https://github.com/ros/console_bridge.git console-bridge
    $ git clone https://github.com/ros/urdfdom_headers.git urdfdom-headers
    $ git clone https://github.com/ros/urdfdom.git urdfdom
    
  9. For each of the above packages, use cmake the build and install the package to the system

    $ cd collada-dom
    $ mkdir build
    $ cd build
    $ cmake ../ -DCMAKE_INSTALL_PREFIX=/usr
    $ make && make install
    
  10. Use pip to install the ROS installation tools.

    $ pip install -U catkin_pkg rosdep rosinstall_generator wstool rosinstall
    
  11. Choose a installation directory (prefix) for Indigo.

    $ mkdir /opt/ros
    $ export ROS_INSTALL_PREFIX=/opt/ros
    
  12. Next, create a catkin workspace and generate the .install file for the Indigo Desktop Install (or alternatively choose Full-Desktop or Barebones Install).

    $ mkdir ${ROS_INSTALL_PREFIX}/ros_catkin_ws
    $ cd ${ROS_INSTALL_PREFIX}/ros_catkin_ws
    $ rosinstall_generator desktop --rosdistro indigo --deps --wet-only > indigo-desktop-wet.rosinstall
    $ wstool init -j8 src indigo-desktop-wet.rosinstall
    
  13. The next step in the standard installation document is to use rosdep install --from-paths src --ignore-src --rosdistro indigo -y to install all the system dependencies, but all dependencies have been installed in steps 3-9 ; therefore, this step can be skipped.

  14. Set up PYTHONPATH for use with Indigo.

    $ echo "export PYTHONPATH=$PYTHONPATH:${ROS_INSTALL_PREFIX}/ROS/indigo/lib64/python2.7/site-packages:${ROS_INSTALL_PREFIX}/ROS/indigo/lib/python2.7/site-packages" >> /etc/profile.d/ros-indigo.sh
    
  15. Use catkin to build and install Indigo and its packages.

    $ ./src/catkin/bin/catkin_make_isolated --install --install-space ${ROS_INSTALL_PREFIX}/indigo -DCMAKE_BUILD_TYPE=Release -DSETUPTOOLS_ARG_EXTRA="" -DSETUPTOOLS_DEB_LAYOUT=OFF
    
  16. Now that Indigo is installed, proceed with the standard documentation to add your own ROS packages.

Except where otherwise noted, the contents of this post are licensed under Creative Commons Attribution 4.0.

Creative Commons License