Tuesday, December 18, 2007

Erlang & Robotics

A lot of people are excited about Erlang, but it's not always obvious why. Here's one reason. Erlang's great for concurrent programming, and concurrent programming is absolutely crucial for autonomous robotics; it's the fundamental technique of subsumption architecture.

Concurrent programming is (in a nutshell) just threads. Subsumption architecture is giving a robot multiple tasks, each in its own thread. A simple example would be a thread for driving forwards and a thread for driving in reverse if the touch sensor indicates you've bumped into something. Rodney Brooks' work first at the MIT Media Lab and later at his company iRobot has proven the effectiveness of subsumption architecture (Brooks invented the technique and coined the term).

Pretty much everybody knows about the Roomba, iRobot's big consumer product, but not everybody knows about their autonomous jeeps, currently driving around Afghanistan and Iraq, and proving that even illegal invasions and brutal massacres can have their upside. iRobot has an entire military robotics division. The soldiers love their robots, and iRobot's making bank.

It's kind of surprising how few people know about these machines. There was a great video on iRobot's site about the self-driving jeep, technically a John Deere Gator. The video was awe-inspiring in its innovation and hilarious in its cheeseball factor. I found and linked to it a couple years ago and it went offline in a matter of days, and back then I didn't even have many readers.

Self-driving vehicles offer pretty obvious economic advantages, especially in terms of safety and for industries like shipping. Shrinking hardware and the trans-machine Google Filesystem make it increasingly likely that autonomous robots could pack unimaginable processing power into relatively compact frames. Languages optimized for concurrent programming may not seem crucial right now, but their usefulness in future looks pretty likely.

On the other hand, Rodney Brooks was a lot cooler when he couldn't look at a picture of an Iraqi kid getting his legs torn off by a bomb and think, "Hey, my stock price is going to go up." I'm not a Christian but there's a classic line in the Bible: "What does it profit a man if he gain the world and lose his soul?" I used to admire that guy.