org.robokind.client.basic
Class Robokind

java.lang.Object
  extended by org.robokind.client.basic.Robokind

public final class Robokind
extends Object

Framework utility methods for the RoboKind Basic API

Author:
Matthew Stevenson

Constructor Summary
Robokind()
           
 
Method Summary
static RemoteAccelerometerServiceClient<HeaderRecord> connectAccelerometer()
          Connects to the accelerometer controller.
static RemoteAnimationPlayerClient connectAnimationPlayer()
          Connects to the animation service.
static RemoteImageServiceClient<CameraServiceConfig> connectCameraService()
          Connects to the robot's cameras.
static RemoteCompassServiceClient<HeaderRecord> connectCompass()
          Connects to the compass controller.
static RemoteGyroscopeServiceClient<HeaderRecord> connectGyroscope()
          Connects to the gyroscope controller.
static RemoteImageRegionServiceClient<FaceDetectServiceConfig> connectImageRegionService()
          Connects to the robot's face-detection service.
static RemoteRobot connectRobot()
          Connects to the RobokindRobot for communicating with an avatar and robot.
static RemoteGpioServiceClient<HeaderRecord> connectSensors()
          Connects to the sensor controller.
static RemoteSpeechServiceClient connectSpeechService()
          Connects to the speech service.
static long currentTime()
          Gets the current time, in Unix format.
static void disconnect()
          Disconnects from the RobokindRobot.
static Animation loadAnimation(String filepath)
          Loads an animation from file.
static boolean saveAnimation(String filepath, Animation anim)
          Saves an animation to disk.
static void sleep(long milliseconds)
          Halts program execution for the given number of milliseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Robokind

public Robokind()
Method Detail

connectRobot

public static RemoteRobot connectRobot()
Connects to the RobokindRobot for communicating with an avatar and robot.

Returns:
RobokindRobot object for controlling an avatar and robot

connectAnimationPlayer

public static RemoteAnimationPlayerClient connectAnimationPlayer()
Connects to the animation service.

Returns:
the animation client

connectSpeechService

public static RemoteSpeechServiceClient connectSpeechService()
Connects to the speech service.

Returns:
the speech client

connectSensors

public static RemoteGpioServiceClient<HeaderRecord> connectSensors()
Connects to the sensor controller.

Returns:
the sensor client

connectAccelerometer

public static RemoteAccelerometerServiceClient<HeaderRecord> connectAccelerometer()
Connects to the accelerometer controller.

Returns:
the accelerometer client

connectGyroscope

public static RemoteGyroscopeServiceClient<HeaderRecord> connectGyroscope()
Connects to the gyroscope controller.

Returns:
the gyroscope client

connectCompass

public static RemoteCompassServiceClient<HeaderRecord> connectCompass()
Connects to the compass controller.

Returns:
the compass client

connectCameraService

public static RemoteImageServiceClient<CameraServiceConfig> connectCameraService()
Connects to the robot's cameras.

Returns:
RemoteImageServiceClient for controlling the robot's cameras

connectImageRegionService

public static RemoteImageRegionServiceClient<FaceDetectServiceConfig> connectImageRegionService()
Connects to the robot's face-detection service.

Returns:
RemoteImageRegionServiceClient for controlling the robot's face detection

loadAnimation

public static Animation loadAnimation(String filepath)
Loads an animation from file.

Parameters:
filepath - path to the animation
Returns:
Animation object loaded from the file

saveAnimation

public static boolean saveAnimation(String filepath,
                                    Animation anim)
Saves an animation to disk.

Parameters:
filepath - path to save the animation
anim - the animation to save
Returns:
true if successful, false if failed

currentTime

public static long currentTime()
Gets the current time, in Unix format.

Returns:
the current time

sleep

public static void sleep(long milliseconds)
Halts program execution for the given number of milliseconds.

Parameters:
milliseconds - number of milliseconds to sleep

disconnect

public static void disconnect()
Disconnects from the RobokindRobot.



Copyright © 2011-2013. All Rights Reserved.