orocos_kdl
trajectory_segment.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Erwin Aertbelien Mon Jan 10 16:38:39 CET 2005 trajectory_segment.h
3 
4  trajectory_segment.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_segment.h,v 1.1.1.1.2.5 2003/07/23 16:44:26 psoetens Exp $
41  * $Name: $
42  ****************************************************************************/
43 
44 #ifndef KDL_MOTION_TRAJECTORY_SEGMENT_H
45 #define KDL_MOTION_TRAJECTORY_SEGMENT_H
46 
47 #include "frames.hpp"
48 #include "frames_io.hpp"
49 #include "trajectory.hpp"
50 #include "path.hpp"
51 #include "velocityprofile.hpp"
52 
53 
54 namespace KDL {
55 
56 
62  class Trajectory_Segment : public Trajectory
63  {
64  VelocityProfile* motprof;
65  Path* geom;
66  bool aggregate;
67  public:
71  Trajectory_Segment(Path* _geom, VelocityProfile* _motprof, bool _aggregate=true);
72 
77  Trajectory_Segment(Path* _geom, VelocityProfile* _motprof, double duration, bool _aggregate=true);
78 
79  virtual double Duration() const;
80  // The duration of the trajectory
81 
82  virtual Frame Pos(double time) const;
83  // Position of the trajectory at <time>.
84 
85  virtual Twist Vel(double time) const;
86  // The velocity of the trajectory at <time>.
87  virtual Twist Acc(double time) const;
88  // The acceleration of the trajectory at <time>.
89 
90  virtual Trajectory* Clone() const
91  {
92  if ( aggregate )
93  return new Trajectory_Segment( geom->Clone(), motprof->Clone(), true );
94  return new Trajectory_Segment( geom, motprof, false );
95  }
96 
97  virtual void Write(std::ostream& os) const;
98 
99  virtual Path* GetPath();
100 
101  virtual VelocityProfile* GetProfile();
102 
103 
104  virtual ~Trajectory_Segment();
105  };
106 
107 
108 
109 }
110 
111 
112 #endif
velocityprofile.hpp
frames.hpp
frames_io.hpp
KDL::Trajectory_Segment::Clone
virtual Trajectory * Clone() const
Definition: trajectory_segment.hpp:166
KDL::Trajectory_Segment::GetPath
virtual Path * GetPath()
Definition: trajectory_segment.cpp:138
KDL
Definition: kukaLWR_DHnew.cpp:25
KDL::Trajectory_Segment::motprof
VelocityProfile * motprof
Definition: trajectory_segment.hpp:140
KDL::VelocityProfile
Definition: velocityprofile.hpp:101
KDL::Trajectory_Segment::~Trajectory_Segment
virtual ~Trajectory_Segment()
Definition: trajectory_segment.cpp:130
std::ostream
KDL::Trajectory_Segment::Trajectory_Segment
Trajectory_Segment(Path *_geom, VelocityProfile *_motprof, bool _aggregate=true)
Definition: trajectory_segment.cpp:87
trajectory.hpp
KDL::Trajectory_Segment::Duration
virtual double Duration() const
Definition: trajectory_segment.cpp:101
KDL::Trajectory_Segment::Pos
virtual Frame Pos(double time) const
Definition: trajectory_segment.cpp:106
KDL::Trajectory_Segment::GetProfile
virtual VelocityProfile * GetProfile()
Definition: trajectory_segment.cpp:142
KDL::VelocityProfile::Clone
virtual VelocityProfile * Clone() const =0
KDL::Path::Clone
virtual Path * Clone()=0
KDL::Trajectory_Segment::aggregate
bool aggregate
Definition: trajectory_segment.hpp:142
KDL::Trajectory_Segment::Acc
virtual Twist Acc(double time) const
Definition: trajectory_segment.cpp:116
path.hpp
KDL::Trajectory_Segment::Vel
virtual Twist Vel(double time) const
Definition: trajectory_segment.cpp:111
KDL::Trajectory_Segment::geom
Path * geom
Definition: trajectory_segment.hpp:141
KDL::Trajectory_Segment::Write
virtual void Write(std::ostream &os) const
Definition: trajectory_segment.cpp:122