[Documentation] [TitleIndex] [WordIndex

  Show EOL distros: 

Ubuntu install of Diamondback

We are building Debian packages for several Ubuntu platforms, listed below. These packages are more efficient than source-based builds and are our preferred installation method for Ubuntu.

If you need to install from source, please see source (download-and-compile) installation instructions.

Installation

Configure your Ubuntu repositories

Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can follow the Ubuntu guide for instructions on doing this.

Setup your sources.list

Setup your computer to accept software from ROS.org.

  • Ubuntu 10.04 (Lucid)

    • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu lucid main" > /etc/apt/sources.list.d/ros-latest.list'

    Ubuntu 10.10 (Maverick)

    • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu maverick main" > /etc/apt/sources.list.d/ros-latest.list'

    Ubuntu 11.04 (Natty)

    • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu natty main" > /etc/apt/sources.list.d/ros-latest.list'

Set up your keys

  • wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

Installation

Make sure you have re-indexed the ROS.org server:

  • sudo apt-get update

There are many different libraries and tools in ROS. We provided four default configurations to get you started. You can also install ROS stacks individually.

  • Desktop-Full Install: (Recommended): ROS, rx, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception

    • sudo apt-get install ros-diamondback-desktop-full

      or click here

    Desktop Install: ROS, rx, rviz, and robot-generic libraries

    • sudo apt-get install ros-diamondback-desktop

      or click here

    ROS-Base: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.

    • sudo apt-get install ros-diamondback-ros-base

      or click here

    Individual Stack: You can also install a specific ROS stack (replace underscores with dashes of the stack name):

    • sudo apt-get install ros-diamondback-STACK
      e.g.
      sudo apt-get install ros-diamondback-slam-gmapping

Environment setup

It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:

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

If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.

If you just want to change the environment of your current shell, you can type:

source /opt/ros/diamondback/setup.bash

Tutorials

Now, to test your installation, please proceed to the ROS Tutorials.

Slackware Installation

The following instructions have not been tested for Electric

Due to its simple vanilla-linux setup and highly customizable design Slackware is a great distribution to pair with ROS when building a custom robot. Unfortunately, it will require a little more setup work from the end-user due to the lack of a proper package-management system. ROS assumes we have multiple non-standard packages installed already, many which Slackware does not currently include. These instructions should help you get past the major initial hurdles. After completing these steps you should be able to run through the ROS/Tutorials without any compile or run-time errors.

SVN Based Install (download-and-compile)

Pre-installation

  • install mercurial? (need some details on this new step for electric)
  • Get super-user access. You will need your system administrator to give you sudo access. If you can login as root yourself you can add sudo access to your account by running:

echo 'your_username ALL=(ALL) ALL' >> /etc/sudoers
  • Install libyaml from source

cd /opt
sudo wget http://pyyaml.org/download/libyaml/yaml-0.1.3.tar.gz
sudo tar -xzf yaml-0.1.3.tar.gz
cd ./yaml-0.1.3 && sudo ./configure && sudo make && sudo make install

You can now sudo rm /opt/yaml-0.1.3.tar.gz if you want to.

  • Build and install python-setuptools from source:

cd /opt
sudo wget http://slackbuilds.org/slackbuilds/13.1/development/pysetuptools.tar.gz
sudo tar -xzf pysetuptools.tar.gz
cd pysetuptools
sudo wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
sudo chmod +x pysetuptools.SlackBuild
sudo ./pysetuptools.SlackBuild

The output you see from building should end with something like: Slackware package /tmp/pysetuptools-0.6c11-i486-1_SBo.tgz created. Now create a directory where you will keep your compiled packages, and move this created package there for safekeeping and install it:

sudo mkdir /opt/installed_tgz
sudo mv /tmp/pysetuptools-0.6c11-i486-1_SBo.tgz  /opt/installed_tgz/
sudo /sbin/installpkg /opt/installed_tgz/pysetuptools-0.6c11-i486-1_SBo.tgz

You can now sudo rm -rf /opt/pysetuptools and the tar.gz file if you want to.

  • Build and install logcxx from source:

cd /opt
sudo wget http://www.gtlib.gatech.edu/pub/apache//logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz
sudo tar -xzf apache-log4cxx-0.10.0.tar.gz
cd apache-log4cxx-0.10.0

Unfortunately there are some issues currently between logcxx and the most recent version of gcc that Slackware uses. We will need to modify the logcxx code as follows.

First download the following two patch files to your log4cxx directory and apply them by issuing these commands:

sudo wget https://issues.apache.org/jira/secure/attachment/12439514/exampleFolder_stringInclude.patch --no-check-certificate
sudo wget https://issues.apache.org/jira/secure/attachment/12439513/cppFolder_stringInclude.patch --no-check-certificate
sudo patch -p1 -i cppFolder_stringInclude.patch
sudo patch -p1 -i exampleFolder_stringInclude.patch

Now you will need to prepend one line that the makers of log4cxx forgot to include in one of the example header files. Do this with the little trick below, or just use your text editor:

sudo touch console_temp.cpp && sudo chmod 777 console_temp.cpp && echo "#include <stdio.h>" | sudo tac src/examples/cpp/console.cpp - | sudo tac > console_temp.cpp && sudo mv console_temp.cpp src/examples/cpp/console.cpp

Now, finally we can build and install log4cxx:

sudo ./configure --prefix=/usr
sudo make
sudo make install

You can now rm the .tar.gz file we downloaded if you want to.

  • easyinstall pyyaml

sudo easy_install pyyaml
  • Build and install wxWidgets (Optional). Many of the ROS graphical tools (turtlesim,rviz,gazebo,pr2_dashboard) assume you have a working installation of wxWidgets. In order to compile and use these tools build and install wxWidgets as follows:

cd /opt
sudo wget http://slackbuilds.org/slackbuilds/13.1/libraries/wxPython.tar.gz
sudo tar xvf wxPython.tar.gz
cd wxPython
sudo wget http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.11.0.tar.bz2
sudo chmod +x wxPython.SlackBuild
sudo ./wxPython.SlackBuild
sudo mv /tmp/wxPython-2.8.11.0-i486-1_SBo.tgz /opt/installed_tgz/
sudo /sbin/installpkg  /opt/installed_tgz/wxPython-2.8.11.0-i486-1_SBo.tgz

You can now sudo rm -rf /opt/wxPython and the .tar.gz file if you want to.

rosinstall

The following lines will download the ROS source code using the rosinstall tool, and bootstrap the installation. The installation downloads all ROS stacks in subdirectories inside the ~/ros directory, one subdirectory for each stack in the rosinstall file.

First install rosinstall:

  • sudo easy_install -U rosinstall

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

  • Desktop-Full Install: (Recommended): ROS Full, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception

    • rosinstall -n ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop-full&overlay=no"

    Desktop Install: : ROS Full, rviz, and robot-generic libraries

    • rosinstall -n ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop&overlay=no"

    ROS-Full: ROS package, build, communication, and graphical tools.

    • rosinstall -n ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=ros-full&overlay=no"

    ROS-Base: (Bare Bones) ROS package, build, and communication libraries.

    • rosinstall -n ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=ros-base&overlay=no"

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.

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

Building Packages

Since rosdep cannnot detect the Slackware OS any rosmake commands will will throw dependency errors. You will need to build packages manually without dependencies using the --no-rosdep flag like in the example below. Compiling rostest and many other simple packages should work for you at this point:

rosmake --no-rosdep rostest

Tutorials

Now, to test your installation, please proceed to the ROS Tutorials.

NOT SUPPORTED

Install ROS Kinetic on Slackware 14.2

This guide has been written and tested for Slackware 14.2 and a ROS Kinetic Desktop Install. If you have a different version of Slackware, steps might be slightly different.

Some other useful references are:

Note: ROS still primarily uses Python 2.7 and you should use that version of python for the installation.

Prerequisites

Install pip if you don't already have it

wget https://bootstrap.pypa.io/get-pip.py 
sudo python get-pip.py

Install ROS tools

Note that for rosdep you need to use the master branch as the latest release does not include some important bug fixes.

git clone https://github.com/ros-infrastructure/rosdep.git
cd rosdep
sudo pip install -U .

sudo pip install -U rosinstall rosinstall_generator wstool

Initialize rosdep

sudo rosdep init
rosdep update

Installing SlackWare package manager

Install sbotools

If you already have sbotools go to the next step

The Slackware installer that ROS uses is sbotools. This installer automates the process of installing packages from SlackBuilds - a third party repository for Slackware Linux. If you don't wish to isntall sbotools you will have to manually install all dependencies.

To install sbotools:

wget https://pink-mist.github.io/sbotools/downloads/sbotools-2.0.tar.gz 
sudo installpkg sbotools-2.0.tar.gz 

Update your list of packages

Make sure to execute this step as some of the dependencies were submitted on SlackBuilds very recently.

sudo sbocheck

Initialize your workspace

mkdir ~/ros_catkin_ws 
cd ~/ros_catkin_ws

Desktop-Full Install:

ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception

This guide has been tested for this installation.

rosinstall_generator desktop_full --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-full-wet.rosinstall
wstool init -j8 src kinetic-desktop-full-wet.rosinstall

Desktop Install (recommended):

ROS, rqt, rviz, and robot-generic libraries

This guide has been tested for this installation.

rosinstall_generator desktop --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-wet.rosinstall
wstool init -j8 src kinetic-desktop-wet.rosinstall

ROS-Comm:

(Bare Bones) ROS package, build, and communication libraries. No GUI tools.

Although not tested for this kind of installation, this guide should work for it as all dependencies should be satisfied.

rosinstall_generator desktop --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-wet.rosinstall
wstool init -j8 src kinetic-desktop-wet.rosinstall

Install remaining dependencies

We should now install the rest of the dependencies for Slackware. We can do that using rosdep which will invoke sbotools and pip to install the missing dependencies.

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

Be careful here. For each SlackBuilds package you will be prompted to confirm installation and optionally install SlackBuilds dependencies of the package. Ideally, you should be fine if you just select the defaults by pressing Enter for all prompts. There is one exception though: when installing VTK and prompted if you want to pass options to the SlackBuild script, select y and pass the option JAVA=yes

If you don't want to use sbotools and pip to install dependencies, instead of the above you can execute

rosdep install --from-paths src --ignore-src --rosdistro kinetic -y -s

This will output a list of commands that rosdep would have otherwise executed. In that list you can find the dependencies that you are missing. It will look like:

 #[sbotools] Installation commands:

 sudo -H sboinstall -r protobuf 
 sudo -H sboinstall -r sbcl
 ...

#[pip] Installation commands:

 sudo -H pip install -U empy
 ...

Build the catkin workspace

Now that we have satisfied all dependencies we are almost ready to go. There are a few issues we need to fix before building.

Set PYTHONPATH

Execute these commands in your current terminal:

PYTHONPATH=$PYTHONPATH:~/ros_catkin_ws/src/catkin/python/catkin 
PYTHONPATH=$PYTHONPATH:~/ros_catkin_ws/install_isolated/lib64/python2.7/site-packages 
PYTHONPATH=$PYTHONPATH:~/ros_catkin_ws/install_isolated/lib/python2.7/site-packages 
export PYTHONPATH 

Fix build issues

If we try to build the workspace now, we will run in build erros due to Slackware managing some packages differently. We are going to fix them by applying a custom-made patch. It makes some slight changes in the source files to fix cmake linking errors and make sure qt5 is used.

Navigate to the ROS-Slackware repo you cloned previously. From there execute the script which will apply the patch. Note that the script expects you to have your workspace in ~/ros_catkin_ws:

./patch.sh

Note you might run into some errors if you did not choose desktop-full installation. Just ignore them.

Build the workspace

We are now ready to build our workspace

cd ~/ros_catkin_ws 
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

Wait for ages until it is done.

Desktop-full install

If you are going for the desktop-full install and you have a 64bit version of Slackware, you are going to run into a build error which will look something like this:

==> Processing catkin package: 'gazebo_plugins'
...
Traceback (most recent call last):
  File "/home/niko/ros_catkin_ws/src/gazebo_ros_pkgs/gazebo_plugins/cfg/GazeboRosCamera.cfg", line 6, in <module>
    from dynamic_reconfigure.msg import SensorLevels
ImportError: No module named msg
CMakeFiles/gazebo_plugins_gencfg.dir/build.make:87: recipe for target '/home/niko/ros_catkin_ws/devel_isolated/gazebo_plugins/include/gazebo_plugins/GazeboRosCameraConfig.h' failed
make[2]: *** [/home/niko/ros_catkin_ws/devel_isolated/gazebo_plugins/include/gazebo_plugins/GazeboRosCameraConfig.h] Error 1
CMakeFiles/Makefile2:1489: recipe for target 'CMakeFiles/gazebo_plugins_gencfg.dir/all' failed
make[1]: *** [CMakeFiles/gazebo_plugins_gencfg.dir/all] Error 2
...
<== Failed to process package 'gazebo_plugins': 
  Command '['/home/niko/ros_catkin_ws/install_isolated/env.sh', 'make', '-j8', '-l8']' returned non-zero exit status 2

This error cannot be prevented beforehand because of a bug in the catkin build system which is currently being fixed. In the meantime, fix the error by navigating to the ROS-Slackware repo you cloned beforehand and execute:

./fixmodules.sh

Note that the script expects you to have your workspace in ~/ros_catkin_ws.

Now get back to the ROS workspace and continue:

cd ~/ros_catkin_ws
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

Everything should install successfully

Finalize installation

source ~/ros_catkin_ws/install_isolated/setup.bash

You are recommended to place this command in your ~/.bashrc to make the changes permanent:

echo "~/ros_catkin_ws/install_isolated/setup.bash" >> ~/.bashrc

Fix a possible build bug

If you are on a Slackware 64bit system, you must fix a future runtime problem which is result of a bug in the catkin build system (currently being fixed). In particular some packages with the same name but different modules were built in both install_isolated/lib64/python2.7/site-packages and install_isolated/lib/python2.7/site-packages. This is incorrect as it causes python errors later.

Navigate to the ROS-Slackware repo you cloned previously and execute from there:

./fixmodules.sh

The script will simply move all modules in install_isolated/lib64/python2.7/site-packages

Enjoy ROS

Issues

Make sure to check the known issues list and possible solutions in my repo https://github.com/nikonikolov/ROS-Slackware.

NOT SUPPORTED


2024-11-16 12:56