| 1 | /*************************************************************************** |
| 2 | tag: Peter Soetens Fri Feb 11 15:59:12 CET 2005 velocityprofile_dirac.h |
| 3 | |
| 4 | velocityprofile_dirac.h - description |
| 5 | ------------------- |
| 6 | begin : Fri February 11 2005 |
| 7 | copyright : (C) 2005 Peter Soetens |
| 8 | email : [email protected] |
| 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 | #ifndef MOTIONPROFILE_DIRAC_H |
| 30 | #define MOTIONPROFILE_DIRAC_Hcxx . . $ `orocos_kdl/src/velocityprofile_dirac.hpp:30:9`! |
| 31 | |
| 32 | #include "velocityprofile.hpp"cxx . . $ `<file>/orocos_kdl/src/velocityprofile.hpp`/ |
| 33 | |
| 34 | |
| 35 | namespace KDLcxx . . $ KDL/ { |
| 36 | /** |
| 37 | * A Dirac VelocityProfile generates an infinite velocity |
| 38 | * so that the position jumps from A to B in in infinite short time. |
| 39 | * In practice, this means that the maximum values are ignored and |
| 40 | * for any t : Vel(t) == 0 and Acc(t) == 0. |
| 41 | * Further Pos( -0 ) = pos1 and Pos( +0 ) = pos2. |
| 42 | * |
| 43 | * However, if a duration is given, it will create an unbound |
| 44 | * rectangular velocity profile for that duration, otherwise, |
| 45 | * Duration() == 0; |
| 46 | * @ingroup Motion |
| 47 | */ |
| 48 | class VelocityProfile_Diraccxx . . $ KDL/VelocityProfile_Dirac# : public VelocityProfilecxx . . $ KDL/VelocityProfile# |
| 49 | { |
| 50 | double p1cxx . . $ KDL/VelocityProfile_Dirac#p1.,p2cxx . . $ KDL/VelocityProfile_Dirac#p2.,tcxx . . $ KDL/VelocityProfile_Dirac#t.; |
| 51 | public: |
| 52 | void SetProfilecxx . . $ KDL/VelocityProfile_Dirac#SetProfile(bc12c9ec15586e6a).(double pos1,double pos2); |
| 53 | virtual void SetProfileDurationcxx . . $ KDL/VelocityProfile_Dirac#SetProfileDuration(98dd472ac7e5c3d4).(double pos1,double pos2,double duration); |
| 54 | virtual double Durationcxx . . $ KDL/VelocityProfile_Dirac#Duration(21b6c25e127938e2).() const; |
| 55 | virtual double Poscxx . . $ KDL/VelocityProfile_Dirac#Pos(7e3a3c6b59947c6d).(double time) const; |
| 56 | virtual double Velcxx . . $ KDL/VelocityProfile_Dirac#Vel(7e3a3c6b59947c6d).(double time) const; |
| 57 | virtual double Acccxx . . $ KDL/VelocityProfile_Dirac#Acc(7e3a3c6b59947c6d).(double time) const; |
| 58 | virtual void Writecxx . . $ KDL/VelocityProfile_Dirac#Write(490063bd7e6d8d5d).(stdcxx . . $ std/::ostreamcxx . . $ std/ostream#& os) const; |
| 59 | virtual VelocityProfilecxx . . $ KDL/VelocityProfile#* Clonecxx . . $ KDL/VelocityProfile_Dirac#Clone(2d6fabc53dd14ca3).() const { |
| 60 | VelocityProfile_Diraccxx . . $ KDL/VelocityProfile_Dirac#* res = new VelocityProfile_Diraccxx . . $ KDL/VelocityProfile_Dirac#(); |
| 61 | res->SetProfileDurationcxx . . $ KDL/VelocityProfile_Dirac#SetProfileDuration(98dd472ac7e5c3d4).( p1cxx . . $ KDL/VelocityProfile_Dirac#p1., p2cxx . . $ KDL/VelocityProfile_Dirac#p2., tcxx . . $ KDL/VelocityProfile_Dirac#t. ); |
| 62 | return res; |
| 63 | } |
| 64 | |
| 65 | virtual ~cxx . . $ KDL/VelocityProfile_Dirac#`~VelocityProfile_Dirac`(ced63f7c635d850d).VelocityProfile_Diraccxx . . $ KDL/VelocityProfile_Dirac#() {} |
| 66 | }; |
| 67 | |
| 68 | } |
| 69 | |
| 70 | |
| 71 | #endif |