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 
)

◆ ~VelocityProfile_Trap()

KDL::VelocityProfile_Trap::~VelocityProfile_Trap ( )
virtual

Member Function Documentation

◆ Acc()

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

Implements KDL::VelocityProfile.

◆ Clone()

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

Implements KDL::VelocityProfile.

◆ Duration()

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

Implements KDL::VelocityProfile.

◆ Pos()

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

Implements KDL::VelocityProfile.

◆ Read()

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

◆ SetMax()

void KDL::VelocityProfile_Trap::SetMax ( double  _maxvel,
double  _maxacc 
)
virtual

◆ SetProfile()

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

Implements KDL::VelocityProfile.

◆ SetProfileDuration()

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

Implements KDL::VelocityProfile.

References maxacc, and maxvel.

◆ 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)

◆ Vel()

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

Implements KDL::VelocityProfile.

◆ Write()

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

Implements KDL::VelocityProfile.

Member Data Documentation

◆ a1

double KDL::VelocityProfile_Trap::a1
private

◆ a2

double KDL::VelocityProfile_Trap::a2
private

◆ a3

double KDL::VelocityProfile_Trap::a3
private

◆ b1

double KDL::VelocityProfile_Trap::b1
private

◆ b2

double KDL::VelocityProfile_Trap::b2
private

◆ b3

double KDL::VelocityProfile_Trap::b3
private

◆ c1

double KDL::VelocityProfile_Trap::c1
private

◆ 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

◆ maxacc

double KDL::VelocityProfile_Trap::maxacc
private

Referenced by SetProfileDuration().

◆ maxvel

double KDL::VelocityProfile_Trap::maxvel
private

Referenced by SetProfileDuration().

◆ startpos

double KDL::VelocityProfile_Trap::startpos
private

◆ 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: