Archive for May, 2009

Friday (Saturday) Night Robotics – MANOIlangelo

Posted by Erin, the RobotGrrl on Saturday, May 30th, 2009

If the title wasn’t a big enough hint (MANOIlangelo), my next goal is to program MANOI to write the alphabet and numbers!

MANOIlangelo

MANOIlangelo from RobotGrrl on Vimeo.

In case this somehow turns into a big project of mine, or the focus of my summer research, I’m going to write a very detailed version of my procedure (just to be safe). It will sound pretty un-blogtastic, but there will be pictures to look at, though! :D

After I finished creating all of the movements for MANOI’s arms possible (waving, hand shaking, worm/slide), I was wondering what else I could do with MANOI. After thinking about all the motions we do with our hands, I finally came across writing!

I brainstormed about the set-up a bit, and I decided to go with a simple set-up, instead of trying to make an eisel/board. The paper is about waste height, it’s held there using books. :P

Next part to figure out was the pencil. I played around with it a bit to see where it would be the best way to place it. The best way to place it is along the servo bracket so it doesn’t limit any of the motions.

Now I had to get the pencil to stick there! I actually didn’t use hot glue (not a good idea to use hot glue in room at night). Instead, I used a combination of tape and hair elastics. I would have use tie wraps instead of the elastics, but I didn’t have any. :(

After it was all attached and all, it was time to start trial and error’ing!

In order to see the << insert smart word here >> of the servos, I created two simple frames to move servo #2 back and forth. Through visual observation, I tuned it so that the pencil never left the paper. The result is a line! Due to chaos though, if the motions is repeated, it is actually an ellipse. This is because everything from the position of the paper (may be moving if it’s not level), the attachment of the pencil, the length of the pencil lead, the movement of the robot, and the possible-yet-minimal errors in the servos.

I repeated the previous step, but for servo #3.

I then combined the motions of servo #2 and servo #3 to make a rectangle!

Results:

MANOIlangelo
1 iteration of the rectangle

MANOIlangelo
Many iterations, started 2 times. Moved the paper between trials.

MANOIlangelo
Several iterations, strong demonstration of chaos, most likely due to the length of the lead

MANOIlangelo
A few iterations, little sign of chaos

MANOIlangelo
MANOI drawing

It is pretty cool! Looking at the resulting rectangles though, it is obvious that there is a section where the pencil does not touch the paper. This is known as a singularity.

MANOIlangelo

If one was to take the inside of a hemisphere, and draw two types of lines on it, you would get this:

MANOIlangelo

At the bottom of the hemisphere, there is more concentration. However, as it gets closer and closer to the semi-circle line or equator, it becomes sparse.

One could apply this idea to the rectangle, where it is 1/4 of a sphere. Note, by sphere I actually meant hemisphere. EDIT: Scratch that, I did mean sphere. I’m having problems with fractions, evidently! LOL!

MANOIlangelo

MANOIlangelo

Why does this make sense? If you think about it, in 3D space the end-effector (pencil) will not touch the paper exactly the same anywhere. There will be more pressure in some spots than others. However, since we want MANOI to draw away from his body, and infront of itself, this leaves only 1/4 of a sphere.

The next step is to create a simple test program that will draw dots all over this area of the rectangle. This way we can gain a better understanding of how to make a robot draw letters.

The interesting part about this is that, in this scenario, it would actually be easier to create AI for the robot to learn how to write the letters by simple feedback, compared to programming the letters in. However, I believe that I should program them in first, and then possibly make AI for it. This way, there can be a goal node in the AI if it was to be made. :D

Posted in: MANOI, Projects, Robot.

Combo Snake Move

Posted by Erin, the RobotGrrl on Thursday, May 28th, 2009

This is a new motion that I’ve been working on for MANOI for a few weeks now. I just finished it tonight! :D

Here is a video:

MANOI Combo Snake Move from RobotGrrl on Vimeo.

There is a surprising amount of frames:

  1. void comboSnakeMove(int repeat) {
  2.    
  3.    setFrame(frame1_left, 500, 500);
  4.    setFrame(frame2_left, 100, 20);
  5.    setFrame(frame3_left, 200, 20);
  6.    setFrame(frame4_left, 100, 50);
  7.    setFrame(frame5_left, 50, 20);
  8.    setFrame(frame6_left, 100, 20);
  9.    setFrame(frame7_left, 100, 100);
  10.    
  11.    /* for(int i=0; i<3; i++) {
  12.      setFrame(frame8_left, 20, 10);
  13.      setFrame(frame9_left, 50, 0);
  14.      setFrame(frame10_left, 20, 10);
  15.      setFrame(frame9_left, 50, 0);
  16.     } */
  17.    
  18.    setFrame(frame11_left, 100, 0);
  19.  
  20.    for(int i=0; i<repeat; i++) {
  21.      setFrame(frame1_rcombo, 500, 100);
  22.      setFrame(frame2_rcombo, 100, 20);
  23.      setFrame(frame3_rcombo, 100, 20);
  24.      setFrame(frame4_rcombo, 100, 50);
  25.      setFrame(frame5_rcombo, 50, 20);
  26.      setFrame(frame6_rcombo, 100, 20);    
  27.      setFrame(frame7_rcombo, 100, 100);
  28.    
  29.     /*for(int i=0; i<3; i++) {
  30.      setFrame(frame8_rcombo, 20, 10);
  31.      setFrame(frame9_rcombo, 50, 0);
  32.      setFrame(frame10_rcombo, 20, 10);
  33.      setFrame(frame9_rcombo, 50, 0);
  34.     }*/
  35.    
  36.      setFrame(frame11_rcombo, 100, 0);
  37.      setFrame(frame1_lcombo, 500, 100);
  38.      setFrame(frame2_lcombo, 100, 20);
  39.      setFrame(frame3_lcombo, 200, 20);
  40.      setFrame(frame4_lcombo, 100, 50);
  41.      setFrame(frame5_lcombo, 50, 20);
  42.      setFrame(frame6_lcombo, 100, 20);    
  43.      setFrame(frame7_lcombo, 100, 100);
  44.    
  45.    /* for(int i=0; i<3; i++) {
  46.      setFrame(frame8_lcombo, 20, 10);
  47.      setFrame(frame9_lcombo, 50, 0);
  48.      setFrame(frame10_lcombo, 20, 10);
  49.      setFrame(frame9_lcombo, 50, 0);
  50.     } */
  51.      
  52.      setFrame(frame11_lcombo, 100, 0);
  53.      
  54.   }
  55.    
  56.    setFrame(homeframe, 5000, 500);
  57.  
  58. }

I was very tedious with this motion, but I think it was worth it. The whole trick behind it though was that I broke it down into parts, specifically around the times where MANOI has to rotate its arm. Lots of tweaking to get both sides to look similar. The left side is not exactly the same as the right side. It was all worth the theory, in the end!

Posted in: MANOI, Programming, Projects, Robot.

Less Wires Hanging Out

Posted by Erin, the RobotGrrl on Tuesday, May 26th, 2009

Today MANOI was having some troubles with its SSC-32. I thought it was the TX line. Ha! It was the +5V, it broke right off!

So I packed a few boxes that I could use for stuff, and decided to once again give MANOI a refurb.


MANOI

The box now holds the Sanguino:


MANOI

and the wires can go out the side:


MANOI

What does MANOI do after all this…


MANOI

“FOUL! RED CARD!”

=)

In other news, I’m back at Clarkson for the summer!!! Woot! Oh yeah, and I got a Clarkson teddy. It is MADE IN AMERICA! Stanford and MIT teddies are not. :P

Posted in: MANOI, Projects, Robot.

Update on MANOI’s code

Posted by Erin, the RobotGrrl on Monday, May 18th, 2009

I updated MANOI’s code a little bit. I think it will work better, it’s more organized for sure!

This program “lifts” MANOI’s broken leg.

  1. #include <stdio.h>
  2.  
  3. int HOME0 = 1800;
  4. int HOME1 = 1500;
  5. int HOME2 = 1000;
  6. int HOME3 = 1300;
  7. int HOME4 = 1300;
  8. int HOME5 = 1600;
  9. int HOME6 = 1900;
  10. int HOME16 = 1550;
  11. int HOME17 = 1200;
  12. int HOME18 = 900;
  13. int HOME19 = 1600;
  14. int HOME20 = 1600;
  15. int HOME21 = 1500;
  16. int HOME22 = 1200;
  17. int HOME23 = 1000;
  18. int HOME24 = 1580;
  19. int HOME25 = 1600;
  20.  
  21. void setup() {
  22.   Serial.begin(9600);
  23.  
  24.   int homeFrame[18] = {
  25.       HOME0,
  26.       HOME1,
  27.       HOME2,
  28.       HOME3,
  29.       HOME4,
  30.       HOME5,
  31.       HOME6,
  32.       HOME16,
  33.       HOME17,
  34.       HOME18,
  35.       HOME19,
  36.       HOME20,
  37.       HOME21,
  38.       HOME22,
  39.       HOME23,
  40.       HOME24,
  41.       HOME25
  42.     };
  43.  
  44.   setFrame(homeFrame, 100, 500);
  45.  
  46.   Serial.println("Hello world!");
  47. }
  48.  
  49. void loop() {
  50.   for(int i=0; i<500; i+=50) {
  51.   int liftLeftLeg[17] = {
  52.       HOME0,
  53.       HOME1,
  54.       HOME2,
  55.       HOME3,
  56.       HOME4,
  57.       HOME5,
  58.       HOME6,
  59.       HOME16,
  60.       HOME17+i,
  61.       HOME18,
  62.       HOME19,
  63.       HOME20,
  64.       HOME21,
  65.       HOME22,
  66.       HOME23,
  67.       HOME24,
  68.       HOME25
  69.     };
  70.     setFrame(liftLeftLeg, 500, 5000);
  71.   }
  72. }
  73.  
  74. void setFrame(int theFrame[], int moveTime, int delayTime) {
  75.   char str[250]; // I will count the actual number, some day
  76.   sprintf(str, "#0 P%d #1 P%d #2 P%d #3 P%d #4 P%d #5 P%d #6 P%d #16 P%d #17 P%d #18 P%d #19 P%d #20 P%d #21 P%d #22 P%d #23 P%d #24 P%d #25 P%d T%d", theFrame[0], theFrame[1], theFrame[2], theFrame[3], theFrame[4], theFrame[5], theFrame[6], theFrame[7], theFrame[8], theFrame[9], theFrame[10], theFrame[11], theFrame[12], theFrame[13], theFrame[14], theFrame[15], theFrame[16], moveTime);
  77.   Serial.println(str);
  78.   delay(moveTime + delayTime);
  79. }

I am more happier with this :) Pretty easy to program with one hand, and MANOI in the other.
Thanks to all who left a comment on the previous post! =)

Posted in: MANOI, Programming, Projects, Robot.

Friday Night Robotics – Code > All theory

Posted by Erin, the RobotGrrl on Friday, May 15th, 2009

Sometimes theory isn’t worth blogging about. This is definitely the case for this FNR.

Instead, I will blog about the code that I use for MANOI! It’s super simple… this allows me to concentrate on harder things!

This is MANOI, in its simplest form:
MANOI <-- 17 servos <-- SSC-32 <-- Sanguino

The SSC-32 is the serial servo controller. It listens for commands at 9600bps, and sends the PWM to the servos accordingly. The Sanguino (an alternative Arduino with an ATmega644) sends these commands to the SSC-32.

Here is what I have at the top of all of my Arduino sketches for MANOI programs:

  1. int HOME0 = 1800;
  2. int HOME1 = 1500;
  3. int HOME2 = 1000;
  4. int HOME3 = 1300;
  5. int HOME4 = 1300;
  6. int HOME5 = 1600;
  7. int HOME6 = 1900;
  8. int HOME16 = 1550;
  9. int HOME17 = 1200;
  10. int HOME18 = 900;
  11. int HOME19 = 1600;
  12. int HOME20 = 1600;
  13. int HOME21 = 1500;
  14. int HOME22 = 1200;
  15. int HOME23 = 1000;
  16. int HOME24 = 1580;
  17. int HOME25 = 1600;

It’s useful to have as a reference. The way I organized the SSC-32 was to have all of the servos for above the waste from 0-15. Below would be 16-29. There’s a lot more leg motors than there are arm motors :P

Here is an example of a motion (forward ‘skating’):

  1. void forward(int repeat, int theTime) {
  2.  for(int i=0; i<repeat; i++) {
  3.    // Frame 1
  4.    Serial.print("#0 P");
  5.    Serial.print(HOME0);
  6.    Serial.print(" #17 P");
  7.    Serial.print(HOME17);
  8.    Serial.print(" #19 P");
  9.    Serial.print(HOME19);
  10.    Serial.print(" #22 P");
  11.    Serial.print(HOME22);
  12.    Serial.print(" #24 P");
  13.    Serial.print(HOME24);
  14.    Serial.print(" #3 P");
  15.    Serial.print(HOME3);
  16.    Serial.print(" #6 P");
  17.    Serial.print(HOME6);
  18.    Serial.print(" #2 P");
  19.    Serial.print(HOME2);
  20.    Serial.print(" #5 P");
  21.    Serial.print(HOME5);
  22.    Serial.print(" T");
  23.    Serial.println(theTime);
  24.    
  25.    delay(theTime+10);
  26.    
  27.    // Frame 2
  28.    Serial.print(" #17 P");
  29.    Serial.print(HOME17-55);
  30.    Serial.print(" #19 P");
  31.    Serial.print(HOME19-50);
  32.    Serial.print(" #22 P");
  33.    Serial.print(HOME22+45);
  34.    Serial.print(" #24 P");
  35.    Serial.print(HOME24+50);
  36.    Serial.print("#0 P");
  37.    Serial.print(HOME0 + 150);
  38.    Serial.print(" #3 P");
  39.    Serial.print(HOME3 - 300);
  40.    Serial.print(" #6 P");
  41.    Serial.print(HOME6 - 300);
  42.    Serial.print(" #2 P");
  43.    Serial.print(HOME2 + 100);
  44.    Serial.print(" #5 P");
  45.    Serial.print(HOME5 + 100);
  46.    Serial.print(" T");
  47.    Serial.println(theTime);
  48.  
  49.    delay(theTime);
  50.  
  51.    // Frame 3
  52.    Serial.print("#0 P");
  53.    Serial.print(HOME0);
  54.    Serial.print(" #17 P");
  55.    Serial.print(HOME17);
  56.    Serial.print(" #19 P");
  57.    Serial.print(HOME19);
  58.    Serial.print(" #22 P");  
  59.    Serial.print(HOME22);
  60.    Serial.print(" #24 P");
  61.    Serial.print(HOME24);
  62.    Serial.print(" #3 P");
  63.    Serial.print(HOME3);
  64.    Serial.print(" #6 P");
  65.    Serial.print(HOME6);
  66.    Serial.print(" #2 P");
  67.    Serial.print(HOME2);
  68.    Serial.print(" #5 P");
  69.    Serial.print(HOME5);
  70.    Serial.print(" T");
  71.    Serial.println(theTime);
  72.    
  73.    delay(theTime+10);
  74.    
  75.    // Frame 4
  76.    Serial.print(" #17 P");
  77.    Serial.print(HOME17+55);
  78.    Serial.print(" #19 P");
  79.    Serial.print(HOME19+50);
  80.    Serial.print(" #22 P");
  81.    Serial.print(HOME22-45);
  82.    Serial.print(" #24 P");
  83.    Serial.print(HOME24-50);
  84.    Serial.print("#0 P");
  85.    Serial.print(HOME0 - 150);
  86.    Serial.print(" #3 P");
  87.    Serial.print(HOME3 + 300);
  88.    Serial.print(" #6 P");
  89.    Serial.print(HOME6 + 300);
  90.    Serial.print(" #2 P");
  91.    Serial.print(HOME2 + 100);
  92.    Serial.print(" #5 P");
  93.    Serial.print(HOME5 + 100);
  94.    Serial.print(" T");
  95.    Serial.println(theTime);
  96.  
  97.    delay(theTime);
  98.  
  99.   }
  100.   lastMove = 3;
  101. }

It looks long, but it actually isn’t. I have numerous Serial.print()s. The main reason behind this is because I still haven’t found a way to do this:

  1. System.out.println("#0 P" + HOME0 + " #1 P" + HOME1 + " #2 P" + HOME2 + " T" + theTime);

in C.

The forward motion has 4 ‘frames’ in it. Frame 2 and 4 differ in the way that frame 2 is to bring the leg forward, and frame 4 is to bring the leg back. These two frames are joined together by the home position of those servos, frame 1 and 3. It can definitely be said that the motions need to be worked on ;)

The backwards motion looks the same as the forward motion.

It all culminates into the two main Arduino functions:

  1. void setup() {
  2.   Serial.begin(9600);
  3.   moveServosIndependent(300);
  4.   delay(1000);
  5. }
  6.  
  7. void loop() {
  8.   forward(10, 200);
  9.   //shoot(0);
  10.   //forward(5, 500);
  11.   //shoot(0);
  12.   //shoot(1);
  13.   //left(10);
  14.   //delay(1000);
  15. }

moveServosIndependent is a motion that sets all the servos to their home position :)

All in all, that is what MANOI’s code looks like. Highly unimpressive and super simple! :D

Posted in: MANOI, Programming, Projects, Robot.

RoboGlyphs are here!

Posted by Erin, the RobotGrrl on Wednesday, May 13th, 2009

I have hinted at RoboGlyphs several times during my blog posts… and now they are here!

RoboGlyphs - 25

They look stunning in real. Since I know not everyone would want an illuminator, I broke it down into three products:

RoboGlyph + Illuminator = $16.00
RoboGlyph = $12.50
Illuminator = $4.50

The illuminator comes in 3 different colours – orange, green, and blue!

I plan to make RoboGlyphs similar to the Nerd Merit Badges, where you have to collect them all to be SUPER COOL! :)

The first set of RoboGlyphs are the Three Laws of Robotics from Isaac Asimov.

RoboGlyphs - 07

RoboGlyphs - 12

RoboGlyphs - 21

I can’t wait to see if some will use an Arduino + PWM an RGB LED to create interesting effects. I know I’ll probably have to try that tomorrow! :)

You might be wondering where this money will go? Here’s the list:

1. MANOI’s gears (I need a new gear for one melted :( )
2. RoboGames 2009 Registration
3. Plane tickets to SF
4. Hotel in SF
5. Possible RobotGrrl.com T-shirt
6. Robot trading cards
6. Books, parts, sensors, etc.

The main focus here is RoboGames. :) Last year, I went to Stanford thanks to the entire robotics community. Now, I need to go to RoboGames because Grant Imahara will be there! Hahahaha, just kidding (or am I?). I actually want to go to see what its like, check out all the robots. I’m not entirely sure what to expect! I know that MANOI will be in good company there.

So, if you have any spare pennies lying around, buy a RoboGlyph or two! Buy a complete set! :D

Posted in: Art, Other, Projects.

Friday (Sunday) Night Robotics – XBEES!

Posted by Erin, the RobotGrrl on Sunday, May 10th, 2009

This Friday (Sunday) I decided to put together the two XBee Kits that we got for Autonomous Robotics Club (ARC). Since its summer and the rest of the members are going to be busy, I get to be able to play with these all summer long!

Look at all the stuff!

FNR (XBees)

XBees are familiar to me- I used them for a project a few months ago. That was so long ago that the XBee Kits used to be GREEN and not BLUE! :P

Everything was going really nicely, all of the soldering was perfect. Until I tried to plug the XBee in… it wouldn’t plug in. (?!?!!?!?!?!) I took the plastic part of the header off, check out what I found:

FNR (XBees)

BLERG! I finally got the solder removed, but then when I was putting the plastic header back on, I noticed that there was a metal header missing! I found it on the desk, and I was trying to solder it back into place. This is how small the header is:

FNR (XBees)

Another one came loose… here, you can see this:

FNR (XBees)

I decided to just try putting the plastic back on and seeing if it worked anyway. Evidently, that was not possible to:

FNR (XBees)

Even further ridiculousness:

FNR (XBees)

BLERG! It’s amazing how devilish these headers can be. In any case, I’m going to go to the electronics store and pick up some headers and parts for RoboGlyphs tomorrow.

In any case, the 2nd XBee Kit was great! :D

FNR (XBees)

(I also have the quadratic formula on a stickie, on my laptop. LOL!)

What will I use these for? I’m thinking that I will want to make a communication between BubbleBoy and MANOI. However, BubbleBoy (who would be ‘hard of hearing’) will seldom understand what MANOI ‘says’. I’m not entirely sure if I want to do this with math, or just easy programming. :)

Upcoming blog posts:
- iPhone Info Button Tutorial
- MANOI’s Inner Workings (a series of posts)
- RoboGlyphs

Also, I totally believe that Adafruit is copying my FNR tradition. ;) Hahahaha

Posted in: Projects, Robot.