General Assignment Specifications: The purpose of this contest is to create a Java-powered program for a WowWee RS media robot that successfully integrates original choreography, utilizing the robot's movements, with crowd-pleasing music. Dance moves are limited only by physical constraints of the robot. Music selections must be suitable for public play (playable on commercial radio). Robot dance demonstrations should be about 40 seconds in length.
How I did it: My robot, whome I lovingly named Jeeves, does a spiffy little jig to the classic Styx hit, Mr. Roboto. I used the sample dance routine provided in the Java SDK NetBeans module as a basis for the structure of my routine code. It consists of a series of move methods executed in sequence. Each move method in the sample dance code simply contained calls to various servo motors using the moveToPosition(int position, int speed) method. I also had some of my moves consisting of simple servo calls, but in addition I looked up other methods in the API such as the lift() and highPickup() methods for the arms, the the turnLeft/Right() and lookUp/Down() methods for the head, various methods of walking, and other things such as kicking. As for the timing, while the sample code used the parameter for the waitUntilStopped(int time), I only used this in a couple of places. Otherwise I would use the speed setting for the servo motion as a means of timing.
Problems I Encountered: I found that using the timing in the waitUntilStopped method often caused the robot to freeze for several seconds at a time, or the moves would be out of sequence. I also could not get the eye LEDs to turn off when I used the method that should have made them do so. Another strange problem I came across was that occationally the robot would do the specific calls inside each move method in sequence rather than simultaneously. I fixed these problems by using the speed of movement for timing rather than including a time perameter in waitUntilStop(), as previously mentioned. Most of the problems with move order and the moves not being carried out simultaniously were fixed when I did this. Occationally when I ran the program, a long pause would occur randomly, but it simply took multiple video takes and a bit of patience to solve this particular dilemma.
The Dance! A video of my dance can be seen on YouTube. Enjoy!