org.robokind.api.motion.utils
Class RobotFrameSource

java.lang.Object
  extended by org.robokind.api.motion.utils.RobotFrameSource
All Implemented Interfaces:
FrameSource

public class RobotFrameSource
extends Object
implements FrameSource

A FrameSource which acts as a Robot move proxy. Accepts movements as a RobotPositionMap and time length.

Author:
Matthew Stevenson

Constructor Summary
RobotFrameSource(org.osgi.framework.BundleContext context, Robot.Id robotId)
           
 
Method Summary
 MotionFrame getMovements(long currentTimeUTC, long moveLengthMilliSec)
          Returns the desired Robot movement starting at the given time and lasting for the given number of milliseconds.
 Robot.Id getRobotId()
          Returns the Robot Id
 void move(Robot.RobotPositionMap positions, long lenMillisec)
          Moves the Robot to the given positions in the given time length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RobotFrameSource

public RobotFrameSource(org.osgi.framework.BundleContext context,
                        Robot.Id robotId)
Method Detail

move

public void move(Robot.RobotPositionMap positions,
                 long lenMillisec)
Moves the Robot to the given positions in the given time length.

Parameters:
positions - goal positions
lenMillisec - length of the movement in milliseconds

getRobotId

public Robot.Id getRobotId()
Returns the Robot Id

Returns:
Robot Id;

getMovements

public MotionFrame getMovements(long currentTimeUTC,
                                long moveLengthMilliSec)
Description copied from interface: FrameSource
Returns the desired Robot movement starting at the given time and lasting for the given number of milliseconds. The frequency and regularity of calls will depend on the Blender configuration used. The DefaultBlender runs in a continuous loop calling FrameSources at 40 millisecond intervals.

Specified by:
getMovements in interface FrameSource
Parameters:
currentTimeUTC - time of the move request
moveLengthMilliSec - expected length of the movement returned, the actual returned length does not have to be same, but the actual movement results will depend on the Blender used
Returns:
MotionFrame desired robot movement


Copyright © 2011. All Rights Reserved.