TypeIIRMLVelocitySetupPhaseSyncSelectionVector.cpp
Go to the documentation of this file.
1 // ---------------------- Doxygen info ----------------------
38 // ----------------------------------------------------------
39 // For a convenient reading of this file's source code,
40 // please use a tab width of four characters.
41 // ----------------------------------------------------------
42 
43 
44 #include <TypeIIRMLVelocity.h>
45 #include <TypeIIRMLMath.h>
47 #include <RMLVector.h>
48 
49 
50 using namespace TypeIIRMLMath;
51 
52 
53 
54 //****************************************************************************
55 // SetupPhaseSyncSelectionVector()
56 
58 {
59  unsigned int i = 0;
60 
61  *(this->PhaseSyncSelectionVector) = *(this->CurrentInputParameters->SelectionVector);
62 
63  for (i = 0; i < this->NumberOfDOFs; i++)
64  {
65  if ( ((this->CurrentInputParameters->SelectionVector->VecData)[i])
66  && ( (this->ExecutionTimes->VecData)[i] <= this->CycleTime)
67  && (IsEpsilonEquality( 0.0
68  , (this->CurrentInputParameters->CurrentVelocityVector->VecData)[i]
69  , 0.5 * this->CycleTime * (this->CurrentInputParameters->MaxAccelerationVector->VecData)[i]))
70  && ((this->CurrentInputParameters->TargetVelocityVector->VecData)[i] == 0.0) )
71  {
72  (this->PhaseSyncSelectionVector->VecData) [i] = false ;
73  (this->CurrentInputParameters->CurrentVelocityVector->VecData) [i] = 0.0 ;
74  }
75  }
76 }
Header file for the dynamic vector class used for the Reflexxes Motion Libraries. ...
Header file for the class TypeIIRMLVelocity.
Header file for functions and definitions of constant values and macros.
Header file for the class RMLVelocityInputParameters.
bool IsEpsilonEquality(const double &Value1, const double &Value2, const double &Epsilon)
Checks epsilon equality for two values.
void SetupPhaseSyncSelectionVector(void)
Modify the current selection vector and exclude unnecessary degrees of freedom.


libreflexxestype2
Author(s):
autogenerated on Sat Nov 21 2020 03:17:34