velocityprofile_trap.hpp
Go to the documentation of this file.
00001 /***************************************************************************
00002   tag: Erwin Aertbelien  Mon Jan 10 16:38:38 CET 2005  velocityprofile_trap.h
00003 
00004                         velocityprofile_trap.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  *  \author
00031  *      Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
00032  *
00033  *  \version
00034  *              ORO_Geometry V0.2
00035  *
00036  *      \par History
00037  *              - $log$
00038  *
00039  *      \par Release
00040  *              $Id: velocityprofile_trap.h,v 1.1.1.1.2.5 2003/07/24 13:26:15 psoetens Exp $
00041  *              $Name:  $
00042  ****************************************************************************/
00043 
00044 #ifndef KDL_MOTION_VELOCITYPROFILE_TRAP_H
00045 #define KDL_MOTION_VELOCITYPROFILE_TRAP_H
00046 
00047 #include "velocityprofile.hpp"
00048 
00049 
00050 
00051 
00052 namespace KDL {
00053 
00054 
00055 
00060 class VelocityProfile_Trap : public VelocityProfile
00061         {
00062                 // For "running" a motion profile :
00063                 double a1,a2,a3; // coef. from ^0 -> ^2 of first part
00064                 double b1,b2,b3; // of 2nd part
00065                 double c1,c2,c3; // of 3th part
00066                 double duration;
00067                 double t1,t2;
00068 
00069                 // specification of the motion profile :
00070                 double maxvel;
00071                 double maxacc;
00072                 double startpos;
00073                 double endpos;
00074         public:
00075 
00076                 VelocityProfile_Trap(double _maxvel=0,double _maxacc=0);
00077                 // constructs motion profile class with <maxvel> and <maxacc> as parameters of the
00078                 // trajectory.
00079 
00080                 virtual void SetProfile(double pos1,double pos2);
00081 
00082                 virtual void SetProfileDuration(
00083                         double pos1,double pos2,double newduration
00084                 );
00085 
00086         virtual void SetMax(double _maxvel,double _maxacc);
00087                 virtual double Duration() const;
00088                 virtual double Pos(double time) const;
00089                 virtual double Vel(double time) const;
00090                 virtual double Acc(double time) const;
00091                 virtual void Write(std::ostream& os) const;
00092                 virtual VelocityProfile* Clone() const;
00093                 // returns copy of current VelocityProfile object. (virtual constructor)
00094                 virtual ~VelocityProfile_Trap();
00095         };
00096 
00097 
00098 
00099 
00100 
00101 
00102 /* Niet OK
00103         class VelocityProfile_Trap : public VelocityProfile {
00104                 double maxvel;
00105                 double maxacc;
00106                 double _t1,_t2,_T,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10;
00107 
00108                 void PrepTraj(double p1,double v1,double p2,double v2,
00109                 double acc,double vel,double t1,double t2,double T);
00110                 // Internal method. Sets the parameters <_t1>,..<c10> with the given
00111                 // arguments.
00112         public:
00113                 VelocityProfile_Trap(double _maxvel,double _maxacc):
00114                   maxvel(_maxvel),maxacc(_maxacc) {}
00115                 // constructs motion profile class with max velocity <maxvel>,
00116                 // and max acceleration <maxacc> as parameter of the
00117                 // trajectory.
00118 
00119                 void SetProfile(double pos1,double pos2);
00120                 virtual void SetProfileDuration(double pos1,double pos2,double duration);
00121                 virtual double Duration() ;
00122                 virtual double Pos(double time);
00123                 virtual double Vel(double time);
00124         };
00125 */
00126 
00127 }
00128 
00129 
00130 #endif


orocos_kdl
Author(s): Ruben Smits, Erwin Aertbelien, Orocos Developers
autogenerated on Sat Dec 28 2013 17:17:25