Random header image... Refresh for more!

Category — Crazy Weekend Project 1: Pong Robot

New Tricks

I’m not sure that playing nice and writing a proper Mindstorms program is going to work out.  It’s too difficult to tweak the motor settings on the fly, and drag and drop programming isn’t exactly conducive to setting up a complex command system where you send a packet that contains all of the motor settings.

So, I’m going to try something new…

You see, Mindstorms are popular because they’re not locked down.  Lego has released many technical documents on how the NxT Brick works.  Those documents include highly useful things like this:

 Set Output State

I can simply send a message directly over Bluetooth that tells the motor what to do.  That way, all of the control is on the PC application side, where it’s easy to tweak settings.

Hopefully this will make things run happier.

September 7, 2009   No Comments

Well. That Didn’t Work.

I just tried a suggested alternative method of playing.  Rather than moving to the predicted point, why not try to track the ball, like the CPU paddle does.  Well…  Here’s what happened with that attempt:

  1. Paddle shoots WAY up.
  2. Paddle overcorrects WAY down.
  3. Paddle is off the screen.
  4. System is confused.

Not terribly successful.  I’ll try again with lower motor settings, since it seems like the motor has kicked up the power since last night for some reason.

September 7, 2009   No Comments

INTRUDER ALERT! INTRUDER ALERT!

Should I be worried...?

Maybe I shouldn’t have played Berzerk with the Mindstorms unit still attached to the Atari…

September 7, 2009   No Comments

LeftMedium Stop RightFast RightMedium Stop RightMedium Stop

So, all this talk about it, and all these videos of the thing going wrong, and yet I haven’t actually posted a video of what the thing does when it’s actually working right?  Well, here you go.

Robot In Action

And the YouTube version:

It’s a lot more subdued than when I started this morning.  The robot I had in the morning could have torn your hand off.  Now it’s much more mellow.  (Of course, I’m afraid that it’ll kill me in my sleep, but whatever…)

Two days remain, and there is still much to be done.

September 7, 2009   2 Comments

Getting Better All The Time

Getting Better All The Time

21-13, the best score yet.  I tweaked the motion yet again.  I went back to continuous motion, for starters, since the angular was constantly starting and stopping over and over and over and over, slowing it down.  I think part of the main problem before was the message buffering.  The same thing that was happening with the LEFT LEFT LEFT stuff I talked about earlier was happening in continuous motion mode, too.  The solution here doesn’t have to be async, though, which is nice.  Instead, all I have to do is not send the same message more than once in a row.  You can tell me LEFT LEFT LEFT LEFT LEFT all you want, and I only tell the robot a single LEFT and I leave it at that.  It’s now hardly ever overshooting the mark, and when it does, it can usually recover with a quick nudge back in the right direction.

In The Lead

Also, with this game, the robot was briefly in the lead!

So, now, why isn’t it winning?  It’s supposed to be a perfect robot, why is it still losing to a 30 year old processor?  Two big apparent reasons:

  1. It’s not moving fast enough.  I need to alter it so that it will race from one side to the other when the projected point is far away.
  2. It’s not going to the right place.  The trajectory projection isn’t perfect.  It’ll sometimes miss the mark.  I’ll need to go back and work on that a bit to improve the prediction.

Still, I’m very pleased with what’s come together in the last hour or so.  The day wasn’t going so well until then.  Right now, I’m at the point where I’d hoped to be by about 2 PM…  The problems today have all been little stupid ones that can only be fixed by experimentation.  There hasn’t been much problem solving, it’s all been iterative failure toward a higher goal.

September 6, 2009   No Comments

I Think This is a 0xBF Error…

0xBF

[Click for Video]

The game is over.  It got clobbered.  And now…  I think it’s having a minor break with reality.

September 6, 2009   No Comments

Four, count’em FOUR points!

Getting Better

The best part about sucking is that any improvement seems like a huge victory.  This is a 400% improvement over my previous score!

I discovered that there was a command flag to indicate that a return message wasn’t necessary.  Apparently return messages could take 60ms to send, which is very precious time in this world.  So, I set that flag and now it’s running much smoother and stopping where it should more often.

Unfortunately, the problem now seems to be that it’s not going fast enough.  It won’t run to the other side of the screen when it needs to get there fast.  Now, that’s something I can fix.  I hope.

September 6, 2009   No Comments

0xBF: My Kind of Error Code

My Kind Of Error Message

September 6, 2009   No Comments

Tip of the Day

It is sometimes helpful to download the latest program to a device before attempting to use the program on the device.

September 6, 2009   No Comments

Angular Momentum

Changing to basic angles seems to have helped considerably.  The movements are now more controlled.  The problem is, now they’re completely overshooting the mark.  I think the problem is that I’m sending rotate requests with every frame, and they’re getting queued up on the robot.  So, I say LEFT LEFT LEFT LEFT LEFT LEFT LEFT STOP, but it’s hit the mark after just two LEFTs. yet it still runs through the remaining five LEFTs before it sees my STOP.

Looks like I need to go async here and have the robot tell me when it’s done moving before I send it another command.

September 6, 2009   No Comments