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.
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:
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.
In order for the above changes to take effect reopen the terminal or run this command:
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
In order to install the first part of ROS some system dependencies need to manually be satisfied.
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:
Install the PyYAML dependency by executing the lines below:
brew install libyaml
pip install -U PyYAML
pip install mercurial
Install some Catkin Python Dependencies:
pip install -U empy nose
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/
5) make install
Install wxPython by downloading and installing the binary distribution from their development website: http://downloads.sourceforge.net/wxpython/wxPython2.9-osx-188.8.131.52-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-184.108.40.206-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:
Make sure to make the changes take effect:
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
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 rosinstall, rospkg 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:
sudo make install
Verify the installed environment:
You should see:
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”
You’ll now need to update your environment. You can do this by typing:
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
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.