Reflexxes Motion Libraries
Manual and Documentation (Type II, Version 1.2.6)
|
Class for the input parameters of the position-based On-Line Trajectory Generation algorithm. More...
#include <RMLPositionInputParameters.h>
Public Member Functions | |
RMLPositionInputParameters (const unsigned int DegreesOfFreedom) | |
Constructor of class RMLPositionInputParameters. | |
RMLPositionInputParameters (const RMLPositionInputParameters &IP) | |
Copy constructor of class RMLPositionInputParameters. | |
~RMLPositionInputParameters (void) | |
Destructor of class RMLPositionInputParameters. | |
RMLPositionInputParameters & | operator= (const RMLPositionInputParameters &IP) |
Copy operator. | |
void | SetMaxVelocityVector (const RMLDoubleVector &InputVector) |
Sets the maximum velocity vector by using the an RMLDoubleVector object. | |
void | SetMaxVelocityVector (const double *InputVector) |
Sets the maximum velocity vector by using a native C double array. | |
void | SetMaxVelocityVectorElement (const double &InputValue, const unsigned int &Index) |
Sets one element of the maximum velocity vector . | |
void | GetMaxVelocityVector (RMLDoubleVector *InputVector) const |
Copies the contents of the RMLDoubleVector object containing the maximum velocity vector to the RMLDoubleVector object referred to by InputVector . | |
void | GetMaxVelocityVector (double *InputVector, const unsigned int &SizeInBytes) const |
Copies the array of double values representing the maximum velocity vector to the memory pointed to by InputVector . | |
void | GetMaxVelocityVectorElement (double *InputValue, const unsigned int &Index) const |
Copies one element of the maximum velocity vector to the memory pointed to by InputValue . | |
double | GetMaxVelocityVectorElement (const unsigned int &Index) const |
Returns one single element of the maximum velocity vector . | |
void | SetTargetPositionVector (const RMLDoubleVector &InputVector) |
Sets the target position vector by using the an RMLDoubleVector object. | |
void | SetTargetPositionVector (const double *InputVector) |
Sets the target position vector by using a native C double array. | |
void | SetTargetPositionVectorElement (const double &InputValue, const unsigned int &Index) |
Sets one element of the target position vector . | |
void | GetTargetPositionVector (RMLDoubleVector *InputVector) const |
Copies the contents of the RMLDoubleVector object containing the target position vector to the RMLDoubleVector object referred to by InputVector . | |
void | GetTargetPositionVector (double *InputVector, const unsigned int &SizeInBytes) const |
Copies the array of double values representing the target position vector to the memory pointed to by InputVector . | |
void | GetTargetPositionVectorElement (double *InputValue, const unsigned int &Index) const |
Copies one element of the target position vector to the memory pointed to by InputValue . | |
double | GetTargetPositionVectorElement (const unsigned int &Index) const |
Returns one single element of the target position vector . | |
void | SetAlternativeTargetVelocityVector (const RMLDoubleVector &InputVector) |
Sets the alternative target velocity vector by using the an RMLDoubleVector object. | |
void | SetAlternativeTargetVelocityVector (const double *InputVector) |
Sets the alternative target velocity vector by using the an RMLDoubleVector object. | |
void | SetAlternativeTargetVelocityVectorElement (const double &InputValue, const unsigned int &Index) |
Sets one element of the alternative target velocity vector . | |
void | GetAlternativeTargetVelocityVector (RMLDoubleVector *InputVector) const |
Copies the contents of the RMLDoubleVector object containing the alternative target velocity vector to the RMLDoubleVector object referred to by InputVector . | |
void | GetAlternativeTargetVelocityVector (double *InputVector, const unsigned int &SizeInBytes) const |
Copies the array of double values representing the alternative target velocity vector to the memory pointed to by InputVector . | |
void | GetAlternativeTargetVelocityVectorElement (double *InputValue, const unsigned int &Index) const |
Copies one element of the alternative target velocity vector to the memory pointed to by InputValue . | |
double | GetAlternativeTargetVelocityVectorElement (const unsigned int &Index) const |
Returns one single element of the alternative target velocity vector . | |
bool | CheckForValidity (void) const |
Checks the input parameters for validity. | |
void | Echo (FILE *FileHandler=stdout) const |
Prints the complete set of input parameters to *FileHandler. | |
Public Attributes | |
RMLDoubleVector * | MaxVelocityVector |
A pointer to the maximum velocity vector . | |
RMLDoubleVector * | TargetPositionVector |
A pointer to the target position vector . | |
RMLDoubleVector * | AlternativeTargetVelocityVector |
A pointer to an alternative target velocity vector . | |
Protected Types | |
enum | { MAXIMUM_MAGNITUDE_RANGE = 8 } |
Class for the input parameters of the position-based On-Line Trajectory Generation algorithm.
The class RMLPositionInputParameters is derived from the class RMLInputParameters and constitutes a part of the interface for the position-based On-Line Trajectory Generation algorithm.
A detailed description can be found at Description of Input Values.
anonymous enum [protected] |
RMLPositionInputParameters::RMLPositionInputParameters | ( | const unsigned int | DegreesOfFreedom | ) | [inline] |
Constructor of class RMLPositionInputParameters.
DegreesOfFreedom | Specifies the number of degrees of freedom |
RMLPositionInputParameters::RMLPositionInputParameters | ( | const RMLPositionInputParameters & | IP | ) | [inline] |
Copy constructor of class RMLPositionInputParameters.
IP | Object to be copied |
RMLPositionInputParameters::~RMLPositionInputParameters | ( | void | ) | [inline] |
Destructor of class RMLPositionInputParameters.
bool RMLPositionInputParameters::CheckForValidity | ( | void | ) | const [inline] |
Checks the input parameters for validity.
This is an important method to ensure numerical robustness of the On-Line Trajectory Generation algorithm. Only if the result of this method is true
, a correct computation of output values can be obtained. If the result is false, the On-Line Trajectory Generation Algorithm will try compute correct output values, and in many cases, this is possible, but it is not guaranteed. All input values have to be within a proper order of magnitude (cf. RMLPositionInputParameters::MAXIMUM_MAGNITUDE_RANGE), the kinematic motion constraints, that is, the maximum values for velocity, and acceleration, have to be positive, and the target velocity must not be greater than the maximum velocity.
true
, if all requirements for input parameters are metfalse
, otherwisevoid RMLPositionInputParameters::Echo | ( | FILE * | FileHandler = stdout | ) | const [inline] |
Prints the complete set of input parameters to *FileHandler.
FileHandler | File handler for the output |
Reimplemented from RMLInputParameters.
void RMLPositionInputParameters::GetAlternativeTargetVelocityVector | ( | RMLDoubleVector * | InputVector | ) | const [inline] |
Copies the contents of the RMLDoubleVector
object containing the alternative target velocity vector to the RMLDoubleVector
object referred to by InputVector
.
InputVector | A pointer to an RMLDoubleVector object, to which the data will be copied |
void RMLPositionInputParameters::GetAlternativeTargetVelocityVector | ( | double * | InputVector, |
const unsigned int & | SizeInBytes | ||
) | const [inline] |
Copies the array of double
values representing the alternative target velocity vector to the memory pointed to by InputVector
.
InputVector | A pointer to an array of double values, to which the data will be copied |
SizeInBytes | The size of available memory at the location pointed to by InputVector . To assure safety and to prevent from prohibited writing into protected memory areas, the user has to specify the amount of available memory in bytes. For a correct operation, the value of SizeInBytes has to equal the number of vector elements multiplied by the size of a double value. |
void RMLPositionInputParameters::GetAlternativeTargetVelocityVectorElement | ( | double * | InputValue, |
const unsigned int & | Index | ||
) | const [inline] |
Copies one element of the alternative target velocity vector to the memory pointed to by InputValue
.
InputValue | A pointer to one double value, to which the desired vector element will be copied |
Index | Specifies the desired element of the vector. The element numbering starts with 0 (zero). If this value is greater the number of vector elements, a value of 0.0 will be written to the memory pointed to by InputValue . |
double RMLPositionInputParameters::GetAlternativeTargetVelocityVectorElement | ( | const unsigned int & | Index | ) | const [inline] |
Returns one single element of the alternative target velocity vector .
Index | Specifies the desired element of the vector. The index of the first vector element is 0 (zero). If the value of Index value is greater the number of vector elements, a value of 0.0 will be written to the memory pointed to by InputValue . |
void RMLPositionInputParameters::GetMaxVelocityVector | ( | RMLDoubleVector * | InputVector | ) | const [inline] |
Copies the contents of the RMLDoubleVector
object containing the maximum velocity vector to the RMLDoubleVector
object referred to by InputVector
.
InputVector | A pointer to an RMLDoubleVector object, to which the data will be copied |
void RMLPositionInputParameters::GetMaxVelocityVector | ( | double * | InputVector, |
const unsigned int & | SizeInBytes | ||
) | const [inline] |
Copies the array of double
values representing the maximum velocity vector to the memory pointed to by InputVector
.
InputVector | A pointer to an array of double values, to which the data will be copied |
SizeInBytes | The size of available memory at the location pointed to by InputVector . To assure safety and to prevent from prohibited writing into protected memory areas, the user has to specify the amount of available memory in bytes. For a correct operation, the value of SizeInBytes has to equal the number of vector elements multiplied by the size of a double value. |
void RMLPositionInputParameters::GetMaxVelocityVectorElement | ( | double * | InputValue, |
const unsigned int & | Index | ||
) | const [inline] |
Copies one element of the maximum velocity vector to the memory pointed to by InputValue
.
InputValue | A pointer to one double value, to which the desired vector element will be copied |
Index | Specifies the desired element of the vector. The element numbering starts with 0 (zero). If this value is greater the number of vector elements, a value of 0.0 will be written to the memory pointed to by InputValue . |
double RMLPositionInputParameters::GetMaxVelocityVectorElement | ( | const unsigned int & | Index | ) | const [inline] |
Returns one single element of the maximum velocity vector .
Index | Specifies the desired element of the vector. The index of the first vector element is 0 (zero). If the value of Index value is greater the number of vector elements, a value of 0.0 will be written to the memory pointed to by InputValue . |
void RMLPositionInputParameters::GetTargetPositionVector | ( | RMLDoubleVector * | InputVector | ) | const [inline] |
Copies the contents of the RMLDoubleVector
object containing the target position vector to the RMLDoubleVector
object referred to by InputVector
.
InputVector | A pointer to an RMLDoubleVector object, to which the data will be copied |
void RMLPositionInputParameters::GetTargetPositionVector | ( | double * | InputVector, |
const unsigned int & | SizeInBytes | ||
) | const [inline] |
Copies the array of double
values representing the target position vector to the memory pointed to by InputVector
.
InputVector | A pointer to an array of double values, to which the data will be copied |
SizeInBytes | The size of available memory at the location pointed to by InputVector . To assure safety and to prevent from prohibited writing into protected memory areas, the user has to specify the amount of available memory in bytes. For a correct operation, the value of SizeInBytes has to equal the number of vector elements multiplied by the size of a double value. |
void RMLPositionInputParameters::GetTargetPositionVectorElement | ( | double * | InputValue, |
const unsigned int & | Index | ||
) | const [inline] |
Copies one element of the target position vector to the memory pointed to by InputValue
.
InputValue | A pointer to one double value, to which the desired vector element will be copied |
Index | Specifies the desired element of the vector. The element numbering starts with 0 (zero). If this value is greater the number of vector elements, a value of 0.0 will be written to the memory pointed to by InputValue . |
double RMLPositionInputParameters::GetTargetPositionVectorElement | ( | const unsigned int & | Index | ) | const [inline] |
Returns one single element of the target position vector .
Index | Specifies the desired element of the vector. The index of the first vector element is 0 (zero). If the value of Index value is greater the number of vector elements, a value of 0.0 will be written to the memory pointed to by InputValue . |
RMLPositionInputParameters & RMLPositionInputParameters::operator= | ( | const RMLPositionInputParameters & | IP | ) | [inline] |
Copy operator.
IP | RMLPositionInputParameters object to be copied |
void RMLPositionInputParameters::SetAlternativeTargetVelocityVector | ( | const RMLDoubleVector & | InputVector | ) | [inline] |
Sets the alternative target velocity vector by using the an RMLDoubleVector
object.
This vector only becomes applied for the fall back strategy when no correct output values can be calculated (e.g., due to incorrect input values.
InputVector | The input vector, whose elements are copied to the attributes of this class. |
void RMLPositionInputParameters::SetAlternativeTargetVelocityVector | ( | const double * | InputVector | ) | [inline] |
Sets the alternative target velocity vector by using the an RMLDoubleVector
object.
This vector only becomes applied for the fall back strategy when no correct output values can be calculated (e.g., due to incorrect input values.
InputVector | The input vector to an array of double values, whose elements are copied to the attributes of this class. |
void RMLPositionInputParameters::SetAlternativeTargetVelocityVectorElement | ( | const double & | InputValue, |
const unsigned int & | Index | ||
) | [inline] |
Sets one element of the alternative target velocity vector .
This vector only becomes applied for the fall back strategy when no correct output values can be calculated (e.g., due to incorrect input values.
InputValue | The input value that is copied to the element Index of the maximum velocity input vector attribute of this class. |
Index | The index of the element to be copied |
void RMLPositionInputParameters::SetMaxVelocityVector | ( | const RMLDoubleVector & | InputVector | ) | [inline] |
Sets the maximum velocity vector by using the an RMLDoubleVector
object.
InputVector | The input vector, whose elements are copied to the attributes of this class. |
void RMLPositionInputParameters::SetMaxVelocityVector | ( | const double * | InputVector | ) | [inline] |
Sets the maximum velocity vector by using a native C double
array.
InputVector | The input vector to an array of double values, whose elements are copied to the attributes of this class. |
void RMLPositionInputParameters::SetMaxVelocityVectorElement | ( | const double & | InputValue, |
const unsigned int & | Index | ||
) | [inline] |
Sets one element of the maximum velocity vector .
InputValue | The input value that is copied to the element Index of the maximum velocity input vector attribute of this class. |
Index | The index of the element to be copied |
void RMLPositionInputParameters::SetTargetPositionVector | ( | const RMLDoubleVector & | InputVector | ) | [inline] |
Sets the target position vector by using the an RMLDoubleVector
object.
InputVector | The input vector, whose elements are copied to the attributes of this class. |
void RMLPositionInputParameters::SetTargetPositionVector | ( | const double * | InputVector | ) | [inline] |
Sets the target position vector by using a native C double
array.
InputVector | The input vector to an array of double values, whose elements are copied to the attributes of this class. |
void RMLPositionInputParameters::SetTargetPositionVectorElement | ( | const double & | InputValue, |
const unsigned int & | Index | ||
) | [inline] |
Sets one element of the target position vector .
InputValue | The input value that is copied to the element Index of the target position input vector attribute of this class. |
Index | The index of the element to be copied |
A pointer to an alternative target velocity vector .
This vector becomes applied in the second safety layer, which becomes activated by calling TypeIVRMLPosition::FallBackStrategy(). The second layer applies the velocity-based On-Line Trajectory Generation algorithm, and this vector is used as desired target velocity vector . In many use cases, a target velocity vector of zero may be sufficient, but in dependence on the application it may be desirable to specify an alternative target velocity vector that becomes applied in the second safety layer (cf. TypeIVRMLVelocity). As a further alternative, the flag RMLPositionFlags::KeepCurrentVelocityInCaseOfFallbackStrategy may be used to use the current velocity vector as set-point and input value for the velocity-based On-Line Trajectory Generation algorithm.
This attribute can be accessed directly or by using one of the following methods:
A pointer to the maximum velocity vector .
This attribute can be accessed directly or by using one of the following methods:
A pointer to the target position vector .
This attribute can be accessed directly or by using one of the following methods: