RefVal_JS.h
Go to the documentation of this file.
00001 /********************************************************************
00002  *                                                                  *
00003  *   Reference Values in Joint Space                                *
00004  *                                                                  *
00005  *   abstract base class defining the functions that a              *
00006  *   class implementing reference values in joint space             *
00007  *   has to provide. Values for                                  *
00008  *                                                                  *
00009  ********************************************************************/
00010 
00011 #ifndef _REFVAL_JS_H_
00012 #define _REFVAL_JS_H_
00013 
00014 #include <vector>
00015 
00016  
00017 class RefVal_JS
00018 {
00019         public:
00020                 virtual std::vector<double> r(double s) const=0;
00021                 virtual double s(double t) const=0;
00022                 virtual std::vector<double> r_t(double t) const { return r( s(t) ); }
00023                 
00024                 virtual std::vector<double> dr_ds(double s) const=0;
00025                 virtual double ds_dt(double t) const=0;
00026                 virtual std::vector<double> dr_dt(double t) const
00027                 {
00028                         std::vector<double> dr;
00029                         dr.resize(dr_ds(t).size());
00030                         for(unsigned int i = 0; i < dr_ds(t).size(); i++)
00031                                 dr.at(i) = dr_ds( s(t) ).at(i) * ds_dt( t );
00032                         return dr;
00033                 }
00034                                 
00035                 virtual std::vector<double> getLast() const { return r_t( getTotalTime() ); }
00036                 
00037                 virtual double getTotalTime() const=0;
00038 };
00039 
00040 #endif
00041 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


cob_trajectory_controller
Author(s): Alexander Bubeck
autogenerated on Fri Mar 1 2013 17:49:16