trajectory.hpp
Go to the documentation of this file.
00001 /***************************************************************************
00002   tag: Erwin Aertbelien  Mon Jan 10 16:38:39 CET 2005  trajectory.h
00003 
00004                         trajectory.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: trajectory.h,v 1.1.1.1.2.5 2003/07/23 16:44:25 psoetens Exp $
00041  *              $Name:  $
00042  *  \todo
00043  *     Peter's remark : should seperate I/O from other routines in the
00044  *     motion/chain directories
00045  *     The problem is that the I/O uses virtual inheritance to write
00046  *     the trajectories/geometries/velocityprofiles/...
00047  *     Have no good solution for this, perhaps
00048  *          * #ifdef's
00049  *          * declaring dummy ostream/istream and change implementation file .cpp
00050  *          * declaring some sort of VISITOR object (containing an ostream) ,
00051  *            the classes contain code to pass this object around along its children
00052  *            a subroutine can then be called with overloading.
00053  *     PROBLEM : if you declare a friend you have to fully declare it  ==> exposing I/O with ostream/istream decl
00054  *     CONSEQUENCE : everything has to be declared public.
00055  ****************************************************************************/
00056 
00057 #ifndef TRAJECTORY_H
00058 #define TRAJECTORY_H
00059 
00060 #include "frames.hpp"
00061 #include "frames_io.hpp"
00062 #include "path.hpp"
00063 #include "velocityprofile.hpp"
00064 
00065 
00066 
00067 namespace KDL {
00068 
00069 
00070 
00071 
00078         class Trajectory
00079         {
00080         public:
00081                 virtual double Duration() const = 0;
00082                 // The duration of the trajectory
00083 
00084                 virtual Frame Pos(double time) const = 0;
00085                 // Position of the trajectory at <time>.
00086 
00087                 virtual Twist Vel(double time) const = 0;
00088                 // The velocity of the trajectory at <time>.
00089                 virtual Twist Acc(double time) const = 0;
00090                 // The acceleration of the trajectory at <time>.
00091 
00092                 virtual Trajectory* Clone() const = 0;
00093                 virtual void Write(std::ostream& os) const = 0;
00094                 static Trajectory* Read(std::istream& is);
00095                 virtual ~Trajectory() {}
00096                 // note : you cannot declare this destructor abstract
00097                 // it is always called by the descendant's destructor !
00098         };
00099 
00100 
00101 
00102 }
00103 
00104 
00105 #endif


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