TypeIIRMLVelocityFallBackStrategy.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>
47 
48 
49 using namespace TypeIIRMLMath;
50 
51 
52 //****************************************************************************
53 // FallBackStrategy()
54 
56  , RMLVelocityOutputParameters *OutputValues )
57 {
58  unsigned int i = 0;
59 
60  for (i = 0; i < this->NumberOfDOFs; i++)
61  {
62  if (InputValues.SelectionVector->VecData[i])
63  {
64  (OutputValues->NewPositionVector->VecData)[i]
65  = InputValues.CurrentPositionVector->VecData[i]
66  + this->CycleTime
67  * (InputValues.CurrentVelocityVector->VecData)[i];
68 
69  (OutputValues->NewVelocityVector->VecData)[i]
70  = InputValues.CurrentVelocityVector->VecData[i];
71  }
72  else
73  {
74  (OutputValues->NewPositionVector->VecData)[i]
75  = InputValues.CurrentPositionVector->VecData[i];
76 
77  (OutputValues->NewVelocityVector->VecData)[i]
78  = InputValues.CurrentVelocityVector->VecData[i];
79  }
80 
81  OutputValues->ExecutionTimes->VecData[i] = 0.0;
82 
83  OutputValues->PositionValuesAtTargetVelocity->VecData[i]
84  = InputValues.CurrentPositionVector->VecData[i];
85  }
86 
87  this->SetPositionalExtremsToZero(OutputValues);
88 
89  OutputValues->TrajectoryIsPhaseSynchronized = false;
90  OutputValues->SynchronizationTime = 0.0;
91  OutputValues->DOFWithTheGreatestExecutionTime = 0;
92 
93  return;
94 }
double SynchronizationTime
The synchronization time in seconds.
RMLDoubleVector * CurrentVelocityVector
A pointer to the current velocity vector .
Header file for the class TypeIIRMLVelocity.
RMLDoubleVector * ExecutionTimes
A pointer to an RMLDoubleVector object that contains the execution times of all selected degrees of f...
T * VecData
Pointer to the actual vector data, that is, an array of type T objects.
Definition: RMLVector.h:524
RMLDoubleVector * NewPositionVector
A pointer to the new position vector .
Header file for the class RMLVelocityInputParameters.
unsigned int DOFWithTheGreatestExecutionTime
Index of the degree of freedom that requires the greatest execution time to reach its desired target ...
RMLBoolVector * SelectionVector
A pointer to the selection vector .
Header file for the class RMLVelocityOutputParameters.
Class for the output parameters of the velocity-based On-Line Trajectory Generation algorithm...
void FallBackStrategy(const RMLVelocityInputParameters &InputValues, RMLVelocityOutputParameters *OutputValues)
In case of an error, this method triggers the next layer of the safety concept.
RMLDoubleVector * NewVelocityVector
A pointer to the new velocity vector .
bool TrajectoryIsPhaseSynchronized
Boolean flag that indicates whether the current trajectory is phase-synchronized. ...
Class for the input parameters of the velocity-based On-Line Trajectory Generation algorithm...
RMLDoubleVector * PositionValuesAtTargetVelocity
A pointer to an RMLDoubleVector object that contains the position values at the instants the desired ...
RMLDoubleVector * CurrentPositionVector
A pointer to the current position vector .


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