Rosanswers logo

This is more a "how did I do it" than a "how do you do it".

The following sequence worked for me. By mixing the instructions from the groovy setup with the instructions from Install from source this is what I did. Note that there are some missing steps (related to dependencies that are on the official reps).

Any comments on better ways to do this are welcome :)

sudo pacman -S python2 gcc boost cmake libyaml yaml-cpp python2-yaml python2-nose python2-paramiko python2-netifaces tinyxml lsb-release bzip2 python2-pip mercurial subversion git pkg-config jshon make

wget https://aur.archlinux.org/packages/pa/packer/packer.tar.gz
tar -zxvf packer.tar.gz 
cd packer
makepkg PKGBUILD 
sudo pacman -U packer*.pkg.tar.xz

sudo packer -S python2-empy log4cxx gtest

sudo pip2 install -U rospkg rosdep rosinstall catkin-pkg wstool

sudo rosdep init
rosdep update

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

./src/catkin/bin/catkin_make_isolated -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so --install --install-space /opt/ros/hydro

Originally posted by loliveira on ROS Answers with karma: 45 on 2014-01-14

Post score: 2

Original comments

Comment by bchr on 2014-01-14:
This should probably go on the Wiki (e.g. http://wiki.ros.org/hydro/Installation/Arch, similarly to the Groovy installation doc: http://wiki.ros.org/groovy/Installation/Arch). I just fixed the automatic PKGBUILD generation for Hydro so AUR packages could also be made rather easily.


1 Answer 1


Rosanswers logo

Installing Hydro with AUR packages

The other possibility (just like for Groovy) is to use AUR packages. If you use yaourt (or packer), you can check the available ROS Hydro packages by typing:

yaourt ros-hydro

To avoid confirmation for all the packages, you can add the --no-confirm option:

yaourt --noconfirm ros-hydro

Then simply pick the packages you want. If we take your example, this would be:

yaourt --noconfirm ros-hydro-ros-comm

Note that packages are currently being added. Even though most official packages have been added, some may still be missing.

Adding new AUR packages

If you want to help packaging for Arch Linux, you can use import_catkin_packages.py available in ros-build-tools. You can fork arch-ros-stacks and contribute by doing this:

# Go to ros-build-tools upstream scripts
cd /path/to/arch-ros-stacks/dependencies/ros-build-tools

# List available packages
python2 import_catkin_packages.py --distro=hydro --list

# Generate PKGBUILD for a given package
python2 import_catkin_packages.py --distro=hydro --output-directory=/path/to/arch-ros-stacks/hydro package_name

# Go to newly created package directory
cd ../../hydro/package_name

# Build, install, add to Git and create AUR source tarball
# You may need to apply some patches in the PKGBUILD (e.g. for Ogre 1.8)
makepkg -if && git add PKGBUILD && makepkg --source

After that, you can upload the new package's *.src.tar.gz to AUR, commit and make a pull request on GitHub. Thus, other Arch Linux users will be able to install your package by simply typing:

yaourt ros-hydro-package-name

Note that you can also create PKGBUILDs manually (just copy another package's PKGBUILD and adapt it), but the automatic process is probably the safest option, since it gets the latest release version, the adequate dependencies, the short description etc.

Originally posted by bchr with karma: 596 on 2014-01-15

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by loliveira on 2014-01-17:
Just installed using this (much better ;) ) method... However I ran insto some dependencies not being met: ros-comm cannot resolve genmsg, and genmsg does require catkin for building (and does not ask for the dependency). Edit: Wrote too soon, there are some "Could not resolve all dependencies".

Comment by bchr on 2014-01-17:
If you find any error, please post on the package's AUR page or on my GitHub fork (http://goo.gl/Ev4Tez). This makes it easier to fix errors. As for dependencies, I simply use the dependencies listed in catkin package.xml and I fix it with rosdep mappings (which are currently being fixed as well).

Comment by loliveira on 2014-01-28:
Sorry for the delay in replying. The problem was with packer, I changed to yaourt and everything worked perfectly.

Comment by bchr on 2014-01-28:
That's good to hear!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.