com.sun.robot.humanoid
Class Humanoid

java.lang.Object
  extended by com.sun.robot.Robot
      extended by com.sun.robot.humanoid.Humanoid

public class Humanoid
extends Robot

Provides access to WowWee Robotics RS Media robot macros, servos and sensors.


Field Summary
 Servo ARM_LEFT_SERVO
          Left Arm Grasping Servo.
 Servo ARM_RIGHT_SERVO
          Right Arm Grasping Servo.
 Audio AUDIO
          Audio recording and playback.
 Camera CAMERA
          Snapshots, video recording and playback.
 Sensor FACE_DOWN_TILT
          The robot lying face down.
 Head HEAD
          Head control object.
 Servo HEAD_LR_SERVO
          Used for Head Left, and Right movement.
 Servo HEAD_UP_DN_SERVO
          Used for Head Up, Down movement.
 Servo HEAD_UPPER_BODY
          Up, Down, Left, Right movement.
 Sensor HEARING_CENTER
          Something is heard in front of the robot.
 Sensor HEARING_LEFT
          Something is heard on the left side of the robot.
 Sensor HEARING_RIGHT
          Something is heard on the right side of the robot.
 Interact INTERACT
          Interaction macros with other robots.
 IRSensor IR_CENTER_CLOSE
          Something is detected nearby in front of the robot.
 IRSensor IR_CENTER_FAR
          Something is detected far away in front of the robot.
 IRSensor IR_FLINCH
          Something is very close ot the robot.
 IRSensor IR_LEFT_CLOSE
          Something is detected nearby on the left side of the robot.
 IRSensor IR_LEFT_FAR
          Something is detected far away on the left side of the robot.
 IRSensor IR_RIGHT_CLOSE
          Something is detected far away on the right side of the robot.
 IRSensor IR_RIGHT_FAR
          Something is detected far away on the right side of the robot.
 Arm LEFT_ARM
          Left arm control object.
 Servo LEFT_LEG_SERVO
          Forward, Backward movement.
 Personality PERSONALITYMACRO
          Animatronic macros.
 Arm RIGHT_ARM
          Right arm control object.
 Servo RIGHT_LEG_SERVO
          Forward, Backward movement.
 Servo SHOULDER_LEFT_SERVO
          Up, Down movement.
 Servo SHOULDER_RIGHT_SERVO
          Up, Down movement.
 Sensor TOUCH_LEFT_FOOT_BACK
          Something is touching the back of the robot's left foot.
 Sensor TOUCH_LEFT_FOOT_FRONT
          Something is touching the front of the robot's left foot.
 Sensor TOUCH_RIGHT_FOOT_BACK
          Something is touching the back of the robot's right foot.
 Sensor TOUCH_RIGHT_FOOT_FRONT
          Something is touching the front of the robot's right foot.
 Vision VISION
          Vision color and object tracking system.
 Servo WAIST_LR_SERVO
          Left and Right movement.
 Servo WAIST_SLR_SERVO
          Tilt Left or Right.
 Servo WAIST_UP_DN_SERVO
          Up, Down movement.
 Walk WALK
          Walking control object.
 
Fields inherited from class com.sun.robot.Robot
sensors, servos
 
Method Summary
 boolean enableLED(boolean on)
          LED.
static Humanoid getInstance()
          Returns a singleton instance of Humanoid
 void restoreDefaultPosition()
          Restores the robot to it's default body posture.
 void shutdown()
          Shuts down the robot.
 void sleep(int timeout)
          Cause the robot to "sleep" for the specified time.
 boolean stop()
          Stop all Robot movement.
 boolean stopAllMotors()
          Stops all motors.
 void waitUntilStop()
          Wait until the current macro or servo movement completes.
 void waitUntilStop(int maxWait)
          Wait until the current macro or servo movement completes.
 
Methods inherited from class com.sun.robot.Robot
addSensor, addServo, getSensor, getSensors, getServo, getServos
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERSONALITYMACRO

public final Personality PERSONALITYMACRO
Animatronic macros.


INTERACT

public final Interact INTERACT
Interaction macros with other robots.


LEFT_ARM

public final Arm LEFT_ARM
Left arm control object.


HEAD

public final Head HEAD
Head control object.


RIGHT_ARM

public final Arm RIGHT_ARM
Right arm control object.


WALK

public final Walk WALK
Walking control object.


VISION

public final Vision VISION
Vision color and object tracking system.


HEARING_LEFT

public final Sensor HEARING_LEFT
Something is heard on the left side of the robot.


HEARING_CENTER

public final Sensor HEARING_CENTER
Something is heard in front of the robot.


HEARING_RIGHT

public final Sensor HEARING_RIGHT
Something is heard on the right side of the robot.


IR_LEFT_CLOSE

public final IRSensor IR_LEFT_CLOSE
Something is detected nearby on the left side of the robot.


IR_LEFT_FAR

public final IRSensor IR_LEFT_FAR
Something is detected far away on the left side of the robot.


IR_CENTER_CLOSE

public final IRSensor IR_CENTER_CLOSE
Something is detected nearby in front of the robot.


IR_CENTER_FAR

public final IRSensor IR_CENTER_FAR
Something is detected far away in front of the robot.


IR_RIGHT_CLOSE

public final IRSensor IR_RIGHT_CLOSE
Something is detected far away on the right side of the robot.


IR_RIGHT_FAR

public final IRSensor IR_RIGHT_FAR
Something is detected far away on the right side of the robot.


IR_FLINCH

public final IRSensor IR_FLINCH
Something is very close ot the robot.


TOUCH_LEFT_FOOT_FRONT

public final Sensor TOUCH_LEFT_FOOT_FRONT
Something is touching the front of the robot's left foot.


TOUCH_LEFT_FOOT_BACK

public final Sensor TOUCH_LEFT_FOOT_BACK
Something is touching the back of the robot's left foot.


TOUCH_RIGHT_FOOT_FRONT

public final Sensor TOUCH_RIGHT_FOOT_FRONT
Something is touching the front of the robot's right foot.


TOUCH_RIGHT_FOOT_BACK

public final Sensor TOUCH_RIGHT_FOOT_BACK
Something is touching the back of the robot's right foot.


FACE_DOWN_TILT

public final Sensor FACE_DOWN_TILT
The robot lying face down.


AUDIO

public final Audio AUDIO
Audio recording and playback.


CAMERA

public final Camera CAMERA
Snapshots, video recording and playback.


HEAD_UP_DN_SERVO

public final Servo HEAD_UP_DN_SERVO
Used for Head Up, Down movement. Positions 0-3 allowed.


HEAD_LR_SERVO

public final Servo HEAD_LR_SERVO
Used for Head Left, and Right movement. Positions 0-7 allowed.


SHOULDER_LEFT_SERVO

public final Servo SHOULDER_LEFT_SERVO
Up, Down movement. Positions 0-32 allowed.


SHOULDER_RIGHT_SERVO

public final Servo SHOULDER_RIGHT_SERVO
Up, Down movement. Positions 0-32 allowed.


ARM_LEFT_SERVO

public final Servo ARM_LEFT_SERVO
Left Arm Grasping Servo. Positions 0-3 allowed.


ARM_RIGHT_SERVO

public final Servo ARM_RIGHT_SERVO
Right Arm Grasping Servo. Positions 0-3 allowed.


WAIST_UP_DN_SERVO

public final Servo WAIST_UP_DN_SERVO
Up, Down movement. Positions 0-32 allowed.


WAIST_LR_SERVO

public final Servo WAIST_LR_SERVO
Left and Right movement. Positions 0-32 allowed.


WAIST_SLR_SERVO

public final Servo WAIST_SLR_SERVO
Tilt Left or Right. Positions 0 (Left) or 2 (Right) allowed.

No position data is available for this servo.


LEFT_LEG_SERVO

public final Servo LEFT_LEG_SERVO
Forward, Backward movement. Positions 0 (forward) or 2 (back) allowed.

No position data is available for this servo.


RIGHT_LEG_SERVO

public final Servo RIGHT_LEG_SERVO
Forward, Backward movement. Positions 0 (forward) or 2 (back) allowed.

No position data is available for this servo.


HEAD_UPPER_BODY

public final Servo HEAD_UPPER_BODY
Up, Down, Left, Right movement. Positions 0-8 allowed.

No position data is available for this servo.

Method Detail

getInstance

public static Humanoid getInstance()
Returns a singleton instance of Humanoid

Returns:
a singleton instance of Humanoid

restoreDefaultPosition

public void restoreDefaultPosition()
Restores the robot to it's default body posture. The robot should be placed in this posture whenever it is idle and not executing commands.

For consistent behaviour it is also a good idea to restore the robot to it's default posture before executing any macros or multi-step servo programs.

Specified by:
restoreDefaultPosition in class Robot

sleep

public void sleep(int timeout)
Cause the robot to "sleep" for the specified time.

Specified by:
sleep in class Robot
Parameters:
timeout - The amount of time to sleep in relative milliseconds.

waitUntilStop

public void waitUntilStop()
Wait until the current macro or servo movement completes.


waitUntilStop

public void waitUntilStop(int maxWait)
Wait until the current macro or servo movement completes.

Parameters:
maxWait - time in milliseconds

stop

public boolean stop()
Stop all Robot movement. This also stops macros.

Specified by:
stop in class Robot
Returns:
true if successful otherwise false.

stopAllMotors

public boolean stopAllMotors()
Stops all motors.

Specified by:
stopAllMotors in class Robot
Returns:
true if successful otherwise false.

shutdown

public void shutdown()
Shuts down the robot.

Specified by:
shutdown in class Robot

enableLED

public boolean enableLED(boolean on)
LED.

Parameters:
on - if true enables LED
Returns:
true if the LEDs are successfully enabled.