Compile Ros2 Humble for Raspberry Pi Zero W
Problem The system of raspberry pi zero w is currently raspberry pi official os image is armv6hf debian 11, and ROS2 official support only ubuntu debian aarch64, not support arm32, so to use ROS2 on raspberry pi zero w must be built from source. So the problem is that if you compile directly on zero w, obviously because of the hardware (cpu: 1 core, memory: 512M), the compilation will be extremely slow, I also tried to use armhf cross-compiler toolchain to compile the ROS source code on aarch64 system, but there will be a problem of missing system libraries. At the same time, I also consider the consistency of the subsequent development environment and zero w’s original system environment, I decided to use zero w’s native debian 11 armhf system as rootfs, make a docker image, and then run on aarch64 systems (such as raspberry pi 4, jetson agx), so that the compiled ros2 can be run on zero w directly. This way, the compiled ros2 can be run on zero w, and the runtime and compilation environments are consistent, which will be very convenient for subsequent tuning and debugging. ...