TypeIIRMLStep2.cpp
Go to the documentation of this file.
1 // ---------------------- Doxygen info ----------------------
37 // ----------------------------------------------------------
38 // For a convenient reading of this file's source code,
39 // please use a tab width of four characters.
40 // ----------------------------------------------------------
41 
42 
43 #include <TypeIIRMLPosition.h>
44 #include <TypeIIRMLMath.h>
45 #include <TypeIIRMLDecisionTree2.h>
48 #include <ReflexxesAPI.h>
49 
50 
51 using namespace TypeIIRMLMath;
52 
53 
54 //*******************************************************************************************
55 // Step2
56 
58 {
59  unsigned int i = 0;
60 
61  if (this->CurrentTrajectoryIsPhaseSynchronized)
62  {
63  // As we only calculate the trajectory for one DOF, we do not use multiple threads for the
64  // Step 2 calculation of the trajectory.
65 
66  this->Step2PhaseSynchronization();
67  }
68  else
69  {
70  if (this->CurrentTrajectoryIsNotSynchronized)
71  {
72  for (i = 0; i < this->NumberOfDOFs; i++)
73  {
74  if((this->ModifiedSelectionVector->VecData)[i])
75  {
76  Step2WithoutSynchronization( (this->CurrentInputParameters->CurrentPositionVector->VecData) [i]
77  , (this->CurrentInputParameters->CurrentVelocityVector->VecData) [i]
78  , (this->CurrentInputParameters->TargetPositionVector->VecData) [i]
79  , (this->CurrentInputParameters->TargetVelocityVector->VecData) [i]
80  , (this->CurrentInputParameters->MaxVelocityVector->VecData) [i]
81  , (this->CurrentInputParameters->MaxAccelerationVector->VecData) [i]
82  , (this->UsedStep1AProfiles->VecData) [i]
83  , (this->MinimumExecutionTimes->VecData) [i]
84  , &((this->Polynomials)[i]) );
85  }
86  }
87  }
88  else
89  {
90  for (i = 0; i < this->NumberOfDOFs; i++)
91  {
92  if((this->ModifiedSelectionVector->VecData)[i])
93  {
94  TypeIIRMLDecisionTree2( (this->CurrentInputParameters->CurrentPositionVector->VecData) [i]
95  , (this->CurrentInputParameters->CurrentVelocityVector->VecData) [i]
96  , (this->CurrentInputParameters->TargetPositionVector->VecData) [i]
97  , (this->CurrentInputParameters->TargetVelocityVector->VecData) [i]
98  , (this->CurrentInputParameters->MaxVelocityVector->VecData) [i]
99  , (this->CurrentInputParameters->MaxAccelerationVector->VecData) [i]
100  , this->SynchronizationTime
101  , &((this->Polynomials)[i]) );
102  }
103  }
104  }
105  }
106 
107  return;
108 }
Header file for the class ReflexxesAPI (API of the Reflexxes Motion Libraries)
Header file file for the declaration of the function TypeIIRMLMath::Step2WithoutSynchronization().
void Step2(void)
Step 2 of the On-Line Trajectory Generation algorithm: time synchronization of all selected degrees o...
void TypeIIRMLDecisionTree2(const double &CurrentPosition, const double &CurrentVelocity, const double &TargetPosition, const double &TargetVelocity, const double &MaxVelocity, const double &MaxAcceleration, const double &SynchronizationTime, MotionPolynomials *PolynomialsInternal)
This function contains the decision tree of the Step 2 of the Type II On-Line Trajectory Generation a...
Header file for functions and definitions of constant values and macros.
Header file for the class RMLPositionInputParameters.
Header file for the class TypeIIRMLPosition, which constitutes the actual interface of the Type II Re...
Header file for the Step 2 decision tree of the Type II On-Line Trajectory Generation algorithm (time...
void Step2WithoutSynchronization(const double &CurrentPosition, const double &CurrentVelocity, const double &TargetPosition, const double &TargetVelocity, const double &MaxVelocity, const double &MaxAcceleration, const TypeIIRMLMath::Step1_Profile &UsedProfile, const double &MinimumExecutionTime, MotionPolynomials *PolynomialsInternal)
This function contains sets of trajectory parameters (i.e., all polynomial coefficients) in the case ...


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