path_cyclic_closed.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002   tag: Erwin Aertbelien  Mon May 10 19:10:36 CEST 2004  path_cyclic_closed.cxx
00003 
00004                         path_cyclic_closed.cxx -  description
00005                            -------------------
00006     begin                : Mon May 10 2004
00007     copyright            : (C) 2004 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  *  \author
00029  *      Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
00030  *
00031  *  \version
00032  *              ORO_Geometry V0.2
00033  *
00034  *      \par History
00035  *              - $log$
00036  *
00037  *      \par Release
00038  *              $Id: path_cyclic_closed.cpp,v 1.1.1.1.2.5 2003/07/24 13:26:15 psoetens Exp $
00039  *              $Name:  $
00040  ****************************************************************************/
00041 
00042 
00043 #include "path_cyclic_closed.hpp"
00044 #include "utilities/error.h"
00045 
00046 namespace KDL {
00047 
00048 Path_Cyclic_Closed::Path_Cyclic_Closed(Path* _geom,int _times, bool _aggregate):
00049 times(_times),geom(_geom), aggregate(_aggregate) {}
00050 
00051 double Path_Cyclic_Closed::LengthToS(double length) {
00052         throw Error_MotionPlanning_Not_Applicable();
00053         return 0;
00054 }
00055 
00056 double Path_Cyclic_Closed::PathLength(){
00057         return geom->PathLength()*times;
00058 }
00059 
00060 Frame Path_Cyclic_Closed::Pos(double s) const  {
00061         return geom->Pos( fmod(s,geom->PathLength()) );
00062 }
00063 
00064 Twist Path_Cyclic_Closed::Vel(double s,double sd) const  {
00065         return geom->Vel( fmod(s,geom->PathLength()),sd );
00066 }
00067 
00068 Twist Path_Cyclic_Closed::Acc(double s,double sd,double sdd) const  {
00069         return geom->Acc( fmod(s,geom->PathLength()),sd,sdd );
00070 }
00071 
00072 
00073 Path_Cyclic_Closed::~Path_Cyclic_Closed() {
00074     if (aggregate)
00075         delete geom;
00076 }
00077 
00078 Path* Path_Cyclic_Closed::Clone() {
00079         return new Path_Cyclic_Closed(geom->Clone(),times, aggregate);
00080 }
00081 
00082 void Path_Cyclic_Closed::Write(std::ostream& os)  {
00083         os << "CYCLIC_CLOSED[ ";
00084         os << "  ";geom->Write(os);os << std::endl;
00085         os << "  " << times << std::endl;
00086         os << "]"  << std::endl;
00087 }
00088 
00089 }
00090 


orocos_kdl
Author(s):
autogenerated on Sat Oct 7 2017 03:04:28