Mac OS X Installation Instructions (10.5 or later)

SVN Based Install (download-and-compile)

Pre Install

  1. Install Apple's Developer Tools: http://developer.apple.com/Tools

  2. Install MacPorts http://www.macports.org/install.php

  3. If you have problems, you may find help at ROS/OSX

ROS will work with either Python 2.5 ("py25") or Python 2.6 ("py26"). However, many packages built on top of ROS still use hard-coded py25 dependencies in their rosdep.yaml files. You will have to change each of these if you are using py26. Here are instructions for using Python 2.5:

  • 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/

Note: The symlink step above can fail if you have a system installation of a Python framework (which can happen with more recent versions of OS X). Also, this is probably not the right way to adjust the way that frameworks are located. We invite advice and ideas from OS X users on this issue.

On Mac OS X 10.6, the following additional steps might be needed:

sudo easy_install -U pyyaml
sudo port install mercurial

In order for the compiler (and rosboost-cfg) to find the correct versions of your libraries, you'll need something like this in your .bashrc if you don't have it already:

  • export CPATH=/opt/local/include
    export LIBRARY_PATH=/opt/local/lib
    export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/opt/local/lib
    export PATH=/opt/local/bin:$PATH

If your .profile doesn't already source .bashrc, you'll also need to do that:

  • echo 'source .bashrc' >> .profile`

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

Then use rosinstall to download your preferred C-Turtle variant:

  • ROS-only: Includes basic ROS and tutorials.

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

    Base Install: ROS plus robot-generic stacks (e.g. navigation, visualization)

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

    PR2 Install: ROS plus PR2-specific stacks, including PR2 simulator.

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

    PR2 All Install: ROS plus PR2 and bleeding edge research/experimental stacks.

    • rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=cturtle&variant=pr2all&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

Tutorials

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

Wiki: cturtle/Installation/OSX (last edited 2011-03-01 03:08:12 by Marrok)