Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!

Dr Footleg's Guide Gets Your ROS 2 Raspberry Pi 5 Project Up and Running with Zero Fuss

By building a Docker image, you can enjoy the benefits of ROS 2 support and the Raspberry Pi OS ecosystem side by side.

Gareth Halfacree
4 months agoRobotics

Pseudonymous roboteer "Dr Footleg" has penned a guide to getting the Robot Operating System 2 (ROS 2) up and running on the latest Raspberry Pi 5 as easily as possible — having found many existing tutorials inaccessible.

"ROS 2 on the Raspberry Pi requires the 64bit version of [Raspberry] Pi OS Bookworm, and Docker to run ROS," Dr Footleg explains. "I found the tutorials and documentation assumed a lot of knowledge of both Docker and ROS so it was a challenge to get started. ROS on Linux is not natively supported on Debian (which the Raspberry Pi OS is based on). Most of the guides either tell you a series of commands to run which gets you through, but feeling like you don’t understand much of what is going on, while the documentation offers you endless choices or decisions to make, leaving it difficult to know which way to turn at each step."

The problem stems from a lack of native support: there's no quick route to installing ROS 2 on Raspberry Pi OS, a Debian-based Linux distribution tailored specifically to the Raspberry Pi family of single-board computers. While it's possible to work around the problem by installing the Raspberry Pi-compatible build of Canonical's Ubuntu Linux instead, doing so shuts you out of the Raspberry Pi OS ecosystem — so the good doctor's approach is different: setting ROS 2 up inside a Docker container running on top of Raspberry Pi OS.

The guide expects that you have a Raspberry Pi 5 and that it's already running the latest version of Raspberry Pi OS, based on Debian 12 "Bookworm." From there, it walks through installing Docker, managing the mandatory post-installation setup including the creation of a dedicated docker group and user, and the building of a Docker container for ROS 2 "Rolling Ridley." "The container image will be around 3.3GB in size," Dr Footleg warns, "so make sure you have enough free disk space."

The full guide, including a selection of handy Docker commands and a look at using the TurtleSim tutorial to get to grips with ROS 2 itself, is available on Dr Footleg's blog.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles