path_composite.hpp
Go to the documentation of this file.
00001 /***************************************************************************
00002   tag: Erwin Aertbelien  Mon Jan 10 16:38:38 CET 2005  path_composite.h
00003 
00004                         path_composite.h -  description
00005                            -------------------
00006     begin                : Mon January 10 2005
00007     copyright            : (C) 2005 Erwin Aertbelien
00008     email                : erwin.aertbelien@mech.kuleuven.ac.be
00009 
00010  ***************************************************************************
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place,                                    *
00024  *   Suite 330, Boston, MA  02111-1307  USA                                *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 
00029  /*****************************************************************************
00030  *  \author
00031  *      Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
00032  *
00033  *  \version
00034  *              ORO_Geometry V0.2
00035  *
00036  *      \par History
00037  *              - $log$
00038  *
00039  *      \par Release
00040  *              $Id: path_composite.h,v 1.1.1.1.2.5 2003/07/24 13:49:16 rwaarsin Exp $
00041  *              $Name:  $
00042  ****************************************************************************/
00043 
00044 #ifndef KDL_PATHCOMPOSITE_H
00045 #define KDL_PATHCOMPOSITE_H
00046 
00047 #include "frames.hpp"
00048 #include "frames_io.hpp"
00049 #include "path.hpp"
00050 #include <vector>
00051 
00052 namespace KDL {
00053 
00069          class Path_Composite : public Path
00070         {
00071                 typedef std::vector< std::pair<Path*,bool> > PathVector;
00072                 typedef std::vector<double>    DoubleVector;
00073 
00074                 PathVector gv;
00075                 DoubleVector   dv;
00076                 double pathlength;
00077 
00078                 // lookup mechanism :
00079                 mutable double cached_starts;
00080                 mutable double cached_ends;
00081                 mutable int    cached_index;
00082                 double Lookup(double s) const;
00083         public:
00084 
00085 
00086                 Path_Composite();
00087 
00091                 void Add(Path* geom, bool aggregate=true);
00092 
00093 
00094                 virtual double LengthToS(double length);
00101                 virtual double PathLength();
00102 
00106                 virtual Frame Pos(double s) const;
00107 
00112                 virtual Twist Vel(double s,double sd) const;
00113 
00118                 virtual Twist Acc(double s,double sd,double sdd) const;
00119 
00120                 virtual Path* Clone();
00121 
00125                 virtual void Write(std::ostream& os);
00126 
00130                 virtual int GetNrOfSegments();
00131 
00139                 virtual Path* GetSegment(int i);
00140 
00147                 virtual double GetLengthToEndOfSegment(int i);
00148 
00154                 virtual void GetCurrentSegmentLocation(double s, int &segment_number, double& inner_s);
00155 
00159                 virtual IdentifierType getIdentifier() const {
00160                         return ID_COMPOSITE;
00161                 }
00162 
00163                 virtual ~Path_Composite();
00164         };
00165 
00166 
00167 
00168 }
00169 
00170 
00171 #endif


orocos_kdl
Author(s):
autogenerated on Wed Aug 26 2015 15:14:14