This is the shortest path to build Homebrew-independent ROS 2 on Arm64 macOS and run:
ros2 run demo_nodes_cpp talkerros2 run demo_nodes_py listener
- Apple Silicon macOS (arm64)
git- Xcode Command Line Tools
uv(installed under~/.local/bin/uv)
xcode-select --install
curl -LsSf https://astral.sh/uv/install.sh | shOpen a new shell, or add uv to PATH:
export PATH="$HOME/.local/bin:$PATH"git clone <YOUR_REPO_URL> ros2_m1_native
cd ros2_m1_native./scripts/run_isolated_build.shFor incremental rebuilds (no clean build):
CLEAN_BUILD=0 ./scripts/run_isolated_build.shsource scripts/activate_env.sh
source install/setup.bashscripts/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.
Terminal A:
source scripts/activate_env.sh
source install/setup.bash
ros2 run demo_nodes_py listenerTerminal B:
source scripts/activate_env.sh
source install/setup.bash
ros2 run demo_nodes_cpp talkerSuccess condition: Terminal A prints I heard: [Hello World: N].
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