Skip to content

Instantly share code, notes, and snippets.

@NikolausDemmel
Last active March 28, 2016 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NikolausDemmel/aeea157e00b2520aedee to your computer and use it in GitHub Desktop.
Save NikolausDemmel/aeea157e00b2520aedee to your computer and use it in GitHub Desktop.
The following tutorial gets you started with compiling ROS from source on Arch Linux.

The following tutorial gets you started with compiling ROS from source on Arch Linux. It combines information from http://wiki.ros.org/jade/Installation/Arch and http://wiki.ros.org/jade/Installation/Source.

I tried this on a fresh archlinux vm using vagrant

vagrant init terrywang/archlinux; vagrant up --provider virtualbox

I needed to edit the Vagrantfile to give some more memory to make roscpp compile. Uncomment the following part

config.vm.provider "virtualbox" do |vb|
  # Customize the amount of memory on the VM:
  vb.memory = "2048"
end

then refresh the vm from the config

vagrant reload

and finally login

vagrant ssh

Inside the vm we first install some base dependencies and make sure that during building ROS packages from source the correct python version is found.

sudo pacman -Sy yaourt python2-pip
yaourt --noconfirm -S python2-rosdep python2-rosinstall-generator 
sudo rosdep init
rosdep update
pip2 install --user -U wstool catkin-tools
export PATH=$HOME/.local/bin:$PATH
cd ~/.local/bin && ln -s /usr/bin/python2 python && cd -

Now we install the ros_base meta package using the package manager. This seems to be the best way to install all dependencies. In general, rosdep is a tool meant to install dependencies, but it seems that on Arch not all rosdep rules are up to date.

yaourt --noconfirm -Sy ros-jade-ros-base

Now we ignore the system-wide install, and download the same packages again from source manually and build them in a catkin workspace.

mkdir ~/ws && cd ~/ws
rosinstall_generator ros_base --rosdistro jade --deps --wet-only --tar > jade-ros-base-wet.rosinstall
wstool init -j4 src jade-ros-base-wet.rosinstall
catkin init
catkin config -DCMAKE_BUILD_TYPE=Release
catkin build

Now src contains all the 77 packages that comprise ros_base, whereas build contains all the cmake build directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment