velocityprofile_traphalf.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Erwin Aertbelien Mon Jan 10 16:38:38 CET 2005 velocityprofile_traphalf.h
3 
4  velocityprofile_traphalf.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  * \author
31  * Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
32  *
33  * \version
34  * ORO_Geometry V0.2
35  *
36  * \par History
37  * - $log$
38  *
39  * \par Release
40  * $Id: velocityprofile_traphalf.h,v 1.1.1.1.2.4 2003/07/24 13:26:15 psoetens Exp $
41  * $Name: $
42  * \par Status
43  * Experimental
44  ****************************************************************************/
45 
46 #ifndef KDL_MOTION_VELOCITYPROFILE_TRAPHALF_H
47 #define KDL_MOTION_VELOCITYPROFILE_TRAPHALF_H
48 
49 #include "velocityprofile.hpp"
50 
51 
52 
53 
54 namespace KDL {
55 
56 
64  {
65  // For "running" a motion profile :
66  double a1,a2,a3; // coef. from ^0 -> ^2 of first part
67  double b1,b2,b3; // of 2nd part
68  double c1,c2,c3; // of 3rd part
69  double duration;
70  double t1,t2;
71 
72  double startpos;
73  double endpos;
74 
75  // Persistent state :
76  double maxvel;
77  double maxacc;
78  bool starting;
79 
80  void PlanProfile1(double v,double a);
81  void PlanProfile2(double v,double a);
82  public:
83 
90  VelocityProfile_TrapHalf(double _maxvel=0,double _maxacc=0,bool _starting=true);
91 
92  void SetMax(double _maxvel,double _maxacc,bool _starting);
93 
104  virtual void SetProfile(double pos1,double pos2);
105 
117  virtual void SetProfileDuration(
118  double pos1,double pos2,double newduration
119  );
120 
121  virtual double Duration() const;
122  virtual double Pos(double time) const;
123  virtual double Vel(double time) const;
124  virtual double Acc(double time) const;
125  virtual void Write(std::ostream& os) const;
126  virtual VelocityProfile* Clone() const;
127 
128  virtual ~VelocityProfile_TrapHalf();
129  };
130 
131 
132 
133 }
134 
135 
136 #endif
virtual double Pos(double time) const
virtual VelocityProfile * Clone() const
VelocityProfile_TrapHalf(double _maxvel=0, double _maxacc=0, bool _starting=true)
virtual double Acc(double time) const
virtual void SetProfile(double pos1, double pos2)
virtual double Vel(double time) const
void SetMax(double _maxvel, double _maxacc, bool _starting)
virtual void SetProfileDuration(double pos1, double pos2, double newduration)
virtual void Write(std::ostream &os) const


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