Monday, May 12, 2008

Rock Band Vocalist

For a final project we wrote some code so a laptop could act as a vocalist player in the cooperative music rhythm game, Rock Band. The software takes an available capture card (will work with a single card attached in PCI, PCIx1, USB, or FireWire interface, but not ethernet), calibrates itself to the frequency range of the song, and plays the tones to go along with the music. There is future improvements to be made, such as dealing with the Rock Band key adjusting which tends to thwart any attempts to sing successfully, and upping the capture resolution to allow the addition of OCR and voice/worded output.

The pdf attached officially gives the details necessary to understand the project further: Project Report

If you are interested in the source code, shoot me an email.

Monday, March 3, 2008

Project 3 Mike and Styler

Our project 3 compares still images. Give a picture and a name, it analyzes the picture and stores it's color distributions in an xml file. Given only a picture, it compares it against all stored people (xml files) it has saved. To compare, it creates color distributions for Red, Blue, and Green pixels (barring white pixels). Then, it compares the red distributions local minimums, maximums, the median and the mean. Comparing these distributions yields a difference, and the known person with the least difference is considered the match.

Here are our saved pictures:



Which were saved into XML. Then, we ran these pictures through the comparison:



The results were:
FaceDetection.exe styler2.jpg
Diff with styler from styler.xml is 103.669794574545
Diff with mike from mike.xml is 179.5194369055
Best match is: styler

FaceDetection.exe mike2.jpg
Diff with styler from styler.xml is 158.225831330128
Diff with mike from mike.xml is 82.0856684981685
Best match is: mike

The algorithm was a success. Given a photo stored into xml, the Diff would equal 0 every time. The algorithm also worked in the reverse direction. However, it is only suitable for fixed backgrounds between photos.

The code is in C# and available here. and a sample XML output is available here.

Project 3

For Project 3 we split into two teams, Mike and Styler vs. Wes and Lucas.

Monday, February 18, 2008

Project 2 Final Cut

Project 2 Credits

Optimash Prime:
Lead Caddy

Alex Styler:
Artificial Intelligence Engineer
Lead Programmer
Wardrobe
Director
Lead Camera

Lucas Coyne:
Team Chaplain
Assistant Caddy
Bugging Lead

Michael Edelson:
Interface Engineer
Debugging Lead

Wesley Chu:
Special Effects Artist
Talent Handler

Project 2 Results

Over 15 trials with no training, selecting complex motions at random:
Average putt distance: 1.66 feet
Percentage of successful swings: 33%

After 50 iterations of training, altering primitive probabilities and eliminating unsuccessful swings:
Average putt distance: 5.28 feet
Percentage of successful swings: 73%

After learning a dramatic increase in performance is observed. With more iterations, even better swings will become more probable and more unsuccessful swings will be eliminated, further increasing performance. The servo speed, however, limits the robot from ever being a successful player beyond short putts.

Project 2 Stills


Project 2 Source Code

The source code for project 2 is available here. It starts with 3 or 4 primitive motions for each servo and creates random complex motions to execute. After execution it waits for feedback through the IR and a menu that we created. Possible feedback is No swing (wii remote didn't recognize the motion), distance ball traveled 1-20, or Switch Modes. During learning mode, the robot takes the feedback we give it, and weights the motions for each servo based on the level of success. Thus a motion that is involved in a good swing is much more likely to happen. During learning mode, doing the same swing multiple times is discouraged (50% chance to repick a swing the 2nd time, 30% the 3rd, etc) in order to encourage innovation. Swings that entirely fail, on the other hand, will not be selected again at all. Switching back to regular mode, the robot keeps the weighted probabilities from past learning, but will select good swings as many times as it wants.

For questions email us.

Project 2 Goals

Demonstrate automated learning with minimal human interaction. We will use Wii Sports to demonstrate how the robot can learn how to putt with a Wii remote. From random motions, the robot will learn which motions yield good results and combine primitive servo motions from good shots into better complex motions.

Wednesday, February 6, 2008

Going... going... gone!

Apparently Robot YMCA doesn't fall into the category of "parody".

This is to notify you that we have removed or disabled access to the following material as a result of a third-party notification by SCORPIO MUSIC S.A. / CAN’T STOP PRODUCTIONS INC. claiming that this material is infringing.


There's more but that sums it up.

Oh well, on to project 2.


Shh... link here.

Monday, February 4, 2008

Project One Final Cut

Hope you enjoyed it.

Project One Credits

Alex Styler:
Director
Risk Management
Hair Stylist

Lucas Coyne:
Executive Producer
Choreographer Lead
Narrator

Mike Edelson:
Lighting Technician
Public Relations
Wardrobe

Wesley Chu:
Programming Lead
Stunt Double
Storyboard

Cast
The Leatherman - As Himself

Music
Y.M.C.A.
The Village People
Casablanca Records (1979)

Project One Stills










Project One Source Code

The source code for project 1's dance contest is here. This java code can be substituted for the main.java code in a new Dancer project. It looks for a ymca.mp3 on your SD card, which we cannot provide. The robotID integer is a flag to switch between which robot (1=Y, 2=M, 3=C, 4=A).

Project One Notes

The fourth robot actually shows an A on his chest panel on the 2nd chorus of YMCA. You just can't really see it. On the first chorus, he's not trying to make the A either... he's shaking his head in confusion.

To ensure the robots were in sync from the beginning, they had to start in the exact same positions, meaning we often had to 'scare' them with their flinch sensors to reset their bodies prior to starting the program.

To keep them in sync, we had to use Thread.sleeps and just move on to the next action instead of utilizing the waitUntilStop command.

The RS Media

The robots used in there projects are Wowwee Robotics RS Medias. They are programmed in Java and can display photos, play music, and perform other media or mobile tasks.

The Team

The team consists of:
Alex Styler (styler@cmu.edu),
Lucas Coyne (lcoyne@andrew.cmu.edu),
Wesley Chu (wchu@andrew.cmu.edu), and
Mike Edelson (medelson)

All are seniors enrolled in CMU's RI Humanoids course, 16-264.