This is a story I've already shared with some friends, but I think it’s worth commemorating in writing as well. It is best told in two movements.
I. Adagio, suspenseful
The background of this sad tale is as follows: in my Engineering 102 class, we’re building and programming small Lego robots that are tasked with searching an arena for yellow and blue canisters, capturing the canisters, and delivering them to separate landfills, one of which is marked by a strong light source. (If you've talked with me recently, you've probably heard about this robot thing, because it is somehow the most stressful project I've ever undertaken, even though from all accounts it’s very hard to get a bad grade in the course.) For the purpose of the preliminary competition, which is the focus of this story, we’ll ignore the yellow canisters and the landfill without the light source.
My group coded a search function that makes the robot run in an increasing spiral from the center of the field. This involved a lot of switches and loops-within-loops, which got seriously confusing, so we decided to take an upperclassman’s advice and put bits of sound into our code at important points, in order to know what the robot was running at any particular time.
What a great idea, I thought to myself at 11:43pm as I was adding the sounds. In fact, I’ll choose the musical notes to be recognizable songs at each part of the function, so I can immediately know what’s going on. How about the first four notes of “Mary Had A Little Lamb” at the end of each search loop? It’ll be cute, I thought.
It’ll be cute. Cute.
Try this out with me. Sing the first four notes of “Mary Had A Little Lamb”—just the first four. You’ll find yourself singing “Mary had a—” and stopping there. And this is precisely what chimed its charming way through our heads every single time the robot completed one square and prepared to enter another.
Mary had a—
Mary had a—
Mary had a—a what?
What did Mary have??
II. Vivace, enunciated
For the other sound bytes, I foolishly chose snippets of Brahm's Lullaby. In particular, the robot declared that it had found the direction of the light source—when the light sensor read 50 or above—with a loud, four-note ascending melody before it would drive towards the light. This was all right in practice, when we used a phone flashlight as our simulated “light source” and only heard the melody a few times before the robot reached a threshold where it released the canister, backed away, and turned around.
On the actual field, during our competition, it came to our attention that our wheel motors were out of sync, enough that our robot had a significant left-turn drag whenever it tried to go forward. This meant that every time it tried to drive towards the light, it would turn left after about two inches, lose the light, rotate again until it found it, play the melody again, and repeat the whole process.
At around the tenth repetition of the melody, I started to tremble and cover my ears. At around the twelfth repetition, the robot leaped forward into a dramatic left turn near ninety degrees, then stopped in utter confusion, as the light readings on that particular part of the field fluctuated constantly between 49 and 50.
The melody began to play endlessly.
I yelled in anguish, lunged to the other side of the arena, and scrabbled at the robot’s off-button until the whole program aborted.
“Shut UP SHUT UP SHUT UP,” I screamed.
Fellow students nearby backed away, some laughing nervously.
Throughout the rest of the day today, Brahm's Lullaby has kept needling its way into my brain and taunting me with its deceptively innocent tones, but the song is ruined for me, forever. I've had to keep myself from clawing at my own ears in the middle of the street.
Needless to say, the sound bytes are coming out of our code as soon as we don’t need them anymore.
Showing posts with label robotics. Show all posts
Showing posts with label robotics. Show all posts
Thursday, February 19, 2015
Wednesday, January 4, 2012
Davina Is A Geek Pt. 2
This time I'll begin with a picture, instead of ending with one.
I understand that now, in light of the picture, calling myself a geek has suddenly become pretentious. However, someone else showed me this thing and told me I was a geek, so I think it might be okay to say that. That was when I was telling her about my adventures on my robotics team.
Ah, yes. Robotics.
A few months into the school year, I joined (at her invitation) a team that my friend Alix has been on for the past two or three years. I really didn't know exactly what I was getting into. At that point, I still held a pretty cliche mental image of robots as these clunky humanoid constructions of metal or as advanced artificial intelligence. So it was interesting to find out that the robot we were building was pretty much a box with things attached to it, and we were mostly designing its functions to be remote-controlled by, well, us. Also, we have very specific tasks that we need the robot to accomplish: collect raquet-balls from the ground in some way, sort between magnet-balls and regular ones, put them into crates, grasp and lift crates, rotate them, stack them--and, of course, good basic mobility is always important.
I spent much of my time just listening at first, which was already confusing to my thoroughly mechanically-illiterate brain.
Axle collars, nylon locking nuts, channels, bushings, long bolts and short bolts, threaded rods, servo motors...
Sorting all that out was just like BLUGHAGHH it'll take me the whole year just to figure out what everything means and how they work together so I'll never contribute to ideas for building the robot so why on earth did I sign up for this in the first place??
However, I'm getting there. I'm competent enough as a pair of working hands, at least, with enough experience now to know how to deal with the basic mechanics. I like to say that the scar on my knuckle is a battle scar, but it really is from when I accidentally scraped my hand across a gear while reaching for a hex key too hastily. Alix and I occasionally race to see who can get four bolts unattached from the steel channels first. I've beat her a few times.
We have lots of opportunities for these races, because we are constantly taking parts of the robot apart, tweaking them, and putting them together again.
It's like, we attach the mechanism to the robot, test, well that didn't work, what went wrong? let's try switching the gears around, detach the mechanism, do whatever, reattach. Test again.
It is so cool. You get to take the theoretical and make it real within a few hours--from an idea in the mind to a working prototype almost immediately. I'm learning a lot: problem-solving, teamwork, and new motor skills (heh), among other things. And when we actually get to drive the robot, it's like a video game in real life, which is just awesome.
So yeah, that's another way that I'm a geek. I create and fix really cool stuff, though that's not through much aptitude on my part. I just got the opportunity to be this kind of geek, and I took it.
If you ever get that opportunity, and you've got the time to spare, I advise you to take it.
It's definitely rewarding.
I understand that now, in light of the picture, calling myself a geek has suddenly become pretentious. However, someone else showed me this thing and told me I was a geek, so I think it might be okay to say that. That was when I was telling her about my adventures on my robotics team.
Ah, yes. Robotics.
A few months into the school year, I joined (at her invitation) a team that my friend Alix has been on for the past two or three years. I really didn't know exactly what I was getting into. At that point, I still held a pretty cliche mental image of robots as these clunky humanoid constructions of metal or as advanced artificial intelligence. So it was interesting to find out that the robot we were building was pretty much a box with things attached to it, and we were mostly designing its functions to be remote-controlled by, well, us. Also, we have very specific tasks that we need the robot to accomplish: collect raquet-balls from the ground in some way, sort between magnet-balls and regular ones, put them into crates, grasp and lift crates, rotate them, stack them--and, of course, good basic mobility is always important.
I spent much of my time just listening at first, which was already confusing to my thoroughly mechanically-illiterate brain.
Axle collars, nylon locking nuts, channels, bushings, long bolts and short bolts, threaded rods, servo motors...
Sorting all that out was just like BLUGHAGHH it'll take me the whole year just to figure out what everything means and how they work together so I'll never contribute to ideas for building the robot so why on earth did I sign up for this in the first place??
However, I'm getting there. I'm competent enough as a pair of working hands, at least, with enough experience now to know how to deal with the basic mechanics. I like to say that the scar on my knuckle is a battle scar, but it really is from when I accidentally scraped my hand across a gear while reaching for a hex key too hastily. Alix and I occasionally race to see who can get four bolts unattached from the steel channels first. I've beat her a few times.
We have lots of opportunities for these races, because we are constantly taking parts of the robot apart, tweaking them, and putting them together again.
It's like, we attach the mechanism to the robot, test, well that didn't work, what went wrong? let's try switching the gears around, detach the mechanism, do whatever, reattach. Test again.
It is so cool. You get to take the theoretical and make it real within a few hours--from an idea in the mind to a working prototype almost immediately. I'm learning a lot: problem-solving, teamwork, and new motor skills (heh), among other things. And when we actually get to drive the robot, it's like a video game in real life, which is just awesome.
So yeah, that's another way that I'm a geek. I create and fix really cool stuff, though that's not through much aptitude on my part. I just got the opportunity to be this kind of geek, and I took it.
If you ever get that opportunity, and you've got the time to spare, I advise you to take it.
It's definitely rewarding.
Subscribe to:
Posts (Atom)