com.sun.robot.humanoid — the Office Toy in JBoss/RedHat Austin

Phillip and I bought the "Java robot" from JavaOne, and decided to keep it in the office as an "office toy". This is easily the coolest geek toy I have seen in years. It can walk around, sit / get up, pick up stuff with its hands, speak / sing (plays any MP3), play video / games on its LCD screen, and even take pictures. It detects and responds to sound, visual objects, and colors. It can even automatically recognize and follow humans. Of course, it can be remotely controlled as well.

Picture 7.png

But the best feature of all is that the robot runs Linux and can be programmed via a simple Java API! There is a simple Java wrapper class that allows your application to interact with all sensors and motors on the robot. You typically run your application in a loop, and try to make the robot respond to events coming in from the sensors. I have not tried but here is some sample code from the SDK. You are smarter than the robot and can figure out what it is supposed to do. :) Isn't that COOL!

JAVA:
  1. Humanoid humanoid = Humanoid.getInstance();
  2.  
  3. ... ...
  4.  
  5. while (true) {
  6.   // Turn off the bright LED in the eyes.
  7.   humanoid.enableLED(false);
  8.            
  9.   // Look around.
  10.   humanoid.VISION.track();
  11.            
  12.   // Check for color red in vision field. Run to red.
  13.   if (humanoid.VISION.getTarget(Vision.RED)) {
  14.     // Turn on the LED in eyes to signal that it sees RED
  15.     humanoid.enableLED(true);
  16.                
  17.     // Advance on target.
  18.     humanoid.WALK.walk(Walk.FORWARD_GAIT1, 10);   
  19.                
  20.     // Are we at the bump?
  21.     If (humanoid.TOUCH_LEFT_FOOT_FRONT.isTriggered()||
  22.               (humanoid.TOUCH_RIGHT_FOOT_FRONT.isTriggered()) {
  23.       // We are done.
  24.       break;
  25.     }
  26.   } else {
  27.     // Do not see RED in current vision field -- so the robot moves around to search for RED
  28.     boolean wanderLeft = 1 != rand.nextInt(1);
  29.              
  30.     // Wander left or right
  31.     if( wanderLeft ) {
  32.       humanoid.WALK.turnRight(2);
  33.     } else {
  34.       humanoid.WALK.turnRight(2);
  35.     }
  36.              
  37.     // Walk forward a bit
  38.     humanoid.WALK.walk(Walk.FORWARD_GAITFAST, rand.nextInt(3) + 3);
  39.   }
  40. }
  41.  
  42. // Raise the arm to declare victory
  43. humanoid.SHOULDER_LEFT_SERVO.moveToPosition(
  44.   humanoid.SHOULDER_LEFT_SERVO.maxPosition() / 4,
  45.   humanoid.SHOULDER_LEFT_SERVO.maxSpeed());
  46.  
  47. // Take a picture of the RED target and display it on the LCD
  48. String pictureFile = humanoid.CAMERA.takePhoto(0);
  49. humanoid.CAMERA.displayImage(pictureFile, 5000);
  50.  
  51. // Say something
  52. humanoid.AUDIO.playClip(mission_accomplished.mp3);
  53. ... ...

The robot is BIG -- it was a challenge to bring it back from San Francisco. :) Just notice how big it is compared with Phillip's 19" monitor in the background.

Picture 6.png

Anyway, we have not officially started playing with it yet (product release deadlines! ;)). I will continue to blog about it here in this blog as we discover its features. If you have ideas on applications, leave a comment -- we might implement it and post a video!

11 Responses to “com.sun.robot.humanoid — the Office Toy in JBoss/RedHat Austin”

  1. asj Says:

    My wife was thinking of buying one in SF, but we decided against it simply because it would be too hard to carry it back to NJ. Ah well, we can always order it later….

  2. Michael Yuan Says:

    It will probably be a little more expensive if you order from their site — at least this is what I was told! ;)

    I just checked it in at the airport with my suitcase and it was easier than expected. :)

    cheers
    Michael

  3. alex Says:

    we just tried it. it’s awesome!!

    first program should be to train robot to bring beer to the owner ;) voice activated of course

  4. Francisco Antônio Says:

    How much did it cost?
    Thanks.

  5. Michael Yuan Says:

    JavaOne price is $270 plus tax. I am told that the retail price will be $50 to $100 more than that.

  6. midcyber Says:

    In code, robot never looks left???

  7. Michael Yuan Says:

    vision.track() looks around. The robot uses its left foot to detect the threshold and raises its left arm when done. But it does look both left and right. :)

  8. Ain Says:

    Key question is, can you get it to bring coffee?

  9. Charo Says:

    Even more important, can you get it to MAKE coffee? :D

  10. tuxer Says:

    I’m surely interested, but is the other type robots (roboraptor) can be programmed with java too?

  11. Robot Toys Says:

    This does look cool. But my favourite NEW robot toys would have to be the spykee, isobot, tribot and rovio (coming soon….). They just seem to be getting more and more advanced

Leave a Reply