-
-
Notifications
You must be signed in to change notification settings - Fork 17
Install ROS on macOS
Quintin edited this page Apr 4, 2024
·
58 revisions
Although it is not officially supported, we have had success using RoboStack to provide ROS packages.
- Install homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install miniforge:
brew install miniforge
. Runconda init "$(basename "${SHELL}")"
. Restart your shell. Runmamba init zsh
. Restart your shell again. Now you should see "base" in your prompt. We recommend addingmamba deactivate
to the end of your.zshrc
to preserve your Python environment previous to the install. - Install Git LFS:
brew install git-lfs
. You should rungit lfs install
afterward. - Run
mkdir -p ~/catkin_ws/src
and change directory to it withcd ~/catkin_ws/src
- Ensure you have your Git credentials set up. Clone the repository with:
git clone [email protected]:umrover/mrover-ros.git mrover
- Ensure you are in the mrover repository:
cd ~/catkin_ws/src/mrover
- Create the virtual environment, activate it, and configure it (it is OK if the last command complains):
mamba create -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
- Now you should see "ros_env" somewhere in your prompt.
- Install needed packages:
mamba install catkin_tools ros-noetic-ros-base ros-noetic-rviz ros-noetic-xacro ros-noetic-robot-localization
mamba install compilers ninja cmake pkg-config make opencv assimp bullet glfw fmt
- Checkout integration branch containing build scripts:
git checkout integration
- Build dawn:
./scripts/build_dawn.sh
- Install Python dependencies:
pip3 install -e ".[dev]"
-
cd ~/catkin_ws
and docatkin init
- 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.zsh
Optionally you can add the following line to the end of ~/.zshrc
for a shortcut
alias mrover="cd ~/catkin_ws/src/mrover && mamba activate ros_env && source ~/catkin_ws/devel/setup.zsh"
After adding and restarting your shell once, you should now be able to run mrover
from anywhere to navigate to the repository, activate the virtual environment and source the setup script.