iCub-main
Public Member Functions | Protected Attributes | List of all members
iCub::iDyn::BaseLinkNewtonEuler Class Reference

#include <iDynInv.h>

+ Inheritance diagram for iCub::iDyn::BaseLinkNewtonEuler:

Public Member Functions

 BaseLinkNewtonEuler (const yarp::sig::Matrix &_H0, const NewEulMode _mode, unsigned int verb=iCub::skinDynLib::NO_VERBOSE)
 Default constructor. More...
 
 BaseLinkNewtonEuler (const yarp::sig::Matrix &_H0, const yarp::sig::Vector &_w, const yarp::sig::Vector &_dw, const yarp::sig::Vector &_ddp, const NewEulMode _mode, unsigned int verb=iCub::skinDynLib::NO_VERBOSE)
 Constructor, initializing the base data. More...
 
bool setAsBase (const yarp::sig::Vector &_w, const yarp::sig::Vector &_dw, const yarp::sig::Vector &_ddp)
 Sets the base data. More...
 
bool setAsBase (const yarp::sig::Vector &_F, const yarp::sig::Vector &_Mu)
 Sets the base data. More...
 
const yarp::sig::Vector & getAngVel () const
 
const yarp::sig::Vector & getAngAcc () const
 
const yarp::sig::Vector & getAngAccM () const
 
const yarp::sig::Vector & getLinAcc () const
 
const yarp::sig::Vector & getLinAccC () const
 
const yarp::sig::Vector & getForce () const
 
const yarp::sig::Vector & getMoment (bool isBase=false) const
 
double getTorque () const
 
const yarp::sig::Matrix & getR ()
 
const yarp::sig::Matrix & getRC ()
 
double getIm () const
 
double getD2q () const
 
double getDq () const
 
double getKr () const
 
double getFs () const
 
double getFv () const
 
double getMass () const
 
const yarp::sig::Matrix & getInertia () const
 
const yarp::sig::Vector & getr (bool proj=false)
 
const yarp::sig::Vector & getrC (bool proj=false)
 
bool setForce (const yarp::sig::Vector &_F)
 Set the OneLink force: either the corresponding iDynLink force, or the one declared as member in the child classes derived from OneLink, such as SensorLink. More...
 
bool setMoment (const yarp::sig::Vector &_Mu)
 Set the OneLink moment: either the corresponding iDynLink moment, or the one declared as member in the child classes derived from OneLink, such as SensorLink. More...
 
void setTorque (const double _Tau)
 Set the OneLink torque, ie the corresponding iDynLink joint torque (nothing in the child classes derived from OneLink, such as SensorLink) More...
 
bool setAngVel (const yarp::sig::Vector &_w)
 Set the OneLink angular velocity (w), ie the corresponding iDynLink angular velocity (w) (in the child classes derived from OneLink, it depends) More...
 
bool setAngAcc (const yarp::sig::Vector &_dw)
 Set the OneLink angular acceleration (dw), ie the corresponding iDynLink angular acceleration (dw) (in the child classes derived from OneLink, it depends) More...
 
bool setLinAcc (const yarp::sig::Vector &_ddp)
 Set the OneLink linear acceleration (ddp), ie the corresponding iDynLink linear acceleration (ddp) (in the child classes derived from OneLink, it depends) More...
 
bool setLinAccC (const yarp::sig::Vector &_ddpC)
 Set the OneLink linear acceleration of the COM (ddpC), ie the corresponding iDynLink linear acceleration of the COM (ddpC) (nothing in the child classes derived from OneLink, except for SensorLink) More...
 
bool setAngAccM (const yarp::sig::Vector &_dwM)
 Set the OneLink angular acceleration of the motor (dwM), ie the corresponding iDynLink angular acceleration of the COM (dwM) (nothing in the child classes derived from OneLink) More...
 
std::string toString () const
 Useful to print some information. More...
 
- Public Member Functions inherited from iCub::iDyn::OneLinkNewtonEuler
 OneLinkNewtonEuler (iDyn::iDynLink *dlink=NULL)
 Default constructor. More...
 
 OneLinkNewtonEuler (const NewEulMode _mode, unsigned int verb=iCub::skinDynLib::NO_VERBOSE, iDyn::iDynLink *dlink=NULL)
 Constructor, with initialization of some data. More...
 
virtual ~OneLinkNewtonEuler ()
 Destructor. More...
 
void zero ()
 Set everything to zero; R is set to an identity matrix. More...
 
virtual bool setAsFinal (const yarp::sig::Vector &_F, const yarp::sig::Vector &_Mu)
 Set the frame as the final one: this is useful to initialize the backward phase of Newton-Euler's method, by setting F and Mu; R is an identity matrix. More...
 
virtual bool setAsFinal (const yarp::sig::Vector &_w, const yarp::sig::Vector &_dw, const yarp::sig::Vector &_ddp)
 Set the frame as the final one: this is useful to initialize the backward phase of Euler's method, by setting w, dw and ddp; R is an identity matrix. More...
 
virtual bool setMeasuredFMu (const yarp::sig::Vector &_F, const yarp::sig::Vector &_Mu)
 Set measured force and moment in a 'sensor' frame: this is useful to initialize the forward phase of the Inverse Newton-Euler's method, by setting F and Mu, measured by the corresponding F/T sensor. More...
 
virtual bool setMeasuredTorque (const double _Tau)
 Set measured torque in a joint torque sensor frame
More...
 
void setVerbose (unsigned int verb=iCub::skinDynLib::VERBOSE)
 Set the verbosity level of comments during operations. More...
 
void setMode (const NewEulMode _mode)
 Set the operation mode (static,dynamic etc) More...
 
bool setZM (const yarp::sig::Vector &_zm)
 Set the zM vector. More...
 
void setInfo (const std::string &_info)
 Set some information about this OneLink class. More...
 
NewEulMode getMode () const
 
yarp::sig::Vector getZM () const
 
std::string getInfo () const
 
virtual const yarp::sig::Matrix & getH ()
 
void ForwardKinematics (OneLinkNewtonEuler *prev)
 [Forward Newton-Euler] Compute w, dw, ddp, ddpC, dwM More...
 
void BackwardKinematics (OneLinkNewtonEuler *prev)
 [Backward Kinematic computation] Compute w, dw, ddp, ddpC, dwM More...
 
void BackwardWrench (OneLinkNewtonEuler *next)
 [Backward Newton-Euler] Compute F, Mu, Tau More...
 
void ForwardWrench (OneLinkNewtonEuler *prev)
 [Inverse Newton-Euler] Compute F, Mu, Tau More...
 
virtual void computeTorque (OneLinkNewtonEuler *prev)
 [all] Compute joint torque; moment must be pre-computed More...
 

Protected Attributes

yarp::sig::Vector w
 initial angular velocity More...
 
yarp::sig::Vector dw
 initial angular acceleration More...
 
yarp::sig::Vector ddp
 initial linear acceleration More...
 
yarp::sig::Matrix H0
 base roto-traslation (if necessary) More...
 
yarp::sig::Vector F
 initial force More...
 
yarp::sig::Vector Mu
 initial moment More...
 
yarp::sig::Vector Mu0
 initial moment More...
 
double Tau
 corresponding torque More...
 
const yarp::sig::Matrix eye3x3
 
const yarp::sig::Matrix zeros3x3
 
const yarp::sig::Vector zeros3
 
- Protected Attributes inherited from iCub::iDyn::OneLinkNewtonEuler
NewEulMode mode
 STATIC/DYNAMIC/DYNAMIC_W_ROTOR/DYNAMIC_CORIOLIS_GRAVITY. More...
 
std::string info
 info or useful notes More...
 
unsigned int verbose
 verbosity flag More...
 
yarp::sig::Vector z0
 z0=[0 0 1]' More...
 
yarp::sig::Vector zm
 z^{i-1}_{m_{i}} versor rotating solidally with link i, projected in frame i ==>> constant More...
 
iDyn::iDynLinklink
 the corresponding iDynLink More...
 

Additional Inherited Members

- Protected Member Functions inherited from iCub::iDyn::OneLinkNewtonEuler
void computeAngVel (OneLinkNewtonEuler *prev)
 [Forward Newton-Euler] compute angular velocity of the link More...
 
void computeAngVelBackward (OneLinkNewtonEuler *prev)
 [Forward Newton-Euler] compute angular velocity of the previous link frame More...
 
void computeAngAcc (OneLinkNewtonEuler *prev)
 [Forward Newton-Euler] compute angular acceleration of the link More...
 
void computeAngAccBackward (OneLinkNewtonEuler *prev)
 [Forward Newton-Euler] compute angular acceleration of the previous link frame More...
 
void computeLinAcc (OneLinkNewtonEuler *prev)
 [Forward Newton-Euler] compute linear acceleration of the reference frame of the link More...
 
void computeLinAccBackward (OneLinkNewtonEuler *prev)
 [Forward Newton-Euler] compute linear acceleration of the reference frame of the previous link More...
 
void computeLinAccC ()
 [Forward Newton-Euler] compute linear acceleration of the center of mass More...
 
void computeAngAccM (OneLinkNewtonEuler *prev)
 [Forward Newton-Euler] compute angular acceleration of the rotor More...
 
void computeForceBackward (OneLinkNewtonEuler *next)
 [Backward Newton-Euler] compute force from the following link More...
 
void computeForceForward (OneLinkNewtonEuler *prev)
 [Inverse Newton-Euler] compute force from the previous link More...
 
void computeMomentBackward (OneLinkNewtonEuler *next)
 [Backward Newton-Euler] compute moment from the following link More...
 
void computeMomentForward (OneLinkNewtonEuler *prev)
 [Inverse Newton-Euler] compute moment from the previous link More...
 

Detailed Description

A class for setting a virtual base link: this is useful to initialize the forward phase of Newton-Euler's method, by setting w, dw, ddp; H is an identity matrix, while ddpC=ddp; Note that this is a virtual link, since there's no iDynLink attached: it is just necessary to make the recursive Newton-Euler computations

Definition at line 491 of file iDynInv.h.

Constructor & Destructor Documentation

◆ BaseLinkNewtonEuler() [1/2]

iCub::iDyn::BaseLinkNewtonEuler::BaseLinkNewtonEuler ( const yarp::sig::Matrix &  _H0,
const NewEulMode  _mode,
unsigned int  verb = iCub::skinDynLib::NO_VERBOSE 
)

Default constructor.

Parameters
_H0the base roto-translation
_modethe analysis mode (static/dynamic)
verbflag for verbosity

◆ BaseLinkNewtonEuler() [2/2]

iCub::iDyn::BaseLinkNewtonEuler::BaseLinkNewtonEuler ( const yarp::sig::Matrix &  _H0,
const yarp::sig::Vector &  _w,
const yarp::sig::Vector &  _dw,
const yarp::sig::Vector &  _ddp,
const NewEulMode  _mode,
unsigned int  verb = iCub::skinDynLib::NO_VERBOSE 
)

Constructor, initializing the base data.

Parameters
_H0the base roto-translation
_wthe initial angular velocity
_dwthe initial angular acceleration
_ddpthe initial linear acceleration
_modethe analysis mode (static/dynamic)
verbflag for verbosity

Member Function Documentation

◆ getAngAcc()

const Vector & BaseLinkNewtonEuler::getAngAcc ( ) const
virtual
Returns
dw = angular acceleration (3x1)

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 875 of file iDynInv.cpp.

◆ getAngAccM()

const Vector & BaseLinkNewtonEuler::getAngAccM ( ) const
virtual
Returns
dwM = angular acceleration of the rotor (3x1)

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 877 of file iDynInv.cpp.

◆ getAngVel()

const Vector & BaseLinkNewtonEuler::getAngVel ( ) const
virtual
Returns
w = angular velocity (3x1)

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 873 of file iDynInv.cpp.

◆ getD2q()

double BaseLinkNewtonEuler::getD2q ( ) const
virtual
Returns
ddq = d2q = joint acceleration

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 896 of file iDynInv.cpp.

◆ getDq()

double BaseLinkNewtonEuler::getDq ( ) const
virtual
Returns
dq = dq = joint velocity

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 897 of file iDynInv.cpp.

◆ getForce()

const Vector & BaseLinkNewtonEuler::getForce ( ) const
virtual
Returns
F = force (3x1)

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 883 of file iDynInv.cpp.

◆ getFs()

double BaseLinkNewtonEuler::getFs ( ) const
virtual
Returns
Fs = static friction

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 894 of file iDynInv.cpp.

◆ getFv()

double BaseLinkNewtonEuler::getFv ( ) const
virtual
Returns
Fv = viscous friction

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 895 of file iDynInv.cpp.

◆ getIm()

double BaseLinkNewtonEuler::getIm ( ) const
virtual
Returns
Im

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 893 of file iDynInv.cpp.

◆ getInertia()

const Matrix & BaseLinkNewtonEuler::getInertia ( ) const
virtual
Returns
I = inertia of the link

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 900 of file iDynInv.cpp.

◆ getKr()

double BaseLinkNewtonEuler::getKr ( ) const
virtual
Returns
Kr

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 898 of file iDynInv.cpp.

◆ getLinAcc()

const Vector & BaseLinkNewtonEuler::getLinAcc ( ) const
virtual
Returns
ddp = d2p = linear acceleration (3x1)

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 879 of file iDynInv.cpp.

◆ getLinAccC()

const Vector & BaseLinkNewtonEuler::getLinAccC ( ) const
virtual
Returns
ddpC = d2pC = linear acceleration of the center of mass (3x1)

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 881 of file iDynInv.cpp.

◆ getMass()

double BaseLinkNewtonEuler::getMass ( ) const
virtual
Returns
m = mass of the link

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 899 of file iDynInv.cpp.

◆ getMoment()

const Vector & BaseLinkNewtonEuler::getMoment ( bool  isBase = false) const
virtual
Returns
Mu = moment (3x1)

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 884 of file iDynInv.cpp.

◆ getR()

const Matrix & BaseLinkNewtonEuler::getR ( )
virtual
Returns
R = (3x3) rotational matrix from the Denavit-Hartenberg roto-translational matrix describing the link

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 891 of file iDynInv.cpp.

◆ getr()

const Vector & BaseLinkNewtonEuler::getr ( bool  proj = false)
virtual
Returns
r = (3x1) distance vector from the Denavit-Hartenberg roto-translational matrix describing the distance vector between frames and <i-1>

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 901 of file iDynInv.cpp.

◆ getRC()

const Matrix & BaseLinkNewtonEuler::getRC ( )
virtual
Returns
RC = (3x3) rotational matrix from the roto-translational matrix of the link COM

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 892 of file iDynInv.cpp.

◆ getrC()

const Vector & BaseLinkNewtonEuler::getrC ( bool  proj = false)
virtual
Returns
rC = (3x1) distance vector from the roto-translational matrix of the link COM, describing the distance vector between COM and frame

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 902 of file iDynInv.cpp.

◆ getTorque()

double BaseLinkNewtonEuler::getTorque ( ) const
virtual
Returns
Tau = torque (1x1)

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 890 of file iDynInv.cpp.

◆ setAngAcc()

bool BaseLinkNewtonEuler::setAngAcc ( const yarp::sig::Vector &  _dw)
virtual

Set the OneLink angular acceleration (dw), ie the corresponding iDynLink angular acceleration (dw) (in the child classes derived from OneLink, it depends)

Parameters
_dwangular acceleration

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 955 of file iDynInv.cpp.

◆ setAngAccM()

bool BaseLinkNewtonEuler::setAngAccM ( const yarp::sig::Vector &  _dwM)
virtual

Set the OneLink angular acceleration of the motor (dwM), ie the corresponding iDynLink angular acceleration of the COM (dwM) (nothing in the child classes derived from OneLink)

Parameters
_dwMangular acceleration of the motor

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 994 of file iDynInv.cpp.

◆ setAngVel()

bool BaseLinkNewtonEuler::setAngVel ( const yarp::sig::Vector &  _w)
virtual

Set the OneLink angular velocity (w), ie the corresponding iDynLink angular velocity (w) (in the child classes derived from OneLink, it depends)

Parameters
_wangular velocity

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 939 of file iDynInv.cpp.

◆ setAsBase() [1/2]

bool iCub::iDyn::BaseLinkNewtonEuler::setAsBase ( const yarp::sig::Vector &  _F,
const yarp::sig::Vector &  _Mu 
)
virtual

Sets the base data.

Parameters
_Fthe initial angular velocity
_Muthe initial angular acceleration

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

◆ setAsBase() [2/2]

bool iCub::iDyn::BaseLinkNewtonEuler::setAsBase ( const yarp::sig::Vector &  _w,
const yarp::sig::Vector &  _dw,
const yarp::sig::Vector &  _ddp 
)
virtual

Sets the base data.

Parameters
_wthe initial angular velocity
_dwthe initial angular acceleration
_ddpthe initial linear acceleration

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

◆ setForce()

bool BaseLinkNewtonEuler::setForce ( const yarp::sig::Vector &  _F)
virtual

Set the OneLink force: either the corresponding iDynLink force, or the one declared as member in the child classes derived from OneLink, such as SensorLink.

Parameters
_Fa (3x1) vector of forces
Returns
true if size is correct, false otherwise

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 904 of file iDynInv.cpp.

◆ setLinAcc()

bool BaseLinkNewtonEuler::setLinAcc ( const yarp::sig::Vector &  _ddp)
virtual

Set the OneLink linear acceleration (ddp), ie the corresponding iDynLink linear acceleration (ddp) (in the child classes derived from OneLink, it depends)

Parameters
_ddplinear acceleration

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 971 of file iDynInv.cpp.

◆ setLinAccC()

bool BaseLinkNewtonEuler::setLinAccC ( const yarp::sig::Vector &  _ddpC)
virtual

Set the OneLink linear acceleration of the COM (ddpC), ie the corresponding iDynLink linear acceleration of the COM (ddpC) (nothing in the child classes derived from OneLink, except for SensorLink)

Parameters
_ddpClinear acceleration of the COM

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 987 of file iDynInv.cpp.

◆ setMoment()

bool BaseLinkNewtonEuler::setMoment ( const yarp::sig::Vector &  _Mu)
virtual

Set the OneLink moment: either the corresponding iDynLink moment, or the one declared as member in the child classes derived from OneLink, such as SensorLink.

Parameters
_Mua 3x1 vector of moments
Returns
true if size is correct, false otherwise

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 920 of file iDynInv.cpp.

◆ setTorque()

void BaseLinkNewtonEuler::setTorque ( const double  _Tau)
virtual

Set the OneLink torque, ie the corresponding iDynLink joint torque (nothing in the child classes derived from OneLink, such as SensorLink)

Parameters
_Taua real torque value

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 937 of file iDynInv.cpp.

◆ toString()

string BaseLinkNewtonEuler::toString ( ) const
virtual

Useful to print some information.

Reimplemented from iCub::iDyn::OneLinkNewtonEuler.

Definition at line 852 of file iDynInv.cpp.

Member Data Documentation

◆ ddp

yarp::sig::Vector iCub::iDyn::BaseLinkNewtonEuler::ddp
protected

initial linear acceleration

Definition at line 499 of file iDynInv.h.

◆ dw

yarp::sig::Vector iCub::iDyn::BaseLinkNewtonEuler::dw
protected

initial angular acceleration

Definition at line 497 of file iDynInv.h.

◆ eye3x3

const yarp::sig::Matrix iCub::iDyn::BaseLinkNewtonEuler::eye3x3
protected

Definition at line 512 of file iDynInv.h.

◆ F

yarp::sig::Vector iCub::iDyn::BaseLinkNewtonEuler::F
protected

initial force

Definition at line 503 of file iDynInv.h.

◆ H0

yarp::sig::Matrix iCub::iDyn::BaseLinkNewtonEuler::H0
protected

base roto-traslation (if necessary)

Definition at line 501 of file iDynInv.h.

◆ Mu

yarp::sig::Vector iCub::iDyn::BaseLinkNewtonEuler::Mu
protected

initial moment

Definition at line 505 of file iDynInv.h.

◆ Mu0

yarp::sig::Vector iCub::iDyn::BaseLinkNewtonEuler::Mu0
protected

initial moment

Definition at line 507 of file iDynInv.h.

◆ Tau

double iCub::iDyn::BaseLinkNewtonEuler::Tau
protected

corresponding torque

Definition at line 509 of file iDynInv.h.

◆ w

yarp::sig::Vector iCub::iDyn::BaseLinkNewtonEuler::w
protected

initial angular velocity

Definition at line 495 of file iDynInv.h.

◆ zeros3

const yarp::sig::Vector iCub::iDyn::BaseLinkNewtonEuler::zeros3
protected

Definition at line 514 of file iDynInv.h.

◆ zeros3x3

const yarp::sig::Matrix iCub::iDyn::BaseLinkNewtonEuler::zeros3x3
protected

Definition at line 513 of file iDynInv.h.


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