Skip to content

takanotaiga/ros2_m1_native

Repository files navigation

ros2_m1_native

This is the shortest path to build Homebrew-independent ROS 2 on Arm64 macOS and run:

  • ros2 run demo_nodes_cpp talker
  • ros2 run demo_nodes_py listener

Prerequisites

  • Apple Silicon macOS (arm64)
  • git
  • Xcode Command Line Tools
  • uv (installed under ~/.local/bin/uv)

1. Install required tools

xcode-select --install
curl -LsSf https://astral.sh/uv/install.sh | sh

Open a new shell, or add uv to PATH:

export PATH="$HOME/.local/bin:$PATH"

2. Clone this repository

git clone <YOUR_REPO_URL> ros2_m1_native
cd ros2_m1_native

3. Build ROS 2 (isolated environment)

./scripts/run_isolated_build.sh

For incremental rebuilds (no clean build):

CLEAN_BUILD=0 ./scripts/run_isolated_build.sh

4. Load runtime environment

source scripts/activate_env.sh
source install/setup.bash

scripts/activate_env.sh also sets Python-related colcon defaults (when unset), so downstream workspaces inherit the same CMake Python settings used to build this ROS 2 install.

5. Run demo nodes

Terminal A:

source scripts/activate_env.sh
source install/setup.bash
ros2 run demo_nodes_py listener

Terminal B:

source scripts/activate_env.sh
source install/setup.bash
ros2 run demo_nodes_cpp talker

Success condition: Terminal A prints I heard: [Hello World: N].

6. Build a custom workspace

source /path/to/ros2_m1_native/scripts/activate_env.sh
source /path/to/ros2_m1_native/install/setup.bash
cd /path/to/your_workspace
uv run colcon build

About

macOS Native ROS 2

Resources

License

Stars

Watchers

Forks

Contributors