This documentation is based on: http://www.ros.org/wiki/fuerte/Installation/OSX/Homebrew/Source.  Only the three points in red are different from the official documentation.

Start by installing Homebrew and configuring the environment to use Homebrew.

Requirements

Install Homebrew

You can install Homebrew, after satisfying the requirements, by running this script in a terminal:

ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)

Once the installation is completed update Homebrew to ensure the latest sources:

brew update

Prepare Environment for Homebrew

You will need to add these lines to your ~/.bash_profile to have Homebrew be at the front of the PATH.

export PATH=/usr/local/bin:$PATH

export PYTHONPATH=”/usr/local/lib/python2.7/site-packages:/usr/local/lib/python:$PYTHONPATH”

In order for the above changes to take effect reopen the terminal or run this command:

source ~/.bash_profile

Add the ROS Fuerte Homebrew Tap

Execute the following line to add the official ROS Fuerte Homebrew repository (“tap” in Homebrew terminology).

brew tap ros/fuerte

Bootstrapping

In order to install the first part of ROS some system dependencies need to manually be satisfied.

Env Setup

export ROS_OS_OVERRIDE=osx:homebrew

Python Dependencies

Change the permissions of your Python, Ruby, and Perl library directories to prevent the need for sudo when running pip. This is recommended by the Homebrew developers, but not strictly necessary.

sudo chown -R $USER /Library/Ruby /Library/Perl /Library/Python

Install pip and setup tools from easy_install:

easy_install pip
easy_install setuptools

Install the PyYAML dependency by executing the lines below:

brew install libyaml
pip install -U PyYAML

Install Mercurial:

pip install mercurial

Install some Catkin Python Dependencies:

pip install -U empy nose

Homebrew Dependencies

Install some other dependencies for the Catkin based ROS stacks to be installed:

brew install cmake
cd /usr/local && git checkout 57665ff /usr/local/Library/Formula/boost.rb
brew install boost
cd /usr/local/Library/Formula && curl -O https://raw.github.com/mxcl/homebrew/ac18935be50d603a64363ba9104b91c643992dce/Library/Formula/gtest.rb
brew install gtest
brew install log4cxx
brew install qt

To install swig-wx :

git clone –branch 1.3.29_fuerte git://github.com/ros/swig-wx.git /Library/Caches/Homebrew/swig-wx–git
2) cd /Library/Caches/Homebrew/swig-wx–git/
3) ./configure
4) make
5) make install

Binary Dependencies

Install wxPython by downloading and installing the binary distribution from their development website: http://downloads.sourceforge.net/wxpython/wxPython2.9-osx-2.9.4.0-cocoa-py2.7.dmg

At least Mountain Lion has problems with package format. After mounting the image you have to run

sudo installer -pkg /Volumes/wxPython2.9-osx-2.9.4.0-cocoa-py2.7/wxPython2.9-osx-cocoa-py2.7.pkg/ -target /

After installing wxPython from the binary, you need to add this line to your ~/.bash_profile in order for ROS to find it:

export PATH=/usr/local/lib/wxPython/bin:$PATH

Make sure to make the changes take effect:

source ~/.bash_profile

Install the nVidia CG toolkit for rViz by download their installation package: http://developer.download.nvidia.com/cg/Cg_3.1/Cg-3.1_April2012.dmg

rosinstall

The core ROS libraries and tools are installed into /opt/ros/fuerte. The higher-level ROS libraries are simply built using rosmake, which is familiar to users of previous versions of ROS. The higher-level ROS stacks are downloaded and built in inside the ~/ros directory.

First install rosinstallrospkg and rosdep:

sudo pip install -U rosinstall
sudo pip install -U rospkg
sudo pip install -U rosdep

Install core libraries

The following instructions will create a system install of the core ROS libraries and tools. The installation is done using standard CMake/make tools, so experts can adjust to their liking.

rosinstall –catkin ~/ros-underlay http://ros.org/rosinstalls/fuerte-ros-full.rosinstall

Build and install the underlay into /opt/ros/fuerte:

cd ~/ros-underlay mkdir build cd build

Before running cmake, change the source code of the file: ~/ros-underlay/ros_comm/utilities/xmlrpcpp /src/XmlRpcSocket.cpp. Replace MSG_NOSIGNAL by 0. MSG_NOSIGNAL is a proprietary Linux manifest (i.e. it is non-posix/Xopen). Just replace it with 0 (the number 0).

Now, run cmake.

cmake .. -DCMAKE_INSTALL_PREFIX=/opt/ros/fuerte -DSETUPTOOLS_DEB_LAYOUT=OFF

Finally, build and install the code:

make -j8
sudo make install

Verify the installed environment:

. /opt/ros/fuerte/setup.sh
which roscore

You should see:

/opt/ros/fuerte/bin/roscore

You can delete ~/ros-underlay now, if you wish. The ROS core libraries are now installed onto your system.

Higher-level robotics libraries and tools

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

rosinstall ~/ros “http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=fuerte&variant=desktop-full&overlay=no”

Environment Setup

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” >> ~/.bash_profile . ~/.bash_profile

Build Higher-level/tools

First, initialize your rosdep. ROS Fuerte comes with rosdep 2. If you get a message that your default sources list exists, then don’t worry as it means you’ve done this before.

sudo rosdep init rosdep update

Before finishing installation: remove the <catkin/> tag in /opt/ros/fuerte/share/rospack/manifest.xml.

Now, use rosdep 2 to install system dependencies.

rosdep install -ay

Finally, build the ROS stacks using rosmake.

rosmake -a

Leave a reply

required

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>