KDL  1.4.0
path_roundedcomposite.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Erwin Aertbelien Mon Jan 10 16:38:38 CET 2005 path_roundedcomposite.h
3 
4  path_roundedcomposite.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_roundedcomposite.h,v 1.1.1.1.2.3 2003/07/24 13:26:15 psoetens Exp $
41  * $Name: $
42  ****************************************************************************/
43 
44 #ifndef KDL_MOTION_ROUNDEDCOMPOSITE_H
45 #define KDL_MOTION_ROUNDEDCOMPOSITE_H
46 
47 #include "path.hpp"
48 #include "path_composite.hpp"
50 
51 namespace KDL {
52 
58 class Path_RoundedComposite : public Path
59  {
63  Path_Composite* comp;
64 
65 
66  double radius;
67  double eqradius;
68  RotationalInterpolation* orient;
69  // cached from underlying path objects for generating the rounding :
70  Frame F_base_start;
71  Frame F_base_via;
72  //Frame F_base_end;
73  int nrofpoints;
74 
75  bool aggregate;
76 
77  Path_RoundedComposite(Path_Composite* comp,double radius,double eqradius,RotationalInterpolation* orient, bool aggregate, int nrofpoints);
78 
79  public:
80 
88  Path_RoundedComposite(double radius,double eqradius,RotationalInterpolation* orient, bool aggregate=true);
89 
109  void Add(const Frame& F_base_point);
110 
115  void Finish();
116 
117 
118  virtual double LengthToS(double length);
119 
126  virtual double PathLength();
127 
128 
132  virtual Frame Pos(double s) const;
133 
138  virtual Twist Vel(double s,double sd) const;
139 
144  virtual Twist Acc(double s,double sd,double sdd) const;
145 
151  virtual Path* Clone();
152 
156  virtual void Write(std::ostream& os);
157 
161  virtual int GetNrOfSegments();
162 
170  virtual Path* GetSegment(int i);
171 
178  virtual double GetLengthToEndOfSegment(int i);
179 
185  virtual void GetCurrentSegmentLocation(double s, int &segment_number, double& inner_s);
186 
190  virtual IdentifierType getIdentifier() const {
191  return ID_ROUNDED_COMPOSITE;
192  }
193 
194 
195  virtual ~Path_RoundedComposite();
196  };
197 
198 
199 
200 }
201 
202 
203 #endif
KDL::Path_RoundedComposite::Pos
virtual Frame Pos(double s) const
Returns the Frame at the current path length s.
Definition: path_roundedcomposite.cpp:192
KDL::Path_Composite::GetSegment
virtual Path * GetSegment(int i)
returns a pointer to the underlying Path of the given segment number i.
Definition: path_composite.cpp:171
path_composite.hpp
KDL::Path_Composite::Clone
virtual Path * Clone()
Virtual constructor, constructing by copying, Returns a deep copy of this Path Object.
Definition: path_composite.cpp:150
KDL::Path_Line::eqradius
double eqradius
Definition: path_line.hpp:147
KDL::Path_RoundedComposite::PathLength
virtual double PathLength()
Returns the total path length of the trajectory (has dimension LENGTH) This is not always a physical ...
Definition: path_roundedcomposite.cpp:188
KDL::Path_RoundedComposite::orient
RotationalInterpolation * orient
Definition: path_roundedcomposite.hpp:144
KDL::Frame::p
Vector p
origine of the Frame
Definition: frames.hpp:572
KDL::Path_Composite::PathLength
virtual double PathLength()
Returns the total path length of the trajectory (has dimension LENGTH) This is not always a physical ...
Definition: path_composite.cpp:130
KDL::Path_RoundedComposite::aggregate
bool aggregate
Definition: path_roundedcomposite.hpp:151
KDL::Path_RoundedComposite::GetLengthToEndOfSegment
virtual double GetLengthToEndOfSegment(int i)
gets the length to the end of the given segment.
Definition: path_roundedcomposite.cpp:216
KDL::Path_RoundedComposite::Clone
virtual Path * Clone()
virtual constructor, constructing by copying.
Definition: path_roundedcomposite.cpp:234
KDL::Path_RoundedComposite::radius
double radius
Definition: path_roundedcomposite.hpp:142
KDL::Path_RoundedComposite::~Path_RoundedComposite
virtual ~Path_RoundedComposite()
Definition: path_roundedcomposite.cpp:227
KDL::Path::ID_ROUNDED_COMPOSITE
@ ID_ROUNDED_COMPOSITE
Definition: path.hpp:179
KDL::Vector::Normalize
double Normalize(double eps=epsilon)
Normalizes this vector and returns it norm makes v a unitvector and returns the norm of v.
Definition: frames.cpp:148
KDL::Path_RoundedComposite::Path_RoundedComposite
Path_RoundedComposite(Path_Composite *comp, double radius, double eqradius, RotationalInterpolation *orient, bool aggregate, int nrofpoints)
Definition: path_roundedcomposite.cpp:92
KDL::Path_RoundedComposite::Add
void Add(const Frame &F_base_point)
Adds a point to this rounded composite, between to adjecent points a Path_Line will be created,...
Definition: path_roundedcomposite.cpp:107
KDL
Definition: articulatedbodyinertia.cpp:28
KDL::Vector
A concrete implementation of a 3 dimensional vector class.
Definition: frames.hpp:160
KDL::Path_RoundedComposite::F_base_via
Frame F_base_via
Definition: path_roundedcomposite.hpp:147
KDL::Twist
represents both translational and rotational velocities.
Definition: frames.hpp:720
KDL::Path_RoundedComposite::LengthToS
virtual double LengthToS(double length)
LengthToS() converts a physical length along the trajectory to the parameter s used in Pos,...
Definition: path_roundedcomposite.cpp:183
KDL::Path_RoundedComposite::nrofpoints
int nrofpoints
Definition: path_roundedcomposite.hpp:149
dot
doubleAcc dot(const VectorAcc &lhs, const VectorAcc &rhs)
Definition: frameacc.inl:137
KDL::Path_Circle
A circular Path with 'open ends'.
Definition: path_circle.hpp:99
KDL::Path_RoundedComposite::eqradius
double eqradius
Definition: path_roundedcomposite.hpp:143
KDL::Path_Composite::Write
virtual void Write(std::ostream &os)
Writes one of the derived objects to the stream.
Definition: path_composite.cpp:158
KDL::Frame
Definition: frames.hpp:570
KDL::Path_Line
A path representing a line from A to B.
Definition: path_line.hpp:98
KDL::Path::IdentifierType
IdentifierType
Definition: path.hpp:137
KDL::Path_Composite::GetLengthToEndOfSegment
virtual double GetLengthToEndOfSegment(int i)
gets the length to the end of the given segment.
Definition: path_composite.cpp:177
KDL::Path_RoundedComposite::GetCurrentSegmentLocation
virtual void GetCurrentSegmentLocation(double s, int &segment_number, double &inner_s)
Definition: path_roundedcomposite.cpp:220
KDL::Path_RoundedComposite::Finish
void Finish()
to be called after the last line is added to finish up the work
Definition: path_roundedcomposite.cpp:175
path_line.hpp
KDL::Path_Composite::Acc
virtual Twist Acc(double s, double sd, double sdd) const
Returns the acceleration twist at path length s and with derivative of s == sd, and 2nd derivative of...
Definition: path_composite.cpp:145
path_roundedcomposite.hpp
KDL::Path_RoundedComposite::GetSegment
virtual Path * GetSegment(int i)
returns a pointer to the underlying Path of the given segment number i.
Definition: path_roundedcomposite.cpp:212
KDL::Path_RoundedComposite::Acc
virtual Twist Acc(double s, double sd, double sdd) const
Returns the acceleration twist at path length s and with derivative of s == sd, and 2nd derivative of...
Definition: path_roundedcomposite.cpp:200
KDL::Path_Composite::Vel
virtual Twist Vel(double s, double sd) const
Returns the velocity twist at path length s theta and with derivative of s == sd.
Definition: path_composite.cpp:140
KDL::Path_Composite::GetCurrentSegmentLocation
virtual void GetCurrentSegmentLocation(double s, int &segment_number, double &inner_s)
Definition: path_composite.cpp:183
KDL::Path_RoundedComposite::GetNrOfSegments
virtual int GetNrOfSegments()
returns the number of underlying segments.
Definition: path_roundedcomposite.cpp:208
KDL::Vector::Norm
double Norm() const
Definition: frames.cpp:118
KDL::Path_Composite
A Path being the composition of other Path objects.
Definition: path_composite.hpp:107
KDL::Frame::M
Rotation M
Orientation of the Frame.
Definition: frames.hpp:573
KDL::Path_RoundedComposite::comp
Path_Composite * comp
a Path_Composite is aggregated to hold the rounded trajectory with circles and lines
Definition: path_roundedcomposite.hpp:139
KDL::Path_RoundedComposite::getIdentifier
virtual IdentifierType getIdentifier() const
gets an identifier indicating the type of this Path object
Definition: path_roundedcomposite.hpp:266
path_circle.hpp
KDL::Path_RoundedComposite::Vel
virtual Twist Vel(double s, double sd) const
Returns the velocity twist at path length s theta and with derivative of s == sd.
Definition: path_roundedcomposite.cpp:196
KDL::Path_RoundedComposite::F_base_start
Frame F_base_start
Definition: path_roundedcomposite.hpp:146
KDL::RotationalInterpolation::Clone
virtual RotationalInterpolation * Clone() const =0
virtual constructor, construction by copying .
KDL::Path_Composite::LengthToS
virtual double LengthToS(double length)
LengthToS() converts a physical length along the trajectory to the parameter s used in Pos,...
Definition: path_composite.cpp:125
path.hpp
rotational_interpolation.hpp
KDL::Path_RoundedComposite::Write
virtual void Write(std::ostream &os)
Writes one of the derived objects to the stream.
Definition: path_roundedcomposite.cpp:204
KDL::Path
The specification of the path of a trajectory.
Definition: path.hpp:96
KDL::Path_Composite::Pos
virtual Frame Pos(double s) const
Returns the Frame at the current path length s.
Definition: path_composite.cpp:135
KDL::Path_Composite::Add
void Add(Path *geom, bool aggregate=true)
Adds a Path* to this composite.
Definition: path_composite.cpp:119
KDL::Path_Composite::GetNrOfSegments
virtual int GetNrOfSegments()
returns the number of underlying segments.
Definition: path_composite.cpp:167