The Ultimate Rat Race

In a display of robotics skill and design honed over nine weeks, UCSB engineering students go from newbies to veteran robot builders and programmers
Tuesday, December 3, 2013 - 09:45
Santa Barbara, CA
Video of UCSB mechanical engineering students building Lego-based robots

DSC06495.JPG

UCSB mechanical engineering students uploading code written for their RoboRat

Two students in Casey Hare's Fall 2013 mechanical engineering class upload programming code into their Lego RoboRat

Photo Credit: 

Sonia Fernandez

DSC06590sf.jpg

UCSB mechanical engineering students testing a robot

A RoboRat gets "road" tested

Photo Credit: 

Sonia Fernandez

DSC06493sf.jpg

UCSB mechanical engineering students building their RoboRat

A RoboRats team builds their Lego-based robotic rodent

Photo Credit: 

Sonia Fernandez

DSC07545sf.jpg

Mechanical engineering instructor teaching

Mechanical engineering instructor Casey Hare advises his students on how to approach building a robot

Photo Credit: 

Sonia Fernandez

It’s roughly the size of a pingpong table, painted white. Black lines traverse the surface, which is flat, save for an undulating ramp in the middle and short ridges at the long sides, and, some students say, a slight slope at one end. Suspended above the table, magnet-tipped dowels hold tantalizing blocks of “cheese” foam.

This setup, as innocuous as it may appear to the casual bystander, is, in fact, the bane of the existence of the 40 students in UC Santa Barbara instructor Casey Hare’s robotics class. It’s the terrain that has challenged teams of coders and builders as they calculate, assemble, test, build and rebuild their autonomous robotic “rats.” Deceptively simple, this track is capable of laying to waste lines of code and presenting unexpected complications to the construction of the most stalwart robot. The work of weeks of sleepless nights can be dashed in one run or can propel a robot’s builders to fleeting but intense glory. The goal? To get their robotic rats to gather as many pieces of cheese as possible, thereby accumulating the highest number of points.

Welcome to RoboRats. Twenty robots enter; one robot leaves.

“Competition is fun,” said Hare, who is running the course this fall. For two days a week and some weekends, the northeast corner of the second floor of the Engineering II building at UCSB is abuzz with activity as students take in classes and apply their newfound knowledge directly to the task at hand. Without competition, this would be just another lecture and lab, but throw in a little friendly rivalry and bragging rights and the lessons stick a little more and students pay closer attention, show up more often, ask specific questions.

But if you ask Hare, RoboRats isn’t even really about the robots, despite the hours students spend digging through Lego pieces and running their creations though their paces.

“The class is nominally about building robots and debugging systems,” he said. “But in the broader sense it’s actually more about design, problem-solving and troubleshooting.” As a mechanical engineer who designs instrumentation, Hare knows the future of these would-be mechanical engineers will lie not only in the things they build, but also in their ability to adapt to circumstances that are at best unpredictable.

In one far corner of the lab, Sean Chiu, a relative newbie to the world of robotics, pores over lines of code — the commands that dictate the autonomous actions of his robot, based on the information its sensors pick up. In this competition, once the robotic rats are given the signal, they take off on their own, and what they do — pick up cheese, deposit cheese, even move cheese away from their competitors — is the result of hours of coding, and testing, rewriting code, and more testing.

“It’s like a crash course in C [programming],” said Chiu. “I’m learning a lot more than I would just taking a C class.”

For anyone new to robotics, every day in this class must feel like a crash course. Geared primarily toward seniors, the class is open to all levels of robot builders in a series of lectures and labs with steadily increasing complexities. The less experienced students have to pay closer attention, ask more questions and do some extra research. Hare has them building and testing almost straight out of the gate.

For at least part of the course, Chiu has had some help in the coding department in the form of his partner Johanne Rudolfsen, one of about 20 exchange students who come to this class to augment what they’ve learned from university back in Norway. The Norwegians, everyone agrees, have strong programming skills and can spew out lines of tight code to fit the challenge. It’s a boon to anyone hoping some of that know-how will rub off on them.

But what Rudolfsen didn’t have — and what she has come here for (aside from the warm winter weather) — is the chance to pair her real-time programming skills with the actual physics of a robot on a course. Confined to parameters set by their instructor, the students are otherwise free to build their battery-powered, Arduino-motored Lego warriors in virtually any shape they choose for the cheese-gathering strategy they employ. Some robots are small and speedy, moving one foam block on the ground at a time. Others evolve to become tall, using their height to gather the dangling cheese or bulky, with room to hold more than one block at a time — but with size comes a slower speed.

“This class really teaches you the relationship between the real world and software,” Rudolfsen said. “I probably still have a lot to learn where it comes to building gears and making the robot sturdy.” Her professors, she said, recommended UCSB as one of the places to go to understand that kind of integration.

However, the natural tendency to let the strong code writers write code and let the builders take over the building does not last long in this course, and it’s the kind of leveling of the playing field Hare does early and often.

“Every time a dominant strategy emerges, we change the rules,” he said. “We don’t want the students building the same robot.” Nor does he want students to be performing the same function all the time in their teams. So the students regularly get paired with different partners, get different tasks or face different challenges.

No matter what level of skill or experience the students possess, they are almost guaranteed to run up against one particular situation.

“We thought our design was good, we stuck with it and now it’s not optimal,” student Eirik Shultz said of a recent build, echoing a worry that haunts many of the teams as they gear up for the final competition. If they’re wise (or lucky), their robots’ performance remains more or less constant as they add sensors and other parts and write additional commands to comply with the ever-increasing set of requirements. For Shultz and students in the same situation, the choice is between working with what they have and trying to fix it, or gambling on an all-new design. It’s a strategy that has worked before — last summer’s RoboRats winner was a complete rebuild at the last moment — but it’s still a gamble.

“Many of the problems the students come up against are very, very real world in that you’re trying to solve a problem, and you have to figure out what it is,” said Hare. “There’s a mechanical solution, an electrical solution and a software solution. One might be harder, the other one might be easier and so you have to figure out which one is which.”

For that reason, mistakes are an essential part of learning throughout the course, and Hare admonishes his charges not to be afraid to make the wrong assumption or give an erroneous answer. A build that has gone through a multitude of errors and troubleshooting sessions teaches more than a single build that has passed all tests, he said.

“The question I hear the most is ‘This was working last night, and now it’s not; what happened?’” said Tucker Root, a mechanical engineering senior, former RoboRats competitor and current teaching assistant. Having waged their own battles in the RoboRats competition, he and several other veterans spend their time helping students answer that question and minimize future uncertainties.

“I think the advice I would give to the students is: Learn from your failures and be open to criticism,” Root said.

For Chelsea Brown, that’s advice she and other students can take to heart. Also brand-new to hands-on robotics, she went from fiddling with random Lego parts and puzzling over circuitry to creating a robotic rodent road warrior, sticking with the steep learning curve and the rapid absorption of information that was required. She spent nearly every free moment in the lab building, testing, rebuilding. It’s no small feat, making a robot programmed to think for itself in the space of nine short weeks, and a point of pride anyone can take, whether or not their robot comes out on top.

“It’s interesting how I’ve learned to build robust systems … from Legos,” she said.

The competition for the last RoboRat standing takes place today, Dec. 3, at 3:30 p.m. at UCSB’s Engineering II building, room 2163.

Contact Info: 

Sonia Fernandez

sonia.fernandez@ucsb.edu

Topics: