Saturday, March 31, 2007

Two steps forward, one step back...

It's late. My eyes are tired. By brain is tired.

But it's working again.

The first step to a "dead reckoning" method of tracking was to get readings on the tachometers in the NXT's motors. Ie "number of degrees turned".

Then I had to do something useful. So I decided to use the laser as a guide to defining a "box" for targeting. Target the upper right & lower left, use those "coordinates" as scales for translating screen coordinates to rotation coordinates. (so to speak)

And to make sure I was getting things working properly, I decided to implement some boundary stuff. Ie, if we moved beyond the bounds, stop the movement (say, out of the top of the frame) and nudge things back in.

I did this also (partially) because I've had the robot chase butterflies and grind gears. Totally. Reading the tachs in the motors I decided would help keep things from moving too wildly.

Now I'm finding (of course) new issues. Like I'm getting what seems to be coordinate drift. I'm guessing it has to do with gear lash in the targeting. No biggie.

An even larger issue (though) is this...I thought I'd try targeting the corners of the "video window". And..hoooooboy.

The video motion detection needs some serious optimization. When it's off, my pentium M 1.6ghz chugs along at around 12%cpu. Connect to the camera and things go wonky.

(wonky. That's a technical term)

Anyway. UI becomes unresponsive. Click on a button and...wait...for...a...reaction...oops! There goes therobotandit'sturningALLTHEWAYAROUNDOHCRAP!!!

(because even though I release the button the "button is up you can stop now" message is still waiting behind the video processing queue and...)

Nevermind. I'm tired. I shouldn't be writing.

However, here's the new build. With dropped "low slung" stance and nifty grafted on laser.





Closeup of the laser:



(Yes, that's hot glue. Shhhh....)

5 comments:

Anonymous said...

Have a look at:
http://www.foxbox.nl/lego/index.asp?FRMid=39

aaron said...

Nifty! (it's looking less and less like I'm an oddity...)

Interestingly enough, it looks very similar to JP Brown's aegis..(webcam, 4 shot cyberslam magazine)

...wonder which came first..?
( http://jpbrown.i8.com/aegis.html )

Cool, though. Very, very cool.

Anonymous said...

JP Brown was first that's for sure! (i build this thing last week). Of course i found Aegis too [see links attached to my project page], but withoud a MLCAD model i had to find the solution myself.
It looks like i'm the first with moving images.....
best regards,
Gerard -Foxbox- Vos

aaron said...

That is still very, very cool.

And the rest of the site is...wow. (I'm feeling sooooo inadequate. ;^) )

I couldn't find an email address on your flickr pages nor your website.

(did I just not look hard enough?!)

So I went ahead and assumed you'd be vain enough to let me call out and point back to your most excellent site. (check the latest entry)

Anonymous said...

Aaron, Yes! it is hard to miss ;-). Thankx a lot. Not advertising my email address is a way to reduce spam. Most comments are entered via YouTube.
Playing with Lego is my sparetime winter hobby. This year i set myself the goal of delivering one project a week; with the exeption of a week holiday in Sweden i succeded.
Thankx (??!) to global climate change i'm now able to go out sailing 1 month earlier than "normal", and the next 6 months my sparetime will go into Sunfish sailing.
CU and good luck with LDI!
br
Gerard