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

A Trapezoidal VelocityProfile implementation. More...

#include <src/velocityprofile_trap.hpp>

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

Public Member Functions

 VelocityProfile_Trap (double _maxvel=0, double _maxacc=0)
 
virtual void SetProfile (double pos1, double pos2)
 
virtual void SetProfileDuration (double pos1, double pos2, double newduration)
 
virtual void SetProfileVelocity (double pos1, double pos2, double newvelocity)
 Compute trapezoidal profile at a given fraction of max velocity. More...
 
virtual void SetMax (double _maxvel, double _maxacc)
 
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_Trap ()
 

Static Public Member Functions

static VelocityProfileRead (std::istream &is)
 

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 maxvel
 
double maxacc
 
double startpos
 
double endpos
 

Detailed Description

A Trapezoidal VelocityProfile implementation.

Constructor & Destructor Documentation

§ VelocityProfile_Trap()

KDL::VelocityProfile_Trap::VelocityProfile_Trap ( double  _maxvel = 0,
double  _maxacc = 0 
)

Referenced by Clone().

§ ~VelocityProfile_Trap()

KDL::VelocityProfile_Trap::~VelocityProfile_Trap ( )
virtual

Member Function Documentation

§ Acc()

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

Implements KDL::VelocityProfile.

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

§ Clone()

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

§ Duration()

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

Implements KDL::VelocityProfile.

References duration.

§ Pos()

double KDL::VelocityProfile_Trap::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_Trap::SetMax ( double  _maxvel,
double  _maxacc 
)
virtual

References maxacc, and maxvel.

§ SetProfile()

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

Implements KDL::VelocityProfile.

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

Referenced by SetProfileDuration(), and SetProfileVelocity().

§ SetProfileDuration()

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

Implements KDL::VelocityProfile.

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

Referenced by Clone().

§ SetProfileVelocity()

void KDL::VelocityProfile_Trap::SetProfileVelocity ( double  pos1,
double  pos2,
double  newvelocity 
)
virtual

Compute trapezoidal profile at a given fraction of max velocity.

Parameters
pos1Position to start from
pos2Position to end at
newvelocityFraction of max velocity to use during the non-ramp, flat-velocity part of the profile.
KDL::epsilon<= newvelocity <= 1.0 (forcibly clamped to this range internally)

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

§ Vel()

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

Implements KDL::VelocityProfile.

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

§ Write()

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

Implements KDL::VelocityProfile.

References maxacc, and maxvel.

Member Data Documentation

§ a1

double KDL::VelocityProfile_Trap::a1
private

Referenced by Pos(), and SetProfile().

§ a2

double KDL::VelocityProfile_Trap::a2
private

§ a3

double KDL::VelocityProfile_Trap::a3
private

§ b1

double KDL::VelocityProfile_Trap::b1
private

Referenced by Pos(), and SetProfile().

§ b2

double KDL::VelocityProfile_Trap::b2
private

§ b3

double KDL::VelocityProfile_Trap::b3
private

§ c1

double KDL::VelocityProfile_Trap::c1
private

Referenced by Pos(), and SetProfile().

§ c2

double KDL::VelocityProfile_Trap::c2
private

§ c3

double KDL::VelocityProfile_Trap::c3
private

§ duration

double KDL::VelocityProfile_Trap::duration
private

§ endpos

double KDL::VelocityProfile_Trap::endpos
private

Referenced by Clone(), Pos(), and SetProfile().

§ maxacc

double KDL::VelocityProfile_Trap::maxacc
private

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

§ maxvel

double KDL::VelocityProfile_Trap::maxvel
private

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

§ startpos

double KDL::VelocityProfile_Trap::startpos
private

Referenced by Clone(), Pos(), and SetProfile().

§ t1

double KDL::VelocityProfile_Trap::t1
private

§ t2

double KDL::VelocityProfile_Trap::t2
private

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