Revision 105 as of 2009-12-03 03:29:23

Clear message

See also: Downloading source code

Step 1: preinstall (os-specific)

This step brings your machine up to the minimal functionality needed to run the ROS installer: gcc, Python 2.5+, PyYaml, CMake, Subversion, and wget.

Ubuntu 08.04 and newer:

sudo apt-get install build-essential python-yaml cmake subversion

Fedora 11:

sudo yum groupinstall 'Development Tools'
sudo yum install wget cmake PyYAML

Arch Linux:

sudo pacman -S python cmake wget
yaourt -S python-yaml

Mac OS X 10.5 (experimental):

One can use any version of python

sudo port -v selfupdate
sudo port install wget cmake py25-yaml python_select
sudo python_select python25
sudo ln -s /opt/local/Library/Frameworks/Python.framework /Library/Frameworks/

The 'rosboost-cfg' cannot generates the correct include/link path of boost library installed by macports. Use the workaround. (you may want add into your .bashrc)

export CPATH=/opt/local/include
export LIBRARY_PATH=/opt/local/lib

Step 2: install (os-neutral)

The rosconfig tool can now install a configuration of ROS on your machine. The following lines will download the ROS source code, and bootstrap the installation. The sample configuration used below will place everything in subdirectories inside the ~/ros directory, one subdirectory for each entry in the rosconfig file. This will take a while, but it should be fully automated once the initial system dependencies are installed by the rosdep tool. (if wget gives you problems with verifying code.ros.org's certificate, use wget with --no-check-certificate)

wget http://ros.org/rosconfig -O ~/rosconfig
chmod 755 ~/rosconfig

You now need to rosconfig to install using a config file. We've created two default configs to use: "all" (kitchen sink) and "ros" (just ROS). The rosconfig format is just a list of SVN repositories, so it's easy to create your own.

Kitchen Sink Install:

~/rosconfig bootstrap -s http://ros.org/rosconfigs/all.rosconfig ~/ros roscpp

ROS-only Install:

~/rosconfig bootstrap -s http://ros.org/rosconfigs/ros.rosconfig ~/ros roscpp

Willow Garage Install: Willow Garage employees should use the wg-all configuration, which pulls ros from the rc tag:

~/rosconfig bootstrap -s http://ros.org/rosconfigs/wg-all.rosconfig ~/ros roscpp

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

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

Then, open a new terminal window, logout/login, or resource your ~/.bashrc file.

Step 3 (optional): demonstration

  • WARNING: this demonstration needs to build a GUI program which requires third-party library. Beginners may want to check "Simple" command-line ROS/Tutorials first.

The following steps will build the navigation system, a 2-d robot simulator (Stage), a graphical interface, and their dependencies. Depending on your machine speed, this could take a while to build.

The following steps are quite generic for building ROS packages. In this case we'll be building the move_base_stage package.

First, let rosdep try to satisfy the system dependencies of move_base_stage on your platform:

rosdep install move_base_stage

If that succeeded, or you otherwise know the dependencies are satisfied, use rosmake to recursively build move_base_stage and its dependencies:

rosmake move_base_stage

If that succeeded, you can now run the demo:

roscd move_base_stage
roslaunch move_base_fake_localization_2.5cm.launch

A window will pop up with a map on it. Click the "Set Goal" button on the top of the window, then left-click, drag, and release somewhere on the map to specify a navigation goal position and heading. The simulated robot will then plan a path and start driving.


Step 4 (really optional): multiple machines

If you are installing ROS on multiple machines, you'll need to run this routine on all of them. However, if your machines have a shared file system (so the ~ directory is shared), you only need to check out and make one time. However, you'll need to:

sudo apt-get install build-essential python-yaml cmake subversion

On all machines first, and:

rosdep install move_base_stage

on all machines after you built ROS on the first machine. This is because while ROS may be shared, the system dependencies are not.

Additionally, if multiple developers are working on the same machine (e.g., a machine onboard a robot), a shared installation might save space and time. (Note that this is somewhat more complicated than the single-user installation.)


There is an experimental method to install pre-compiled binaries.