org.robokind.api.motion.blending
Class NaiveMotionFrameAverager<Id,PosMap extends JointPositionMap<Id,org.robokind.api.common.position.NormalizedDouble>>
java.lang.Object
org.robokind.api.motion.blending.NaiveMotionFrameAverager<Id,PosMap>
- Type Parameters:
Id
- type of id used in the PositionMaps being combinedPosMap
- type of PositionMaps being combined
- All Implemented Interfaces:
- FrameCombiner<MotionFrame<PosMap>,FrameSource<PosMap>,PosMap>
public class NaiveMotionFrameAverager<Id,PosMap extends JointPositionMap<Id,org.robokind.api.common.position.NormalizedDouble>>
- extends Object
- implements FrameCombiner<MotionFrame<PosMap>,FrameSource<PosMap>,PosMap>
Naively combines MotionFrames by averaging the goal positions.
Ignores MotionFrame start positions and timing.
- Author:
- Matthew Stevenson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NaiveMotionFrameAverager
public NaiveMotionFrameAverager(org.jflux.api.core.Source<PosMap> posMapFact)
- Creates a new NaiveMotionFrameAverager/
- Parameters:
posMapFact
- factory for creating new PositionMaps
combineFrames
public PosMap combineFrames(long time,
long interval,
PosMap curPos,
Map<? extends MotionFrame<PosMap>,? extends FrameSource<PosMap>> frames)
- Averages the goal positions from the MotionFrames into a single
PositionMap. The MotionFrames' start positions, timing, and
FrameSources are ignored.
- Specified by:
combineFrames
in interface FrameCombiner<MotionFrame<PosMap extends JointPositionMap<Id,org.robokind.api.common.position.NormalizedDouble>>,FrameSource<PosMap extends JointPositionMap<Id,org.robokind.api.common.position.NormalizedDouble>>,PosMap extends JointPositionMap<Id,org.robokind.api.common.position.NormalizedDouble>>
- Parameters:
time
- time of the move requestinterval
- time since last move requestcurPos
- set of current Joint positionsframes
- map of Frames and their originating FrameSources
- Returns:
- PositionMap with averaged goal positions from the MotionFrames
Copyright © 2011-2013. All Rights Reserved.