org.robokind.api.motion.protocol
Class DefaultMotionFrame<PosMap extends JointPositionMap>

java.lang.Object
  extended by org.robokind.api.motion.protocol.DefaultMotionFrame<PosMap>
Type Parameters:
PosMap - Type of JointPositionMap used
All Implemented Interfaces:
MotionFrame<PosMap>

public class DefaultMotionFrame<PosMap extends JointPositionMap>
extends Object
implements MotionFrame<PosMap>

A DefaultMotionFrame describes the start and goal PositionSets for a set of \ Joints over an interval of time.

Author:
Matthew Stevenson

Constructor Summary
DefaultMotionFrame()
          Creates an empty MotionFrame.
 
Method Summary
 long getFrameLengthMillisec()
          Returns the interval for the movements.
 PosMap getGoalPositions()
          Returns the MotionFrame's goal JointPositionMap.
 PosMap getPreviousPositions()
          Returns the MotionFrame's previous JointPositionMap.
 long getTimestampMillisecUTC()
          Returns MotionFrame creation time.
 void setFrameLengthMillisec(long interval)
          Sets the time interval length for the MotionFrame.
 void setGoalPositions(PosMap pos)
          Sets the MotionFrame's goal JointPositionMap.
 void setPreviousPositions(PosMap pos)
          Set the MotionFrame's previous JointPositionMap.
 void setTimestampMillisecUTC(long time)
          Sets the MotionFrame creation time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMotionFrame

public DefaultMotionFrame()
Creates an empty MotionFrame.

Method Detail

setTimestampMillisecUTC

public void setTimestampMillisecUTC(long time)
Sets the MotionFrame creation time.

Specified by:
setTimestampMillisecUTC in interface MotionFrame<PosMap extends JointPositionMap>
Parameters:
time - create time

getTimestampMillisecUTC

public long getTimestampMillisecUTC()
Returns MotionFrame creation time.

Specified by:
getTimestampMillisecUTC in interface MotionFrame<PosMap extends JointPositionMap>
Returns:
MotionFrame creation time

setFrameLengthMillisec

public void setFrameLengthMillisec(long interval)
Sets the time interval length for the MotionFrame. The velocity is calculated as the difference of position divided by the interval length.

Specified by:
setFrameLengthMillisec in interface MotionFrame<PosMap extends JointPositionMap>
Parameters:
interval - length of time for the frame in milliseconds

getFrameLengthMillisec

public long getFrameLengthMillisec()
Returns the interval for the movements.

Specified by:
getFrameLengthMillisec in interface MotionFrame<PosMap extends JointPositionMap>
Returns:
interval time interval for the movements

setGoalPositions

public void setGoalPositions(PosMap pos)
Sets the MotionFrame's goal JointPositionMap.

Specified by:
setGoalPositions in interface MotionFrame<PosMap extends JointPositionMap>
Parameters:
pos - goal JointPositionMap

getGoalPositions

public PosMap getGoalPositions()
Returns the MotionFrame's goal JointPositionMap.

Specified by:
getGoalPositions in interface MotionFrame<PosMap extends JointPositionMap>
Returns:
MotionFrame's goal JointPositionMap

setPreviousPositions

public void setPreviousPositions(PosMap pos)
Set the MotionFrame's previous JointPositionMap.

Specified by:
setPreviousPositions in interface MotionFrame<PosMap extends JointPositionMap>
Parameters:
pos - previous JointPositionMap

getPreviousPositions

public PosMap getPreviousPositions()
Returns the MotionFrame's previous JointPositionMap.

Specified by:
getPreviousPositions in interface MotionFrame<PosMap extends JointPositionMap>
Returns:
MotionFrame's previous JointPositionMap


Copyright © 2011-2013. All Rights Reserved.