Robots rampage (in a friendly way) at SCALE 10X
"World domination" is a less prevalent theme in Linux and open source
discussions these days than it was some time ago, but it still comes up
regularly in one field of study: robots. At the 2012 Southern California
Linux Expo (SCALE) in Los Angeles, Willow Garage's Tully Foote
described the Robot Operating System
(ROS) project, an open source stack for state-of-the-art robotics. ROS is
in use by industry and academic research projects, often on hardware that
runs in the hundreds-of-thousands of dollars range, but it is capable of
running on low end and homebrew robots, too.
Naturally, the ultimate homebrew device automation option is the open source Arduino, which was also on display at SCALE thanks to Akkana Peck and her flying robot shark....
ROS's universal robots
In his talk, Foote illustrated the need for a common, open source platform like ROS by describing his own background in robotics. As a graduate student, he often lamented the fact that interesting developments described in research papers were nearly impossible to re-implement at a different institution because there was no baseline framework on which to build the new bits. As a result, every research group ended up re-building the same infrastructure in a separate silo, slowing down the pace of useful research. The same productivity hit was evident in the DARPA Grand Challenge; Foote and his teammates saw that virtually every successful entrant ran Linux, but they shared no code. The difference between the teams that completed the challenge and those that failed was "a couple of percent
" more efficiency in key algorithms, he said — a tiny amount of time compared to the hours spent constructing and debugging the predictable, underlying base layer.
![[Tully Foote]](https://static.lwn.net/images/2012/scale-foote-sm.jpg)
ROS grew out of those concerns. The idea is to provide a reusable meta-framework that researchers can run on their own robot hardware, taking care of low-level services like hardware abstraction, device control (for sensors, actuators, motors, and other robo-building-blocks), and message-passing, and to offer reusable modules for common services like 2D and 3D object recognition and navigation. Developers can incorporate the libraries they need, then write their own code focused on the area of research interest.
Rather than simply design the system and post the code, however, the ROS team has taken an active interest in cultivating an active community of robotics researchers and code contributors. There is a thorough documentation site and a StackOverflow-style question-and-answer site, plus a bug tracker, IRC channel, and mailing lists. The code is licensed BSD-style, in order to encourage adoption by commercial research groups in addition to academics.
The plan seems to be successfully attracting developers; the wiki lists more than 400 "stacks," which are installable ROS variants tuned for a specific task, hardware configuration, or research project. Many are marked as being maintained by institutions other than Willow Garage. Willow Garage itself is a "long-term incubator
", as Foote described it. The team does its own robotics research as well as developing ROS, in the hopes of making a breakthrough someday that will warrant spinning off a startup company.
Architecture and marathons
Structurally, ROS is a collection of processes that communicate via the ros_comm middleware layer. This communication framework is abstracted at the network level, with C++, Java, Python, and Lisp all equally supported for developing modules. There are several message-passing paradigms supported, including synchronous RPC-style services, asynchronous publish-subscribe, and simple data acquisition. Under the hood, ROS is designed to run on Ubuntu (and the official downloads for the current release, "Electric Emys," are packaged only for Ubuntu), although experimental packages are available for other distributions, as well as Mac OS X and Windows.
Robotics research is centered on compute-intensive subjects like computer vision, object-detection, and decision making (rather than simply programming repetitive tasks like car assembly), rarely manageable by a single CPU. Thus, ROS supports grid-like designs it calls "compute graphs" in which multiple slave compute nodes can talk to each other in peer-to-peer style, as well as report back to a master node. Foote described his team's DARPA Grand Challenge vehicles, which in different generations used everything from six rack-mount servers to a trunk full of Mac Minis. ROS can also run on remote compute nodes that communicate wirelessly to a robot — Foote mentioned that an Android application is in development that will allow users to run ROS on their phones to control small, Roomba-like robots.
A Roomba and an Android phone does not make for a cutting-edge proof of concept, however, so Willow Garage set out to develop a state-of-the-art research robot for working with ROS. The result is the PR2, a mobile (wheeled) robot with stereo vision, two manipulator arms with five pressure-sensing fingers on each, and an assortment of rangefinders and other sensors for interacting with the world. The PR2 is powered by sixteen i7 cores, and has a $400,000 price tag (although Foote said the company offers some level of discount for open source projects).
Foote played videos of several demonstration projects that Willow Garage undertook, which are available at the bottom of the PR2 page. They included training the PR2 to "run" a 26.2 mile marathon (a problem that seemed to focus largely on teaching the PR2 to notice when it was running low on battery power, find an outlet, and plug itself in to recharge), play pool, and fetch and open bottled beer (determining the brand by visually scanning and interpreting the labels it finds in the fridge).
Nearly half a million bucks is a hefty bill by most standards, but Foote said there are around twenty PR2 units in the field — and that together they result in the publication of more than 100 research papers every year. The ROS community as a whole has expanded the number of software packages available from the initial 200 to more than 3000. Luckily, ROS runs on a range of other robot hardware, including several inexpensive options like the LEGO NXT and Willow Garage's new offering, the TurtleBot. TurtleBot is based on an iRobot Create, augmented with an ASUS netbook, a Microsoft Kinect, and various other sensors. TurtleBot kits are available for between $400 and $1400 (US), depending on how many of the off-the-shelf components are included.
The DIY approach
![[Akkana Peck]](https://static.lwn.net/images/2012/scale-peck-sm.jpg)
Foote's talk and PR2 videos wowed the crowd (which strained the capacity of the session room), but so did Akkana Peck's live demonstration of Arduino development in the "Fun With Linux and Devices" talk. Peck described herself as an circuit-building novice, emphasizing that Arduino was a simple way to get into the world of programming hardware devices and robots even for those inexperienced with IDEs and soldering irons.
Peck began with an overview of the Arduino itself, including digital and
analog I/O, programming via USB cable, and the various options for power
(USB-supplied, battery, and AC adapter). She then explained the Arduino
software environment and how to compile and upload code. "The first
project is always making the LED blink,
" she said, "which is a lot more exciting than it sounds when you finally get yours to blink.
"
From the blinking LED, she gradually increased the complexity of the projects, including how to interface with devices that draw more power than an Arduino can safely handle, how to read from sensors, and how to write Python code that interfaces with the Arduino's I/O pins — thus allowing the user to monitor and control devices. Along the way, these examples included several live demonstrations, including linking the blinking-LED signal into a series of desk lamps and Christmas tree lights, creating a functioning oscilloscope, and an echolocation rangefinder.
But those projects were only the lead-up to the main event, Sharkduino: controlling an "Air Swimmers" flying shark from a Linux box. Air Swimmers are helium-filled balloon toys with motorized tails and adjustable ballasts, and can be flown using an infrared remote controller. They are also inexpensive, which makes them a tempting target for an Arduino automation project. In addition, the infrared controller is more limited in functionality than a typical radio-controlled airplane or helicopter, making it ripe for hacking. Peck said she considered attaching a small Arduino directly to the shark, but ultimately chose to connect to it via the remote in the interest of making flying-shark-run-amok a less likely outcome.
The project involved dissecting the infrared remote, getting help from the Arduino community on what sort of circuits to attach to the remote control's switches, and writing a Python application to run on the desktop. The end result allows the user to fly the shark by moving the mouse up, down, left, or right. It may not shoot lasers yet (to Dr. Evil's certain dismay), but "Bruce" (as the shark is evidently named) was still a hit with young and old alike in the audience.
Along the way, Peck included tips on where to find Arduino components, how to ask for help from the Arduino community, and how the platform compares to BeagleBoard, RaspberryPi, and other rapid-prototyping products. All of the code demonstrated in the session (including the Sharkduino application) is available on Peck's personal web site, along with the session slides.
Penguin overlords not far behind
In some ways, ROS and Arduino could not be further apart. ROS is developed (although not exclusively) on expensive specialty hardware, while Arduino boards come as cheap as seven dollars (thanks to the open hardware plans). ROS is designed for complex, compute-intensive tasks, while Arduino is designed to be as simple as possible. But in the more fundamental sense, they serve the same goal: to provide a reliable, common platform on which others can experiment and innovate. Neither could accomplish that as effectively if they were proprietary, closed-source projects.
Willow Garage's TurtleBot promises to bring brainy robotics to the hobbyist market (while giving those hobbyists the same reliability and service that research institutions already enjoy), which should have an interesting effect on the ROS project and its community. And if the thought already occurred to you that a low-cost ROS robot outfitted with an Arduino-controlled sensor board sounds like an intriguing platform for exploration — why yes, there are several modules to do exactly that.
Index entries for this article | |
---|---|
GuestArticles | Willis, Nathan |
Conference | Southern California Linux Expo/2012 |
Posted Jan 25, 2012 23:54 UTC (Wed)
by louie (guest, #3285)
[Link] (2 responses)
Posted Jan 26, 2012 4:05 UTC (Thu)
by BrucePerens (guest, #2510)
[Link] (1 responses)
Posted Feb 9, 2012 2:28 UTC (Thu)
by n8willis (subscriber, #43041)
[Link]
Nate
Posted Jan 27, 2012 0:01 UTC (Fri)
by alison (subscriber, #63752)
[Link]
Robots rampage (in a friendly way) at SCALE 10X
Good pun. Clue here.
ROS's universal robots
ROS's universal robots
Robots rampage (in a friendly way) at SCALE 10X