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
- Steps to install Arch Linux on armv6 is available here.
- Once arch is installed, you may either follow below steps on pi itself or by chrooting into the system.
- My steps for chrooting are available here.
Building ROS from source for ARMV6
- Install Dependencies
sudo apt-get update && sudo apt-get upgradesudo apt install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
- Init Rosdep
export ROS_OS_OVERRIDE=debian:wheezysudo rosdep initrosdep update
- Init ROS Workspace
mkdir -p ~/ros_ws && cd ~/ros_ws
rosinstall_generator ros_comm --rosdistro noetic --deps --wet-only --tar > noetic.rosinstallwstool 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.rosinstallwstool merge noetic.rosinstallwstool update -t srcrosdep install -y --from-paths src --ignore-src --rosdistro noetic -y -rsudo ./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