ReflexxesAPI.cpp
Go to the documentation of this file.
1 // ---------------------- Doxygen info ----------------------
40 // ----------------------------------------------------------
41 // For a convenient reading of this file's source code,
42 // please use a tab width of four characters.
43 // ----------------------------------------------------------
44 
45 
46 #include <ReflexxesAPI.h>
47 #include <TypeIIRMLPosition.h>
48 #include <TypeIIRMLVelocity.h>
51 #include <RMLPositionFlags.h>
54 #include <RMLVelocityFlags.h>
55 
56 
57 //****************************************************************************
58 // ReflexxesAPI()
59 
60 ReflexxesAPI::ReflexxesAPI( const unsigned int &DegreesOfFreedom
61  , const double &CycleTimeInSeconds
62  , const unsigned int &NumberOfAdditionalThreads)
63 {
64  this->NumberOfDOFs = DegreesOfFreedom ;
65  this->NumberOfOwnThreads = NumberOfAdditionalThreads ;
66  this->CycleTime = CycleTimeInSeconds ;
67 
68  this->RMLPositionObject = (void*) new TypeIIRMLPosition( DegreesOfFreedom
69  , CycleTimeInSeconds);
70 
71  this->RMLVelocityObject = (void*) new TypeIIRMLVelocity( DegreesOfFreedom
72  , CycleTimeInSeconds);
73 }
74 
75 
76 //****************************************************************************
77 // ~ReflexxesAPI()
78 
80 {
81  delete (TypeIIRMLVelocity*)this->RMLVelocityObject;
82  delete (TypeIIRMLPosition*)this->RMLPositionObject;
83 
84  this->RMLVelocityObject = NULL;
85  this->RMLPositionObject = NULL;
86 }
87 
88 
89 //****************************************************************************
90 // RMLPosition()
91 
93  , RMLPositionOutputParameters *OutputValues
94  , const RMLPositionFlags &Flags)
95 {
96  return(((TypeIIRMLPosition*)(this->RMLPositionObject))->GetNextStateOfMotion( InputValues
97  , OutputValues
98  , Flags ));
99 }
100 
101 
102 //****************************************************************************
103 // RMLPositionAtAGivenSampleTime()
104 
105 int ReflexxesAPI::RMLPositionAtAGivenSampleTime( const double &TimeValueInSeconds
106  , RMLPositionOutputParameters *OutputValues)
107 {
108  return(((TypeIIRMLPosition*)(this->RMLPositionObject))->GetNextStateOfMotionAtTime( TimeValueInSeconds
109  , OutputValues ));
110 }
111 
112 
113 //****************************************************************************
114 // RMLVelocity()
115 
117  , RMLVelocityOutputParameters *OutputValues
118  , const RMLVelocityFlags &Flags)
119 {
120  return(((TypeIIRMLVelocity*)(this->RMLVelocityObject))->GetNextStateOfMotion( InputValues
121  , OutputValues
122  , Flags ));
123 }
124 
125 
126 //****************************************************************************
127 // RMLVelocityAtAGivenSampleTime()
128 
129 int ReflexxesAPI::RMLVelocityAtAGivenSampleTime( const double &TimeValueInSeconds
130  , RMLVelocityOutputParameters *OutputValues)
131 {
132  return(((TypeIIRMLVelocity*)(this->RMLVelocityObject))->GetNextStateOfMotionAtTime( TimeValueInSeconds
133  , OutputValues ));
134 }
Header file for the class RMLPositionOutputParameters.
Header file for the class ReflexxesAPI (API of the Reflexxes Motion Libraries)
Header file for the class RMLPositionFlags.
Data structure containing flags to parameterize the execution of the position-based On-Line Trajector...
Data structure containing flags to parameterize the execution of the velocity-based On-Line Trajector...
Header file for the class TypeIIRMLVelocity.
unsigned int NumberOfOwnThreads
Positive integer number of additional threads as specified by the constructor ReflexxesAPI() ...
Definition: ReflexxesAPI.h:644
int RMLVelocityAtAGivenSampleTime(const double &TimeValueInSeconds, RMLVelocityOutputParameters *OutputValues)
After calling ReflexxesAPI::RMLVelocity(), this methods returns the state of motion of the computed t...
~ReflexxesAPI(void)
Destructor of the class ReflexxesAPI.
Header file for the class RMLPositionInputParameters.
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...
int RMLPosition(const RMLPositionInputParameters &InputValues, RMLPositionOutputParameters *OutputValues, const RMLPositionFlags &Flags)
This is the central method of each Reflexxes Type Motion Library.
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.
double CycleTime
Cycle time in seconds as specified by the constructor ReflexxesAPI()
Definition: ReflexxesAPI.h:659
void * RMLVelocityObject
A pointer to an object for velocity-based On-Line Trajectory Generation.
Definition: ReflexxesAPI.h:701
ReflexxesAPI(const unsigned int &DegreesOfFreedom, const double &CycleTimeInSeconds, const unsigned int &NumberOfAdditionalThreads=0)
Constructor of the API class ReflexxesAPI (API of the Reflexxes Motion Library)
void * RMLPositionObject
A pointer to an object for position-based On-Line Trajectory Generation.
Definition: ReflexxesAPI.h:680
unsigned int NumberOfDOFs
Positive integer number of degrees of freedom as specified by the constructor ReflexxesAPI() ...
Definition: ReflexxesAPI.h:619
Class for the output parameters of the position-based On-Line Trajectory Generation algorithm...
Class for the input parameters of the position-based On-Line Trajectory Generation algorithm...
This class constitutes the low-level user interface of the Reflexxes Type II Motion Library...
Class for the input parameters of the velocity-based On-Line Trajectory Generation algorithm...
int RMLPositionAtAGivenSampleTime(const double &TimeValueInSeconds, RMLPositionOutputParameters *OutputValues)
After calling ReflexxesAPI::RMLPosition(), this methods returns the state of motion of the computed t...
This class constitutes the user interface of velocity-based the Type II On-Line Trajectory Generation...


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