path_cyclic_closed.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Erwin Aertbelien Mon May 10 19:10:36 CEST 2004 path_cyclic_closed.cxx
3 
4  path_cyclic_closed.cxx - description
5  -------------------
6  begin : Mon May 10 2004
7  copyright : (C) 2004 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  * \author
29  * Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
30  *
31  * \version
32  * ORO_Geometry V0.2
33  *
34  * \par History
35  * - $log$
36  *
37  * \par Release
38  * $Id: path_cyclic_closed.cpp,v 1.1.1.1.2.5 2003/07/24 13:26:15 psoetens Exp $
39  * $Name: $
40  ****************************************************************************/
41 
42 
43 #include "path_cyclic_closed.hpp"
44 #include "utilities/error.h"
45 
46 namespace KDL {
47 
48 Path_Cyclic_Closed::Path_Cyclic_Closed(Path* _geom,int _times, bool _aggregate):
49 times(_times),geom(_geom), aggregate(_aggregate) {}
50 
51 double Path_Cyclic_Closed::LengthToS(double length) {
53  return 0;
54 }
55 
57  return geom->PathLength()*times;
58 }
59 
60 Frame Path_Cyclic_Closed::Pos(double s) const {
61  return geom->Pos( fmod(s,geom->PathLength()) );
62 }
63 
64 Twist Path_Cyclic_Closed::Vel(double s,double sd) const {
65  return geom->Vel( fmod(s,geom->PathLength()),sd );
66 }
67 
68 Twist Path_Cyclic_Closed::Acc(double s,double sd,double sdd) const {
69  return geom->Acc( fmod(s,geom->PathLength()),sd,sdd );
70 }
71 
72 
74  if (aggregate)
75  delete geom;
76 }
77 
80 }
81 
82 void Path_Cyclic_Closed::Write(std::ostream& os) {
83  os << "CYCLIC_CLOSED[ ";
84  os << " ";geom->Write(os);os << std::endl;
85  os << " " << times << std::endl;
86  os << "]" << std::endl;
87 }
88 
89 }
90 
virtual Path * Clone()=0
virtual Twist Acc(double s, double sd, double sdd) const =0
virtual Frame Pos(double s) const
virtual Frame Pos(double s) const =0
represents both translational and rotational velocities.
Definition: frames.hpp:720
virtual Twist Vel(double s, double sd) const =0
virtual void Write(std::ostream &os)=0
virtual double LengthToS(double length)
virtual void Write(std::ostream &os)
represents a frame transformation in 3D space (rotation + translation)
Definition: frames.hpp:570
virtual Twist Acc(double s, double sd, double sdd) const
Path_Cyclic_Closed(Path *_geom, int _times, bool _aggregate=true)
virtual Twist Vel(double s, double sd) const
virtual double PathLength()=0


orocos_kdl
Author(s):
autogenerated on Sat Jun 15 2019 19:07:36