iCub-main
|
Generator of approximately minimum jerk trajectories. More...
#include <minJerkCtrl.h>
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... | |
minJerkTrajGen & | operator= (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... | |
minJerkBaseGen & | operator= (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 | |
Filter * | posFilter |
Filter * | velFilter |
Filter * | accFilter |
yarp::sig::Vector | pos |
yarp::sig::Vector | vel |
yarp::sig::Vector | acc |
yarp::sig::Vector | lastRef |
double | Ts |
double | T |
unsigned int | dim |
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.
minJerkTrajGen::minJerkTrajGen | ( | const unsigned int | _dim, |
const double | _Ts, | ||
const double | _T | ||
) |
Constructor.
_dim | number of variables. |
_Ts | sample time in seconds. |
_T | trajectory 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.
iCub::ctrl::minJerkTrajGen::minJerkTrajGen | ( | const yarp::sig::Vector & | y0, |
const double | _Ts, | ||
const double | _T | ||
) |
Constructor with initial value.
_y0 | initial value of the trajectory. |
_Ts | sample time in seconds. |
_T | trajectory reference time (90% of steady-state value in t=_T, transient extinguished for t>=1.5*_T). |
minJerkTrajGen::minJerkTrajGen | ( | const minJerkTrajGen & | z | ) |
Copy constructor.
z | the object to copy. |
Definition at line 390 of file minJerkCtrl.cpp.
|
protectedvirtual |
Implements iCub::ctrl::minJerkBaseGen.
Definition at line 407 of file minJerkCtrl.cpp.
|
virtual |
Compute the next position, velocity and acceleration.
yd | desired final value of the trajectory. |
Implements iCub::ctrl::minJerkBaseGen.
Definition at line 447 of file minJerkCtrl.cpp.
minJerkTrajGen & minJerkTrajGen::operator= | ( | const minJerkTrajGen & | z | ) |
Assignment operator.
z | the object to copy. |
Definition at line 398 of file minJerkCtrl.cpp.