Reflexxes Motion Libraries
Manual and Documentation (Type II, Version 1.2.6)

If one the methods
is called with valid input values, it is guaranteed that the output values of the Reflexxes algorithms lead to a continuous accelerationlimited motion trajectory in any case. This fundamental feature was implemented using a threelayered approach of errorhandling, which is described in the following two sections.
The positionbased Reflexxes Type II OnLine Trajectory Generation (OTG) algorithm is the most complex algorithm of the Reflexxes Motion Libraries. Robustness and numerical stability are key features to assure deterministic and safe behaviors of robots and mechanical systems. After more than eight years of research and development, the released algorithm runs robust and is numerically stable.
In order to guarantee continuous accelerationlimited motion trajectories, three layers of errorhandling have been implemented in order to obtain a deterministic and safe behavior of all Reflexxes Motion Libraries for any set given input values.
This layer contains the positionbased Reflexxes Type II OnLine Trajectory Generation algorithm. This algorithm is called through the API method ReflexxesAPI::RMLPosition(), which calls the internal method TypeIIRMLPosition::GetNextStateOfMotion() that contains the actual positionbased trajectory generation algorithm. If the algorithm is fed with valid input values, that is, the method RMLPositionInputParameters::CheckForValidity() returns false
, we switch from Layer 3 to Layer 2 (even after after more than cylces, this has not happened yet).
The implementation of Layer 2 can be found in the method TypeIIRMLPosition::FallBackStrategy().
In the second layer, the velocitybased algorithm of the Reflexxes Type II Motion Library is executed in order to safely transfer the system to a predefined velocity (cf. ReflexxesAPI::RMLVelocity()). The default value for this alternative desired velocity vector is zero, that is, the robot or mechanical system would simply slow down to zerovelocity by using the currently given maximum acceleration vector (cf. RMLPositionInputParameters::MaxAccelerationVector) until is reached. In order to decouple all selected degrees of freedom and to reach this sate safely, a nonsynchronized motion will be computed, and the flag RMLFlags::NO_SYNCHRONIZATION will be used for the velocitybased algorithm.
If it is not desired to decrease the velocity to zero but to continue moving the system with a certain application or taskdependent velocity, an alternative desired target velocity vector can be defined. The attribute RMLPositionInputParameters::AlternativeTargetVelocityVector can be used to specify this alternative velocity vector unequal to zero, . Furthermore, the input flag RMLPositionFlags::KeepCurrentVelocityInCaseOfFallbackStrategy can be used to set the alternative desired target velocity vector to the current velocity vector, that is, .
The mathematical equations of the velocitybased OnLine Trajectory Generation only contain closedform solutions; numerical instabilities cannot occur if the Input Requirements for Numerical Stability are met. In case, the user specifies elements of the maximum acceleration vector that are equal or less than zero (cf. RMLPositionInputParameters::MaxAccelerationVector), the algorithm will even switch from Layer 2 to Layer 1 in order to continue the current motion. This layer is implemented in the method TypeIIRMLVelocity::FallBackStrategy().
Although even the probability of switching from Layer 3 to Layer 2 can only happen in case of incorrect input values, a third layer is used to handle this case. In this case, the motion of the system is continued with zeroacceleration. That means the output values RMLPositionOutputParameters determined by the following equations:
Where the variables and symbols represent the following data:
Details about the implementation of these equations can be found in the method TypeIIRMLVelocity::FallBackStrategy().
If a phasesynchronized motion trajectory is required (i.e., the input flag RMLPositionFlags::ONLY_PHASE_SYNCHRONIZATION is set), and if phasesynchronisation is not possible because the input vectors are not collinear, we also switch from Layer 3 to Layer 2, because in this case, priority is given to the fact that phasesynchronization is required (otherwise, the flag RMLPositionFlags::PHASE_SYNCHRONIZATION_IF_POSSIBLE may be used). If we switch to the second layer in this case, the algorithm will check, whether a phasesynchronous solution is existent if the velocitybased OnLine Trajectory Generation is executed. If so, the velocitybased algorithm will compute a phasesynchronized motion. Otherwise, we will switch from Layer 2 to Layer 1. If the current state of motion is homothetic, the trajectory will be continued homothetically (phasesynchronized) by applying zeroacceleration in the current control cycle.
The velocitybased Reflexxes Type II OnLine Trajectory Generation (OTG) algorithm is of much simpler nature than the positionbased algorithm and only a twolayered method is used for errorhandling. This safety mechanism is directly derived from Layer 2 and Layer 1 of the positionbased OnLine Trajectory Generation algorithm.
The algorithm is called through the API method ReflexxesAPI::RMLVelocity(), which executes the internal method TypeIIRMLVelocity::GetNextStateOfMotion(). If the input values for this algorithm are valid, that is, the result of RMLVelocityInputParameters::CheckForValidity() is true
, the velocitybased algorithm will always find the correct solution. If RMLVelocityInputParameters::CheckForValidity() returns false
, because elements of the maximum acceleration vector that or equal or less than zero (cf. RMLVelocityInputParameters::MaxAccelerationVector and RMLVelocityInputParameters::MaxJerkVector), the algorithm will switch from Layer 2 to Layer 1 in order to continue the current motion. This layer is implemented in the method TypeIIRMLVelocity::FallBackStrategy(). Please refer to Sec. Layer 1 of the positionbased algorithm for a detailed description.
If a phasesynchronized motion trajectory is required (i.e., the input flag RMLVelocityFlags::ONLY_PHASE_SYNCHRONIZATION is set), and if phasesynchronisation is not possible because the input vectors are not collinear, we also apply the switching mechanism described above (i.e., the new state of motion is computed by applying a zeroacceleration). If the current state of motion is homothetic, the trajectory will be continued homothetically (phasesynchronized).