[Documentation] [TitleIndex] [WordIndex

Installation Instructions for Hydro in OSX

This page describes how to install Hydro in OSX. OSX is not officially supported by ROS and the installation might fail for several reasons. This page documents how to install using a new experimental packaging of ROS into Portfiles for use with Macports. Please post any issues found with these instructions to the repository issue tracker.


  1. Install Apple's Developer Tools (Xcode 4).

  2. Install the Xcode command line tools via "xcode-select --install" on the command line.
  3. Install MacPorts

  4. Install python27 and set it as the default system interpreter:

sudo port install python27
sudo port select --set python python27

Clone ROS Repository Locally and Update MacPorts Configuration

First clone the repository to somewhere local:

cd ~
git clone https://github.com/kyonifer/ros-macports.git ros-macports

Now we need to tell MacPorts where the local repository clone is. Do this by adding a file:///path/to/clone/location line to /opt/local/etc/macports/sources.conf:

sudo sh -c 'echo file:///$HOME/ros-macports >> /opt/local/etc/macports/sources.conf'

Install the ROS Ports

At this point you can install any ros-hydro-* package that you want. Due to some GUI packages not currently compiling, the ros-hydro-desktop_full package is broken. However, the ros-hydro-* packages have full dependency resolution, so installing high-level packages will also build all of their dependencies. For example:

sudo port install ros-hydro-roslaunch
sudo port install ros-hydro-common_msgs
sudo port install ros-hydro-rosbag

will bring in a lot of the ROS core packages. You can also just build the packages that you want, for a lean install. See the repository for a full list of packages available.

Everything will be installed into /opt/local. As long as ros-hydro-catkin is installed (which is pulled in by every other ros port), we need can source a ROS environment:

source /opt/local/setup.bash

Now a quick check to make sure all is working

which roscore



2024-05-25 13:04