# Ros2 on MacOS AArch64(arm64) Note `update date: 2024/07/21` ## Environment - Mac: MacAir2020(M1) - MacOS versoin: Sonoma 14.5 - python: 3.11 with conda virtual environment ## References 1. [RoboStack](https://robostack.github.io/GettingStarted.html#__tabbed_4_1) 2. [Current support packages list for ros-humble](https://robostack.github.io/humble.html) 3. [Video explain](https://youtu.be/GEgVpdZj3tY?si=oP8kyd2wyUfK1f9A) ## Steps 1. [Install brew](https://brew.sh/zh-tw/) ```shell= /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` 2. [Install conda/miniconda](https://docs.anaconda.com/miniconda/#quick-command-line-install) ```shell= mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh #zsh user ~/miniconda3/bin/conda init zsh #bash user ~/miniconda3/bin/conda init bash ``` 3. Create virtual python environment of python ```shell= conda create -n ros_env python=3.11 conda activate ros_env # this adds the conda-forge channel to the new created environment configuration conda config --env --add channels conda-forge # and the robostack channel conda config --env --add channels robostack-staging # remove the defaults channel just in case, this might return an error if it is not in the list which is ok conda config --env --remove channels defaults ``` 4. Download ROS/ROS2 ```shell= # Install ros-noetic into the environment (ROS1) conda install ros-noetic-desktop # Install ros-humble into the environment (ROS2) conda install ros-humble-desktop ``` > reactivate ```shell= conda deactivate conda activate ros_env ``` 5. Test ```shell= # ros2 rviz2 # open rviz2 ros2 run turtlesim turtlesim_node ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up