1994: Robot Sheepdog

Here’s a video I’ve wanted to post for a long time. It was a project for a college class in 1994, taught by one of MIT’s most understanding professors, Donald Troxel. Carlton Mills digitized the old VHS copy of our video report.

It was built by a team of three students: John Wallberg, Adam Holt, and me—we were the leftovers, actually, who hadn’t already found lab partners. Our two project ideas were this and robotic air hockey, and we were pretty sure a sheepdog would be both easier and safer. But we still finished it about 10 days late, working right up until we all had to leave for winter break. But it still won a prize (follow the link and search for “Newton”)!

The sheepdog itself is a LEGO robot covered by a cardboard box, and the sheep is a jittery baby toy. The sheepdog controls are three hand-built computers running 5-volt TTL logic, 8-bit 10MHz microcontrollers, miscellaneous op-amps and potentiometers, and at best 256 bytes of RAM and a few kilobytes of EEPROM. It turns out you can do some basic vision, navigation, and motor control with that!

Some details:

  • The sheep had to be juiced down by power engineer Adam — I think he used 3 good batteries and a dud instead of 4 good batteries, because it was just too vigorous otherwise.
  • The navigation system required the most complex computer of the three; Adam had 16 bits to work with on his main bus, which he had to divide into address and data lines; I think he settled on 10 bits for addressing and 6 bits of numerical precision in his trigonometric lookup tables. That way he could have 1024 instructions, of which he probably used 1023. While the vision system was being debugged, Adam and John had to find creative ways to test the navigation and driving blind. Because of their preparation, the whole thing basically worked the first night we plugged in the vision sensor. I think it was only possible because of Adam’s love of trigonometry and navigation. In his spare time he was downloading publicly available street grid data and displaying it interactively in ASCII on his home computer — a precursor to modern web-accessible maps.
  • The vision system did simple light-dark thresholding and looked for blobs. We didn’t have a wide-angle lens, so we jammed our camera up as high in the ceiling as we could, to get about an 8-foot square field of view. My favorite feature was the debugging display, visible at 1:42, which was an RGB screen hooked straight to various internal signal lines of the vision system. It showed a raw greyscale camera channel in green, thresholded blobs in red, and the center of one of the blobs in blue (but aliased into a grid and with computation noise mixed in because I ran out of wiring space). You could see it compute the blobs at the top of each frame and then settle out into a clean debugging pattern that followed a blob around. It’s briefly visible in the background.
  • The mechanical robot was amazingly reliable. John built it out of proven 6.270 parts, including what must have been at least 3 pounds of cross-linked LEGO Technic pieces, two small DC motors, rechargeable lead-acid motorcycle batteries (housed in the chassis itself) and a pulse-width modulation circuit. After we tweaked constants to match slight difference between the two drivetrains, the robot could go straight or curve along fairly accurate arcs. But even if it wasn’t exact, the feedback loop from sensor to navigation planning was tight enough (30 hertz?) that corrections were pretty immediate. At about 4:00, for example, it navigates tightly around the sheep and butts it from the other side. (Another, less fortunate team the same semester used a different brand of toys for their robot, along with stepper motors, which are theoretically simpler to control digitally but proved to be much less mechanically robust. Their robot hardware never did function properly, but the teachers were understanding and graded them well based on their circuits and software.)
Posted in Techno-biological | 2 Comments

Baker Family Animated Special

Charles Schultz, the creator of Peanuts, required that only his own artwork be used for his comic strip, which, when you boil it down, means no more new Peanuts holiday specials.

The following (which Bahiyyih also posted a few days ago) should in no way be construed as an attempt to fill the gap, but it was fun to make. Introducing the animated version of a bedtime story from last week, Two Scoops:

Posted in Bedtime Story | 4 Comments

Two Scoops

Once upon a time, there were two scoops of ice cream at the top of a hill.

One scoop, which was chocolate, said to the other, “Hey Vanilla, want to race?”

“Race?” the other scoop answered, “What’s that?”

“It’s where we each go as fast as we can and see who can get to the bottom of the hill first!”

“Ooh, that sounds exciting,” said Vanilla, and gave a little roll. “How do we do that?”

“Well, it’s pretty hot out here, so I figure we can melt and slide our way down,” Chocolate answered.

Now, to ice cream, “hot” means anything that is not freezing cold. But it was rather warm that day. It wasn’t carry-your-water-with-you-at-all-times hot, but if you had looked down the road from the top of the hill, and maybe if you had put your head down close to street level, and if you were patient, you would probably have seen some waviness in the air, rising from the pavement.

The two ice cream scoops started their race. They glistened in the sunlight as their outer layers started to melt. And if they had been on someone’s cones, their parents would have said, “Be sure to lick that before it drips.”

“Oh my specks! I’ve never moved this fast!” yelled Vanilla.

“Wooooo!” wailed Chocolate, sliding past Vanilla at the speed of a very fast snail.

“Wow, how do you do that?” Vanilla called after the other scoop.

“Yeah, it’s a trick I just figured out. Face one side toward the sun until it’s good and melted, and then roll down on top of it to get a really good slide!”

Vanilla tried it. “Hmm, I’m not really heating up as fast. I’m going to try rolling instead. Watch out, I’m going to catch up!”

The two ice cream scoops slid and rolled down the hill, slowly at the top, where it wasn’t very steep, and speeding up as they got lower. They were really melting now — if they had been on cones, the parents would now be saying, “Here, let me help you with that.”

“Oh no,” said Chocolate, “I’ve slid into the shade!”

“Ha ha, I’ll catch you now!” answered Vanilla, “Whoa, what’s this, a crack? I’m going sidewaaaays!”

Behind them two stripes of melted ice cream stretched up the hill, once white and one brown.

Just then, out from behind a building at the top of the hill, a dog and a cat walked onto the street. The dog sniffed the air, and the cat jumped up on a bench to look around. The cat saw the chocolate stripe, jumped down, and ran over to it, while the dog found the vanilla one, and they both started licking.

The Chocolate scoop was back in the sunlight again and making good time on the hot pavement. “Wuk ut meee, Um huff-multed,” Chocolate said, in a melty voice.

“Yeh won’t ketch meh!” Vanilla said. But vanilla was mostly melted on one side and was having trouble rolling. Vanilla looked back up the hill; Chocolate was nearly even. “Weht! Whet’s that?”

“Wuht? Wuht uz it?” Chocolate asked.

“Sehm kehnd eff ennimals, chessing ess!”

Chocolate struggled to turn around but was sliding headlong down the street, now mostly liquid.

The dog and cat were having a race of their own, of sorts. The dog slobbered its way down the hill, going back and forth across the vanilla trail, while the cat licked straight down the middle of the chocolate, getting the thickest part of the melted ice cream and ignoring the edges.

“Thehr genna eehht ess! Ehhhhh!” Vanilla panicked.

Chocolate ran out into a final syrupy dollop that spread across the pavement. The cat was not far behind; it licked its way right to the middle and lapped up a little circle through the thickest part.

The dog closed in on the lopsided lump of Vanilla, who burbled, “Eeeargh, et’s theh ehnd!”

But as the dog’s tongue scooped Vanilla up, Vanilla’s last thoughts were suddenly calm and clear. “Wait, this isn’t so bad. I’m ice cream. I always wanted to be eaten outdoors on a hot day, after all.”

Posted in Bedtime Story | 3 Comments

Rocks vs. Frogs

Teresa on game design (inspired by a lesson on alive and not alive at school today, in which rocks and frogs were compared):

What if there was a game called rocks versus frogs?
If the frog sits on top of the rock and lays its eggs on it, and the eggs crack and the yolk gets all over the rock, then the frog wins.
If a tornado comes and blows the rock on top of the frog, the rock wins.

Posted in Teresa | Leave a comment

Bedtime Story: “Hey, watch what I can do,” said the Skunk

“Hey,” said Skunk, “watch what I can do.”

“Okay,” said Rabbit and Deer, and turned to watch.

Skunk pointed at a dandelion, ripe and ready to blow in the wind, and raised his black and white eyebrow.  “Eh?”

Skunk turned his rear end towards the dandelion and let fly his best predator-befuddling blast.  The dandelion seeds flew up into the air and over the grass.

“That’s quite a trick,” said Rabbit, holding her nose.  “I think I see some really nice clover go over there. My stomach is ready for breakfast.” She hopped away.

“Grrt idear, frrnd rrbbit,” snuffled Deer, trying not to breathe. She wobbled after her friend.

“Yeah,” mused Skunk. “That was a good one.”

The seeds wafted across hillock and glen. Wherever they went, animals avoided them. Mice refused to eat them, or in fact anything they touched. Beetles, as soon as they caught a whiff of the scent they carried, scuttled in the opposite direction. In fact, none of them was eaten–save one, by a stink bug.

Teresa: Ew gross, a stink bug.

Yes, they all landed safely, because no animal would go near them. They were the worst-smelling dandelion seeds ever.

“We’re lonely,” one seed said.

“Why doesn’t anyone like us?” moaned another.

But you know what?  Because they weren’t eaten, most of them sprouted, and nearly half of them grew into dandelions. Which was very unusual — normally, they’d be lucky if even one made it. They were protected by the skunk’s scent.

And that’s the end of the story.

Maya: Dad, can we have an ending?

Rabbit and Deer munched in a clearing. Their noses twitched every once in a while.

“Mmm, this is delicious clover,” said Deer.

“Oh, yes, it is absolutely delicious,” Rabbit agreed. “A fine breakfast.”

“Yes, I’m so glad we are eating it together,” Deer said.

“I think I’ll go get some salad dressing to go with it,” Rabbit offered, and scampered off.

Posted in Bedtime Story | Leave a comment

Return Fluids to User

Over the last year or so, our local blood bank has been encouraging donors to give what they call “double red” donations, rather than regular old whole blood.  I’ve done it a couple of times now.

The Good:

  • You get to lie down on a heating pad.  It’s awfully nice.  The apheresis machine (which centrifuges your blood, keeps what it wants and returns the rest to you) gives you extra saline, and it’s cold.
  • My employer gives time off to donate blood.  That’s awfully nice of them.
  • You can go in half as often as whole blood donation and still give the same quantity.  After all, most of what hospitals need is your red blood cells; they’re happy for you to keep the rest.

Now, regular blood donation is pretty straightforward: Someone sticks a needle in you and waits for the bag to fill up.  Then they walk you over to a kitchenette, holding your arm in case you start to faint, and you celebrate with a snack.  But apheresis involves a more intimate encounter with technology.

The Weird:

  • You can taste the machine.  (I’m sure this is true for being on an IV drip, too.)  When it puts electrolytes back into you, they come through a fresh vinyl tube.  It doesn’t take long for the fumes to spread throughout your circulatory system, including the back side of your taste buds, so that it feels like you just ate a new inflatable pool toy.  Does that mean we are constantly tasting ourselves from the inside, but we we’re just used to it?
  • It can make your teeth tingly.  The phlebotomist explained that, with the red cells, I’m losing calcium from my blood, and my body is drawing it out of my bones and teeth.  But that’s okay, there’s a remedy, she said, and gave me a couple of Tums to chew on.  It seemed to work—the tingling went away.

A few weeks ago, I went in for my fourth double-red donation.  I was well-hydrated, and I had just gone out to lunch with my Mom and had a nice big plate of chicken fajitas to prepare.  The blood donation folks hooked me up to the machine, and everything was going well, until the phlebotomist called a supervisor over to look at the machine.  She was doing her best Professional Calm.

“What is it?” the supervisor asked, in a half-whisper.

“It’s saying 12/09.”  They both inspected the machine’s little LCD display.  “This one came out of the same box I’ve been using all month.”

“Well, it’s expired.  We can’t use it,” the supervisor admitted.

“What should I do?”

“You’ll have to give him his fluids back.”

“How do I do that?”

“Select ‘Return fluids to user’ in the menu.”

Man, if I ever get to use “Return fluids to user” in a computer interface, I will have truly lived.

Posted in Life, Techno-biological | 3 Comments

Smart Pill to help children get through Puberty?

This looks like a “tip of the iceberg” type of article: Smart pill that helps children through puberty.

To summarize,

  1. During adolescence, a specific brain development makes it harder for you to learn. I remember going from being able to absorb just about anything to having to work to learn stuff, around 13-15, and I’ve heard that my grandfather Bill made a similar observation.
  2. Someone is advocating use of a drug to block this development (which seems kind of crazy without much more investigation)
  3. But there’s another way to improve learning: experience mild stress: “Dr Smith said until a pill was developed, students could increase their learning by enduring mild stress.” What does that mean — adolescents should be challenged? Could there be a sound basis to some cultures’ ritualized coming-of-age stress experiences?

What is going on here, and what does it imply for adolescent education? Is “send them to a farm” correct after all? What kind of farm? Should it include camels, or are they too stressful?

Posted in Techno-biological | 1 Comment

Keeping computers from ending science’s reproducibility

Here’s a really good description of one of the key things that the people I work with are wrestling with right now:

Ars Technica: Keeping computers from ending science’s reproducibility

Basically, scientific exploration is relying more and more on computation. Scientists used to know how to tell other scientists how to reproduce their results, when it was just manipulation of the physical world. But computers have turned out to be really messy, and it’s hard to describe how they were used to perform a particular experiment.

One of the main things we’re trying to provide (that is, the people I work with at NCSA) is an accurate — even reproducible — description of the computer processes that led to particular data or conclusions. It’s the kind of thing that Joe Futrelle can foam at the mouth about, but only arouse concerned looks from the people around him because it sounds so esoteric and fiddly. I thought this article did a good job of explaining why it’s vital to the process of scientific investigation. Here are the first two paragraphs:

In recent years, scientists may have inadvertently given up on a key component of the scientific method: reproducibility. That’s an argument that’s being advanced by a number of people who have been tracking our increasing reliance on computational methods in all areas of science. An apparently simple computerized analysis may now involve a complex pipeline of software tools; reproducing it will require version control for both software and data, along with careful documentation of the precise parameters used at every step. Some researchers are now getting concerned that their peers simply aren’t up to the challenge, and we need to start providing the legal and software tools to make it easier for them.

In the past, reproduction was generally a straightforward affair. Given a list of reagents, and an outline of the procedure used to generate some results, other labs should be able to see the same things. If a result couldn’t be reproduced, then it could be a sign that the original result was so sensitive to the initial conditions that it probably wasn’t generally relevant; more seriously, it could be viewed as a sign of serious error or fraud. In any case, the ability to reproduce a given result is key to its general acceptance and, since a successful experiment is often the foundation of further research, often essential for pushing a field forward.

Posted in Uncategorized | Leave a comment

The Psychology of Moral Safety

I’ve had a question for a while now: Why do people who crusade against a particular “moral evil” so often struggle against it personally and fall prey to it, sometimes very publicly? In my opinion, it happens too often to be mere coincidence — I really think there’s a correlation.

Well, the Boston Globe published an article this week by Drake Bennett on The Nature of Temptation, which talks about that tie. It explains the dangers of overconfidence in one’s own willpower:

… people with the most favorable opinion of their own moral fortitude seem to have the widest empathy gaps. In one study, Nordgren looked at a group of people trying to quit smoking and found that it was those who rated their willpower particularly highly who were most likely to end up smoking again within a few months. The reason, Nordgren argues, is that they were more cavalier about exposing themselves to situations where they might be tempted to smoke. It’s a tendency that he argues extends far beyond smokers. Mark Sanford’s admission this week that in the lead-up to his affair he had flirtatious extramarital relationships that “didn’t cross the sex line” with multiple women suggests, perhaps, a similarly reckless faith in his own willpower.

Beyond willpower is a sense of one’s own inherent moral goodness — if you’re a “good guy”, you don’t need to prove it by actually doing good things:

A paper published this spring … at Northwestern University found that, if people were primed to think of themselves as good, caring people, they were actually less generous with donations, and less likely to advocate spending money on costly environmental protection measures, than people primed to think of themselves as selfish and cruel.

The article quotes Benoit Monin, a Stanford University professor, “People feel like they have a free pass because they’ve amassed those moral credits as a good person.” It goes on to cite a suggestion by Sonya Sachdeva, a graduate student who was an author of the Northwestern paper:

… for those who worry about the complacency that moral self-satisfaction can bring, the key may lie in seeing our good deeds as individually unimportant. Rather than thinking of moral acts as accomplishments – thereby triggering the cooling effect on our inner moral thermostat – we should strive to make them habitual, almost rote, so they’re not competing with all of our other goals. Writing of “moral habits” two millennia ago, Aristotle argued for something similar.

This line of reasoning also might help illuminate why the Baha’i Long Obligatory Prayer includes such an emphasis on our own weakness and moral limitations.

Thou dost perceive my tears and the sighs I utter, and hearest my groaning, and my wailing, and the lamentation of my heart. By Thy might! My trespasses have kept me back from drawing nigh unto Thee; and my sins have held me far from the court of Thy holiness. Thy love, O my Lord, hath enriched me, and separation from Thee hath destroyed me, and remoteness from Thee hath consumed me.

The Long Obligatory Prayer has always seemed to me to be particularly powerful. Baha’u’llah is quoted as saying, “In truth, it hath been revealed in such wise that if it be recited to a rock, that rock would stir and speak forth.” I’ve wondered, though, why it puts so much emphasis on humility and unworthiness. Perhaps comparing one’s moral standard to God’s is a sure way to keep perspective, and help avoid the “cooling effect on our moral thermostat” that Sachdeva describes. From the prayer:

Thy forgiveness hath emboldened me, and Thy mercy hath strengthened me and Thy call hath awakened me, and Thy grace hath raised me up and led me unto Thee. Who, otherwise, am I that I should dare to stand at the gate of the city of Thy nearness, or set my face toward the lights that are shining from the heaven of Thy will? Thou seest, O my Lord, this wretched creature knocking at the door of Thy grace, and this evanescent soul seeking the river of everlasting life from the hands of Thy bounty. Thine is the command at all times, O Thou Who art the Lord of all names; and mine is resignation and willing submission to Thy will, O Creator of the heavens!

There’s much more in the Globe article. I heartily recommend it to anyone interested in current psychological research on personal moral integrity.

Posted in Life | 1 Comment

Philosophy of a 4-year-old

Setting: back yard

T: “I wish it was pillow day. Where there are pillows everywhere.”

Dad: “Pillows everywhere?”

T: “Yeah, and all the pillows are filled with candy.”

On not having arms

“Without arms you couldn’t throw out the compost.”

“Without arms, you couldn’t pick flowers for your Mom on her birthday.”

See, those are the important things.

Teresa Philosophizing

Posted in Teresa | 2 Comments