| Lego My Robot
by David Pescovitz
A gaggle of tiny robots is making its way through an obstacle course, detecting barriers in its path and weaving back and forth along the ground. Some manage to make it from one end to the other, coming to rest at a light source glowing brightly at the edge of the course. They pause and then slowly rotate on their wheels to tackle the task again. This is not a test of new military technology or an experiment in artificial intelligence, but rather the culmination of an undergraduate course in robotics. And the contraptions traversing the terrain in this engineering building's basement were constructed from Legos.
The aim of Professor Roger Glassey's introductory robotics course is to instill students with the most fundamental skills in designing computer-controlled mechanical systems, and provide them with the discipline and stamina to solve difficult engineering problems systematically and efficiently. Basically, they should learn to suck it up when their robots crash-and-burn and return enthusiastically to the drawing board.
"I'd like to stir up the students' excitement about robotics, but also inspire them to continue their research and development until their projects actually work," says Glassey, professor emeritus of Industrial Engineering and Operations Research.
Roger Glassey with Anthony Levandowski and the BillSortBot, winner of the first Java Technology Lego Mindstorms Challenge. (courtesy Sun Microsystems)
Teams of students in the wildly popular course are given Lego Mindstorms Robotics Invention System kits, consisting of traditional Lego bricks along with gears, motors, touch and light sensors, and a small microprocessor. The assignment is to design and construct mobile robots and program them in Sun Microsystems's popular Java computer language, co-developed by UC Berkeley alum Bill Joy.
"I played with Legos as a kid, so that's fun, but my weekends were totally taken up by coding and debugging,"says mechanical engineering student Juan Ruiz, who plans to study robotics as a graduate student. "It's worthwhile, though, once you see your robot start to move."
The students' robots were judged in timed races on a small obstacle course. Touch sensors on the robots' front ends enabled them to change course when they hit an obstacle. The goal was to reach desk lamp "beacons"detected by the robots' onboard light sensors. It's far harder than it sounds. But several of the students' creations managed to best their professor's personal robot.
"The key is having tight control over the sensors,"says Mario Garcia, a student with a double major in mechanical engineering and materials science engineering. "You need a really good control scheme to win this."
Students Mario Garcia and Juan Ruiz with their Lego creation. (David Pescovitz photo)
And that all comes down to smart programming. While Glassey's research focused mostly on production planning and scheduling at semiconductor plants, he's no stranger to the elegant software design he teaches to his undergraduates.
"I've been interested in programming languages since I punched my first deck of program cards"in the earliest days of computing, he says.
Toward the end of his active research career, Glassey designed software to simulate semiconductor manufacturing systems. To do it, he leveraged the benefits of object-oriented programming, a paradigm similar to Java where data and functionalities are "packaged"into units that can be linked together.
"I thought it was a great way to code,"Glassey says. "I taught the robotics course once using a much simpler programming language, but when Java was released, it enabled the students to really increase the functionality of these simple robots."
Glassey has become a celebrity of sorts in the Lego Mindstorms community of garage hobbyists and student engineers. He was a pioneering user of leJOS, an open source bit of firmware that that enables the Lego Mindstorms robots to be programmed with Java. Three years ago, Glassey's student Anthony Levandowski led his classmates to victory at the first Java Technology Lego Mindstorms Challenge, sponsored by Sun Microsystems.
"I'm a great believer in competition as a motivator for research,"Glassey says.
Roger Glassey's Home Page
"Lego Robot Passes Go, Collects Prize" by David Pescovitz (Lab Notes, October 2001)
leJOS: Java for the Lego Mindstorms RCX Microcontrollr
Lab Notes is
published online by the Public Affairs Office of the UC Berkeley
College of Engineering. The Lab Notes mission is to illuminate groundbreaking
research underway today at the College of Engineering that will
dramatically change our lives tomorrow.
Media contact: Teresa
Moore, Lab Notes editor, Director of Public Affairs
Writer, Researcher: David
Web Manager: Michele
Subscribe or send comments to the Engineering Public Affairs
© 2004 UC Regents.