|
Fast Research Interface Library
Manual and Documentation
|
This class contains the API of the Reflexxes Motion Library (Type I) More...
#include <TypeIRML.h>
Public Types | |
| enum | TypeIRMLResult { RML_ERROR = -1, RML_MAX_VELOCITY_ERROR = -200, RML_MAX_ACCELERATION_ERROR = -201, RML_WORKING = 0, RML_FINAL_STATE_REACHED = 1 } |
| Result values of the methods TypeIRML::GetNextMotionState_Position() and TypeIRML::GetNextMotionState_Velocity() More... | |
Public Member Functions | |
| TypeIRML (const unsigned int &NoOfDOFs, const double &CycleTimeInSeconds) | |
| Constructor of the class TypeIRML. | |
| ~TypeIRML (void) | |
| Destructor of the class TypeIRML. | |
| int | GetNextMotionState_Position (const double *CurrentPosition, const double *CurrentVelocity, const double *MaxVelocity, const double *MaxAcceleration, const double *TargetPosition, const bool *SelectionVector, double *NewPosition, double *NewVelocity) |
Calculates new position and velocity values for target position-based trajectory generation. | |
| int | GetNextMotionState_Position (const TypeIRMLInputParameters &IP, TypeIRMLOutputParameters *OP) |
Calculates new position and velocity values for target position-based trajectory generation. | |
| int | GetNextMotionState_Velocity (const double *CurrentPosition, const double *CurrentVelocity, const double *MaxAcceleration, const double *TargetVelocity, const bool *SelectionVector, double *NewPosition, double *NewVelocity) |
Calculates new position and velocity values for target velocity-based trajectory generation. | |
| int | GetNextMotionState_Velocity (const TypeIRMLInputParameters &IP, TypeIRMLOutputParameters *OP) |
Calculates new position and velocity values for target velocity-based trajectory generation. | |
| double | GetExecutionTime (void) const |
| Returns the time in seconds that is required to time-optimally reach the desired target state of motion. | |
Private Member Functions | |
| double | CalculateMinimumSynchronizationTime (const TypeIRMLMath::TypeIRMLInputParameters &IP) const |
| Calculates and returns the minimum synchronization time. | |
| void | SynchronizeTrajectory (const TypeIRMLMath::TypeIRMLInputParameters &IP, const double &SynchronizationTime, TypeIRMLMath::TypeIMotionPolynomials *PolynomialArray) |
| Computes time-synchronized trajectories for all selected DOFs. | |
| int | CalculateOutputValues (const TypeIRMLMath::TypeIMotionPolynomials *PolynomialArray, const TypeIRMLBoolVector &SelectionVector, TypeIRMLMath::TypeIRMLOutputParameters *OP) |
| Computes the output values for of the method GetNextMotionState_Position() | |
Private Attributes | |
| int | NumberOfDOFs |
| Number of degrees of freedom. | |
| double | CycleTime |
| Cycle time in seconds. | |
| double | InternalClockInSeconds |
Internal time. This time will set to zero if the input values have changed. Otherwise, this value will be incremented by CycleTime during every call of GetNextMotionState_Position() or GetNextMotionState_Velocity() | |
| double | TrajectoryExecutionTimeForTheUser |
| Time in seconds until the final state of motion has been reached. | |
| TypeIRMLMath::TypeIRMLInputParameters * | CurrentInputParameters |
| Pointer to an object of the class TypeIRMLInputParameters. | |
| TypeIRMLMath::TypeIRMLOutputParameters * | OutputParameters |
| Pointer to an object of the class TypeIRMLOutputParameters. | |
| TypeIRMLMath::TypeIMotionPolynomials * | Polynomials |
| Pointer to an array of TypeIMotionPolynomials objects. | |
This class contains the API of the Reflexxes Motion Library (Type I)
The algorithm works with an arbitrary number of degrees of freedom. It can handle and proceed with any state of motion, that is, a new motion trajectory can be generated in any situation after any sensor event within the same control cycle. Further and detailed information can be found in
T. Kroeger.
On-Line Trajectory Generation in Robotic Systems.
Springer Tracts in Advanced Robotics, Vol. 58, Springer, January 2010.
http://www.springer.com/978-3-642-05174-6.
Definition at line 87 of file TypeIRML.h.
Result values of the methods TypeIRML::GetNextMotionState_Position() and TypeIRML::GetNextMotionState_Velocity()
Definition at line 123 of file TypeIRML.h.
| TypeIRML::TypeIRML | ( | const unsigned int & | NoOfDOFs, |
| const double & | CycleTimeInSeconds | ||
| ) |
Constructor of the class TypeIRML.
| NoOfDOFs | Indicates the number of degrees of freedom |
| CycleTimeInSeconds | Indicates the cycle time in seconds for the generator. A typical value is 0.001 (seconds). |
Definition at line 68 of file TypeIRML.cpp.
| TypeIRML::~TypeIRML | ( | void | ) |
Destructor of the class TypeIRML.
Definition at line 85 of file TypeIRML.cpp.
| double TypeIRML::CalculateMinimumSynchronizationTime | ( | const TypeIRMLMath::TypeIRMLInputParameters & | IP | ) | const [private] |
Calculates and returns the minimum synchronization time.
This method computes the minimum execution time for each selected DOF, determines the maximum one, and returns this value.
| IP | Pointer to the input parameters of the current call of GetNextMotionState_Position() |
Definition at line 192 of file TypeIRML.cpp.
| int TypeIRML::CalculateOutputValues | ( | const TypeIRMLMath::TypeIMotionPolynomials * | PolynomialArray, |
| const TypeIRMLBoolVector & | SelectionVector, | ||
| TypeIRMLMath::TypeIRMLOutputParameters * | OP | ||
| ) | [private] |
Computes the output values for of the method GetNextMotionState_Position()
Based on all polynomial parameters that have been calculated by the method SynchronizeTrajectory(), this method computes the output values for of the method GetNextMotionState_Position(), that is, the state of motion for the next control cycle.
| PolynomialArray | Pointer to the array of polynomials (TypeIRMLMath::TypeIMotionPolynomials) that have been parameterized by SynchronizeTrajectory(). |
| SelectionVector | Selection vector of the current set of input parameters. Only if the flag for a DOF is set to true, output values will be set by this method. |
| OP | Output values of GetNextMotionState_Position(), that is, the state of motion for the next control cycle. |
Definition at line 401 of file TypeIRML.cpp.
| double TypeIRML::GetExecutionTime | ( | void | ) | const |
Returns the time in seconds that is required to time-optimally reach the desired target state of motion.
If this method is called after the execution of the method TypeIRML::GetNextMotionState_Position(), the time value for the position-based trajectory will be returned. If this method is called after the execution of the method TypeIRML::GetNextMotionState_Velocity(), the time value for the velocity-based trajectory will be returned, i.e., the time until which the last degree of freedom will reach its target velocity. For the case, the final and desired state of motion has already been reached (i.e., the result of TypeIRML::GetNextMotionState_Position() or TypeIRML::GetNextMotionState_Velocity() was TypeIRML::RML_FINAL_STATE_REACHED), this method returns a zero value.
Definition at line 521 of file TypeIRML.cpp.
| int TypeIRML::GetNextMotionState_Position | ( | const double * | CurrentPosition, |
| const double * | CurrentVelocity, | ||
| const double * | MaxVelocity, | ||
| const double * | MaxAcceleration, | ||
| const double * | TargetPosition, | ||
| const bool * | SelectionVector, | ||
| double * | NewPosition, | ||
| double * | NewVelocity | ||
| ) |
Calculates new position
and velocity
values for target position-based trajectory generation.
| CurrentPosition | The current position (position of the last cycle, given by the user) |
| CurrentVelocity | The current velocity (velocity of the last cycle, given by the user) |
| MaxVelocity | The maximum velocity (given by the user) |
| MaxAcceleration | The maximum acceleration (given by the user) |
| TargetPosition | The target Position (given by the user) |
| SelectionVector | The selection vector , which determines, which DOFs are position controlled by the RML (of the current control cycle, given by the user) |
| NewPosition | Pointer to an array of double values for the new position (position of the current control cycle, to be calculated) |
| NewVelocity | Pointer to an array of double values for the new velocity (velocity of the current control cycle, to be calculated) |
Definition at line 96 of file TypeIRML.cpp.
| int TypeIRML::GetNextMotionState_Position | ( | const TypeIRMLInputParameters & | IP, |
| TypeIRMLOutputParameters * | OP | ||
| ) |
Calculates new position
and velocity
values for target position-based trajectory generation.
| IP | Input parameters for the current control cycle |
| OP | Output parameters for the current control cycle |
Definition at line 175 of file TypeIRML.cpp.
| int TypeIRML::GetNextMotionState_Velocity | ( | const double * | CurrentPosition, |
| const double * | CurrentVelocity, | ||
| const double * | MaxAcceleration, | ||
| const double * | TargetVelocity, | ||
| const bool * | SelectionVector, | ||
| double * | NewPosition, | ||
| double * | NewVelocity | ||
| ) |
Calculates new position
and velocity
values for target velocity-based trajectory generation.
| CurrentPosition | The current position (position of the last cycle, given by the user) |
| CurrentVelocity | The current velocity (velocity of the last cycle, given by the user) |
| MaxAcceleration | The maximum acceleration (given by the user) |
| TargetVelocity | The target velocity (velocity to be reached, given by the user) |
| SelectionVector | The selection vector , which determines, which DOFs are position controlled by the RML (of the current control cycle, given by the user) |
| NewPosition | Pointer to an array of double values for the new position (position of the current control cycle, to be calculated) |
| NewVelocity | Pointer to an array of double values for the new velocity (velocity of the current control cycle, to be calculated) |
Definition at line 443 of file TypeIRML.cpp.
| int TypeIRML::GetNextMotionState_Velocity | ( | const TypeIRMLInputParameters & | IP, |
| TypeIRMLOutputParameters * | OP | ||
| ) |
Calculates new position
and velocity
values for target velocity-based trajectory generation.
| IP | Input parameters for the current control cycle |
| OP | Output parameters for the current control cycle |
Definition at line 505 of file TypeIRML.cpp.
| void TypeIRML::SynchronizeTrajectory | ( | const TypeIRMLMath::TypeIRMLInputParameters & | IP, |
| const double & | SynchronizationTime, | ||
| TypeIRMLMath::TypeIMotionPolynomials * | PolynomialArray | ||
| ) | [private] |
Computes time-synchronized trajectories for all selected DOFs.
This method computes all polynomial parameters PolynomialArray of all selected DOFs. These calculations are based on the input parameters that are given through the call of GetNextMotionState_Position() and and the minimum synchronization time SynchronizationTime.
| IP | Pointer to the input parameters of the current call of GetNextMotionState_Position() |
| SynchronizationTime | Minimum synchronization time in seconds |
| PolynomialArray | Pointer to an array of polynomials (TypeIRMLMath::TypeIMotionPolynomials) |
Definition at line 283 of file TypeIRML.cpp.
Pointer to an object of the class TypeIRMLInputParameters.
Definition at line 494 of file TypeIRML.h.
double TypeIRML::CycleTime [private] |
double TypeIRML::InternalClockInSeconds [private] |
Internal time. This time will set to zero if the input values have changed. Otherwise, this value will be incremented by CycleTime during every call of GetNextMotionState_Position() or GetNextMotionState_Velocity()
Definition at line 476 of file TypeIRML.h.
int TypeIRML::NumberOfDOFs [private] |
Number of degrees of freedom.
Definition at line 453 of file TypeIRML.h.
Pointer to an object of the class TypeIRMLOutputParameters.
Definition at line 503 of file TypeIRML.h.
Pointer to an array of TypeIMotionPolynomials objects.
Definition at line 512 of file TypeIRML.h.
double TypeIRML::TrajectoryExecutionTimeForTheUser [private] |
Time in seconds until the final state of motion has been reached.
Definition at line 485 of file TypeIRML.h.