TypeIIRMLFallBackStrategy.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 <TypeIIRMLPosition.h>
49 #include <RMLVector.h>
50 #include <RMLVelocityFlags.h>
51 #include <TypeIIRMLVelocity.h>
52 
53 
54 //*******************************************************************************************
55 // FallBackStrategy()
56 
58  , RMLPositionOutputParameters *OutputValues
59  , const RMLPositionFlags &InputsFlags)
60 {
61  unsigned int i = 0;
62 
64  = *(InputValues.SelectionVector);
66  = *(InputValues.CurrentPositionVector);
68  = *(InputValues.CurrentVelocityVector);
70  = *(InputValues.CurrentAccelerationVector);
72  = *(InputValues.MaxAccelerationVector);
74  = *(InputValues.MaxJerkVector);
75 
77  {
79  = *(InputValues.CurrentVelocityVector);
80  }
81  else
82  {
84  = *(InputValues.AlternativeTargetVelocityVector);
85  }
86 
88  {
90  }
91  else
92  {
94  }
95 
98  , this->VelocityFlags);
99 
100  *(OutputValues->NewPositionVector)
102  *(OutputValues->NewVelocityVector)
104  *(OutputValues->NewAccelerationVector)
106 
107  OutputValues->SynchronizationTime
109 
110  OutputValues->TrajectoryIsPhaseSynchronized = false;
111 
112  OutputValues->ANewCalculationWasPerformed = true;
113 
114  *(OutputValues->MinPosExtremaPositionVectorOnly)
116  *(OutputValues->MaxPosExtremaPositionVectorOnly)
118 
119  *(OutputValues->MinExtremaTimesVector)
121  *(OutputValues->MaxExtremaTimesVector)
123 
124  for (i = 0; i < this->NumberOfDOFs; i++)
125  {
126  *((OutputValues->MinPosExtremaPositionVectorArray)[i])
128  *((OutputValues->MinPosExtremaVelocityVectorArray)[i])
130  *((OutputValues->MinPosExtremaAccelerationVectorArray)[i])
132 
133  *((OutputValues->MaxPosExtremaPositionVectorArray)[i])
135  *((OutputValues->MaxPosExtremaVelocityVectorArray)[i])
137  *((OutputValues->MaxPosExtremaAccelerationVectorArray)[i])
139  }
140 }
Header file for the class RMLPositionOutputParameters.
Header file for the dynamic vector class used for the Reflexxes Motion Libraries. ...
double SynchronizationTime
The synchronization time in seconds.
RMLDoubleVector * NewAccelerationVector
A pointer to the new acceleration vector .
Data structure containing flags to parameterize the execution of the position-based On-Line Trajector...
RMLDoubleVector * CurrentVelocityVector
A pointer to the current velocity vector .
Header file for the class TypeIIRMLVelocity.
RMLDoubleVector ** MaxPosExtremaAccelerationVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...
RMLDoubleVector * MaxAccelerationVector
A pointer to the maximum acceleration vector .
RMLVelocityOutputParameters * VelocityOutputParameters
Pointer to an RMLVelocityOutputParameters object. It is used for the output parameters of the velocit...
RMLDoubleVector * NewPositionVector
A pointer to the new position vector .
RMLDoubleVector ** MaxPosExtremaVelocityVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...
RMLDoubleVector ** MinPosExtremaVelocityVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...
TypeIIRMLVelocity * RMLVelocityObject
Pointer to an TypeIIRMLVelocity object. The velocity-based On-Line Trajectory Generation algorithm is...
Header file for the class RMLPositionInputParameters.
RMLDoubleVector * MaxExtremaTimesVector
A pointer to an RMLDoubleVector object that contains the times at which each degree of freedom reache...
Header file for the class RMLVelocityInputParameters.
Header file for the class RMLVelocityFlags.
Header file for the class TypeIIRMLPosition, which constitutes the actual interface of the Type II Re...
RMLDoubleVector * MinExtremaTimesVector
A pointer to an RMLDoubleVector object that contains the times at which each degree of freedom reache...
bool KeepCurrentVelocityInCaseOfFallbackStrategy
If true, RMLPositionInputParameters::AlternativeTargetVelocityVector will be used in TypeIVRMLPositio...
unsigned char SynchronizationBehavior
This value specifies the desired synchronization behavior.
Definition: RMLFlags.h:192
void FallBackStrategy(const RMLPositionInputParameters &InputValues, RMLPositionOutputParameters *OutputValues, const RMLPositionFlags &InputsFlags)
In case of an error, this method triggers the second layer of the safety concept. ...
RMLBoolVector * SelectionVector
A pointer to the selection vector .
Header file for the class RMLVelocityOutputParameters.
bool ANewCalculationWasPerformed
Indicates, whether a new computation was performed in the last cycle.
RMLVelocityInputParameters * VelocityInputParameters
Pointer to an RMLVelocityInputParameters object. It is used for the input parameters of the velocity-...
Only phase-synchronized trajectories are allowed. If it is not possible calculate a phase-synchronize...
Definition: RMLFlags.h:159
RMLVelocityFlags VelocityFlags
Pointer to an RMLVelocityFlags object. It is used for the velocity-based On-Line Trajectory Generatio...
No synchronization will be performed, and all selected degrees of freedom are treated independently...
Definition: RMLFlags.h:163
RMLDoubleVector * TargetVelocityVector
A pointer to the target velocity vector .
RMLDoubleVector * MaxJerkVector
A pointer to the maximum jerk vector .
Class for the output parameters of the position-based On-Line Trajectory Generation algorithm...
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 position-based On-Line Trajectory Generation algorithm...
RMLDoubleVector * MinPosExtremaPositionVectorOnly
A pointer to an RMLDoubleVector object that contains the maximum positions for all degrees of freedom...
unsigned int NumberOfDOFs
The number of degrees of freedom .
RMLDoubleVector * AlternativeTargetVelocityVector
A pointer to an alternative target velocity vector .
RMLDoubleVector * MaxPosExtremaPositionVectorOnly
A pointer to an RMLDoubleVector object that contains the maximum positions for all degrees of freedom...
int GetNextStateOfMotion(const RMLVelocityInputParameters &InputValues, RMLVelocityOutputParameters *OutputValues, const RMLVelocityFlags &Flags)
The main method of the class TypeIIRMLVelocity. It executes the velocity-based Type II On-Line Trajec...
RMLDoubleVector ** MinPosExtremaAccelerationVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...
RMLDoubleVector * CurrentAccelerationVector
A pointer to the current acceleration vector .
RMLDoubleVector * CurrentPositionVector
A pointer to the current position vector .
RMLDoubleVector ** MinPosExtremaPositionVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...
double GetGreatestExecutionTime(void) const
Returns the time value in seconds which is required by the degree with the greatest execution to reac...
RMLDoubleVector ** MaxPosExtremaPositionVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...


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