UPDATE: Instead of installing ROS, you can simply download the VirtualBox virtual machine that we provide, so you can start experimenting quickly.
Being Mac users, we decided to install ROS on one of our Mac Book Pro. We first took the latest release: Fuerte although it is tagged as experimental for Mac OS X. It requires XCode 4 and Homebrew. But, since we could not go much far, we decided to switch to the previous version: ROS Electric. We took the recommended option which is Homebrew-based. Even if is also tagged experimental, the installation worked well. But, we failed to make work the first basic tutorial on Navigating the ROS Filesystem. The very first example with the rospack tool that provides information about installed ROS packages did not work. So, we decided to change our strategy.
We took a PC and installed Ubuntu which is THE supported platform for ROS. The latest available version of Ubuntu is 12.04 LTS (Long Term Support). The installation is straight forward. But, Ubuntu 12.04 has an annoying bug that makes the screen flicker. Fortunately, the problem is solved by simply running the Update Manager and install all available updates.
The installation of ROS Fuerte on Ubuntu 12.04 performed without any notable problem. We provide you in the following with our actual sequence of steps to install ROS. This list is simpler than the one provided on the ROS wiki since we focus on Ubuntu 12.04, and we omit alternatives proposed by ROS developers and added some extra configurations scattered over the tutorials. So, in a terminal evaluate the following commands:
1- Add ros.org to the list of package repositories
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
2- Add to your system ROS keys to allow identifying ROS packages as trusted
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
3- Ensure that the index of packages from ROS.org server are up to date
sudo apt-get update
4- Install the appropriate ROS package. We chose the recommended option which is to install the full ROS
sudo apt-get install ros-fuerte-desktop-full
5- Add ROS variables to the environment of your current terminal
6- Install the recommended standalone command-line tools rosinstall and rosdep. rosinstall eases downloading source trees for ROS packages and stacks. rosdep simplifies installing system dependencies for sources before compilation.
sudo easy_install -U rosinstall vcstools rosdep
7- Create a workspace folder for your experiments.
8- Add to the .bashrc file environment variables that should be set on every session for ROS.
echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc
echo "export ROS_PACKAGE_PATH=~/ros_workspace:$ROS_PACKAGE_PATH" >> ~/.bashrc
echo "export ROS_WORKSPACE=~/ros_workspace" >> ~/.bashrc
9- Add to the .bashrc file environment variables for ROS network setup. We provide here only the code required to run ROS on a single machine which is enough for running the ROS tutorials. If you plan to use more one machine, you should use an alternate configuration as suggested in our tutorial on ROS Networking.
echo "export ROS_HOSTNAME=localhost" >> ~/.bashrc
echo "export ROS_MASTER_URI=http://localhost:11311" >> ~/.bashrc
10- To continue working on the same terminal window you need to set the ROS environment variables defined in the previous step. This has to be done only for this session since the .bashrc file is automatically run when you open a new terminal.
Congratulations! ROS is now installed. You can now proceed with our first tutorial showing how to use ROS. The ROS wiki also provides a series of tutorials. But, you can skip the first chapter which is about installing and configuring the ROS environment. Indeed, we did merge it with the install procedure. So, you can go directly to the second tutorial which is about the ROS file system.
It is worth noting that in the fifth tutorial, when running roscore, you will encounter an exception AttributeError(“‘_DummyThread’ object has no attribute ‘_Thread__block’”,). This issue is due to a bug in python that will hopefully be fixed in the next Ubuntu update. It has no impact on roscore, so you can simply ignore it and enjoy ROS.