53 #define CYCLE_TIME_IN_SECONDS 0.001 54 #define NUMBER_OF_DOFS 3 74 bool FirstCycleCompleted = false ;
104 printf(
"-------------------------------------------------------\n" );
105 printf(
"Reflexxes Motion Libraries \n" );
106 printf(
"Example: 05_RMLVelocitySampleApplication \n\n");
107 printf(
"This example demonstrates the use of the entire output \n" );
108 printf(
"values of the velocity-based Online Trajectory \n" );
109 printf(
"Generation algorithm of the Type II Reflexxes Motion \n" );
110 printf(
"Library. \n\n");
111 printf(
"Copyright (C) 2014 Google, Inc. \n" );
112 printf(
"-------------------------------------------------------\n" );
162 printf(
"Input values are valid!\n");
166 printf(
"Input values are INVALID!\n");
187 printf(
"An error occurred (%d).\n", ResultValue );
196 if (!FirstCycleCompleted)
198 FirstCycleCompleted =
true;
200 printf(
"-------------------------------------------------------\n");
201 printf(
"General information:\n\n");
205 printf(
"The current trajectory is phase-synchronized.\n");
209 printf(
"The current trajectory is time-synchronized.\n");
213 printf(
"The trajectory was computed during the last computation cycle.\n");
217 printf(
"The input values did not change, and a new computation of the trajectory parameters was not required.\n");
222 printf(
"The degree of freedom with the index %d will reach its target velocity at position %.3lf after %.3lf seconds.\n" 230 printf(
"-------------------------------------------------------\n");
231 printf(
"New state of motion:\n\n");
233 printf(
"New position/pose vector : ");
239 printf(
"New velocity vector : ");
245 printf(
"New acceleration vector : ");
251 printf(
"-------------------------------------------------------\n");
252 printf(
"Extremes of the current trajectory:\n");
257 printf(
"Degree of freedom : %d\n", i);
260 printf(
"Position/pose vector at this time : ");
266 printf(
"Velocity vector at this time : ");
272 printf(
"Acceleration vector at this time : ");
280 printf(
"Position/pose vector at this time : ");
286 printf(
"Velocity vector at this time : ");
292 printf(
"Acceleration vector at this time : ");
299 printf(
"-------------------------------------------------------\n");
Header file for the class ReflexxesAPI (API of the Reflexxes Motion Libraries)
unsigned int GetDOFWithTheGreatestExecutionTime(void) const
Returns the index of the degree of freedom with the greatest trajectory execution time...
RMLDoubleVector * NewAccelerationVector
A pointer to the new acceleration vector .
Data structure containing flags to parameterize the execution of the velocity-based On-Line Trajector...
RMLDoubleVector ** MaxPosExtremaAccelerationVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...
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.
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...
RMLDoubleVector * MaxExtremaTimesVector
A pointer to an RMLDoubleVector object that contains the times at which each degree of freedom reache...
Header file for the class RMLVelocityFlags.
RMLDoubleVector * MinExtremaTimesVector
A pointer to an RMLDoubleVector object that contains the times at which each degree of freedom reache...
bool IsTrajectoryPhaseSynchronized(void) const
Indicates whether the currently calculated trajectory is phase- synchronized or only time-synchronize...
#define CYCLE_TIME_IN_SECONDS
Header file for the class RMLVelocityOutputParameters.
Class for the output parameters of the velocity-based On-Line Trajectory Generation algorithm...
int RMLVelocity(const RMLVelocityInputParameters &InputValues, RMLVelocityOutputParameters *OutputValues, const RMLVelocityFlags &Flags)
This is the method for velocity-based On-Line Trajectory Generation.
bool WasACompleteComputationPerformedDuringTheLastCycle(void) const
Indicates, whether a new computation was performed in the last cycle.
This class constitutes the API of the Reflexxes Motion Libraries
RMLDoubleVector * NewVelocityVector
A pointer to the new velocity vector .
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 * PositionValuesAtTargetVelocity
A pointer to an RMLDoubleVector object that contains the position values at the instants the desired ...
RMLDoubleVector ** MinPosExtremaAccelerationVectorArray
A pointer to an array of pointers to RMLDoubleVector objects. The number of array elements equals the...
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...