Wednesday, November 15, 2006

The ultimate sentry gun...coming soon to a DMZ near you

Well now Aaron Rasmussen can rest in peace. Someone has finally built a "real" sentry gun.

Apparently Samsung has developed an actual autonomous sentry gun that tracks and recognizes humans. The device is intended for deployment in the DMZ between N and S Korea. Included in the article is a nifty video that's both funny and yet very...disturbing.

However, the following line pretty much sums it up, methinks:

It has a sophisticated pattern recognition which can detect the difference between humans and trees, and a 5.5mm machine-gun.
Oh boy. It can tell the difference between trees and humans.

And it has a gun.


("Mr. Oak, put down your branches. You have 20 seconds to comply...")

Monday, November 13, 2006

Analysis paralysis and other fun design choices

Given we haven't picked out a cool acronym as a name, I can't say we've made HUGE progress. But we're getting there.

We're meeting once a week and have decided to use this as a "demo project" to work through project issues as well as being a boost to coding skills. And of course, that means we're dealing with the dreaded "R" word. Requirements. Gotta do em'.

So we tried to hash out what the "overarching architecture"
should look like. Got lost in philosophical rabbit
trails. Wondered where intelligence/data/processing should happen.

And then, after poking about some of 37signals manifesto, I came up for air and wondered...do we REALLY need comprehensive BDUF requirements?

So we rethought a few things. Today's meeting looked like this:



Guiding design principles

  • encapsulation
  • loose coupling
  • build for extensibility...but keep things reasonable
(ed: isn't it great when you re-discover...oh yeah, that's why we do oo...)



Ways to go forward (breaking analysis paralysis)




Requirements

  • What is the minimal requirements set needed to get the minimal functionality going?
  • Use "guiding design principles" where possible, use hard-and-fast
    requirements where necessary. (of course, "necessary" is always up for
    debate..)

  • Think "growing" software vs. "building"...so build in extensibility. Think "encapsulation/objects"...
  • Maybe a useful thought would be "how much encapsulation is
    reasonably necessary to re-use this module in another app?"...that
    might help with removing unnecessary dependancy on other modules too...



AR's (action required)

(sorry...old Intel-ism. I've just always thought AI should be artificial intelligence..)



A:

  • build a basic robot with 2 axis of motion. (maybe 3rd axis would be ultrasonic sensor?)
  • Build a basic test-harness to move the robot through motion.

W:

  • Begin experimenting with his USB cam and the motion sensing API
    at http://www.codeproject.com/cs/media/Motion_Detection.asp (check out
    his other articles for the image manipulation algo's used in the motion
    sensing kit..)

Both A and W

  • Remember that this is supposed to be FUN. If it starts being a CHORE and stops being FUN we need to re-eval... =^))

Sunday, October 29, 2006

Houston, the NXT has landed..

So I couldn't wait. I was soooo close to having gathered enough $$ for the new Mindstorms that it was too much to resist.

I ebay'ed. I'd looked a while back and seen once-used or even new kits for around $180-$200 and sure enough, I kept tabs on things for a week and found one for $199 (Buy it now) + $20 shipping. Hey, I can use that extra $30 to buy the webcam or something...

(I freely admit that I'm crossing my fingers that it didn't just fall of the back of a truck...but given how many I saw for that price range from different folks there'd have to be an epidemic of lego filtching going on..)

So it arrived, sealed and band-spanking new. The base of the tri-bot went together in less than the promised 30 minutes. Shortly thereafter I added a light sensor and managed to make a "follow the light" robot with only the brick's primative 5 program steps. The kids got a kick making it drive straight with our "Home Defense Certified" mag light.

(turn left. Wait for light. Drive straight while the light's on. loop)

A few days later, I added all the other pieces to make the fully-functional tribot. (not my videos, but thank you to the poster!) Cool beans, with the exception that I'm not particularly impressed with the accuracy/reliability of the ultrasonic distance sensor. Yes, I know that it has to do with sound waves bouncing higglety-pigglety everywhere. And I'm impressed that they included the tech at all. Then again, this is LEGO... (whom in my very biased opinion can do no wrong. Well, except for that ridiculous bionacle stuff..) and my expectations were that it'd pick out a fly at 20 meters.

[sigh] Such dissapointment.

It is a testament to Lego's excellent directions that my almost 5-year-old son and I put together spike in about 1 hour...with him doing about 50% of the assembly by himself. It was fascinating watching him turn the L-girders around in his hands, figuring out which side the pins were supposed to go in. While I did have to give lots of hints at first ("look at the picture...look again...that's almost there, hold it up and try again") by the time we were done, I just piled the parts in front of him and let him figure it out. And he did! Yeah, I'm sure I'm projecting on my kid a little but as a Lego Dad, I was bursting with pride!

Interestingly enough, fitting her personality my 6 year old daughter was content to simply collect and match pieces and combine them in interesting ways. ("Instructions? No thanks dad...")

Even the 3 year old got into the act. Though we quickly found that the tiny technic pins were just a mite too small for his fingers to manage.

We showed off Spike (the scorpion) to mom and some family. Everyone was mightily impressed by the tail stinger - it really does move quick!

I've enjoyed doing the projects with the kids (err, kid). Good way to familiarize with the new studdless building, get an idea of how things fit together and "lego best practices". Of course, there's no substitute for simply playing around, so the set will continue to commute with me.

Oh yeah, when it first came I was rather dissapointed (as were many, apparently) at the fact the box wasn't a particulary good storage tool. Apparently, the educational version of the set includes a nice organizational component. (It's also $30 more than the standard set's $250 price tag from what I've seen...so I won't compain too loud.)

All that said, I wasn't going to tote the set into work in it's box, so I had to have myself a little think. The upshot was that I snagged an old softside briefcase I had paired it with an inexpensive plastic organizer, and "poof"! Instant stealth mindstorms transport mechanism.

No, it doesn't fit the brick, but it does fit everything else quite nicely. And hey, for $2.99 from BigLots, I ain't gonna quibble.

So that's about it for now.

Oh wait - one more thing. While doing some poking about for this article, I happened across NXTasy.com. Check out the challenges in their forums. The first one is up and ends Dec 1st of this year. Summary: Using (only) lego, how far can you toss the blue ball? Current furthest is over 200" (17ft) by one entrant. Hmm....maybe this would be a good warm up for the cube anti-intruder defense? Ping pong balls could be a good auto-loaded assault ammo..

Friday, October 06, 2006

Mmm...small bits of acrylonitrile butadiene styrene...

Or ABS. The plastic of which Lego bricks are made.

I started my fascination with Lego probably close to 25 years ago. That would make me...8 at the time? Maybe younger, but I was a Lego fanatic by 8 to be sure.

Hours upon hours upon hours were spent with the toys creating Star Wars replicas, houses, horses, spaceships, cars, cats, moonbuggies, planes, mitochondria...

And then, at about age 15 or 16, it stopped. Computers (an ancient XT clone), adventure games, and voracious reading overcame the time I spent with the small, perfectly formed bricks.

Until now.

Long story short, I have kids (3,5,6), pulled the old legos out of storage and rediscovered the magic. As I watch them make space ship after space ship after car after house I remember fondly my own hours. A 9lb batch of mixed regular/technic courtesy ebay + my own bits and pieces + a couple general brick batches and creativity has been flourishing.

Well, that and suppressed profanity as I step on the inevitable 1x2 bricks hidden in the carpet.

Why Lego Defense Industries?

When I rediscovered my old stash, I gave my kids the "regular" ones, and took my beloved 8055 set with me to work. While diddling around with gears and pinions entertained for a season, I longed for a goal. A Big Hairy Engineering Goal. And slowly...with visitors chatting, the next challenge revealed itself.

How to fling an M&M 15 feet in a nice arc to land in the cube across a wall and one aisle away. I cackled evily as I imagined a barrage of chocolate death raining down from above like so much multicolored melt-in-your-mouth-not-in-your-hands hail. (actually, the target was a very congenial co-worker. Aka, someone who wouldn't chase me down and beat me with a mousepad were I successful.)

(Anyway.)

Many catapult ideas were built, scrapped, reworked.

"This will never do", I thought to myself. I ripped through the history of "thingies which fling stuff at something else, generally a largish amount of space away, with the intent to cause mayhem".

Looking for inspiration, naturally.

Of course, these folks generally weren't necessarily concerned with efficient confectionary delivery, ("pound cake" had a whole 'nother connotation) but the principles were otherwise very similar.

One thing led to another and I decided to see if I could create an auto-loading mechanism with to increase frequency of pelting.

(alas, unsuccessful. Mercifully for my officemates.)

I continued wandering down the blue, red, green and yellow brick road. I began collecting sites that dealt with all sorts of lego flinging machines. Those that shot rubber bands. Popped ping pong balls. Launched gen-u-ine lego missiles. Goodness only knows what else.

And then, it all came together. An unholy synthesis misanthropic intentions. A physical engineering challenge as well as an excuse to exercise Microsoft's .NET interface for mindstorms, increase my coding skills, and execute a design and solution with real world parameters.

An algamation of:

JP Brown's Serious Lego Aegis.

Daniel Rojas's lego rocket launcher

and Sebastian Dick's "Ultimate Lego Chaingun" .

(with inspiration from The Quintessential Sentry Gun.)

The progject's success will be determined by the ability of the device to track, shoot at, and hit one of these cool indoor mini-helicopters when monitored airspace is invaded.

Well, that and my own childish glee at seeing a small chaingun spinning up with an ominous hum, wakening and stretching while noseing blindly towards unwary office invaders...

("Please Exit The Office. You have 20 seconds to comply...")

I get tingles just thinking about it. And fits of childish, diabolical, gleeful chortling.

Progress will be posted here.

Assuming my officemate doesn't have me comitted first.

First hurdle...how to do the vision tracking? I'm using c#, so I'm not sure if I can leverage the lejos vision system, or if I'll have to write my own.

Did I mention that I'm using this as a good motivating point to sharpen my rusty-to-nonexistant coding skills?

Stay tuned.