23 : targetPosition( dofMover.targetPosition )
24 , initialPosition( dofMover.initialPosition )
25 , initialTime( dofMover.initialTime )
26 , activationTime( dofMover.activationTime )
27 , finalTime( dofMover.finalTime )
28 , positionRange( dofMover.positionRange )
29 , timeRange( dofMover.timeRange )
30 , targetDofPtr( dofMover.targetDofPtr )
39 initialTime = iniTime;
41 targetPosition = finPos;
46 if ((goalTime > initialTime) && (goalTime < finalTime))
48 float interpolationIndex;
53 initialPosition = targetDofPtr->GetCurrent();
55 positionRange = targetPosition - initialPosition;
56 timeRange = finalTime - goalTime;
58 if (timeRange < minimumDuration)
59 timeRange = minimumDuration;
60 activationTime = goalTime;
62 targetDofPtr->MoveTo(initialPosition, priority);
67 interpolationIndex = (goalTime - activationTime)/timeRange;
68 goalPosition = interpolatorPtr->GetValue(interpolationIndex,initialPosition,positionRange);
69 targetDofPtr->MoveTo(goalPosition, priority);
79 list<float>::iterator iter = resultPtr->begin();
81 while ((iter != resultPtr->end()) && (*iter < finalTime))
83 if (!((iter != resultPtr->end()) && (*iter == finalTime)))
84 resultPtr->insert(iter, finalTime);
Header file for V-ART class "Dof".
static bool cycle
Indicates whether the current action is cyclic.
static float goalTime
Time of next snapshot, normalized to joint movement's duration.
std::ostream & operator<<(std::ostream &output, const Joint::DofID &dofId)
static float minimumDuration
Minimum duration when computing motion paths.
float finalTime
Normalized deactivation time.
static const Interpolator * interpolatorPtr
Position interpolator.
Controller for DOF movement.
Interpolator representation.
Header file for V-ART class "DofMover".
float initialTime
Time of predicted activation (normalized).
void GetFinalTime(std::list< float > *resultPtr)
Adds the final time to the list.
static unsigned int priority
Priority of active action.
virtual void Move()
Changes target DOF.
Header file for V-ART class "Interpolator".
DofMover()
Creates an unitialized DOF mover.
virtual void Initialize(float iniTime, float finTime, float finPos)
float targetPosition
Target position.