KDL  1.4.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
KDL::VelocityProfile_TrapHalf Class Reference

A 'Half' Trapezoidal VelocityProfile. More...

#include <src/velocityprofile_traphalf.hpp>

Inheritance diagram for KDL::VelocityProfile_TrapHalf:
Inheritance graph
[legend]
Collaboration diagram for KDL::VelocityProfile_TrapHalf:
Collaboration graph
[legend]

Public Member Functions

 VelocityProfile_TrapHalf (double _maxvel=0, double _maxacc=0, bool _starting=true)
 
void SetMax (double _maxvel, double _maxacc, bool _starting)
 
virtual void SetProfile (double pos1, double pos2)
 Plans a 'Half' Trapezoidal VelocityProfile between pos1 and pos2. More...
 
virtual void SetProfileDuration (double pos1, double pos2, double newduration)
 Can be used to prolong the profile, there are two possible outcomes: in a first phase the acceleration is lowered as such that the end position and maximum velocity are reached at the given duration (newduration). More...
 
virtual double Duration () const
 
virtual double Pos (double time) const
 
virtual double Vel (double time) const
 
virtual double Acc (double time) const
 
virtual void Write (std::ostream &os) const
 
virtual VelocityProfileClone () const
 
virtual ~VelocityProfile_TrapHalf ()
 

Static Public Member Functions

static VelocityProfileRead (std::istream &is)
 

Private Member Functions

void PlanProfile1 (double v, double a)
 
void PlanProfile2 (double v, double a)
 

Private Attributes

double a1
 
double a2
 
double a3
 
double b1
 
double b2
 
double b3
 
double c1
 
double c2
 
double c3
 
double duration
 
double t1
 
double t2
 
double startpos
 
double endpos
 
double maxvel
 
double maxacc
 
bool starting
 

Detailed Description

A 'Half' Trapezoidal VelocityProfile.

A constructor flag indicates if the calculated profile should be starting or ending.

Constructor & Destructor Documentation

§ VelocityProfile_TrapHalf()

KDL::VelocityProfile_TrapHalf::VelocityProfile_TrapHalf ( double  _maxvel = 0,
double  _maxacc = 0,
bool  _starting = true 
)
Parameters
maxvelmaximal velocity of the motion profile (positive)
maxaccmaximal acceleration of the motion profile (positive)
startingthis value is true when initial velocity is zero and ending velocity is maxvel, is false for the reverse

Referenced by Clone().

§ ~VelocityProfile_TrapHalf()

KDL::VelocityProfile_TrapHalf::~VelocityProfile_TrapHalf ( )
virtual

Member Function Documentation

§ Acc()

double KDL::VelocityProfile_TrapHalf::Acc ( double  time) const
virtual

Implements KDL::VelocityProfile.

References a3, b3, c3, duration, t1, and t2.

§ Clone()

VelocityProfile * KDL::VelocityProfile_TrapHalf::Clone ( ) const
virtual

§ Duration()

double KDL::VelocityProfile_TrapHalf::Duration ( ) const
virtual

Implements KDL::VelocityProfile.

References duration.

§ PlanProfile1()

void KDL::VelocityProfile_TrapHalf::PlanProfile1 ( double  v,
double  a 
)
private

References a1, a2, a3, b1, b2, b3, c1, c2, c3, duration, endpos, startpos, and t1.

Referenced by SetProfile(), and SetProfileDuration().

§ PlanProfile2()

void KDL::VelocityProfile_TrapHalf::PlanProfile2 ( double  v,
double  a 
)
private

References a1, a2, a3, b1, b2, b3, c1, c2, c3, endpos, startpos, and t2.

Referenced by SetProfile(), and SetProfileDuration().

§ Pos()

double KDL::VelocityProfile_TrapHalf::Pos ( double  time) const
virtual

Implements KDL::VelocityProfile.

References a1, a2, a3, b1, b2, b3, c1, c2, c3, duration, endpos, startpos, t1, and t2.

§ Read()

VelocityProfile * KDL::VelocityProfile::Read ( std::istream &  is)
staticinherited

Referenced by KDL::Trajectory::Read().

§ SetMax()

void KDL::VelocityProfile_TrapHalf::SetMax ( double  _maxvel,
double  _maxacc,
bool  _starting 
)

References maxacc, maxvel, and starting.

§ SetProfile()

void KDL::VelocityProfile_TrapHalf::SetProfile ( double  pos1,
double  pos2 
)
virtual

Plans a 'Half' Trapezoidal VelocityProfile between pos1 and pos2.

If the distance is too short between pos1 and pos2, only the acceleration phase is set and the max velocity is not reached.

Parameters
pos1Starting position
pos2Ending position

Can throw a Error_MotionPlanning_Not_Feasible

Implements KDL::VelocityProfile.

References duration, endpos, maxacc, maxvel, PlanProfile1(), PlanProfile2(), starting, startpos, t1, and t2.

Referenced by SetProfileDuration().

§ SetProfileDuration()

void KDL::VelocityProfile_TrapHalf::SetProfileDuration ( double  pos1,
double  pos2,
double  newduration 
)
virtual

Can be used to prolong the profile, there are two possible outcomes: in a first phase the acceleration is lowered as such that the end position and maximum velocity are reached at the given duration (newduration).

In this case there is an acceleration part and a constant velocity part, when this reaches a minimum acceleration value at which the constant part disappears, the motion is stalled, in this case their is a non-motion part and an acceleration part.

Parameters
pos1starting position
pos2ending position
newdurationthe desired duration, if it is lower than the minimum duration, the minimum duration will be used instead of the given duration.

Implements KDL::VelocityProfile.

References duration, endpos, maxvel, PlanProfile1(), PlanProfile2(), SetProfile(), starting, startpos, t1, and t2.

Referenced by Clone().

§ Vel()

double KDL::VelocityProfile_TrapHalf::Vel ( double  time) const
virtual

Implements KDL::VelocityProfile.

References a2, a3, b2, b3, c2, c3, duration, t1, and t2.

§ Write()

void KDL::VelocityProfile_TrapHalf::Write ( std::ostream &  os) const
virtual

Implements KDL::VelocityProfile.

References maxacc, maxvel, and starting.

Member Data Documentation

§ a1

double KDL::VelocityProfile_TrapHalf::a1
private

Referenced by PlanProfile1(), PlanProfile2(), and Pos().

§ a2

double KDL::VelocityProfile_TrapHalf::a2
private

Referenced by PlanProfile1(), PlanProfile2(), Pos(), and Vel().

§ a3

double KDL::VelocityProfile_TrapHalf::a3
private

Referenced by Acc(), PlanProfile1(), PlanProfile2(), Pos(), and Vel().

§ b1

double KDL::VelocityProfile_TrapHalf::b1
private

Referenced by PlanProfile1(), PlanProfile2(), and Pos().

§ b2

double KDL::VelocityProfile_TrapHalf::b2
private

Referenced by PlanProfile1(), PlanProfile2(), Pos(), and Vel().

§ b3

double KDL::VelocityProfile_TrapHalf::b3
private

Referenced by Acc(), PlanProfile1(), PlanProfile2(), Pos(), and Vel().

§ c1

double KDL::VelocityProfile_TrapHalf::c1
private

Referenced by PlanProfile1(), PlanProfile2(), and Pos().

§ c2

double KDL::VelocityProfile_TrapHalf::c2
private

Referenced by PlanProfile1(), PlanProfile2(), Pos(), and Vel().

§ c3

double KDL::VelocityProfile_TrapHalf::c3
private

Referenced by Acc(), PlanProfile1(), PlanProfile2(), Pos(), and Vel().

§ duration

double KDL::VelocityProfile_TrapHalf::duration
private

§ endpos

double KDL::VelocityProfile_TrapHalf::endpos
private

§ maxacc

double KDL::VelocityProfile_TrapHalf::maxacc
private

Referenced by Clone(), SetMax(), SetProfile(), and Write().

§ maxvel

double KDL::VelocityProfile_TrapHalf::maxvel
private

§ starting

bool KDL::VelocityProfile_TrapHalf::starting
private

§ startpos

double KDL::VelocityProfile_TrapHalf::startpos
private

§ t1

double KDL::VelocityProfile_TrapHalf::t1
private

§ t2

double KDL::VelocityProfile_TrapHalf::t2
private

The documentation for this class was generated from the following files: