org.cogchar.bind.rk.robot.motion
Class CogcharMotionSource

java.lang.Object
  extended by org.robokind.api.motion.utils.RobotMoverFrameSource
      extended by org.cogchar.bind.rk.robot.motion.CogcharMotionSource
All Implemented Interfaces:
org.robokind.api.motion.blending.FrameSource<org.robokind.api.motion.Robot.RobotPositionMap>, org.robokind.api.motion.utils.RobotFrameSource

public class CogcharMotionSource
extends org.robokind.api.motion.utils.RobotMoverFrameSource

Author:
Stu B. Each instance binds to the RK joint-frame protocol for one jointed robot. Holds an ordered list of joint computers, each of which receives one notifySourceComputingCycle() each time we process getMovements(). No protocol among those computers is enforced at this level, we simply presume they will somehow call our "move()" method (inherited from RobotMoverFrameSource) in a sensible way, with the last joint-computer in our collection having the last word. So, this class provides capability, without policy, and is a good place to begin investigating your own custom low-level (in Cogchar terms) movement planning systems. Under OSGi (or other JFlux binding), instances of CogcharMotionSource can be found in the registry using findCogcharMotionSources, which can be extended to use robotID as a filter parameter.

Constructor Summary
CogcharMotionSource(org.robokind.api.motion.Robot robot)
           
 
Method Summary
 void addJointComputer(CogcharMotionComputer computer)
           
static List<CogcharMotionSource> findCogcharMotionSources(org.osgi.framework.BundleContext bunCtx, org.robokind.api.motion.Robot.Id optRobotID)
          TODO: Add robotID filtering parameter.
 org.robokind.api.motion.protocol.MotionFrame getMovements(long currentTimeUTC, long moveLengthMilliSec)
           
 boolean isComputingNow()
           
 void move(org.robokind.api.motion.Robot.RobotPositionMap positions, long lenMillisec)
           
 
Methods inherited from class org.robokind.api.motion.utils.RobotMoverFrameSource
getRobot, setRobot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CogcharMotionSource

public CogcharMotionSource(org.robokind.api.motion.Robot robot)
Method Detail

addJointComputer

public void addJointComputer(CogcharMotionComputer computer)

getMovements

public org.robokind.api.motion.protocol.MotionFrame getMovements(long currentTimeUTC,
                                                                 long moveLengthMilliSec)
Specified by:
getMovements in interface org.robokind.api.motion.blending.FrameSource<org.robokind.api.motion.Robot.RobotPositionMap>
Overrides:
getMovements in class org.robokind.api.motion.utils.RobotMoverFrameSource

move

public void move(org.robokind.api.motion.Robot.RobotPositionMap positions,
                 long lenMillisec)
Overrides:
move in class org.robokind.api.motion.utils.RobotMoverFrameSource

isComputingNow

public boolean isComputingNow()

findCogcharMotionSources

public static List<CogcharMotionSource> findCogcharMotionSources(org.osgi.framework.BundleContext bunCtx,
                                                                 org.robokind.api.motion.Robot.Id optRobotID)
TODO: Add robotID filtering parameter.

Parameters:
bunCtx -
Returns:


Copyright © 2010-2014. All Rights Reserved.