68 double AnalizedPosition = 0.0
69 , TimeOfZeroVelocity1 = 0.0
70 , TimeOfZeroVelocity2 = 0.0
71 , TimeValueAtExtremumPosition = 0.0;
73 for (i = 0; i < this->NumberOfDOFs; i++)
75 if ((this->CurrentInputParameters->SelectionVector->VecData)[i])
83 for (j = 0; j < ((this->Polynomials)[i].ValidPolynomials - 1); j++)
85 if ((this->Polynomials)[i].PolynomialTimes[j] > TimeValueInSeconds)
88 ? ((this->Polynomials)[i].VelocityPolynomial[j].CalculateValue(0.0))
89 : ((this->Polynomials)[i].VelocityPolynomial[j].CalculateValue(
90 (this->Polynomials)[i].PolynomialTimes[j - 1])))
92 Sign( (this->Polynomials)[i].VelocityPolynomial[j].CalculateValue(
93 (this->Polynomials)[i].PolynomialTimes[j])) )
95 (this->Polynomials)[i].VelocityPolynomial[j].CalculateRealRoots( &NumberOfRoots
96 , &TimeOfZeroVelocity1
97 , &TimeOfZeroVelocity2);
99 if ((NumberOfRoots == 1) && (TimeOfZeroVelocity1 > TimeValueInSeconds))
101 AnalizedPosition = (this->Polynomials)[i].PositionPolynomial[j].CalculateValue(TimeOfZeroVelocity1);
102 TimeValueAtExtremumPosition = TimeOfZeroVelocity1;
125 = (this->Polynomials)[i].PositionPolynomial[
126 ((this->Polynomials)[i].ValidPolynomials - 1)].CalculateValue(
127 (this->Polynomials)[i].PolynomialTimes[
128 ((this->Polynomials)[i].ValidPolynomials - 2)]);
130 TimeValueAtExtremumPosition
131 = (this->Polynomials)[i].PolynomialTimes[((this->Polynomials)[i].ValidPolynomials - 2)];
133 if ((this->Polynomials)[i].PolynomialTimes[(this->Polynomials)[i].ValidPolynomials - 1] > TimeValueInSeconds)
136 && (TimeValueInSeconds
137 <= (this->Polynomials)[i].PolynomialTimes[((this->Polynomials)[i].ValidPolynomials - 2)]))
144 && (TimeValueInSeconds
145 <= (this->Polynomials)[i].PolynomialTimes[((this->Polynomials)[i].ValidPolynomials - 2)]))
152 for (k = 0; k < this->NumberOfDOFs; k++)
154 if ((this->CurrentInputParameters->SelectionVector->VecData)[k])
158 if ( (this->Polynomials)[k].PolynomialTimes[l]
167 = (this->Polynomials)[k].PositionPolynomial[l].CalculateValue(
170 = (this->Polynomials)[k].VelocityPolynomial[l].CalculateValue(
173 = (this->Polynomials)[k].AccelerationPolynomial[l].CalculateValue(
178 if ( (this->Polynomials)[k].PolynomialTimes[l]
187 = (this->Polynomials)[k].PositionPolynomial[l].CalculateValue(
190 = (this->Polynomials)[k].VelocityPolynomial[l].CalculateValue(
193 = (this->Polynomials)[k].AccelerationPolynomial[l].CalculateValue(
199 = (this->CurrentInputParameters->CurrentPositionVector->VecData)[k];
201 = (this->CurrentInputParameters->CurrentVelocityVector->VecData)[k];
203 = (this->CurrentInputParameters->CurrentAccelerationVector->VecData)[k];
206 = (this->CurrentInputParameters->CurrentPositionVector->VecData)[k];
208 = (this->CurrentInputParameters->CurrentVelocityVector->VecData)[k];
210 = (this->CurrentInputParameters->CurrentAccelerationVector->VecData)[k];
233 for (k = 0; k < this->NumberOfDOFs; k++)
236 = (this->CurrentInputParameters->CurrentPositionVector->VecData)[k];
238 = (this->CurrentInputParameters->CurrentVelocityVector->VecData)[k];
240 = (this->CurrentInputParameters->CurrentAccelerationVector->VecData)[k];
243 = (this->CurrentInputParameters->CurrentPositionVector->VecData)[k];
245 = (this->CurrentInputParameters->CurrentVelocityVector->VecData)[k];
247 = (this->CurrentInputParameters->CurrentAccelerationVector->VecData)[k];
267 for (i = 0; i < this->NumberOfDOFs; i++)
269 for (k = 0; k < this->NumberOfDOFs; k++)
Header file for the dynamic vector class used for the Reflexxes Motion Libraries. ...
Header file for the class ReflexxesAPI (API of the Reflexxes Motion Libraries)
void SetPositionalExtremsToZero(RMLVelocityOutputParameters *OP) const
Set all positional extremum parameters of the output values of the algorithm (TypeIIRMLVelocity::Outp...
#define MAXIMAL_NO_OF_POLYNOMIALS
The maximum number of polynomials.
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...
T * VecData
Pointer to the actual vector data, that is, an array of type T objects.
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...
Header file for functions and definitions of constant values and macros.
RMLDoubleVector * MaxExtremaTimesVector
A pointer to an RMLDoubleVector object that contains the times at which each degree of freedom reache...
void CalculatePositionalExtrems(const double &TimeValueInSeconds, RMLVelocityOutputParameters *OP) const
Set all positional extremum parameters of the output values of the algorithm (TypeIIRMLVelocity::Outp...
RMLDoubleVector * MinExtremaTimesVector
A pointer to an RMLDoubleVector object that contains the times at which each degree of freedom reache...
Header file for the class RMLVelocityOutputParameters.
Class for the output parameters of the velocity-based On-Line Trajectory Generation algorithm...
RMLDoubleVector * MinPosExtremaPositionVectorOnly
A pointer to an RMLDoubleVector object that contains the maximum positions for all degrees of freedom...
RMLDoubleVector * MaxPosExtremaPositionVectorOnly
A pointer to an RMLDoubleVector object that contains the maximum positions for all degrees of freedom...
RMLDoubleVector ** MinPosExtremaAccelerationVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...
#define Sign(A)
Sign macro (integer)
RMLDoubleVector ** MinPosExtremaPositionVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...
RMLDoubleVector ** MaxPosExtremaPositionVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...