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

Generator of position, velocity and acceleration references that are approximately minimum jerk. More...

#include <minJerkCtrl.h>

+ Inheritance diagram for iCub::ctrl::minJerkRefGen:

Public Member Functions

 minJerkRefGen (const unsigned int _dim, const double _Ts, const double _T)
 Constructor.
 
 minJerkRefGen (const yarp::sig::Vector &y0, const double _Ts, const double _T)
 Constructor with initial value.
 
 minJerkRefGen (const minJerkRefGen &z)
 Copy constructor.
 
minJerkRefGenoperator= (const minJerkRefGen &z)
 Assignment operator.
 
void computeNextValues (const yarp::sig::Vector &y)
 Computes the position, velocity and acceleration references.
 
virtual void computeNextValues (const yarp::sig::Vector &y, const yarp::sig::Vector &yd)
 Computes the position, velocity and acceleration references.
 
- Public Member Functions inherited from iCub::ctrl::minJerkBaseGen
 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.
 
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

void computeCoeffs ()
 

Additional Inherited Members

- Protected Attributes inherited from iCub::ctrl::minJerkBaseGen
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

Generator of position, velocity and acceleration references that are approximately minimum jerk.

The references are computed taking into account both the desired final value of the trajectory and the current feedback position.

Definition at line 406 of file minJerkCtrl.h.

Constructor & Destructor Documentation

◆ minJerkRefGen() [1/3]

minJerkRefGen::minJerkRefGen ( 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 463 of file minJerkCtrl.cpp.

◆ minJerkRefGen() [2/3]

iCub::ctrl::minJerkRefGen::minJerkRefGen ( 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).

◆ minJerkRefGen() [3/3]

minJerkRefGen::minJerkRefGen ( const minJerkRefGen z)

Copy constructor.

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

Definition at line 479 of file minJerkCtrl.cpp.

Member Function Documentation

◆ computeCoeffs()

void minJerkRefGen::computeCoeffs ( )
protectedvirtual

Implements iCub::ctrl::minJerkBaseGen.

Definition at line 496 of file minJerkCtrl.cpp.

◆ computeNextValues() [1/2]

void minJerkRefGen::computeNextValues ( const yarp::sig::Vector &  y)
virtual

Computes the position, velocity and acceleration references.

Parameters
ycurrent position.

Implements iCub::ctrl::minJerkBaseGen.

Definition at line 542 of file minJerkCtrl.cpp.

◆ computeNextValues() [2/2]

void minJerkRefGen::computeNextValues ( const yarp::sig::Vector &  y,
const yarp::sig::Vector &  yd 
)
virtual

Computes the position, velocity and acceleration references.

Parameters
ycurrent position.
yddesired final value of the trajectory.

Definition at line 561 of file minJerkCtrl.cpp.

◆ operator=()

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

Assignment operator.

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

Definition at line 487 of file minJerkCtrl.cpp.


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