trajectory.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Erwin Aertbelien Mon Jan 10 16:38:39 CET 2005 trajectory.h
3 
4  trajectory.h - description
5  -------------------
6  begin : Mon January 10 2005
7  copyright : (C) 2005 Erwin Aertbelien
8  email : erwin.aertbelien@mech.kuleuven.ac.be
9 
10  ***************************************************************************
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2.1 of the License, or (at your option) any later version. *
15  * *
16  * This library is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19  * Lesser General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU Lesser General Public *
22  * License along with this library; if not, write to the Free Software *
23  * Foundation, Inc., 59 Temple Place, *
24  * Suite 330, Boston, MA 02111-1307 USA *
25  * *
26  ***************************************************************************/
27 
28 
29 /*****************************************************************************
30  * \author
31  * Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
32  *
33  * \version
34  * ORO_Geometry V0.2
35  *
36  * \par History
37  * - $log$
38  *
39  * \par Release
40  * $Id: trajectory.h,v 1.1.1.1.2.5 2003/07/23 16:44:25 psoetens Exp $
41  * $Name: $
42  * \todo
43  * Peter's remark : should separate I/O from other routines in the
44  * motion/chain directories
45  * The problem is that the I/O uses virtual inheritance to write
46  * the trajectories/geometries/velocityprofiles/...
47  * Have no good solution for this, perhaps
48  * * #ifdef's
49  * * declaring dummy ostream/istream and change implementation file .cpp
50  * * declaring some sort of VISITOR object (containing an ostream) ,
51  * the classes contain code to pass this object around along its children
52  * a subroutine can then be called with overloading.
53  * PROBLEM : if you declare a friend you have to fully declare it ==> exposing I/O with ostream/istream decl
54  * CONSEQUENCE : everything has to be declared public.
55  ****************************************************************************/
56 
57 #ifndef TRAJECTORY_H
58 #define TRAJECTORY_H
59 
60 #include "frames.hpp"
61 #include "frames_io.hpp"
62 #include "path.hpp"
63 #include "velocityprofile.hpp"
64 
65 
66 
67 namespace KDL {
68 
69 
70 
71 
78  class Trajectory
79  {
80  public:
81  virtual double Duration() const = 0;
82  // The duration of the trajectory
83 
84  virtual Frame Pos(double time) const = 0;
85  // Position of the trajectory at <time>.
86 
87  virtual Twist Vel(double time) const = 0;
88  // The velocity of the trajectory at <time>.
89  virtual Twist Acc(double time) const = 0;
90  // The acceleration of the trajectory at <time>.
91 
92  virtual Trajectory* Clone() const = 0;
93  virtual void Write(std::ostream& os) const = 0;
94  static Trajectory* Read(std::istream& is);
95  virtual ~Trajectory() {}
96  // note : you cannot declare this destructor abstract
97  // it is always called by the descendant's destructor !
98  };
99 
100 
101 
102 }
103 
104 
105 #endif
virtual Trajectory * Clone() const =0
virtual void Write(std::ostream &os) const =0
virtual Twist Acc(double time) const =0
static Trajectory * Read(std::istream &is)
Definition: trajectory.cpp:56
represents both translational and rotational velocities.
Definition: frames.hpp:723
virtual Twist Vel(double time) const =0
virtual ~Trajectory()
Definition: trajectory.hpp:95
virtual Frame Pos(double time) const =0
virtual double Duration() const =0
represents a frame transformation in 3D space (rotation + translation)
Definition: frames.hpp:572


orocos_kdl
Author(s):
autogenerated on Thu Apr 13 2023 02:19:14