Painter robots
Grand Opening!
Lauren — Thu, 05/14/2009 - 14:40
Lynxie's Art Studio is in its new home at the Children's Museum of Pittsburgh!
This past Saturday, May 9, was our Grand Opening. With great fanfare of balloons, posters, and a slide show, the finished exhibit was set up on the floor of the Children's Museum and opened for public use. Thank you to everyone who came and helped make this day a success! It was especially great to have our interns there to help with the setup and to have them be able to demo their own project, the tic-tac-toe playing robots.
Here are some pictures from the day:
Grand Opening Overall
Grand Opening Front
Grand Opening Child Drawing
Grand Opening Child Watching
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 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)
(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)



