Building ROS hydro from source on Ubuntu 13.10 Saucy Salamander

By Christopher, February 25, 2014

This post will cover the steps I made to build ROS hydro successfully from source on my Ubuntu 13.10 amd64 with German localization settings.

1. Add repositories

http://wiki.ros.org/hydro/Installation/Ubuntu

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

2. The basic building procedure is covered in the article below, but I will list all commands/steps I have used from this tutorial as well, together with links to resources which helped me solving problems and how I solved them. If you want to have an explanation of the steps, please refer to the provided links.

http://wiki.ros.org/hydro/Installation/Source

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

sudo rosdep init
rosdep update

mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws

rosinstall_generator desktop --rosdistro hydro --deps --wet-only
--tar > hydro-desktop-wet.rosinstall

wstool init -j8 src hydro-desktop-wet.rosinstall

rosdep install --from-paths src --ignore-src --rosdistro hydro -y

3. In order to prevent language problems on a non English system, I used following hint.

http://answers.ros.org/question/124081/unicodeencodeerror-while-installing-ros-on-debian/

export LANG=en_US.UTF-8

4. Resolving another build error:

http://answers.ros.org/question/114386/ros-hydro-from-source-on-ubuntu-1310-make-error-in-qt_gui_cpp/

sudo apt-get purge libshiboken-dev shiboken

5. Finish the build process and install ROS to a custom location.

sudo src/catkin/bin/catkin_make_isolated --install

--force-cmake
--install-space /opt/ros/hydro_custom

6. This command needs to be run every time before you are using ROS. For simplification just add it to your .bashrc

source /opt/ros/hydro_custom/setup.bash

7. Check if the installation was successful by running:

roscore

8. Enjoy…!

6 Comments

  1. cleve says:

    I have problem running “sudo src/catkin/bin/catkin_make_isolated –install”
    I got this error

    ==> Processing catkin package: ‘catkin’
    ==> cmake /home/knight/ros_catkin_ws/src/catkin -DCATKIN_DEVEL_PREFIX=/home/knight/ros_catkin_ws/devel_isolated/catkin -DCMAKE_INSTALL_PREFIX=/home/knight/ros_catkin_ws/install_isolated in ‘/home/knight/ros_catkin_ws/build_isolated/catkin’
    Unhandled exception of type ‘OSError’:
    Traceback (most recent call last):
    File “src/catkin/bin/../python/catkin/builder.py”, line 832, in build_workspace_isolated
    number=index + 1, of=len(ordered_packages)
    File “src/catkin/bin/../python/catkin/builder.py”, line 585, in build_package
    destdir=destdir
    File “src/catkin/bin/../python/catkin/builder.py”, line 350, in build_catkin_package
    run_command_colorized(cmake_cmd, build_dir, quiet, add_env=add_env)
    File “src/catkin/bin/../python/catkin/builder.py”, line 170, in run_command_colorized
    run_command(cmd, cwd, quiet=quiet, colorize=True, add_env=add_env)
    File “src/catkin/bin/../python/catkin/builder.py”, line 188, in run_command
    raise OSError(“Failed command ‘%s’: %s” % (cmd, e))
    OSError: Failed command ‘[‘cmake’, ‘/home/knight/ros_catkin_ws/src/catkin’, ‘-DCATKIN_DEVEL_PREFIX=/home/knight/ros_catkin_ws/devel_isolated/catkin’, ‘-DCMAKE_INSTALL_PREFIX=/home/knight/ros_catkin_ws/install_isolated’]’: [Errno 2] No such file or directory
    <== Failed to process package 'catkin':
    Failed command '['cmake', '/home/knight/ros_catkin_ws/src/catkin', '-DCATKIN_DEVEL_PREFIX=/home/knight/ros_catkin_ws/devel_isolated/catkin', '-DCMAKE_INSTALL_PREFIX=/home/knight/ros_catkin_ws/install_isolated']': [Errno 2] No such file or directory
    Command failed, exiting.

  2. Vincent says:

    Thanks for the tutorial, it worked fine for me!
    One remark: As a Ubuntu newbie it took me a while to find out that those commands all run in one line:

    sudo src/catkin/bin/catkin_make_isolated –install

    –force-cmake
    –install-space /opt/ros/hydro_custom

  3. Rafael says:

    Thanks for this tutorial! The installation went fine according to your comments. However, if I try to compile any package, for example:
    cd ~/ros_catkin_ws
    catkin_make rviz

    it says:

    CMake Error at catkin/cmake/catkin_workspace.cmake:89 (message): This workspace contains non-catkin packages in it, and catkin cannot build a non-homogeneous workspace without isolation.

    How am I supposed to compile packages in this workspace?

    in the created catkin workspace, there is an error.

  4. Cam says:

    I’m getting the same error as cleve.

    It fails when processing catkin package:’catkin’

What do you think?

You must be logged in to post a comment.