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

A base class for computing forces and torques in a serial link chain. More...

#include <iDynInv.h>

+ Inheritance diagram for iCub::iDyn::OneLinkNewtonEuler:

Public Member Functions

 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 setAsBase (const yarp::sig::Vector &_w, const yarp::sig::Vector &_dw, const yarp::sig::Vector &_ddp)
 Virtual method to set the frame as the base one: this is useful to initialize the forward phase of Newton-Euler's method. More...
 
virtual bool setAsBase (const yarp::sig::Vector &_F, const yarp::sig::Vector &_Mu)
 
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...
 
virtual std::string toString () const
 Useful to print some information. 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::Vector & getAngVel () const
 
virtual const yarp::sig::Vector & getAngAcc () const
 
virtual const yarp::sig::Vector & getAngAccM () const
 
virtual const yarp::sig::Vector & getLinAcc () const
 
virtual const yarp::sig::Vector & getLinAccC () const
 
virtual const yarp::sig::Vector & getForce () const
 
virtual const yarp::sig::Vector & getMoment (bool isBase=false) const
 
virtual double getTorque () const
 
virtual double getIm () const
 
virtual double getFs () const
 
virtual double getFv () const
 
virtual double getD2q () const
 
virtual double getDq () const
 
virtual double getKr () const
 
virtual double getMass () const
 
virtual const yarp::sig::Matrix & getInertia () const
 
virtual const yarp::sig::Matrix & getH ()
 
virtual const yarp::sig::Matrix & getR ()
 
virtual const yarp::sig::Matrix & getRC ()
 
virtual const yarp::sig::Vector & getr (bool proj=false)
 
virtual const yarp::sig::Vector & getrC (bool proj=false)
 
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 Member Functions

virtual 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...
 
virtual 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...
 
virtual 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...
 
virtual 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...
 
virtual 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...
 
virtual 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...
 
virtual 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...
 
virtual 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...
 
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...
 

Protected Attributes

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...
 

Detailed Description

A base class for computing forces and torques in a serial link chain.

Definition at line 95 of file iDynInv.h.

Constructor & Destructor Documentation

◆ OneLinkNewtonEuler() [1/2]

OneLinkNewtonEuler::OneLinkNewtonEuler ( iDyn::iDynLink dlink = NULL)

Default constructor.

Definition at line 46 of file iDynInv.cpp.

◆ OneLinkNewtonEuler() [2/2]

OneLinkNewtonEuler::OneLinkNewtonEuler ( const NewEulMode  _mode,
unsigned int  verb = iCub::skinDynLib::NO_VERBOSE,
iDyn::iDynLink dlink = NULL 
)

Constructor, with initialization of some data.

Definition at line 56 of file iDynInv.cpp.

◆ ~OneLinkNewtonEuler()

virtual iCub::iDyn::OneLinkNewtonEuler::~OneLinkNewtonEuler ( )
inlinevirtual

Destructor.

Definition at line 267 of file iDynInv.h.

Member Function Documentation

◆ BackwardKinematics()

void OneLinkNewtonEuler::BackwardKinematics ( OneLinkNewtonEuler prev)

[Backward Kinematic computation] Compute w, dw, ddp, ddpC, dwM

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 729 of file iDynInv.cpp.

◆ BackwardWrench()

void OneLinkNewtonEuler::BackwardWrench ( OneLinkNewtonEuler next)

[Backward Newton-Euler] Compute F, Mu, Tau

Parameters
nextthe OneLinkNewtonEuler class of the following link

Definition at line 737 of file iDynInv.cpp.

◆ computeAngAcc()

void OneLinkNewtonEuler::computeAngAcc ( OneLinkNewtonEuler prev)
protected

[Forward Newton-Euler] compute angular acceleration of the link

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 428 of file iDynInv.cpp.

◆ computeAngAccBackward()

void OneLinkNewtonEuler::computeAngAccBackward ( OneLinkNewtonEuler prev)
protected

[Forward Newton-Euler] compute angular acceleration of the previous link frame

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 460 of file iDynInv.cpp.

◆ computeAngAccM()

void OneLinkNewtonEuler::computeAngAccM ( OneLinkNewtonEuler prev)
protected

[Forward Newton-Euler] compute angular acceleration of the rotor

Parameters
prevthe OneLinkNewtonEuler class of the previous link
Returns
dwM

Definition at line 563 of file iDynInv.cpp.

◆ computeAngVel()

void OneLinkNewtonEuler::computeAngVel ( OneLinkNewtonEuler prev)
protected

[Forward Newton-Euler] compute angular velocity of the link

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 388 of file iDynInv.cpp.

◆ computeAngVelBackward()

void OneLinkNewtonEuler::computeAngVelBackward ( OneLinkNewtonEuler prev)
protected

[Forward Newton-Euler] compute angular velocity of the previous link frame

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 408 of file iDynInv.cpp.

◆ computeForceBackward()

void OneLinkNewtonEuler::computeForceBackward ( OneLinkNewtonEuler next)
protected

[Backward Newton-Euler] compute force from the following link

Parameters
nextthe OneLinkNewtonEuler class of the following link

Definition at line 581 of file iDynInv.cpp.

◆ computeForceForward()

void OneLinkNewtonEuler::computeForceForward ( OneLinkNewtonEuler prev)
protected

[Inverse Newton-Euler] compute force from the previous link

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 588 of file iDynInv.cpp.

◆ computeLinAcc()

void OneLinkNewtonEuler::computeLinAcc ( OneLinkNewtonEuler prev)
protected

[Forward Newton-Euler] compute linear acceleration of the reference frame of the link

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 492 of file iDynInv.cpp.

◆ computeLinAccBackward()

void OneLinkNewtonEuler::computeLinAccBackward ( OneLinkNewtonEuler prev)
protected

[Forward Newton-Euler] compute linear acceleration of the reference frame of the previous link

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 517 of file iDynInv.cpp.

◆ computeLinAccC()

void OneLinkNewtonEuler::computeLinAccC ( )
protected

[Forward Newton-Euler] compute linear acceleration of the center of mass

Returns
ddpC

Definition at line 542 of file iDynInv.cpp.

◆ computeMomentBackward()

void OneLinkNewtonEuler::computeMomentBackward ( OneLinkNewtonEuler next)
protected

[Backward Newton-Euler] compute moment from the following link

Parameters
nextthe OneLinkNewtonEuler class of the following link

Definition at line 596 of file iDynInv.cpp.

◆ computeMomentForward()

void OneLinkNewtonEuler::computeMomentForward ( OneLinkNewtonEuler prev)
protected

[Inverse Newton-Euler] compute moment from the previous link

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 642 of file iDynInv.cpp.

◆ computeTorque()

void OneLinkNewtonEuler::computeTorque ( OneLinkNewtonEuler prev)
virtual

[all] Compute joint torque; moment must be pre-computed

Parameters
nextthe OneLinkNewtonEuler class of the following link

Definition at line 698 of file iDynInv.cpp.

◆ ForwardKinematics()

void OneLinkNewtonEuler::ForwardKinematics ( OneLinkNewtonEuler prev)

[Forward Newton-Euler] Compute w, dw, ddp, ddpC, dwM

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 720 of file iDynInv.cpp.

◆ ForwardWrench()

void OneLinkNewtonEuler::ForwardWrench ( OneLinkNewtonEuler prev)

[Inverse Newton-Euler] Compute F, Mu, Tau

Parameters
prevthe OneLinkNewtonEuler class of the previous link

Definition at line 743 of file iDynInv.cpp.

◆ getAngAcc()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 340 of file iDynInv.cpp.

◆ getAngAccM()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 342 of file iDynInv.cpp.

◆ getAngVel()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 338 of file iDynInv.cpp.

◆ getD2q()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 364 of file iDynInv.cpp.

◆ getDq()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 366 of file iDynInv.cpp.

◆ getForce()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 348 of file iDynInv.cpp.

◆ getFs()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 370 of file iDynInv.cpp.

◆ getFv()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 372 of file iDynInv.cpp.

◆ getH()

const Matrix & OneLinkNewtonEuler::getH ( )
virtual
Returns
H = (4x4) the Denavit-Hartenberg roto-translational matrix describing the link

Reimplemented in iCub::iDyn::FinalLinkNewtonEuler.

Definition at line 356 of file iDynInv.cpp.

◆ getIm()

double OneLinkNewtonEuler::getIm ( ) const
virtual

◆ getInertia()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 376 of file iDynInv.cpp.

◆ getInfo()

string OneLinkNewtonEuler::getInfo ( ) const
Returns
the info string

Definition at line 354 of file iDynInv.cpp.

◆ getKr()

double OneLinkNewtonEuler::getKr ( ) const
virtual

◆ getLinAcc()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 344 of file iDynInv.cpp.

◆ getLinAccC()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 346 of file iDynInv.cpp.

◆ getMass()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 374 of file iDynInv.cpp.

◆ getMode()

NewEulMode OneLinkNewtonEuler::getMode ( ) const
Returns
the operation mode (static, dynamic etc)

Definition at line 334 of file iDynInv.cpp.

◆ getMoment()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 350 of file iDynInv.cpp.

◆ getR()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 358 of file iDynInv.cpp.

◆ getr()

const Vector & OneLinkNewtonEuler::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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 378 of file iDynInv.cpp.

◆ getRC()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 360 of file iDynInv.cpp.

◆ getrC()

const Vector & OneLinkNewtonEuler::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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 380 of file iDynInv.cpp.

◆ getTorque()

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

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 352 of file iDynInv.cpp.

◆ getZM()

Vector OneLinkNewtonEuler::getZM ( ) const
Returns
zM vector (3x1)

Definition at line 336 of file iDynInv.cpp.

◆ setAngAcc()

bool OneLinkNewtonEuler::setAngAcc ( const yarp::sig::Vector &  _dw)
protectedvirtual

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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 196 of file iDynInv.cpp.

◆ setAngAccM()

bool OneLinkNewtonEuler::setAngAccM ( const yarp::sig::Vector &  _dwM)
protectedvirtual

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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 241 of file iDynInv.cpp.

◆ setAngVel()

bool OneLinkNewtonEuler::setAngVel ( const yarp::sig::Vector &  _w)
protectedvirtual

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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 181 of file iDynInv.cpp.

◆ setAsBase() [1/2]

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

◆ setAsBase() [2/2]

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

Virtual method to set the frame as the base one: this is useful to initialize the forward phase of Newton-Euler's method.

The BaseLink class is used to this scope.

Reimplemented in iCub::iDyn::BaseLinkNewtonEuler.

◆ setAsFinal() [1/2]

virtual bool iCub::iDyn::OneLinkNewtonEuler::setAsFinal ( const yarp::sig::Vector &  _F,
const yarp::sig::Vector &  _Mu 
)
virtual

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.

Parameters
_Fthe final force
_Muthe final moment

Reimplemented in iCub::iDyn::FinalLinkNewtonEuler.

◆ setAsFinal() [2/2]

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

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.

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

Reimplemented in iCub::iDyn::FinalLinkNewtonEuler.

◆ setForce()

bool OneLinkNewtonEuler::setForce ( const yarp::sig::Vector &  _F)
protectedvirtual

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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 146 of file iDynInv.cpp.

◆ setInfo()

void OneLinkNewtonEuler::setInfo ( const std::string &  _info)

Set some information about this OneLink class.

Parameters
_infoa string

Definition at line 256 of file iDynInv.cpp.

◆ setLinAcc()

bool OneLinkNewtonEuler::setLinAcc ( const yarp::sig::Vector &  _ddp)
protectedvirtual

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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 211 of file iDynInv.cpp.

◆ setLinAccC()

bool OneLinkNewtonEuler::setLinAccC ( const yarp::sig::Vector &  _ddpC)
protectedvirtual

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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 226 of file iDynInv.cpp.

◆ setMeasuredFMu()

bool OneLinkNewtonEuler::setMeasuredFMu ( const yarp::sig::Vector &  _F,
const yarp::sig::Vector &  _Mu 
)
virtual

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.

Parameters
_Fthe sensor force
_Muthe sensor moment

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler.

Definition at line 261 of file iDynInv.cpp.

◆ setMeasuredTorque()

bool OneLinkNewtonEuler::setMeasuredTorque ( const double  _Tau)
virtual

Set measured torque in a joint torque sensor frame

Parameters
_Tauthe sensor torque

Definition at line 286 of file iDynInv.cpp.

◆ setMode()

void OneLinkNewtonEuler::setMode ( const NewEulMode  _mode)

Set the operation mode (static,dynamic etc)

Parameters
_modethe NewEulMode defining the type of operations

Definition at line 122 of file iDynInv.cpp.

◆ setMoment()

bool OneLinkNewtonEuler::setMoment ( const yarp::sig::Vector &  _Mu)
protectedvirtual

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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 161 of file iDynInv.cpp.

◆ setTorque()

void OneLinkNewtonEuler::setTorque ( const double  _Tau)
protectedvirtual

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 in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 176 of file iDynInv.cpp.

◆ setVerbose()

void OneLinkNewtonEuler::setVerbose ( unsigned int  verb = iCub::skinDynLib::VERBOSE)

Set the verbosity level of comments during operations.

Parameters
verb,aboolean flag

Definition at line 117 of file iDynInv.cpp.

◆ setZM()

bool OneLinkNewtonEuler::setZM ( const yarp::sig::Vector &  _zm)

Set the zM vector.

Parameters
_zma (3x1) vector zM
Returns
true if size is correct, false otherwise

Definition at line 127 of file iDynInv.cpp.

◆ toString()

string OneLinkNewtonEuler::toString ( ) const
virtual

Useful to print some information.

Reimplemented in iCub::iDyn::SensorLinkNewtonEuler, iCub::iDyn::FinalLinkNewtonEuler, and iCub::iDyn::BaseLinkNewtonEuler.

Definition at line 301 of file iDynInv.cpp.

◆ zero()

void OneLinkNewtonEuler::zero ( void  )

Set everything to zero; R is set to an identity matrix.

Definition at line 66 of file iDynInv.cpp.

Member Data Documentation

◆ info

std::string iCub::iDyn::OneLinkNewtonEuler::info
protected

info or useful notes

Definition at line 102 of file iDynInv.h.

◆ link

iDyn::iDynLink* iCub::iDyn::OneLinkNewtonEuler::link
protected

the corresponding iDynLink

Definition at line 110 of file iDynInv.h.

◆ mode

NewEulMode iCub::iDyn::OneLinkNewtonEuler::mode
protected

STATIC/DYNAMIC/DYNAMIC_W_ROTOR/DYNAMIC_CORIOLIS_GRAVITY.

Definition at line 100 of file iDynInv.h.

◆ verbose

unsigned int iCub::iDyn::OneLinkNewtonEuler::verbose
protected

verbosity flag

Definition at line 104 of file iDynInv.h.

◆ z0

yarp::sig::Vector iCub::iDyn::OneLinkNewtonEuler::z0
protected

z0=[0 0 1]'

Definition at line 106 of file iDynInv.h.

◆ zm

yarp::sig::Vector iCub::iDyn::OneLinkNewtonEuler::zm
protected

z^{i-1}_{m_{i}} versor rotating solidally with link i, projected in frame i ==>> constant

Definition at line 108 of file iDynInv.h.


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