Sunday, January 24, 2010

MARVIN

Bot now has a name….MARVIN, or Mindstorms Anthropomorphic Robot-Verbalizing Interactive Nerd. Thanks to all of you that suggested names and voted!

I have been spending tons of time programming MARVIN. I have to tell you, creating an interactive robot with tons of sensors and motors is a HUGE task. I have spent more time programming than building, and I still have a long, long way to go to achieve my goals.

Here are some of the specs.
MARVIN is 28 inches tall, 22 inches wide, but the arms extend out to the side so it can be about 18" wider. If I had to guess, it probably weighs about 20 lbs.

The hardware includes:
4 NXTs
9 servos
5 PF motors, three XL and two MED
3 IR Receivers
2 micro motors
1 PF battery box
The HiTechnic SMUX
17 sensors,
• HiTechnic Compass
• 2 HiTechnic IR Links
• 4 ultrasonic sensors, three on the bumpers and one on the chest.
• 3 touch bumpers
• 1 touch for an emergency stop
• 4 sound sensor for emergency stop, yell louder than 95 and the robot dies,
• 2 light sensors, which picks up light signals from the master as commands, since there is no BlueTooth capability for fours NXTs using RobotC

Not all sensors are completely written into the code yet. I have envisioned what I want to do, but there just isn't enough time in the day to do it all.



Both arms and the face are controlled by functions that receive pre-programmed parameters from arrays such as...
int FaceArray[][]=
{
{9, 0, 0, 0, 0, 0, 0, 30, 200}, // Brows Only
{0, 0, 0, 100, 30, 100, 30, 0, 0}, // Eyes Only
{0, 0, 0, -100, 30, -100, 30, 0, 0}, // Eyes Only
{0, 0, 0, 0, 30, 0, 30, 0, 0}, // Eyes Only
{0, 120, 80, 0, 0, 0, 0, 0, 0}, // Mouth Only
{0, 10, 80, 0, 0, 0, 0, 0, 0}, // Mouth Only
{0, 120, 80, 0, 0, 0, 0, 0, 0}, // Mouth Only
{0, 0, 80, 0, 0, 0, 0, 0, 0}, // Mouth Only
{0, 0, 0, 0, 0, 0, 0, -30, -200}, // Brows Only
{6, 0, 0, 0, 0, 0, 0, -30, 200}, // Brows Only
};

This way, each motor can run completely independently thru their own task. Each array is created in Excel (easier to read the numbers) and exported into a data file that is read by the program.

Since there are 4 NXTs, I can run multiple motors and functions at the same time. Each arm has 3 degrees of freedom, plus the gripper motion.

The eyes move up & down and side to side. The eyebrows move up and down and turn in and out to make scowling and other facial movements reflecting mood. The more I look at MARVIN, he reminds me of Wall-E.

Here is a very basic look at how the robot is controlled; Master NXT (1) controls the drive motors, runs the face and sends a BlueTooth signal to NXT (2). NXT (2) then sends simultaneous light signals to NXT (3) and NXT (4) which run the arms. NXT (3) runs the grippers and NXT (4) sends a BT signal to NXT (3) when it is time to close the right gripper on NXT (4).

So basically, there is a "script" of several actions. For example, NXT (1) says "run Action 12". On all the other NXTs, they then run whatever Action 12 is, whether it be play a sound, move the right arm, play a tone, move the face, turn on a light etc. Multiple things happen all at the same time. MARVIN can sense the presence of someone (or something) right in front of him and can hear them.

He can do things such as “see” an object with sonar, yell "Ahhhh!" (moving his mouth while raising his eye brows), raise both arms, turn around and drive away. Then he can turn back around, point his arm at you and laugh. I have several actions such as this that I am working on teaching him. I hope to be able to set up 20-30 actions with more than 30 sound files that are standard with the NXT software.

2 comments: