orocos_kdl
path_composite.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Erwin Aertbelien Mon Jan 10 16:38:38 CET 2005 path_composite.h
3 
4  path_composite.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: path_composite.h,v 1.1.1.1.2.5 2003/07/24 13:49:16 rwaarsin Exp $
41  * $Name: $
42  ****************************************************************************/
43 
44 #ifndef KDL_PATHCOMPOSITE_H
45 #define KDL_PATHCOMPOSITE_H
46 
47 #include "frames.hpp"
48 #include "frames_io.hpp"
49 #include "path.hpp"
50 #include <vector>
51 
52 namespace KDL {
53 
69  class Path_Composite : public Path
70  {
73 
74  PathVector gv;
76  double pathlength;
77 
78  // lookup mechanism :
79  mutable double cached_starts;
80  mutable double cached_ends;
81  mutable int cached_index;
82  double Lookup(double s) const;
83  public:
84 
85 
87 
91  void Add(Path* geom, bool aggregate=true);
92 
93 
94  virtual double LengthToS(double length);
101  virtual double PathLength();
102 
106  virtual Frame Pos(double s) const;
107 
112  virtual Twist Vel(double s,double sd) const;
113 
118  virtual Twist Acc(double s,double sd,double sdd) const;
119 
120  virtual Path* Clone();
121 
125  virtual void Write(std::ostream& os);
126 
130  virtual int GetNrOfSegments();
131 
139  virtual Path* GetSegment(int i);
140 
147  virtual double GetLengthToEndOfSegment(int i);
148 
154  virtual void GetCurrentSegmentLocation(double s, int &segment_number, double& inner_s);
155 
159  virtual IdentifierType getIdentifier() const {
160  return ID_COMPOSITE;
161  }
162 
163  virtual ~Path_Composite();
164  };
165 
166 
167 
168 }
169 
170 
171 #endif
KDL::Path_Composite::cached_ends
double cached_ends
Definition: path_composite.hpp:156
frames.hpp
KDL::Path_Composite::dv
DoubleVector dv
Definition: path_composite.hpp:151
KDL::Path_Composite::GetSegment
virtual Path * GetSegment(int i)
Definition: path_composite.cpp:172
KDL::Path_Composite::Clone
virtual Path * Clone()
Definition: path_composite.cpp:151
KDL::Path_Composite::cached_index
int cached_index
Definition: path_composite.hpp:157
KDL::Path_Composite::~Path_Composite
virtual ~Path_Composite()
Definition: path_composite.cpp:191
vector
KDL::Path_Composite::PathLength
virtual double PathLength()
Definition: path_composite.cpp:131
frames_io.hpp
KDL::Path_Composite::Path_Composite
Path_Composite()
Definition: path_composite.cpp:113
KDL::Path::ID_COMPOSITE
@ ID_COMPOSITE
Definition: path.hpp:178
KDL::Path_Composite::getIdentifier
virtual IdentifierType getIdentifier() const
Definition: path_composite.hpp:235
KDL::Path_Composite::PathVector
std::vector< std::pair< Path *, bool > > PathVector
Definition: path_composite.hpp:147
KDL
Definition: kukaLWR_DHnew.cpp:25
KDL::Twist
represents both translational and rotational velocities.
Definition: frames.hpp:723
std::ostream
KDL::Path_Composite::Write
virtual void Write(std::ostream &os)
Definition: path_composite.cpp:159
KDL::Path::IdentifierType
IdentifierType
Definition: path.hpp:137
KDL::Path_Composite::GetLengthToEndOfSegment
virtual double GetLengthToEndOfSegment(int i)
Definition: path_composite.cpp:178
KDL::Path_Composite::cached_starts
double cached_starts
Definition: path_composite.hpp:155
KDL::Path_Composite::Acc
virtual Twist Acc(double s, double sd, double sdd) const
Definition: path_composite.cpp:146
KDL::Path_Composite::pathlength
double pathlength
Definition: path_composite.hpp:152
KDL::Path_Composite::Vel
virtual Twist Vel(double s, double sd) const
Definition: path_composite.cpp:141
KDL::Path_Composite::GetCurrentSegmentLocation
virtual void GetCurrentSegmentLocation(double s, int &segment_number, double &inner_s)
Definition: path_composite.cpp:184
KDL::Path_Composite::DoubleVector
std::vector< double > DoubleVector
Definition: path_composite.hpp:148
KDL::Path_Composite::gv
PathVector gv
Definition: path_composite.hpp:150
KDL::Path_Composite::LengthToS
virtual double LengthToS(double length)
Definition: path_composite.cpp:126
path.hpp
KDL::Path
Definition: path.hpp:96
KDL::Path_Composite::Lookup
double Lookup(double s) const
Definition: path_composite.cpp:93
KDL::Path_Composite::Pos
virtual Frame Pos(double s) const
Definition: path_composite.cpp:136
KDL::Path_Composite::Add
void Add(Path *geom, bool aggregate=true)
Definition: path_composite.cpp:120
KDL::Path_Composite::GetNrOfSegments
virtual int GetNrOfSegments()
Definition: path_composite.cpp:168