Time-synchronized trajectories can be generated from any arbitrary state of motion, but to generate phase-synchronized trajectories, certain conditions have to be fulfilled. The flag
RMLFlags::PHASE_SYNCHRONIZATION_IF_POSSIBLE allows user to always generate phase-synchronized trajectories if possible. In order to demonstrate the behavior difference between the flags
the following diagram shows the path and trajectories of two different motions. The left one was generated using the flag
RMLFlags::ONLY_TIME_SYNCHRONIZATION, and the right one using the flag
RMLFlags::PHASE_SYNCHRONIZATION_IF_POSSIBLE. In both cases the desired target state of motion is reached after 3074 milliseconds for the first time. Because the trajectory started from an arbitrary initial state of motion , only time- but no phase-synchronization is possible. Also in both cases, the flag
RMLPositionFlags::RECOMPUTE_TRAJECTORY is used, such that after reaching at , is the new desired target state of motion. In this case, however, a phase-synchronized trajectory can be generated, because all input vectors are collinear now. This can be seen in the right diagram. The left diagram shows the corresponding time-synchronized trajectory.
In the two top diagrams, one can clearly recognize that the second part of the phase-synchronized trajectory is a straight-line motion instead of an eight-shaped path in the case of time-synchronization.
The position diagram ( ) also contains the positional extreme values depicted in darker colors (cf. RMLFlags::EnableTheCalculationOfTheExtremumMotionStates).
This example was generated using the same example as on page Behavior after the Final State of Motion is Reached. Further information about the different synchronization behaviors can be found on page Synchronization Behavior.