Skip to content

Install ROS on macOS

Quintin edited this page Jan 23, 2024 · 58 revisions

Overview

Although it is not officially supported, we have had success using RoboStack to provide ROS packages.

Steps

  1. Install homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Install miniforge: brew install miniforge. You should run conda init "$(basename "${SHELL}")" and mamba init zsh afterward and restart your shell. After restarting you should see "base" in your prompt. We recommend adding mamba deactivate to the end of your .zshrc to preserve your Python environment previous to the install.
  3. Install Git LFS: brew install git-lfs. You should run git lfs install afterward.
  4. Run mkdir -p ~/catkin_ws/src and change directory to it with cd ~/catkin_ws/src
  5. Ensure you have your Git credentials set up. Clone the repository with: git clone [email protected]:umrover/mrover-ros.git mrover
  6. Ensure you are in the mrover repository: cd ~/catkin_ws/src/mrover
  7. Create the virtual environment, activate it, and configure it (it is OK if the last command complains):
mamba create python=3.9 -n ros_env
mamba activate ros_env
conda config --env --add channels conda-forge
conda config --env --add channels robostack-staging
conda config --env --remove channels defaults
  1. Now you should see "ros_env" somewhere in your prompt.
  2. Install needed packages:
mamba install catkin_tools ros-noetic-ros-base ros-noetic-rviz ros-noetic-xacro ros-noetic-robot-localization
mamba install compilers ccache ninja cmake pkg-config make opencv assimp bullet glfw fmt
  1. Build dawn: ./scripts/build_dawn.sh
  2. Install Python dependencies: pip3 install -e ".[dev]"
  3. cd ~/catkin_ws and do catkin init
  4. Run catkin build. Add -i for extra fun

Every time you open a shell, you need to run: mamba activate ros_env && source ~/catkin_ws/devel/setup.sh

Clone this wiki locally