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: 07_RMLPositionSampleApplication.cpp \n\n");
106 printf(
"This example demonstrates the use of the entire output \n" );
107 printf(
"values of the position-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" );
174 printf(
"Input values are valid!\n");
178 printf(
"Input values are INVALID!\n");
199 printf(
"An error occurred (%d).\n", ResultValue );
208 if (!FirstCycleCompleted)
210 FirstCycleCompleted =
true;
212 printf(
"-------------------------------------------------------\n");
213 printf(
"General information:\n\n");
219 printf(
"The current trajectory is phase-synchronized.\n");
223 printf(
"The current trajectory is time-synchronized.\n");
227 printf(
"The trajectory was computed during the last computation cycle.\n");
231 printf(
"The input values did not change, and a new computation of the trajectory parameters was not required.\n");
234 printf(
"-------------------------------------------------------\n");
235 printf(
"New state of motion:\n\n");
237 printf(
"New position/pose vector : ");
243 printf(
"New velocity vector : ");
249 printf(
"New acceleration vector : ");
255 printf(
"-------------------------------------------------------\n");
256 printf(
"Extremes of the current trajectory:\n");
261 printf(
"Degree of freedom : %d\n", i);
264 printf(
"Position/pose vector at this time : ");
270 printf(
"Velocity vector at this time : ");
276 printf(
"Acceleration vector at this time : ");
284 printf(
"Position/pose vector at this time : ");
290 printf(
"Velocity vector at this time : ");
296 printf(
"Acceleration vector at this time : ");
303 printf(
"-------------------------------------------------------\n");
Header file for the class RMLPositionOutputParameters.
Header file for the class ReflexxesAPI (API of the Reflexxes Motion Libraries)
Header file for the class RMLPositionFlags.
RMLDoubleVector * NewAccelerationVector
A pointer to the new acceleration vector .
Data structure containing flags to parameterize the execution of the position-based On-Line Trajector...
double GetSynchronizationTime(void) const
Returns the synchronization time.
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.
#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...
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...
int RMLPosition(const RMLPositionInputParameters &InputValues, RMLPositionOutputParameters *OutputValues, const RMLPositionFlags &Flags)
This is the central method of each Reflexxes Type Motion Library.
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
Class for the output parameters of the position-based On-Line Trajectory Generation algorithm...
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 ** 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...