KDL  1.4.0
path_line.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Erwin Aertbelien Mon Jan 10 16:38:39 CET 2005 path_line.h
3 
4  path_line.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 * ALTERNATIVE FOR trajectory_line.h/cpp
31  * \author
32  * Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
33  *
34  * \version
35  * ORO_Geometry V0.2
36  *
37  * \par History
38  * - $log$
39  *
40  * \par Release
41  * $Id: path_line.h,v 1.1.1.1.2.3 2003/07/24 13:26:15 psoetens Exp $
42  * $Name: $
43  ****************************************************************************/
44 
45 #ifndef KDL_MOTION_PATH_LINE_H
46 #define KDL_MOTION_PATH_LINE_H
47 
48 #include "path.hpp"
50 
51 
52 namespace KDL {
53 
54 
59 class Path_Line : public Path
60  {
61  // Orientatie gedeelte
62  RotationalInterpolation* orient;
63 
64  // Lineair gedeelte
65  Vector V_base_start;
66  Vector V_base_end;
67  Vector V_start_end;
68 
69  double eqradius; // equivalent radius
70 
71  // verdeling baanlengte over pos/rot
72  double pathlength;
73  double scalelin;
74  double scalerot;
75 
76  bool aggregate;
77  public:
107  Path_Line(const Frame& F_base_start,
108  const Frame& F_base_end,
109  RotationalInterpolation* orient,
110  double eqradius,
111  bool _aggregate=true);
112  Path_Line(const Frame& F_base_start,
113  const Twist& twist_in_base,
114  RotationalInterpolation* orient,
115  double eqradius,
116  bool _aggregate=true);
117  double LengthToS(double length);
118  virtual double PathLength();
119  virtual Frame Pos(double s) const;
120  virtual Twist Vel(double s,double sd) const ;
121  virtual Twist Acc(double s,double sd,double sdd) const;
122  virtual void Write(std::ostream& os);
123  virtual Path* Clone();
124 
128  virtual IdentifierType getIdentifier() const {
129  return ID_LINE;
130  }
131  virtual ~Path_Line();
132  };
133 
134 
135 }
136 
137 
138 #endif
KDL::RotationalInterpolation
RotationalInterpolation specifies the rotational part of a geometric trajectory.
Definition: rotational_interpolation.hpp:101
KDL::Path_Line::V_base_start
Vector V_base_start
Definition: path_line.hpp:143
KDL::Twist::rot
Vector rot
The rotational velocity of that point.
Definition: frames.hpp:723
KDL::Path_Line::~Path_Line
virtual ~Path_Line()
Definition: path_line.cpp:186
KDL::Path_Line::eqradius
double eqradius
Definition: path_line.hpp:147
KDL::RotationalInterpolation::SetStartEnd
virtual void SetStartEnd(Rotation start, Rotation end)=0
Set the start and end rotational_interpolation.
KDL::RotationalInterpolation::Vel
virtual Vector Vel(double theta, double thetad) const =0
Returns the rotational velocity at angle theta and with derivative of theta == thetad.
KDL::Path_Line::scalerot
double scalerot
Definition: path_line.hpp:152
KDL::Path_Line::getIdentifier
virtual IdentifierType getIdentifier() const
gets an identifier indicating the type of this Path object
Definition: path_line.hpp:206
KDL::Path_Line::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_line.cpp:181
KDL::Path_Line::Clone
virtual Path * Clone()
Virtual constructor, constructing by copying, Returns a deep copy of this Path Object.
Definition: path_line.cpp:191
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_Line::V_base_end
Vector V_base_end
Definition: path_line.hpp:144
KDL
Definition: articulatedbodyinertia.cpp:28
KDL::Path_Line::PathLength
virtual double PathLength()
Returns the total path length of the trajectory (has dimension LENGTH) This is not always a physical ...
Definition: path_line.cpp:170
KDL::Path::ID_LINE
@ ID_LINE
Definition: path.hpp:176
KDL::Twist
represents both translational and rotational velocities.
Definition: frames.hpp:720
KDL::RotationalInterpolation::Write
virtual void Write(std::ostream &os) const =0
Writes one of the derived objects to the stream.
KDL::Path_Line::aggregate
bool aggregate
Definition: path_line.hpp:154
KDL::Frame
Definition: frames.hpp:570
KDL::Path::IdentifierType
IdentifierType
Definition: path.hpp:137
KDL::RotationalInterpolation::Angle
virtual double Angle()=0
KDL::Path_Line::Path_Line
Path_Line(const Frame &F_base_start, const Frame &F_base_end, RotationalInterpolation *orient, double eqradius, bool _aggregate=true)
Definition: path_line.cpp:85
KDL::Path_Line::Write
virtual void Write(std::ostream &os)
Writes one of the derived objects to the stream.
Definition: path_line.cpp:211
KDL::Path_Line::orient
RotationalInterpolation * orient
Definition: path_line.hpp:140
KDL::RotationalInterpolation::Acc
virtual Vector Acc(double theta, double thetad, double thetadd) const =0
Returns the rotational acceleration at angle theta and with derivative of theta == thetad,...
path_line.hpp
KDL::Twist::vel
Vector vel
The velocity of that point.
Definition: frames.hpp:722
KDL::Path_Line::LengthToS
double LengthToS(double length)
LengthToS() converts a physical length along the trajectory to the parameter s used in Pos,...
Definition: path_line.cpp:167
KDL::Vector::Norm
double Norm() const
Definition: frames.cpp:118
KDL::Rotation::Rot
static Rotation Rot(const Vector &rotvec, double angle)
Along an arbitrary axes.
Definition: frames.cpp:294
KDL::Path_Line::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_line.cpp:177
KDL::Frame::M
Rotation M
Orientation of the Frame.
Definition: frames.hpp:573
KDL::Path_Line::scalelin
double scalelin
Definition: path_line.hpp:151
KDL::Path_Line::V_start_end
Vector V_start_end
Definition: path_line.hpp:145
KDL::RotationalInterpolation::Clone
virtual RotationalInterpolation * Clone() const =0
virtual constructor, construction by copying .
KDL::Path_Line::pathlength
double pathlength
Definition: path_line.hpp:150
path.hpp
rotational_interpolation.hpp
KDL::Path_Line::Pos
virtual Frame Pos(double s) const
Returns the Frame at the current path length s.
Definition: path_line.cpp:173
KDL::RotationalInterpolation::Pos
virtual Rotation Pos(double theta) const =0
Returns the rotation matrix at angle theta.