[Documentation] [TitleIndex] [WordIndex

Archlinux Installation Instructions

WARNING!!! Installing fuerte on Arch Linux can be done but it's not a clean or well documented process yet.:

Prerequisites

Here's a list of Arch Linux packages to install before you get started.

jshon is required for packer to execute correctly.

AUR Packages

You will need to build some packages from AUR. I use packer to do this but you can also do it by hand or with other build tools. First get packer which is just a bash script which adds extra capabilities to pacman.

Now make packer executable with a "chmod a+x packer" add packer to your PATH, for example bash would be something like:

Next use packer to build and install these packages from AUR.

Note: As of this writing, python-empy does not support Python 3, but the package build system may attempt to use Python 3 to install it. To work around this, edit 'PKGBUILD' to use python2 to run setup.py, rather than python.

While you are at it you may as well install the AUR packages required for the higher-level build. Note: pcl-ros takes a while to build.

Note: If you are using 64-bit Arch Linux, you may get an error about a conflict with gcc-libs-multilib. To resolve this, manually install gcc-libs-multilib with pacman. See this wiki page for further information.

The Python Issue

There are presently issues with the different ways Ubuntu and Arch deal with python. Basically Ubuntu has 'python' and 'python3' while Arch has 'python2' and 'python3' with /usr/bin/python linked to python3. Various techniques for handling this have been proposed. Select one of the following or add a technique if you have a suggestion.

Python Workaround 1

Link python -> python2

WARNING: This has the potential to break a lot of system packages that expect /usr/bin/python to be python3 instead of python2.

Python Workaround 2

Since changing the link /usr/bin/python to point to python2 might have unforeseen side effects like breaking other packages that use python, fixing all #!/usr/bin/env python lines in ROS should be preferred. This can be done with the following shell command:

for file in $(grep -rl 'env python *$' .); do
    sed -i 's/env python *$/env python2/g' $file
done

Note: the command changes all python scripts without notification. Only execute it in your ROS directory.

Python Workaround 3

This seems to be necessary to get ROS to start compiling on the newest Arch Linux 64.

Run the following shell script in ~/ros-underlay:

for file in $(grep -rl '/usr/bin/python *$' .); do
        sed -i 's/\/usr\/bin\/python *$/\/usr\/bin\/python2/g' $file
done

Then rename the 'empy' cmake file.

mv ~/ros-underlay/catkin/cmake/empy.cmake ~/ros-underlay/catkin/cmake/python-empy.cmake

ROS Python Tools

You will need to install rosinstall and rospkg using easy_install (advanced options for easy_install):

SVN Based Install (download-and-compile)

There is an AUR package to automate the core libraries install (the 'install core libraries' step below). It's called ros-core

rosinstall

The following steps requires two separate installation steps and will compile ROS-related code into two separate places/layers:

  1. Download and install the underlying core ROS libraries and tools into /opt/ros/fuerte.

  2. Download and build higher-level ROS libraries using rosmake in ~/ros.

The compiled code from (1) is installed into /opt/ros/fuerte. While it is possible to install elsewhere (e.g. /usr), this is not well tested and you will encounter various problems along the way (e.g. having to change rosinstall files, having to manually install system dependencies, etc...). Please see REP 122: Filesystem Hiearchy Layout for more detailed documentation on how the installed files are placed.

The compiled code from (2) is simply built using rosmake, which is familiar to users of previous versions of ROS. The higher-level ROS stacks are download and build in subdirectories inside the ~/ros directory.

Layer 1: Install core libraries

The following instructions will create a system install of the core ROS libraries and tools. The installation is done using standard CMake/make tools, so experts can adjust to their liking.

Build and install the underlay into /opt/ros/fuerte:

cd ~/ros-underlay
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/ros/fuerte -DSETUPTOOLS_DEB_LAYOUT=OFF
make -j8
sudo make install

Temporary Note: If the cmake step fails try changing the catkin entry in .rosinstall from 'wg-debs/catkin.git' to 'willowgarage/catkin.git'.

Verify the installed environment:

You should see:

You can delete ~/ros-underlay now, if you wish. The ROS core libraries are now installed onto your system.

Layer 2: Higher-level robotics libraries and tools

Now it's time to create the second layer, which contains your main robotics libraries (e.g. navigation) as well as visualization tools like rviz. You will build this layer using rosmake, but it is not installed.

There are many different libraries and tools in ROS. We provided four default configurations to get you started.

NOTE: The rosinstall installation files below assume that you've installed into /opt/ros/fuerte, so you will need to change them manually if you have a different install path.

NOTE: the instructions above download all stacks inside the ~/ros folder. If you prefer a different location, simply change the ~/ros in the commands above.

NOTE: you may need to add another stack to .rosinstall

Please reference REP 113 for description of other available configurations.

Environment Setup

Shell language:   Bash     Zsh    

You'll now need to update your environment. You can do this by typing:

source ~/ros/setup.bash

It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched, which you can do with the command below:

echo "source ~/ros/setup.bash" >> ~/.bashrc
. ~/.bashrc

For Zsh users, change the last line of ~/ros/setup.zsh to

source $ROS_ROOT/tools/rosbash/roszsh

before running source ~/ros/setup.zsh Similarly, have the setup script called at the start of each new shell session with

echo "source ~/ros/setup.zsh" >> ~/.zshrc
. ~/.zshrc

Build Higher-level/tools (Layer 2)

Note: This presently works but you will need to create a patch. See https://code.ros.org/trac/ros-pkg/ticket/5417 for clues The following should work:

Also: you will need to create a link to https://github.com/hauptmech/rosdistro/raw/arch_pkgs3/rosdep/archlinux.yaml

First, initialize your rosdep. ROS Fuerte comes with rosdep 2. If you get a message that your default sources list exists, then don't worry as it means you've done this before.

Now, use rosdep 2 to install system dependencies. Many of the system dependencies will install into /opt/ros/fuerte and will not be usable if you have changed the installation prefix.

Finally, build the ROS stacks using rosmake.


2024-03-23 12:35