Berkeley Engineering Home
Volume 4, Issue 9
December 2004



In This Issue
Listening for ET

Lego my Robot

A Boom in Satellite Engineering

Cool Alumni

Dean's Digest

Archives 2004
2003
2002
2001

Lab Notes, Research from the College of Engineering

Lego My Robot
by David Pescovitz

Printer-friendly versionPrinter-friendly version

Photo of Robot

A Lego bot works its way around a barrier. (David Pescovitz photo)


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.

Glassey and Levandowski

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."

Garcia and Ruiz

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."

Your Turn

Do you have a comment or question regarding this research?

We want to hear from you...

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.


Related Sites

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 Pescovitz
Web Manager: Michele Foley

Subscribe or send comments to the Engineering Public Affairs Office: lab-notes@coe.berkeley.edu.

© 2004 UC Regents. Updated 11/30/04.