53 #define CYCLE_TIME_IN_SECONDS 0.001 54 #define NUMBER_OF_DOFS 3 74 bool FirstCycleCompleted = false ;
103 printf(
"-------------------------------------------------------\n" );
104 printf(
"Reflexxes Motion Libraries \n" );
105 printf(
"Example: 08_RMLVelocitySampleApplication \n\n");
106 printf(
"This example demonstrates the use of the entire output \n" );
107 printf(
"values of the velocity-based Online Trajectory \n" );
108 printf(
"Generation algorithm of the Type II Reflexxes Motion \n" );
109 printf(
"Library. \n\n");
110 printf(
"Copyright (C) 2014 Google, Inc. \n" );
111 printf(
"-------------------------------------------------------\n" );
166 printf(
"Input values are valid!\n");
170 printf(
"Input values are INVALID!\n");
193 printf(
"An error occurred (%d).\n", ResultValue );
202 if (!FirstCycleCompleted)
204 FirstCycleCompleted =
true;
206 printf(
"-------------------------------------------------------\n");
207 printf(
"General information:\n\n");
211 printf(
"The current trajectory is phase-synchronized.\n");
215 printf(
"The current trajectory is time-synchronized.\n");
219 printf(
"The trajectory was computed during the last computation cycle.\n");
223 printf(
"The input values did not change, and a new computation of the trajectory parameters was not required.\n");
228 printf(
"The degree of freedom with the index %d will reach its target velocity at position %.3lf after %.3lf seconds.\n" 236 printf(
"-------------------------------------------------------\n");
237 printf(
"New state of motion:\n\n");
239 printf(
"New position/pose vector : ");
245 printf(
"New velocity vector : ");
251 printf(
"New acceleration vector : ");
257 printf(
"-------------------------------------------------------\n");
258 printf(
"Extremes of the current trajectory:\n");
263 printf(
"Degree of freedom : %d\n", i);
266 printf(
"Position/pose vector at this time : ");
272 printf(
"Velocity vector at this time : ");
278 printf(
"Acceleration vector at this time : ");
286 printf(
"Position/pose vector at this time : ");
292 printf(
"Velocity vector at this time : ");
298 printf(
"Acceleration vector at this time : ");
305 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.
#define CYCLE_TIME_IN_SECONDS
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...
unsigned char SynchronizationBehavior
This value specifies the desired synchronization behavior.
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.
Even if it is possible to calculate a phase-synchronized trajectory, only a time-synchronized traject...
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...