Fast Research Interface Library  Manual and Documentation
include/TypeIRML.h
Go to the documentation of this file.
00001 //  ---------------------- Doxygen info ----------------------
00051 //  ----------------------------------------------------------
00052 //   For a convenient reading of this file's source code,
00053 //   please use a tab width of four characters.
00054 //  ----------------------------------------------------------
00055 
00056 
00057 #ifndef __TypeIRML__
00058 #define __TypeIRML__
00059 
00060 #include <TypeIRMLMath.h>
00061 #include <TypeIRMLVector.h>
00062 #include <TypeIRMLInputParameters.h>
00063 #include <TypeIRMLOutputParameters.h>
00064 #include <TypeIRMLPolynomial.h>
00065 
00066 
00067 using namespace TypeIRMLMath;
00068 
00069 //  ---------------------- Doxygen info ----------------------
00086 //  ----------------------------------------------------------
00087 class TypeIRML
00088 {
00089 public:
00090 
00091 //  ---------------------- Doxygen info ----------------------
00103 //  ----------------------------------------------------------
00104     TypeIRML                (       const unsigned int          &NoOfDOFs
00105                                 ,   const double                &CycleTimeInSeconds  );
00106     
00107 //  ---------------------- Doxygen info ----------------------
00112 //  ----------------------------------------------------------
00113     ~TypeIRML               (       void    );
00114 
00115 
00116 //  ---------------------- Doxygen info ----------------------
00122 //  ----------------------------------------------------------
00123     enum TypeIRMLResult
00124     {
00127         RML_ERROR                               =   -1,
00131         RML_MAX_VELOCITY_ERROR                  =   -200,
00135         RML_MAX_ACCELERATION_ERROR              =   -201,
00139         RML_WORKING                             =   0,
00142         RML_FINAL_STATE_REACHED                 =   1,
00143     };
00144 
00145 
00146 //  ---------------------- Doxygen info ----------------------
00193 //  ----------------------------------------------------------
00194     int GetNextMotionState_Position (       const double*   CurrentPosition
00195                                         ,   const double*   CurrentVelocity
00196                                         ,   const double*   MaxVelocity
00197                                         ,   const double*   MaxAcceleration
00198                                         ,   const double*   TargetPosition
00199                                         ,   const bool*     SelectionVector
00200                                         ,   double*         NewPosition
00201                                         ,   double*         NewVelocity );
00202 
00203 
00204 //  ---------------------- Doxygen info ----------------------
00227 //  ----------------------------------------------------------                                      
00228     int GetNextMotionState_Position (       const TypeIRMLInputParameters   &IP
00229                                         ,   TypeIRMLOutputParameters        *OP );
00230 
00231 
00232 //  ---------------------- Doxygen info ----------------------
00276 //  ----------------------------------------------------------
00277     int GetNextMotionState_Velocity (       const double*   CurrentPosition
00278                                         ,   const double*   CurrentVelocity
00279                                         ,   const double*   MaxAcceleration
00280                                         ,   const double*   TargetVelocity
00281                                         ,   const bool*     SelectionVector
00282                                         ,   double*         NewPosition
00283                                         ,   double*         NewVelocity );
00284 
00285 
00286 //  ---------------------- Doxygen info ----------------------
00308 //  ----------------------------------------------------------                          
00309     int GetNextMotionState_Velocity (       const TypeIRMLInputParameters   &IP
00310                                         ,   TypeIRMLOutputParameters        *OP );                                      
00311 
00312 
00313 //  ---------------------- Doxygen info ----------------------
00342 //  ----------------------------------------------------------
00343     double  GetExecutionTime(void) const;
00344 
00345 
00346 private:
00347 
00348 
00349 //  ---------------------- Doxygen info ----------------------
00369 //  ----------------------------------------------------------
00370     double CalculateMinimumSynchronizationTime(const TypeIRMLMath::TypeIRMLInputParameters &IP) const;
00371 
00372 
00373 //  ---------------------- Doxygen info ----------------------
00399 //  ----------------------------------------------------------
00400     void SynchronizeTrajectory(     const TypeIRMLMath::TypeIRMLInputParameters     &IP
00401                                 ,   const double                                    &SynchronizationTime
00402                                 ,   TypeIRMLMath::TypeIMotionPolynomials            *PolynomialArray);
00403 
00404 
00405 //  ---------------------- Doxygen info ----------------------
00439 //  ----------------------------------------------------------
00440     int CalculateOutputValues(      const TypeIRMLMath::TypeIMotionPolynomials      *PolynomialArray
00441                                 ,   const TypeIRMLBoolVector                        &SelectionVector
00442                                 ,   TypeIRMLMath::TypeIRMLOutputParameters          *OP);
00443 
00444 
00445 //  ---------------------- Doxygen info ----------------------
00452 //  ----------------------------------------------------------
00453     int                             NumberOfDOFs                        ;
00454 
00455 
00456 //  ---------------------- Doxygen info ----------------------
00463 //  ----------------------------------------------------------
00464     double                          CycleTime                           ;
00465 
00466 
00467 //  ---------------------- Doxygen info ----------------------
00475 //  ----------------------------------------------------------
00476     double                          InternalClockInSeconds              ;
00477     
00478 
00479 //  ---------------------- Doxygen info ----------------------
00484 //  ----------------------------------------------------------
00485     double                          TrajectoryExecutionTimeForTheUser   ;
00486 
00487 
00488 //  ---------------------- Doxygen info ----------------------
00493 //  ----------------------------------------------------------
00494     TypeIRMLMath::TypeIRMLInputParameters       *CurrentInputParameters;
00495 
00496 
00497 //  ---------------------- Doxygen info ----------------------
00502 //  ----------------------------------------------------------
00503     TypeIRMLMath::TypeIRMLOutputParameters      *OutputParameters;
00504 
00505 
00506 //  ---------------------- Doxygen info ----------------------
00511 //  ----------------------------------------------------------
00512     TypeIRMLMath::TypeIMotionPolynomials        *Polynomials;
00513 
00514 };
00515 
00516 
00517 
00518 #endif
This document was generated with Doxygen on Thu Apr 12 2012 11:18:54. User documentation of the Fast Research Interface Library for the KUKA Lightweight Robot IV by the Stanford Robotics Research Group. Copyright 2010–2012.