Every day, roboticists write code that helps their robots do amazing new things. And every day, this code remains virtually useless to anyone else, because outside distribution is such a hassle. This isn’t a problem that’s unique to robotics: distributing software in general is tricky to do reliably and well, since you’re never sure what kind of system your end user has. Robotics magnifies this challenge because of the unpredictably exotic mix of hardware and software that makes up a given robot doing a given thing at a given time, combined with the extraordinarily rapid pace of advancement. Given all of this complexity, how do you make code that’s portable and robust and useful to as many people as possible?
Ruffin White, a graduate research assistant at the Institute for Robotics and Intelligent Machines at Georgia Tech (and ex-OSRF intern), discusses how Linux containers can help manage some of these issues. A Linux container is a software package that lives somewhere in between a complete virtual machine and bare code. Using a service called Docker, you can wrap up code, distros, libraries, drivers, and all the other dependencies necessary for your code to function into portable containers that still use the underlying kernel on whatever they end up getting installed on. This allows the container to be very lightweight, while also providing adaptability to local infrastructure.
White gives three different demonstrations of how Docker containers can come in handy for robots in a ROS environment. In the first, he shows how in an educational context, you can use containers to provide a preset environment that can be safely experimented in without any risk. Second, for researchers, containers can allow you to easily test different algorithms, provides a way to publish code in a repeatable and reproducible way, and makes collaborative research much simpler. And finally, industry can take advantage of containers to deploy multiple nodes on different cloud services, or to manage entire swarms of robots at once.
If you want to give ROS a try inside Docker containers, the offical repo can be found at https://hub.docker.com/_/ros/.
Next up: Dejan Pangercic, Daniel Di Marco, and Arne Hamann (Robert Bosch)
Check out last week’s post: Morgan Quigley of OSRF