iCub-main
Public Member Functions | Protected Member Functions | List of all members
iCub::ctrl::minJerkTrajGen Class Reference

Generator of approximately minimum jerk trajectories. More...

#include <minJerkCtrl.h>

+ Inheritance diagram for iCub::ctrl::minJerkTrajGen:

Public Member Functions

 minJerkTrajGen (const unsigned int _dim, const double _Ts, const double _T)
 Constructor. More...
 
 minJerkTrajGen (const yarp::sig::Vector &y0, const double _Ts, const double _T)
 Constructor with initial value. More...
 
 minJerkTrajGen (const minJerkTrajGen &z)
 Copy constructor. More...
 
minJerkTrajGenoperator= (const minJerkTrajGen &z)
 Assignment operator. More...
 
void computeNextValues (const yarp::sig::Vector &yd)
 Compute the next position, velocity and acceleration. More...
 
- Public Member Functions inherited from iCub::ctrl::minJerkBaseGen
 minJerkBaseGen (const unsigned int _dim, const double _Ts, const double _T)
 Constructor. More...
 
 minJerkBaseGen (const yarp::sig::Vector &y0, const double _Ts, const double _T)
 Constructor with initial value. More...
 
 minJerkBaseGen (const minJerkBaseGen &z)
 Copy constructor. More...
 
minJerkBaseGenoperator= (const minJerkBaseGen &z)
 Assignment operator. More...
 
virtual ~minJerkBaseGen ()
 Destructor. More...
 
virtual void init (const yarp::sig::Vector &y0)
 Initialize the trajectory. More...
 
const yarp::sig::Vector & getPos () const
 Get the current position. More...
 
const yarp::sig::Vector & getVel () const
 Get the current velocity. More...
 
const yarp::sig::Vector & getAcc () const
 Get the current acceleration. More...
 
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). More...
 
double getTs () const
 Get the sample time in seconds. More...
 
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). More...
 
bool setTs (const double _Ts)
 Set the sample time. More...
 

Protected Member Functions

virtual 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 approximately minimum jerk trajectories.

The min jerk trajectory is approximated using a 3rd order LTI dynamical system (for more details see Pattacini2010). Position, velocity and acceleration trajectories are computed. The main advantage with respect to the standard polynomial form is that if the reference value yd changes there is no need to recompute the filter coefficients.

Definition at line 351 of file minJerkCtrl.h.

Constructor & Destructor Documentation

◆ minJerkTrajGen() [1/3]

minJerkTrajGen::minJerkTrajGen ( 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 374 of file minJerkCtrl.cpp.

◆ minJerkTrajGen() [2/3]

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

◆ minJerkTrajGen() [3/3]

minJerkTrajGen::minJerkTrajGen ( const minJerkTrajGen z)

Copy constructor.

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

Definition at line 390 of file minJerkCtrl.cpp.

Member Function Documentation

◆ computeCoeffs()

void minJerkTrajGen::computeCoeffs ( )
protectedvirtual

Implements iCub::ctrl::minJerkBaseGen.

Definition at line 407 of file minJerkCtrl.cpp.

◆ computeNextValues()

void minJerkTrajGen::computeNextValues ( const yarp::sig::Vector &  yd)
virtual

Compute the next position, velocity and acceleration.

Parameters
yddesired final value of the trajectory.

Implements iCub::ctrl::minJerkBaseGen.

Definition at line 447 of file minJerkCtrl.cpp.

◆ operator=()

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

Assignment operator.

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

Definition at line 398 of file minJerkCtrl.cpp.


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