Mac OS X Installation Instructions (10.5 or later)
SVN Based Install (download-and-compile)
Install Apple's Developer Tools: http://developer.apple.com/Tools
Install MacPorts http://www.macports.org/install.php
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.
rosboost-cfg cannot generate the correct include/link path of the Boost library installed by macports. You will need to use this workaround (you may want add into your .bashrc) :
export CPATH=/opt/local/include export LIBRARY_PATH=/opt/local/lib export PATH=/opt/local/bin:$PATH
The rosinstall tool can now install a configuration of ROS on your machine. The following lines will download the ROS source code, and bootstrap the installation. The sample configuration used below will place everything in subdirectories inside the ~/ros directory, one subdirectory for each entry in the rosinstall file. This will take a while, but it should be fully automated once the initial system dependencies are installed by the rosdep tool.
wget --no-check-certificate http://ros.org/rosinstall -O ~/rosinstall
chmod 755 ~/rosinstall
You now need to rosinstall to install using a configuration file. We've created the following configurations:
- "base" (robot-generic)
- "pr2" (PR2 robot development)
The rosinstall format is just a list of SVN repositories, so it's easy to create your own (see rosinstall for more information on this format).
NOTE: the instructions below assume you are installing to ~/ros. To change this location, simply change the ~/ros in the commands below.
ROS-only: Includes basic ROS and tutorials.
~/rosinstall ~/ros http://ros.org/rosinstalls/boxturtle_ros.rosinstall
Base Install: Recommended, includes ROS, robot-generic libraries, and tutorials.
~/rosinstall ~/ros http://ros.org/rosinstalls/boxturtle_base.rosinstall
PR2 Install: Includes ROS, robot-generic libraries, tutorials, and PR2-specific libraries.
~/rosinstall ~/ros http://ros.org/rosinstalls/boxturtle_pr2.rosinstall
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.sh" >> ~/.bashrc . ~/.bashrc
To install the tutorials you will need at least boxturtle-base installed before running the following, with it setup in your environment. Go back to boxturtle/Installation if you have not installed boxturtle-base.
If you are using binary installs.
If you are using a source install
wget --no-check-certificate http://ros.org/rosinstall -O ~/rosinstall chmod 755 ~/rosinstall ~/rosinstall -o ~/ros-tutorials http://rosinstalls/ros_boxturtle_tutorial.rosinstall
You'll need to configure your environment to enable the tutorials, just like you did with the ROS installation. The command below will automatically load the environment variables in your bash shell:
echo "source ~/ros-tutorials/setup.sh" >> ~/.bashrc . ~/.bashrc
If you just want to change the environment of your current shell, you can type:
Now, to test your installation, please proceed to the ROS Tutorials.