Reflexxes Motion Libraries  Manual and Documentation (Type II, Version 1.2.6)
Public Member Functions | Public Attributes | Protected Types
RMLPositionInputParameters Class Reference

Class for the input parameters of the position-based On-Line Trajectory Generation algorithm. More...

#include <RMLPositionInputParameters.h>

Inheritance diagram for RMLPositionInputParameters:
RMLInputParameters

List of all members.

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.
RMLPositionInputParametersoperator= (const RMLPositionInputParameters &IP)
 Copy operator.
void SetMaxVelocityVector (const RMLDoubleVector &InputVector)
 Sets the maximum velocity vector $ \vec{V}_{i}^{\,max} $ by using the an RMLDoubleVector object.
void SetMaxVelocityVector (const double *InputVector)
 Sets the maximum velocity vector $ \vec{V}_{i}^{\,max} $ by using a native C double array.
void SetMaxVelocityVectorElement (const double &InputValue, const unsigned int &Index)
 Sets one element of the maximum velocity vector $ \vec{V}_{i}^{\,max} $.
void GetMaxVelocityVector (RMLDoubleVector *InputVector) const
 Copies the contents of the RMLDoubleVector object containing the maximum velocity vector $ \vec{V}_{i}^{\,max} $ 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 $ \vec{V}_{i}^{\,max} $ to the memory pointed to by InputVector.
void GetMaxVelocityVectorElement (double *InputValue, const unsigned int &Index) const
 Copies one element of the maximum velocity vector $ \vec{V}_{i}^{\,max} $ to the memory pointed to by InputValue.
double GetMaxVelocityVectorElement (const unsigned int &Index) const
 Returns one single element of the maximum velocity vector $ \vec{V}_{i}^{\,max} $.
void SetTargetPositionVector (const RMLDoubleVector &InputVector)
 Sets the target position vector $ \vec{P}_{i}^{\,trgt} $ by using the an RMLDoubleVector object.
void SetTargetPositionVector (const double *InputVector)
 Sets the target position vector $ \vec{P}_{i}^{\,trgt} $ by using a native C double array.
void SetTargetPositionVectorElement (const double &InputValue, const unsigned int &Index)
 Sets one element of the target position vector $ \vec{P}_{i}^{\,trgt} $.
void GetTargetPositionVector (RMLDoubleVector *InputVector) const
 Copies the contents of the RMLDoubleVector object containing the target position vector $ \vec{P}_{i}^{\,trgt} $ 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 $ \vec{P}_{i}^{\,trgt} $ to the memory pointed to by InputVector.
void GetTargetPositionVectorElement (double *InputValue, const unsigned int &Index) const
 Copies one element of the target position vector $ \vec{P}_{i}^{\,trgt} $ to the memory pointed to by InputValue.
double GetTargetPositionVectorElement (const unsigned int &Index) const
 Returns one single element of the target position vector $ \vec{P}_{i}^{\,trgt} $.
void SetAlternativeTargetVelocityVector (const RMLDoubleVector &InputVector)
 Sets the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $ by using the an RMLDoubleVector object.
void SetAlternativeTargetVelocityVector (const double *InputVector)
 Sets the alternative target velocity vector $ \vec{V}_{i}^{\,max} $ by using the an RMLDoubleVector object.
void SetAlternativeTargetVelocityVectorElement (const double &InputValue, const unsigned int &Index)
 Sets one element of the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $.
void GetAlternativeTargetVelocityVector (RMLDoubleVector *InputVector) const
 Copies the contents of the RMLDoubleVector object containing the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $ 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 $ \vec{V}_{i}^{\,\underline{trgt}} $ 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 $ \vec{V}_{i}^{\,\underline{trgt}} $ to the memory pointed to by InputValue.
double GetAlternativeTargetVelocityVectorElement (const unsigned int &Index) const
 Returns one single element of the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $.
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

RMLDoubleVectorMaxVelocityVector
 A pointer to the maximum velocity vector $ \vec{V}_{i}^{\,max} $.
RMLDoubleVectorTargetPositionVector
 A pointer to the target position vector $ \vec{P}_{i}^{\,trgt} $.
RMLDoubleVectorAlternativeTargetVelocityVector
 A pointer to an alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $.

Protected Types

enum  { MAXIMUM_MAGNITUDE_RANGE = 8 }

Detailed Description

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.

See also:
ReflexxesAPI
RMLInputParameters
RMLVelocityInputParameters
RMLPositionOutputParameters
Description of Input Values

Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
MAXIMUM_MAGNITUDE_RANGE 

Specifies the maximum allowed range for the orders of magnitude of the input values.


Constructor & Destructor Documentation

RMLPositionInputParameters::RMLPositionInputParameters ( const unsigned int  DegreesOfFreedom) [inline]

Constructor of class RMLPositionInputParameters.

Warning:
The constructor is not real-time capable as heap memory has to be allocated.
Parameters:
DegreesOfFreedomSpecifies the number of degrees of freedom

Copy constructor of class RMLPositionInputParameters.

Warning:
The constructor is not real-time capable as heap memory has to be allocated.
Parameters:
IPObject to be copied

Destructor of class RMLPositionInputParameters.


Member Function Documentation

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.

Returns:
  • true, if all requirements for input parameters are met
  • false, otherwise
Note:
  • In order to achieve an optimal performance of the On-Line Trajectory Generation algorithm, this method is only executed in case of an error with the purpose to specify the error code of the result value (cf. ReflexxesAPI::RMLResultValue). As a consequence, there is no loss CPU time inside of the Reflexxes Motion Library, such that also the worst-case execution time is not negatively influenced. Please consider this method just as an additional possibility for the user application to check whether the current input values are valid for the On-Line Trajectory Generation algorithm.

  • If the On-Line Trajectory Generation algorithm is fed with invalid input parameters, it will try to compute correct output values. This works for many cases, and correct output values can be provided. If no correct output values can be calculated, it is guaranteed that valid output are provided in any case (cf. Safety: Three Layers of Error Handling).
See also:
ReflexxesAPI::RMLResultValue
RMLPositionInputParameters::MAXIMUM_MAGNITUDE_RANGE
RMLVelocityInputParameters::CheckForValidity()
RMLVelocityInputParameters::MAXIMUM_MAGNITUDE_RANGE
Description of Input Values
void RMLPositionInputParameters::Echo ( FILE *  FileHandler = stdout) const [inline]

Prints the complete set of input parameters to *FileHandler.

Parameters:
FileHandlerFile handler for the output
Warning:
The usage of this method is not real-time capable.

Reimplemented from RMLInputParameters.

Copies the contents of the RMLDoubleVector object containing the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $ to the RMLDoubleVector object referred to by InputVector.

Parameters:
InputVectorA pointer to an RMLDoubleVector object, to which the data will be copied
See also:
SetAlternativeTargetVelocityVector(const RMLDoubleVector &InputVector)
GetAlternativeTargetVelocityVector(double *InputVector, const unsigned int &SizeInBytes) const
GetAlternativeTargetVelocityVectorElement(double *InputValue, const unsigned int &Index) const
void RMLPositionInputParameters::GetAlternativeTargetVelocityVector ( double *  InputVector,
const unsigned int &  SizeInBytes 
) const [inline]

Copies the array of double values representing the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $ to the memory pointed to by InputVector.

Parameters:
InputVectorA pointer to an array of double values, to which the data will be copied
SizeInBytesThe 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.
See also:
SetAlternativeTargetVelocityVector(const double *InputVector)
GetAlternativeTargetVelocityVector(RMLDoubleVector *InputVector) const
GetAlternativeTargetVelocityVectorElement(double *InputValue, const unsigned int &Index) const
void RMLPositionInputParameters::GetAlternativeTargetVelocityVectorElement ( double *  InputValue,
const unsigned int &  Index 
) const [inline]

Copies one element of the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $ to the memory pointed to by InputValue.

Parameters:
InputValueA pointer to one double value, to which the desired vector element will be copied
IndexSpecifies 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.
See also:
SetAlternativeTargetVelocityVectorElement(const double &InputValue, const unsigned int &Index)
GetAlternativeTargetVelocityVector(RMLDoubleVector *InputVector) const
GetAlternativeTargetVelocityVectorElement(double *InputValue, const unsigned int &Index) const
GetAlternativeTargetVelocityVectorElement(const unsigned int &Index) const
double RMLPositionInputParameters::GetAlternativeTargetVelocityVectorElement ( const unsigned int &  Index) const [inline]

Returns one single element of the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $.

Parameters:
IndexSpecifies 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.
See also:
SetAlternativeTargetVelocityVectorElement(const double &InputValue, const unsigned int &Index)
GetAlternativeTargetVelocityVectorElement(double *InputValue, const unsigned int &Index) const
void RMLPositionInputParameters::GetMaxVelocityVector ( RMLDoubleVector InputVector) const [inline]

Copies the contents of the RMLDoubleVector object containing the maximum velocity vector $ \vec{V}_{i}^{\,max} $ to the RMLDoubleVector object referred to by InputVector.

Parameters:
InputVectorA pointer to an RMLDoubleVector object, to which the data will be copied
See also:
SetMaxVelocityVector(const RMLDoubleVector &InputVector)
GetMaxVelocityVector(double *InputVector, const unsigned int &SizeInBytes) const
GetMaxVelocityVectorElement(double *InputValue, const unsigned int &Index) const
void RMLPositionInputParameters::GetMaxVelocityVector ( double *  InputVector,
const unsigned int &  SizeInBytes 
) const [inline]

Copies the array of double values representing the maximum velocity vector $ \vec{V}_{i}^{\,max} $ to the memory pointed to by InputVector.

Parameters:
InputVectorA pointer to an array of double values, to which the data will be copied
SizeInBytesThe 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.
See also:
SetMaxVelocityVector(const double *InputVector)
GetMaxVelocityVector(RMLDoubleVector *InputVector) const
GetMaxVelocityVectorElement(double *InputValue, const unsigned int &Index) const
void RMLPositionInputParameters::GetMaxVelocityVectorElement ( double *  InputValue,
const unsigned int &  Index 
) const [inline]

Copies one element of the maximum velocity vector $ \vec{V}_{i}^{\,max} $ to the memory pointed to by InputValue.

Parameters:
InputValueA pointer to one double value, to which the desired vector element will be copied
IndexSpecifies 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.
See also:
SetMaxVelocityVectorElement(const double &InputValue, const unsigned int &Index)
GetMaxVelocityVector(RMLDoubleVector *InputVector) const
GetMaxVelocityVectorElement(double *InputValue, const unsigned int &Index) const
GetMaxVelocityVectorElement(const unsigned int &Index) const
double RMLPositionInputParameters::GetMaxVelocityVectorElement ( const unsigned int &  Index) const [inline]

Returns one single element of the maximum velocity vector $ \vec{V}_{i}^{\,max} $.

Parameters:
IndexSpecifies 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.
See also:
SetMaxVelocityVectorElement(const double &InputValue, const unsigned int &Index)
GetMaxVelocityVectorElement(double *InputValue, const unsigned int &Index) const

Copies the contents of the RMLDoubleVector object containing the target position vector $ \vec{P}_{i}^{\,trgt} $ to the RMLDoubleVector object referred to by InputVector.

Parameters:
InputVectorA pointer to an RMLDoubleVector object, to which the data will be copied
See also:
SetTargetPositionVector(const RMLDoubleVector &InputVector)
GetTargetPositionVector(double *InputVector, const unsigned int &SizeInBytes) const
GetTargetPositionVectorElement(double *InputValue, const unsigned int &Index) const
void RMLPositionInputParameters::GetTargetPositionVector ( double *  InputVector,
const unsigned int &  SizeInBytes 
) const [inline]

Copies the array of double values representing the target position vector $ \vec{P}_{i}^{\,trgt} $ to the memory pointed to by InputVector.

Parameters:
InputVectorA pointer to an array of double values, to which the data will be copied
SizeInBytesThe 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.
See also:
SetTargetPositionVector(const double *InputVector)
GetTargetPositionVector(RMLDoubleVector *InputVector) const
GetTargetPositionVectorElement(double *InputValue, const unsigned int &Index) const
void RMLPositionInputParameters::GetTargetPositionVectorElement ( double *  InputValue,
const unsigned int &  Index 
) const [inline]

Copies one element of the target position vector $ \vec{P}_{i}^{\,trgt} $ to the memory pointed to by InputValue.

Parameters:
InputValueA pointer to one double value, to which the desired vector element will be copied
IndexSpecifies 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.
See also:
SetTargetPositionVectorElement(const double &InputValue, const unsigned int &Index)
GetTargetPositionVector(RMLDoubleVector *InputVector) const
GetTargetPositionVectorElement(double *InputValue, const unsigned int &Index) const
GetTargetPositionVectorElement(const unsigned int &Index) const
double RMLPositionInputParameters::GetTargetPositionVectorElement ( const unsigned int &  Index) const [inline]

Returns one single element of the target position vector $ \vec{P}_{i}^{\,trgt} $.

Parameters:
IndexSpecifies 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.
See also:
SetTargetPositionVectorElement(const double &InputValue, const unsigned int &Index)
GetTargetPositionVectorElement(double *InputValue, const unsigned int &Index) const
RMLPositionInputParameters & RMLPositionInputParameters::operator= ( const RMLPositionInputParameters IP) [inline]

Copy operator.

Parameters:
IPRMLPositionInputParameters object to be copied

Sets the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $ 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.

Parameters:
InputVectorThe input vector, whose elements are copied to the attributes of this class.
Note:
By default and and in most cases this vector equals the zero vector.
See also:
SetAlternativeTargetVelocityVector(const double *InputVector)
SetAlternativeTargetVelocityVectorElement(const double &InputValue, const unsigned int &Index)
GetAlternativeTargetVelocityVector(RMLDoubleVector *InputVector) const
void RMLPositionInputParameters::SetAlternativeTargetVelocityVector ( const double *  InputVector) [inline]

Sets the alternative target velocity vector $ \vec{V}_{i}^{\,max} $ 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.

Parameters:
InputVectorThe input vector to an array of double values, whose elements are copied to the attributes of this class.
Note:
By default and and in most cases this vector equals the zero vector.
See also:
SetAlternativeTargetVelocityVector(const RMLDoubleVector &InputVector)
SetAlternativeTargetVelocityVectorElement(const double &InputValue, const unsigned int &Index)
GetAlternativeTargetVelocityVector(double *InputVector, const unsigned int &SizeInBytes) const
void RMLPositionInputParameters::SetAlternativeTargetVelocityVectorElement ( const double &  InputValue,
const unsigned int &  Index 
) [inline]

Sets one element of the alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $.

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.

Parameters:
InputValueThe input value that is copied to the element Index of the maximum velocity input vector attribute of this class.
IndexThe index of the element to be copied
Note:
By default and and in most cases this vector equals the zero vector.
See also:
SetAlternativeTargetVelocityVector(const RMLDoubleVector &InputVector)
SetAlternativeTargetVelocityVector(const double *InputVector)
GetAlternativeTargetVelocityVectorElement(double *InputValue, const unsigned int &Index) const
void RMLPositionInputParameters::SetMaxVelocityVector ( const RMLDoubleVector InputVector) [inline]

Sets the maximum velocity vector $ \vec{V}_{i}^{\,max} $ by using the an RMLDoubleVector object.

Parameters:
InputVectorThe input vector, whose elements are copied to the attributes of this class.
See also:
SetMaxVelocityVector(const double *InputVector)
SetMaxVelocityVectorElement(const double &InputValue, const unsigned int &Index)
GetMaxVelocityVector(RMLDoubleVector *InputVector) const
void RMLPositionInputParameters::SetMaxVelocityVector ( const double *  InputVector) [inline]

Sets the maximum velocity vector $ \vec{V}_{i}^{\,max} $ by using a native C double array.

Parameters:
InputVectorThe input vector to an array of double values, whose elements are copied to the attributes of this class.
See also:
SetMaxVelocityVector(const RMLDoubleVector &InputVector)
SetMaxVelocityVectorElement(const double &InputValue, const unsigned int &Index)
GetMaxVelocityVector(double *InputVector, const unsigned int &SizeInBytes) const
void RMLPositionInputParameters::SetMaxVelocityVectorElement ( const double &  InputValue,
const unsigned int &  Index 
) [inline]

Sets one element of the maximum velocity vector $ \vec{V}_{i}^{\,max} $.

Parameters:
InputValueThe input value that is copied to the element Index of the maximum velocity input vector attribute of this class.
IndexThe index of the element to be copied
See also:
SetMaxVelocityVector(const RMLDoubleVector &InputVector)
SetMaxVelocityVector(const double *InputVector)
GetMaxVelocityVectorElement(double *InputValue, const unsigned int &Index) const

Sets the target position vector $ \vec{P}_{i}^{\,trgt} $ by using the an RMLDoubleVector object.

Parameters:
InputVectorThe input vector, whose elements are copied to the attributes of this class.
See also:
SetTargetPositionVector(const double *InputVector)
SetTargetPositionVectorElement(const double &InputValue, const unsigned int &Index)
GetTargetPositionVector(RMLDoubleVector *InputVector) const
void RMLPositionInputParameters::SetTargetPositionVector ( const double *  InputVector) [inline]

Sets the target position vector $ \vec{P}_{i}^{\,trgt} $ by using a native C double array.

Parameters:
InputVectorThe input vector to an array of double values, whose elements are copied to the attributes of this class.
See also:
SetTargetPositionVector(const RMLDoubleVector &InputVector)
SetTargetPositionVectorElement(const double &InputValue, const unsigned int &Index)
GetTargetPositionVector(double *InputVector, const unsigned int &SizeInBytes) const
void RMLPositionInputParameters::SetTargetPositionVectorElement ( const double &  InputValue,
const unsigned int &  Index 
) [inline]

Sets one element of the target position vector $ \vec{P}_{i}^{\,trgt} $.

Parameters:
InputValueThe input value that is copied to the element Index of the target position input vector attribute of this class.
IndexThe index of the element to be copied
See also:
SetTargetPositionVector(const RMLDoubleVector &InputVector)
SetTargetPositionVector(const double *InputVector)
GetTargetPositionVectorElement(double *InputValue, const unsigned int &Index) const

Member Data Documentation

A pointer to an alternative target velocity vector $ \vec{V}_{i}^{\,\underline{trgt}} $.

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 $ \vec{V}_{i}^{\,trgt} $. 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:

Note:
By default, this vector is set to the zero vector, such that in case of an internal error (e.g., erroneous input values for the position-based On-Line Trajectory Generation algorithm) a motion trajectory guiding all selected degrees of freedom to zero-velocity will be generated.
See also:
RMLPositionFlags::KeepCurrentVelocityInCaseOfFallbackStrategy
Safety: Three Layers of Error Handling

The documentation for this class was generated from the following file:
User documentation of the Reflexxes Motion Libraries by Reflexxes GmbH (Company Information, Impressum). This document was generated with Doxygen on Mon Jul 7 2014 13:21:09. Copyright 2010–2014.