Home

Charles's blog

The final TicTacToe Game source code

Charles — Thu, 05/07/2009 - 20:52

Hey GirlTech interns, I finally got around to pulling the source code for the TicTacToe game you guys wrote from that laptop, cleaned it up a little, wrote some comments and posted them up to this website. You can download the code from the Lectures page here

http://www.etc.cmu.edu/projects/girl-tech/?q=node/167

Let me know if you have any issues or questions. I would suggest you guys read over the code again and try to understand it. Also you still have some work to do in the TTTPlayerAI class to make the computer smarter than it is now (look for the "TODO" parts). You can also expand the game and maybe make it into a Connect-Four game or something similar (way more things to work out there, like the pieces sliding down to the bottom etc). Just play around, experiment and have fun.

Also note that I've included the BioloidArm robot arm code including your favorite Inverse Kinematics math (it's in Armature). See if you can figure out how things are working in there.

  • Internship
  • News

Soft Opening

Charles — Sat, 04/25/2009 - 11:54

G.I.R.L. Tech had our Soft Opening yesterday and it was a big success! *whew*

It wouldn't have been possible had it not been for Lauren and Rebecca slaving away making these awesome cabinets til 4am these past weeks (get some sleep you two) and Lindsay for hammering away at that Interface code and electronics/lighting til it was all integrated (I'll admit it, that last minute lighting idea of yours was genius). Laura did an excellent job saving the days multiple times getting all the equipment (especially getting those incorrectly cut canvas plexis straightened out) and writing up all that documentation. And I can't forget about little Samantha ditching school to come out and represent our interns' work at Soft... Awesome job explaining and presenting it Sam!

The faculty and visitors were very impressed by the project and somewhat more impressed by the interns' tic-tac-toe playing robots than Lynxy... which made Lynxy somewhat jealous (older sibling syndrome and all, I can relate :). We were given tons of valuable feedback that we definitely hope to incorporate in the final exhibit... I particularly loved Brenda's idea of a personality on Lynxy... Pixar's Luxo Jr immediately came to my mind when she was describing how Lynxy could animate. Now I need to think of a way to give her a personality (through keyframed animations) without shredding through her servos too much with all those repetitive actions. Ah a good artsy engineering challenge!

We'd like to Thank all the faculty, students and visitors who came by at Soft and all those times prior to test out our little painting bot. We've still got a lot of work ahead of us to finalize and clean things up for the final grand opening in a few weeks.

  • Internship
  • News
  • Deliverable
  • Events

She's ALIVEEE!

Charles — Sun, 03/15/2009 - 17:44

So Spring Break was kinda' boring... NOT!

A few of us, with not much of a personal life, came in to work on the robot arm. We started on the Friday before Spring Break and by the Monday of Spring Break Lauren and I had successfully gotten the robot arm constructed from the LynxMotion kit. That was an adventure in itself let me tell you; instructions written so haphazardly that it left us saying WTF every so often... but we got through it eventually and with help from Laura and Jim Valenti getting us the extra tools we needed. Thanks guys.

Speaking of Jim, he's apparently an electronics genius (well at least to someone like me, a software guy :)... we'll hopefully be going back to him later for some help in making our robot more robust. He'd suggested putting fuses between the servos and the controller board so wires won't suddenly catch fire. We'll also need him to build us a wall adapter unit that can share the power between the controller board and the servos cleanly... the current implementation uses a 9v battery to control the controller board and I really don't like the museum having to keep replacing a battery.

So here's an image of the assembled bot:
LynxMotion Arm assembledLynxMotion Arm assembled

The rest of the week was a nice steady flow of win... Lauren got the bot mounted on a temporary ground plane and setup the drawing area etc. I figured out how to connect the bot to my laptop using a USB-to-Serial (DB9) adapter and used the Cutecom raw serial terminal on Ubuntu Linux in a VMWare on my Mac OSX Macbook Pro... I love technology :). The bot only comes with crappy Windows software but luckily the controller board (SSC-32) is capable of accepting raw servo commands over the serial port in plaintext (115200 baud, 8N1)... the USB-to-Serial cable shows up as /dev/ttyUSB0 in Linux. Cutecom allowed me to play around with the servos individually and map out their capabilities. I created a quick spreadsheet of their minimum, maximum and median values and what they actually meant on the bot.

That was the easy part... the hard part was the Inverse Kinematics. We need to use Inverse Kinematics (IK) to be able to tell the hand joint, called the end effector (where the drawing pen is held), to be in a particular point in a 2D plane (ie. where the paper is). IK allows us to essentially solve for the angles of all the joints/servos on the arm so we get the end effector to that point in space. I'd done some research earlier and found 3 Excel spreadsheets where people had shown a 2D vector graph of an armature capable of doing IK. The spreadsheet essentially had the equations I needed to write our own IK solver. I ported the equations to Perl at first and got it giving me the same degree outputs that the spreadsheet was giving me. Unfortunately writing a serial communication interface in Perl to the bot was starting to be a pain. So I found a serial communication module in Python called pyserial which seemed to do the job beautifully. So I ported the IK stuff over to Python and started testing out the IK solving on the bot in the real world... oh man that was so much fail. Some solutions seemed to kinda work (ie. it moved in the general direction) while others were just WTF. So it was time to actually do the math and learn IK... Luckily for me (the math failure) Lauren had a lecture in Inverse Kinematics in her various Mechanical Engineering classes... and she had notes! So we went on the whiteboard and drew out all the triangles and angles and related it to her notes and slowly but surely found the right equations (freaking law of cosines... I'd totally forgotten about that from high school). The "aha!" moment was satisfying to say the least.

Sooo we finally got the bot painting, not perfectly but painting nonetheless. Next up is creating a clean software framework and figuring out the pen picking up/putting down etc. Also I need to figure out some heuristics to get the perfect stroke with the fastest speed... it might come down to more samplings of points and/or adding more points in the strokes. In general the wider apart the sample points that the servos interpolate between (group servo motion in a given time frame), the worse the approximation of the stroke.

Anyways, here are some images of the baby bot's artwork:

BotArt: First Stroke (manual control): First Stroke (manual control)BotArt: First Stroke (manual control): First Stroke (manual control)
(NOTE: It's the big green line not the drawing of the display layout on the back which was done by our other bot Laura :)

BotArt: Square: First IK drawing (square)BotArt: Square: First IK drawing (square)

BotArt: Circle: First IK circlesBotArt: Circle: First IK circles

BotArt: Circle + Square: Circle (slow/accurate) + SquareBotArt: Circle + Square: Circle (slow/accurate) + Square

  • News
  • Painter robots
  • Prototyping

We met Penny Arcade today!

Charles — Wed, 02/11/2009 - 09:50

So the guys from Penny Arcade came to visit the ETC today (they were giving a talk yesterday at the University Center). They did a walk-around to every project room and we got their last time-slot at 5:00pm.

My first question to them was which was Gabe and which was Tycho... because apparently they don't look anything like their characters from the strip. Also Gabe and Tycho aren't their real names (it's Mike Krahulik and Jerry Holkins respectively)... I'm such a lousy fanboy, I should have known that. Reading their strip (as well as vgcats, apple-geeks, xkcd etc) was a daily ritual when I used to have an actual job :P

Anyways, we gave them the whole shpeel about our clients, our three ideas and the one we finally chose. They seemed very interested in the robot painter particularly since it merged aspects of what they were interested in themselves (art and technology). They were actually very eager to help too, throwing all sorts of ideas at us for the actual implementation (ie. using the RFID features of the surface table to figure out which brushes, showing us a symbolic programming language site etc). I think they were having a ball because when Drew came to pick them up to leave Mike wanted to stay a while longer. We were all like, dude you're more than welcome to stay and help us build this thing :P But alas, they had to get going.

Look they even mentioned us in their blog... OMG We made it to the Penny Arcade blog! Whoohoo! We're famous now!

  • News
  • Meetings

Well that was an easy choice

Charles — Fri, 02/06/2009 - 18:31

We went to meet with Jane from the Children's Museum today to discuss our 3 robot concepts. We were totally worried that she'd just be happy with them all and leave the final decision up to us... which meant we'd probably be spending the rest of the semester still deciding on a concept :P

  • News
  • Children's Museum of Pittsburgh
  • Meetings
  • Read more

Pittsburgh Pattern Recognition

Charles — Thu, 02/05/2009 - 20:54

So I was down at the University Center Employment something-or-other job fair and met one of the guys from the Pittsburgh Pattern Recognition company. I remember Lauren researched them as a potential candidate for facial recognition software. They're forked from the CMU Robotics Institute or something I believe.

  • Contacts
  • Read more

Robot CPU

Charles — Tue, 01/27/2009 - 00:00

This is the board that we used in my undergrad, the Handyboard. It was designed by
some professor at MIT for his class but then eventually evolved into the Lego
Mindstorm RCX thingamabob. Anyways here is a link to the site:

http://www.handyboard.com/

  • Research
  • Computer science
  • Mechanical engineering
  • Backdated

Welcome to the new Girl Tech / Children's Museum Project Website

Charles — Mon, 01/26/2009 - 20:01

We're in the process of setting up and configuring this website.
As soon as that's done we'll load it up with content including the various research and brainstormed ideas.
Stay tuned for further updates :)

  • News
  • Project website

Recent blog posts

  • Happy Summer Vacation!
  • Miss You Guys!!!
  • Grand Opening!
  • The final TicTacToe Game source code
  • The extinct Penbo and a giant hamster wheel!
  • Soft Opening
  • hmm... What should I name this?
  • A piggy playing tic tac toe in Star Wars!
  • Soft Opening!
  • Cool
more
Syndicate content

Site menu

  • News
  • Team blog
  • About
    • Children's Museum installation
    • High school robotics internships
  • Intern team members
  • ETC team members
  • Lectures
  • Private wiki

User login

  • Request new password

Search

Syndicate

Syndicate content

©2009 G.I.R.L. Tech | Original theme by Klaas Van Waesberghe | Customization by G.I.R.L. Tech.