iCub-main
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
iCub::ctrl::minJerkBaseGen Class Referenceabstract

Base class for minimum jerk generators. More...

#include <minJerkCtrl.h>

+ Inheritance diagram for iCub::ctrl::minJerkBaseGen:

Public Member Functions

 minJerkBaseGen (const unsigned int _dim, const double _Ts, const double _T)
 Constructor.
 
 minJerkBaseGen (const yarp::sig::Vector &y0, const double _Ts, const double _T)
 Constructor with initial value.
 
 minJerkBaseGen (const minJerkBaseGen &z)
 Copy constructor.
 
minJerkBaseGenoperator= (const minJerkBaseGen &z)
 Assignment operator.
 
virtual ~minJerkBaseGen ()
 Destructor.
 
virtual void init (const yarp::sig::Vector &y0)
 Initialize the trajectory.
 
virtual void computeNextValues (const yarp::sig::Vector &yd)=0
 Compute the next position, velocity and acceleration.
 
const yarp::sig::Vector & getPos () const
 Get the current position.
 
const yarp::sig::Vector & getVel () const
 Get the current velocity.
 
const yarp::sig::Vector & getAcc () const
 Get the current acceleration.
 
double getT () const
 Get the trajectory reference time in seconds (90% of steady-state value in t=_T, transient extinguished for t>=1.5*_T).
 
double getTs () const
 Get the sample time in seconds.
 
bool setT (const double _T)
 Set the trajectory reference time (90% of steady-state value in t=_T, transient extinguished for t>=1.5*_T).
 
bool setTs (const double _Ts)
 Set the sample time.
 

Protected Member Functions

virtual void computeCoeffs ()=0
 

Protected Attributes

FilterposFilter
 
FiltervelFilter
 
FilteraccFilter
 
yarp::sig::Vector pos
 
yarp::sig::Vector vel
 
yarp::sig::Vector acc
 
yarp::sig::Vector lastRef
 
double Ts
 
double T
 
unsigned int dim
 

Detailed Description

Base class for minimum jerk generators.

Definition at line 227 of file minJerkCtrl.h.

Constructor & Destructor Documentation

◆ minJerkBaseGen() [1/3]

minJerkBaseGen::minJerkBaseGen ( const unsigned int  _dim,
const double  _Ts,
const double  _T 
)

Constructor.

Parameters
_dimnumber of variables.
_Tssample time in seconds.
_Ttrajectory reference time (90% of steady-state value in t=_T, transient extinguished for t>=1.5*_T).

Definition at line 273 of file minJerkCtrl.cpp.

◆ minJerkBaseGen() [2/3]

iCub::ctrl::minJerkBaseGen::minJerkBaseGen ( const yarp::sig::Vector &  y0,
const double  _Ts,
const double  _T 
)

Constructor with initial value.

Parameters
_y0initial value of the trajectory.
_Tssample time in seconds.
_Ttrajectory reference time (90% of steady-state value in t=_T, transient extinguished for t>=1.5*_T).

◆ minJerkBaseGen() [3/3]

minJerkBaseGen::minJerkBaseGen ( const minJerkBaseGen z)

Copy constructor.

Parameters
zthe object to copy.
Note
After copy, internal filters are reset.

Definition at line 292 of file minJerkCtrl.cpp.

◆ ~minJerkBaseGen()

minJerkBaseGen::~minJerkBaseGen ( )
virtual

Destructor.

Definition at line 306 of file minJerkCtrl.cpp.

Member Function Documentation

◆ computeCoeffs()

virtual void iCub::ctrl::minJerkBaseGen::computeCoeffs ( )
protectedpure virtual

◆ computeNextValues()

virtual void iCub::ctrl::minJerkBaseGen::computeNextValues ( const yarp::sig::Vector &  yd)
pure virtual

Compute the next position, velocity and acceleration.

Parameters
yddesired final value of the trajectory.

Implemented in iCub::ctrl::minJerkRefGen, and iCub::ctrl::minJerkTrajGen.

◆ getAcc()

const yarp::sig::Vector & iCub::ctrl::minJerkBaseGen::getAcc ( ) const
inline

Get the current acceleration.

Definition at line 308 of file minJerkCtrl.h.

◆ getPos()

const yarp::sig::Vector & iCub::ctrl::minJerkBaseGen::getPos ( ) const
inline

Get the current position.

Definition at line 298 of file minJerkCtrl.h.

◆ getT()

double iCub::ctrl::minJerkBaseGen::getT ( ) const
inline

Get the trajectory reference time in seconds (90% of steady-state value in t=_T, transient extinguished for t>=1.5*_T).

Definition at line 315 of file minJerkCtrl.h.

◆ getTs()

double iCub::ctrl::minJerkBaseGen::getTs ( ) const
inline

Get the sample time in seconds.

Definition at line 320 of file minJerkCtrl.h.

◆ getVel()

const yarp::sig::Vector & iCub::ctrl::minJerkBaseGen::getVel ( ) const
inline

Get the current velocity.

Definition at line 303 of file minJerkCtrl.h.

◆ init()

void minJerkBaseGen::init ( const yarp::sig::Vector &  y0)
virtual

Initialize the trajectory.

Parameters
y0initial value of the trajectory.

Definition at line 335 of file minJerkCtrl.cpp.

◆ operator=()

minJerkBaseGen & minJerkBaseGen::operator= ( const minJerkBaseGen z)

Assignment operator.

Parameters
zthe object to copy.
Note
After copy, internal filters are reset.

Definition at line 315 of file minJerkCtrl.cpp.

◆ setT()

bool minJerkBaseGen::setT ( const double  _T)

Set the trajectory reference time (90% of steady-state value in t=_T, transient extinguished for t>=1.5*_T).

Parameters
_Ttrajectory reference time in seconds.
Returns
true if operation succeeded, false otherwise.

Definition at line 352 of file minJerkCtrl.cpp.

◆ setTs()

bool minJerkBaseGen::setTs ( const double  _Ts)

Set the sample time.

Parameters
_Tssample time in seconds.
Returns
true if operation succeeded, false otherwise.

Definition at line 363 of file minJerkCtrl.cpp.

Member Data Documentation

◆ acc

yarp::sig::Vector iCub::ctrl::minJerkBaseGen::acc
protected

Definition at line 236 of file minJerkCtrl.h.

◆ accFilter

Filter* iCub::ctrl::minJerkBaseGen::accFilter
protected

Definition at line 232 of file minJerkCtrl.h.

◆ dim

unsigned int iCub::ctrl::minJerkBaseGen::dim
protected

Definition at line 241 of file minJerkCtrl.h.

◆ lastRef

yarp::sig::Vector iCub::ctrl::minJerkBaseGen::lastRef
protected

Definition at line 237 of file minJerkCtrl.h.

◆ pos

yarp::sig::Vector iCub::ctrl::minJerkBaseGen::pos
protected

Definition at line 234 of file minJerkCtrl.h.

◆ posFilter

Filter* iCub::ctrl::minJerkBaseGen::posFilter
protected

Definition at line 230 of file minJerkCtrl.h.

◆ T

double iCub::ctrl::minJerkBaseGen::T
protected

Definition at line 240 of file minJerkCtrl.h.

◆ Ts

double iCub::ctrl::minJerkBaseGen::Ts
protected

Definition at line 239 of file minJerkCtrl.h.

◆ vel

yarp::sig::Vector iCub::ctrl::minJerkBaseGen::vel
protected

Definition at line 235 of file minJerkCtrl.h.

◆ velFilter

Filter* iCub::ctrl::minJerkBaseGen::velFilter
protected

Definition at line 231 of file minJerkCtrl.h.


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