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.
Contents
Setup
Install Apple's Developer Tools (Xcode 4).
- Install the Xcode command line tools via "xcode-select --install" on the command line.
Install MacPorts
- Install python27 and set it as the default system interpreter:
sudo port install python27 sudo port select --set python python27
- Do this even if you have python 2.7.x running on your mac
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'
Note that there are three slashes after file:
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 /opt/local/bin/roscore
Caveats
- None of the visualization packages are working yet, which breaks most meta-packages trying to install all of ROS.
ROS is built against MacPorts OpenCV, so if you want specific functionality to be compiled in to OpenCV be sure to build it before ROS with the correct variants flagged, e.g.:
sudo port install opencv +eigen +opencl +python27 +qt4
The same is true for any other dependencies that ROS brings in which you want custom variants of. (You can list available variants for any port by port variant <port_name>). In particular, many ports build by default with X11, such as graphviz and VTK, which may not be what you want.