velocityprofile.hpp

Go to the documentation of this file.
00001 /***************************************************************************
00002   tag: Erwin Aertbelien  Mon Jan 10 16:38:38 CET 2005  velocityprofile.h
00003 
00004                         velocityprofile.h -  description
00005                            -------------------
00006     begin                : Mon January 10 2005
00007     copyright            : (C) 2005 Erwin Aertbelien
00008     email                : erwin.aertbelien@mech.kuleuven.ac.be
00009 
00010  ***************************************************************************
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place,                                    *
00024  *   Suite 330, Boston, MA  02111-1307  USA                                *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 
00029 /*****************************************************************************
00030  *
00031  *  \author
00032  *      Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
00033  *
00034  *  \version
00035  *              ORO_Geometry V0.2
00036  *
00037  *      \par History
00038  *              - $log$
00039  *
00040  *      \par Release
00041  *              $Id: velocityprofile.h,v 1.1.1.1.2.5 2003/07/24 13:26:15 psoetens Exp $
00042  *              $Name:  $
00043  ****************************************************************************/
00044 
00045 #ifndef KDL_VELOCITYPROFILE_H
00046 #define KDL_VELOCITYPROFILE_H
00047 
00048 #include "utilities/utility.h"
00049 #include "utilities/utility_io.h"
00050 
00051 
00052 namespace KDL {
00053 
00054 
00062 class VelocityProfile
00063         {
00064         public:
00065                 // trajectory parameters are set in constructor of
00066                 // derived class
00067 
00068                 virtual void SetProfile(double pos1,double pos2) = 0;
00069                 // sets a trajectory from pos1 to pos2 as fast as possible
00070 
00071                 virtual void SetProfileDuration(
00072                         double pos1,double pos2,double duration) = 0;
00073                 // Sets a trajectory from pos1 to pos2 in <duration> seconds.
00074         // @post new.Duration() will not be shorter than the one obtained
00075         //       from SetProfile(pos1,pos2).
00076 
00077 
00078                 virtual double Duration() const = 0;
00079                 // returns the duration of the motion in [sec]
00080 
00081                 virtual double Pos(double time) const = 0;
00082                 // returns the position at <time> in the units of the input
00083                 // of the constructor of the derived class.
00084 
00085                 virtual double Vel(double time) const = 0;
00086                 // returns the velocity at <time> in the units of the input
00087                 // of the constructor of the derived class.
00088 
00089                 virtual double Acc(double time) const = 0;
00090                 // returns the acceleration at <time> in the units of the input
00091                 // of the constructor of the derived class.
00092 
00093                 virtual void Write(std::ostream& os) const = 0;
00094                 // Writes object to a stream.
00095 
00096                 static VelocityProfile* Read(std::istream& is);
00097                 // reads a VelocityProfile object from the stream and returns it.
00098 
00099                 virtual VelocityProfile* Clone() const = 0;
00100                 // returns copy of current VelocityProfile object. (virtual constructor)
00101 
00102                 virtual ~VelocityProfile() {}
00103         };
00104 }
00105 
00106 
00107 #endif

Generated on Wed Nov 23 19:00:56 2011 for FreeCAD by  doxygen 1.6.1