Tuesday, May 15, 2007
The accelerometer (acc. for short) is pretty cool but I'm bot sure I'll be able to use it to balance my robot. I should have researched this a bit more. I thought the tilt measurement function was independent of the acceleration part. Unfortunately, it isn't so while the robot falls, the numbers being reported are not the angle. I need to puzzle a bit more on this.
Another problem I had was accessing the sensor from RobotC. The documentation identifies the address as 42H to 47H. I had something at 42H but nothing meaningful at 43H and 44H.
Late in the evening, after 2 Advils, I decided to take a peek at 40H to 45H instead and voila! all 3 axis on the NXT display. Time to update your documentation guys.
Tuesday, May 8, 2007
This whole thing relies on an algorithm called PID (Proportional Integral Derivative). Looks like one of the terms actually takes care of that by minimizing the accumulated error.
See my web site for a more detailed description.
A big problem seems to be that once it starts rolling in one direction, it just keeps going. There's no "stay in place" logic, so as long as the robot stays pretty much vertical, it's happy.
I'm now working on a more elaborate program inspired by my imperfect understanding of Ryo's project. That code takes everything into account.
Monday, May 7, 2007
I did it. After uselessly going to Sears (losers, they have nothing) and Toys-r-us (Downtown Toronto location closed, worse losers), I finally found an NXT box, way up there on the top shelf at an obscure toy store. It was overpriced compared to Lego's online store but I didn't care. Who can wait for delivery.
Built the first sample robot as soon as I got home. My 12 year old daughter, which to my great shame has never played with the Lego kits I bought for her when she was younger, couldn't keep her hands off my new toy. I sure told her off. If she wants to play with Lego robots, she can join the friggin' Lego club at school!
No programming yet...
Tuesday, May 1st, 2007
Added the light sensor to the front and wrote a line following program. Not a big fan of Visual Programming. Researched options a bit and decided to try RobotC. leJOS seemed interesting but it looks like it's not quite ready yet. I'll try it for sure later. My other option was NBC/NXC which was close to RobotC. What did it was Steve Hassenplug's NXT development environment comparison. RobotC is way fast, plus the debugger is nice. I'll try it and see if it's worth 30 bucks.
Wednesday, May 2nd, 2007
Couldn't wait any longer.
Friday, May 4th, 2007
Installed RobotC and updated my Firmware. Looked at Philo's program written in NBC and quickly adapted it to RobotC. Robot falls faster than on the movies. Need to play with the various constants.
I'm not too sure about this light sensor. It's all right, but as soon as the surface changes, it's bye-bye robot. Not to mention hills.
To make a long story short, I ordered the accelerometer sensor which supposedly also reports the tilt in three axis. I also ordered a rechargeable battery pack 'cause I'm going thru batteries like their going out of style. Unfortunately, they are back ordered so my order is delayed, pending the battery pack. Aaaaarg! I'll keep playing with the light sensor in the mean time.
Sunday, May 6th, 2007
My brain is mush. I have been trying to comprehend Ryo's Mathematical Model of the NXTWay-G.
Did you know that:
That's the kind of crazy stuff that's involved. And this is a simple one. How on earth am I supposed to know the moment of inertia of my robot's body? Do I need it?
I'm going to maintain a an annotated model that describes what I find out as I progress.