25 Mar 2008 RoboDo   » (Journeyer)

Baby's First Words

My little NXT bot, RoboDo Baby, has uttered its first word, which was, "Ooops."

I'm using the sounds to help me figure out what's going on in the program as it runs.

Right now, Baby moves forward until it detects something within 10 inches. Once it detects something in its way, it says "ooops" then calls a custom scan block which returns range data for 90 degrees right and left, 45 degrees right and left, and straight forward. This data is then passed to a primitive mapping block which sets the variables right, front right, front, front left, and left to either "1" (can enter) or "0" (can't enter.)

If the way is clear in only one direction, Baby says "turn" followed by the clear direction. Baby will then turn in that direction and restart the movement routine.

If both right and left are valid options, Baby will randomly pick a direction. When this happens, Baby says, "Mindstorm" before making its choice. Introducing random elements gives me the ability to dynamically weight these decisions at some later time.

Two variables are set whenever Baby turns: "dist-turn" resets the distance Baby has traveled since the last turn, and "last-turn" records the last turn direction.

These variables are used in a special case where Baby has wandered down a corridor where turning is impossible. In this case, Baby says, "ooof" backs up to its last turning point, then turns in the same direction again, which sends it back the way it originally came from.

I'm having problems with the turns. It's hard to get accurate 90 degree turns, so Baby crawls in odd directions. The easiest solution will be to get the compass sensor, and that's what I intend to do.

Baby also hits its back end sometimes when it turns. Since RoboDo will have bluetooth communications between torso and legs, I am considering getting a second NXT kit so I can play with NXT to NXT communications via bluetooth. This would also give me more sensors and servos so I could have the bot navigate more effectively. If I do get another kit, expect RoboDo Baby to be replaced by RoboDo Toddler. :-)

That's all for now.

Latest blog entries     Older blog entries

Share this page