Skip to content
Robokinesis
Visit Robokinesis on GitHub
Set theme to dark (⇧+D)

How to setup ROS on Pi Zero W

Raspberry Pi zero is ARMV6 and ROS is not available via apt as debian binaries for ARMV6. I used Arch Linux as base OS and built ROS Noetic from source.

Arch Linux ARM V6 Setup

Building ROS from source for ARMV6

  • Install Dependencies
sudo apt-get update && sudo apt-get upgrade
sudo apt install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
  • Init Rosdep
export ROS_OS_OVERRIDE=debian:wheezy
sudo rosdep init
rosdep update
  • Init ROS Workspace
mkdir -p ~/ros_ws && cd ~/ros_ws
rosinstall_generator ros_comm --rosdistro noetic --deps --wet-only --tar > noetic.rosinstall
wstool init src noetic.rosinstall
  • Resolve Dependencies
rosdep install -y --from-paths src --ignore-src --rosdistro noetic -r
  • Build ROS and Install to /opt/ros/noetic
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/noetic
  • To install additional packages
rosinstall_generator ros_comm package-name --rosdistro noetic --deps --wet-only --tar > noetic.rosinstall
wstool merge noetic.rosinstall
wstool update -t src
rosdep install -y --from-paths src --ignore-src --rosdistro noetic -y -r
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/noetic --pkg pkgname
  • To install any other ROS distro, change noetic to preferred distro name.

Additional Resources: https://askubuntu.com/questions/1249708/connect-raspberry-pi-4-with-ubuntu-server-to-wifi

Author: Mihir Patel