Reflexxes Motion Libraries
Manual and Documentation (Type II, Version 1.2.6)
|
00001 // ---------------------- Doxygen info ---------------------- 00043 // ---------------------------------------------------------- 00044 // For a convenient reading of this file's source code, 00045 // please use a tab width of four characters. 00046 // ---------------------------------------------------------- 00047 00048 00049 #ifndef __TypeIIRMLVelocity__ 00050 #define __TypeIIRMLVelocity__ 00051 00052 00053 #include <RMLVelocityInputParameters.h> 00054 #include <RMLVelocityOutputParameters.h> 00055 #include <RMLVector.h> 00056 #include <TypeIIRMLPolynomial.h> 00057 #include <RMLVelocityFlags.h> 00058 00059 00060 00061 using namespace TypeIIRMLMath; 00062 00063 00064 // ---------------------- Doxygen info ---------------------- 00102 // ---------------------------------------------------------- 00103 class TypeIIRMLVelocity 00104 { 00105 public: 00106 00107 00108 // ---------------------- Doxygen info ---------------------- 00126 // ---------------------------------------------------------- 00127 TypeIIRMLVelocity( const unsigned int &DegreesOfFreedom 00128 , const double &CycleTimeInSeconds); 00129 00130 00131 // ---------------------- Doxygen info ---------------------- 00145 // ---------------------------------------------------------- 00146 TypeIIRMLVelocity(const TypeIIRMLVelocity &TypeIIRMLObject); 00147 00148 00149 // ---------------------- Doxygen info ---------------------- 00154 // ---------------------------------------------------------- 00155 ~TypeIIRMLVelocity(void); 00156 00157 00158 // ---------------------- Doxygen info ---------------------- 00166 // ---------------------------------------------------------- 00167 TypeIIRMLVelocity &operator = (const TypeIIRMLVelocity &TypeIIRMLObject); 00168 00169 00170 // ---------------------- Doxygen info ---------------------- 00246 // ---------------------------------------------------------- 00247 int GetNextStateOfMotion( const RMLVelocityInputParameters &InputValues 00248 , RMLVelocityOutputParameters *OutputValues 00249 , const RMLVelocityFlags &Flags); 00250 00251 00252 // ---------------------- Doxygen info ---------------------- 00307 // ---------------------------------------------------------- 00308 int GetNextStateOfMotionAtTime( const double &TimeValueInSeconds 00309 , RMLVelocityOutputParameters *OutputValues ) const; 00310 00311 00312 protected: 00313 00314 00315 // ---------------------- Doxygen info ---------------------- 00320 // ---------------------------------------------------------- 00321 enum FunctionResults 00322 { 00324 FUNC_SUCCESS = false, 00326 FUNC_ERROR_OCCURRED = true 00327 }; 00328 00329 00330 // ---------------------- Doxygen info ---------------------- 00382 // ---------------------------------------------------------- 00383 void FallBackStrategy( const RMLVelocityInputParameters &InputValues 00384 , RMLVelocityOutputParameters *OutputValues ); 00385 00386 00387 // ---------------------- Doxygen info ---------------------- 00408 // ---------------------------------------------------------- 00409 void CalculateExecutionTimes(void); 00410 00411 00412 // ---------------------- Doxygen info ---------------------- 00432 // ---------------------------------------------------------- 00433 void ComputeTrajectoryParameters(void); 00434 00435 00436 // ---------------------- Doxygen info ---------------------- 00456 // ---------------------------------------------------------- 00457 void ComputePhaseSynchronizationParameters(void); 00458 00459 00460 // ---------------------- Doxygen info ---------------------- 00474 // ---------------------------------------------------------- 00475 void ComputeTimeSynchronizedTrajectoryParameters(void); 00476 00477 00478 // ---------------------- Doxygen info ---------------------- 00514 // ---------------------------------------------------------- 00515 int ComputeAndSetOutputParameters( const double &TimeValueInSeconds 00516 , RMLVelocityOutputParameters *OP ) const; 00517 00518 // ---------------------- Doxygen info ---------------------- 00563 // ---------------------------------------------------------- 00564 bool IsPhaseSynchronizationPossible(void); 00565 00566 00567 // ---------------------- Doxygen info ---------------------- 00616 // ---------------------------------------------------------- 00617 void CalculatePositionalExtrems( const double &TimeValueInSeconds 00618 , RMLVelocityOutputParameters *OP ) const; 00619 00620 00621 // ---------------------- Doxygen info ---------------------- 00659 // ---------------------------------------------------------- 00660 void SetPositionalExtremsToZero(RMLVelocityOutputParameters *OP) const; 00661 00662 00663 // ---------------------- Doxygen info ---------------------- 00689 // ---------------------------------------------------------- 00690 void SetupPhaseSyncSelectionVector(void); 00691 00692 00693 // ---------------------- Doxygen info ---------------------- 00703 // ---------------------------------------------------------- 00704 bool CurrentTrajectoryIsPhaseSynchronized; 00705 00706 00707 // ---------------------- Doxygen info ---------------------- 00716 // ---------------------------------------------------------- 00717 bool CurrentTrajectoryIsNotSynchronized; 00718 00719 00720 // ---------------------- Doxygen info ---------------------- 00727 // ---------------------------------------------------------- 00728 bool CalculatePositionalExtremsFlag; 00729 00730 00731 // ---------------------- Doxygen info ---------------------- 00739 // ---------------------------------------------------------- 00740 int ReturnValue; 00741 00742 00743 // ---------------------- Doxygen info ---------------------- 00750 // ---------------------------------------------------------- 00751 unsigned int NumberOfDOFs; 00752 00753 00754 // ---------------------- Doxygen info ---------------------- 00761 // ---------------------------------------------------------- 00762 unsigned int DOFWithGreatestExecutionTime; 00763 00764 00765 // ---------------------- Doxygen info ---------------------- 00772 // ---------------------------------------------------------- 00773 double CycleTime; 00774 00775 00776 // ---------------------- Doxygen info ---------------------- 00784 // ---------------------------------------------------------- 00785 double SynchronizationTime; 00786 00787 00788 // ---------------------- Doxygen info ---------------------- 00797 // ---------------------------------------------------------- 00798 double InternalClockInSeconds; 00799 00800 00801 // ---------------------- Doxygen info ---------------------- 00815 // ---------------------------------------------------------- 00816 RMLVelocityFlags OldFlags; 00817 00818 00819 // ---------------------- Doxygen info ---------------------- 00831 // ---------------------------------------------------------- 00832 RMLBoolVector *PhaseSyncSelectionVector; 00833 00834 00835 // ---------------------- Doxygen info ---------------------- 00843 // ---------------------------------------------------------- 00844 RMLDoubleVector *ExecutionTimes; 00845 00846 00847 // ---------------------- Doxygen info ---------------------- 00856 // ---------------------------------------------------------- 00857 RMLDoubleVector *PhaseSynchronizationReferenceVector; 00858 00859 00860 // ---------------------- Doxygen info ---------------------- 00869 // ---------------------------------------------------------- 00870 RMLDoubleVector *PhaseSynchronizationCurrentVelocityVector; 00871 00872 00873 // ---------------------- Doxygen info ---------------------- 00882 // ---------------------------------------------------------- 00883 RMLDoubleVector *PhaseSynchronizationTargetVelocityVector; 00884 00885 00886 // ---------------------- Doxygen info ---------------------- 00896 // ---------------------------------------------------------- 00897 RMLDoubleVector *PhaseSynchronizationMaxAccelerationVector; 00898 00899 00900 // ---------------------- Doxygen info ---------------------- 00915 // ---------------------------------------------------------- 00916 RMLVelocityInputParameters *OldInputParameters; 00917 00918 00919 // ---------------------- Doxygen info ---------------------- 00928 // ---------------------------------------------------------- 00929 RMLVelocityInputParameters *CurrentInputParameters; 00930 00931 00932 // ---------------------- Doxygen info ---------------------- 00945 // ---------------------------------------------------------- 00946 RMLVelocityOutputParameters *OutputParameters; 00947 00948 00949 00950 // ---------------------- Doxygen info ---------------------- 00961 // ---------------------------------------------------------- 00962 MotionPolynomials *Polynomials; 00963 00964 00965 }; // class TypeIIRMLVelocity 00966 00967 00968 #endif 00969 00970