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

A class for computing forces and torques in a iDynChain. More...

#include <iDynInv.h>

Public Member Functions

 OneChainNewtonEuler (iDyn::iDynChain *_c, std::string _info, const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::NO_VERBOSE)
 Constructor (note: without FT sensor) More...
 
 ~OneChainNewtonEuler ()
 Standard destructor. More...
 
std::string toString () const
 Useful to print some information. More...
 
bool getVelAccAfterForward (unsigned int i, yarp::sig::Vector &w, yarp::sig::Vector &dw, yarp::sig::Vector &dwM, yarp::sig::Vector &ddp, yarp::sig::Vector &ddpC) const
 Useful to debug, getting the intermediate computations after the forward phase. More...
 
bool getWrenchAfterForward (unsigned int i, yarp::sig::Vector &F, yarp::sig::Vector &Mu) const
 Useful to debug, getting the intermediate computations after the forward phase. More...
 
void getVelAccBase (yarp::sig::Vector &w, yarp::sig::Vector &dw, yarp::sig::Vector &ddp) const
 This method is used by iDynChain to retrieve kinematic information for connection with one or more iDynLimb, through iDynNode. More...
 
void getVelAccEnd (yarp::sig::Vector &w, yarp::sig::Vector &dw, yarp::sig::Vector &ddp) const
 This method is used by iDynChain to retrieve kinematic information for connection with one or more iDynLimb, through iDynNode. More...
 
void getWrenchBase (yarp::sig::Vector &F, yarp::sig::Vector &Mu) const
 This method is used by iDynChain to retrieve wrench information for connection with one or more iDynLimb, through iDynNode. More...
 
void getWrenchEnd (yarp::sig::Vector &F, yarp::sig::Vector &Mu) const
 This method is used by iDynChain to retrieve wrench information for connection with one or more iDynLimb, through iDynNode. More...
 
void setVerbose (unsigned int verb=iCub::skinDynLib::VERBOSE)
 
void setMode (const NewEulMode _mode)
 
void setInfo (const std::string _info)
 
bool initKinematicBase (const yarp::sig::Vector &w0, const yarp::sig::Vector &dw0, const yarp::sig::Vector &ddp0)
 [classic] Initialize the base with measured or known kinematics variables More...
 
bool initKinematicEnd (const yarp::sig::Vector &w0, const yarp::sig::Vector &dw0, const yarp::sig::Vector &ddp0)
 [inverse] Initialize the end-effector finalLink with measured or known kinematics variables More...
 
bool initWrenchEnd (const yarp::sig::Vector &F0, const yarp::sig::Vector &Mu0)
 [classic] Initialize the end-effector finalLink with measured or known wrench More...
 
bool initWrenchBase (const yarp::sig::Vector &F0, const yarp::sig::Vector &Mu0)
 [inverse] Initialize the base with measured or known wrench More...
 
std::string getInfo () const
 
NewEulMode getMode () const
 
void ForwardKinematicFromBase ()
 [classic/inverse] Base function for forward of classical Newton-Euler. More...
 
void ForwardKinematicFromBase (const yarp::sig::Vector &w0, const yarp::sig::Vector &dw0, const yarp::sig::Vector &ddp0)
 [classic/inverse] Forward of classical Newton-Euler, after initializing the base link More...
 
void BackwardKinematicFromEnd ()
 [inverse] Base function for forward of classical Newton-Euler. More...
 
void BackwardKinematicFromEnd (const yarp::sig::Vector &we, const yarp::sig::Vector &dwe, const yarp::sig::Vector &ddpe)
 [inverse] Forward of classical Newton-Euler, after initializing the base link More...
 
void BackwardWrenchFromEnd ()
 [classic] Base function for backward of classical Newton-Euler. More...
 
void BackwardWrenchFromEnd (const yarp::sig::Vector &F, const yarp::sig::Vector &Mu)
 [classic] Backward of classical Newton-Euler, after initializing the final link More...
 
void computeTorques ()
 Computes all the torques in the chain, assuming that all the internal wrenches have been already computed. More...
 
void ForwardWrenchFromBase ()
 [inverse] Base function for inverse Newton-Euler: from the i-th link to the end, forward of forces and moments using the inverse formula More...
 
void ForwardWrenchFromBase (const yarp::sig::Vector &F, const yarp::sig::Vector &Mu)
 [inverse] Base function for inverse Newton-Euler: from the i-th link to the base, backward of forces and moments using the classical formula More...
 
bool ForwardWrenchToEnd (unsigned int lSens)
 [inverse] Base function for inverse Newton-Euler: from the i-th link to the end, forward of forces and moments using the inverse formula More...
 
bool BackwardWrenchToBase (unsigned int lSens)
 [classic/inverse] Base function for inverse Newton-Euler: from the i-th link to the base, backward of forces and moments using the classical formula More...
 
bool ForwardWrenchFromAtoB (unsigned int lA, unsigned int lB)
 Base function for inverse Newton-Euler: from the lA-th link to the lB-th, forward of forces and moments using the inverse formula; lA < lB. More...
 
bool BackwardWrenchFromAtoB (unsigned int lA, unsigned int lB)
 Base function for inverse Newton-Euler: from the lA-th link to the lB-th, backward of forces and moments; lA > lB. More...
 

Protected Attributes

iDyn::iDynChainchain
 the real kinematic/dynamic chain of the robot More...
 
OneLinkNewtonEuler ** neChain
 the chain of links/frames for Newton-Euler computations More...
 
unsigned int nLinks
 number of links More...
 
unsigned int nEndEff
 the index of the end-effector in the chain (the last frame) More...
 
NewEulMode mode
 static/dynamic/dynamicWrotor More...
 
std::string info
 info or useful notes More...
 
unsigned int verbose
 verbosity flag More...
 

Friends

class iDynChain
 

Detailed Description

A class for computing forces and torques in a iDynChain.

Definition at line 881 of file iDynInv.h.

Constructor & Destructor Documentation

◆ OneChainNewtonEuler()

OneChainNewtonEuler::OneChainNewtonEuler ( iDyn::iDynChain _c,
std::string  _info,
const NewEulMode  _mode = DYNAMIC,
unsigned int  verb = iCub::skinDynLib::NO_VERBOSE 
)

Constructor (note: without FT sensor)

Definition at line 1673 of file iDynInv.cpp.

◆ ~OneChainNewtonEuler()

OneChainNewtonEuler::~OneChainNewtonEuler ( )

Standard destructor.

Definition at line 1713 of file iDynInv.cpp.

Member Function Documentation

◆ BackwardKinematicFromEnd() [1/2]

void OneChainNewtonEuler::BackwardKinematicFromEnd ( )

[inverse] Base function for forward of classical Newton-Euler.

Definition at line 1867 of file iDynInv.cpp.

◆ BackwardKinematicFromEnd() [2/2]

void iCub::iDyn::OneChainNewtonEuler::BackwardKinematicFromEnd ( const yarp::sig::Vector &  we,
const yarp::sig::Vector &  dwe,
const yarp::sig::Vector &  ddpe 
)

[inverse] Forward of classical Newton-Euler, after initializing the base link

◆ BackwardWrenchFromAtoB()

bool OneChainNewtonEuler::BackwardWrenchFromAtoB ( unsigned int  lA,
unsigned int  lB 
)

Base function for inverse Newton-Euler: from the lA-th link to the lB-th, backward of forces and moments; lA > lB.

Parameters
lAthe lA-th link
lBthe lB-th link
Returns
true if the operation is successful, false otherwise (eg out of range index)

Definition at line 1995 of file iDynInv.cpp.

◆ BackwardWrenchFromEnd() [1/2]

void OneChainNewtonEuler::BackwardWrenchFromEnd ( )

[classic] Base function for backward of classical Newton-Euler.

Definition at line 1883 of file iDynInv.cpp.

◆ BackwardWrenchFromEnd() [2/2]

void iCub::iDyn::OneChainNewtonEuler::BackwardWrenchFromEnd ( const yarp::sig::Vector &  F,
const yarp::sig::Vector &  Mu 
)

[classic] Backward of classical Newton-Euler, after initializing the final link

◆ BackwardWrenchToBase()

bool OneChainNewtonEuler::BackwardWrenchToBase ( unsigned int  lSens)

[classic/inverse] Base function for inverse Newton-Euler: from the i-th link to the base, backward of forces and moments using the classical formula

Parameters
lSensthe i-th link, where the sensor is attached to
Returns
true if the operation is successful, false otherwise (eg out of range index)

Definition at line 1947 of file iDynInv.cpp.

◆ computeTorques()

void OneChainNewtonEuler::computeTorques ( )

Computes all the torques in the chain, assuming that all the internal wrenches have been already computed.

Definition at line 1892 of file iDynInv.cpp.

◆ ForwardKinematicFromBase() [1/2]

void OneChainNewtonEuler::ForwardKinematicFromBase ( )

[classic/inverse] Base function for forward of classical Newton-Euler.

Definition at line 1851 of file iDynInv.cpp.

◆ ForwardKinematicFromBase() [2/2]

void iCub::iDyn::OneChainNewtonEuler::ForwardKinematicFromBase ( const yarp::sig::Vector &  w0,
const yarp::sig::Vector &  dw0,
const yarp::sig::Vector &  ddp0 
)

[classic/inverse] Forward of classical Newton-Euler, after initializing the base link

◆ ForwardWrenchFromAtoB()

bool OneChainNewtonEuler::ForwardWrenchFromAtoB ( unsigned int  lA,
unsigned int  lB 
)

Base function for inverse Newton-Euler: from the lA-th link to the lB-th, forward of forces and moments using the inverse formula; lA < lB.

Parameters
lAthe lA-th link
lBthe lB-th link
Returns
true if the operation is successful, false otherwise (eg out of range index)

Definition at line 1976 of file iDynInv.cpp.

◆ ForwardWrenchFromBase() [1/2]

void OneChainNewtonEuler::ForwardWrenchFromBase ( )

[inverse] Base function for inverse Newton-Euler: from the i-th link to the end, forward of forces and moments using the inverse formula

Definition at line 1908 of file iDynInv.cpp.

◆ ForwardWrenchFromBase() [2/2]

void iCub::iDyn::OneChainNewtonEuler::ForwardWrenchFromBase ( const yarp::sig::Vector &  F,
const yarp::sig::Vector &  Mu 
)

[inverse] Base function for inverse Newton-Euler: from the i-th link to the base, backward of forces and moments using the classical formula

Parameters
lSensthe i-th link, where the sensor is attached to
Returns
true if the operation is successful, false otherwise (eg out of range index)

◆ ForwardWrenchToEnd()

bool OneChainNewtonEuler::ForwardWrenchToEnd ( unsigned int  lSens)

[inverse] Base function for inverse Newton-Euler: from the i-th link to the end, forward of forces and moments using the inverse formula

Parameters
lSensthe i-th link, where the sensor is attached to
Returns
true if the operation is successful, false otherwise (eg out of range index)

Definition at line 1926 of file iDynInv.cpp.

◆ getInfo()

string OneChainNewtonEuler::getInfo ( ) const
Returns
information about the chain

Definition at line 1843 of file iDynInv.cpp.

◆ getMode()

NewEulMode OneChainNewtonEuler::getMode ( ) const
Returns
the computational mode: static/dynamic/etc

Definition at line 1844 of file iDynInv.cpp.

◆ getVelAccAfterForward()

bool OneChainNewtonEuler::getVelAccAfterForward ( unsigned int  i,
yarp::sig::Vector &  w,
yarp::sig::Vector &  dw,
yarp::sig::Vector &  dwM,
yarp::sig::Vector &  ddp,
yarp::sig::Vector &  ddpC 
) const

Useful to debug, getting the intermediate computations after the forward phase.

Definition at line 1732 of file iDynInv.cpp.

◆ getVelAccBase()

void OneChainNewtonEuler::getVelAccBase ( yarp::sig::Vector &  w,
yarp::sig::Vector &  dw,
yarp::sig::Vector &  ddp 
) const

This method is used by iDynChain to retrieve kinematic information for connection with one or more iDynLimb, through iDynNode.

Definition at line 1767 of file iDynInv.cpp.

◆ getVelAccEnd()

void OneChainNewtonEuler::getVelAccEnd ( yarp::sig::Vector &  w,
yarp::sig::Vector &  dw,
yarp::sig::Vector &  ddp 
) const

This method is used by iDynChain to retrieve kinematic information for connection with one or more iDynLimb, through iDynNode.

Definition at line 1774 of file iDynInv.cpp.

◆ getWrenchAfterForward()

bool OneChainNewtonEuler::getWrenchAfterForward ( unsigned int  i,
yarp::sig::Vector &  F,
yarp::sig::Vector &  Mu 
) const

Useful to debug, getting the intermediate computations after the forward phase.

Definition at line 1751 of file iDynInv.cpp.

◆ getWrenchBase()

void OneChainNewtonEuler::getWrenchBase ( yarp::sig::Vector &  F,
yarp::sig::Vector &  Mu 
) const

This method is used by iDynChain to retrieve wrench information for connection with one or more iDynLimb, through iDynNode.

Definition at line 1781 of file iDynInv.cpp.

◆ getWrenchEnd()

void OneChainNewtonEuler::getWrenchEnd ( yarp::sig::Vector &  F,
yarp::sig::Vector &  Mu 
) const

This method is used by iDynChain to retrieve wrench information for connection with one or more iDynLimb, through iDynNode.

Definition at line 1787 of file iDynInv.cpp.

◆ initKinematicBase()

bool OneChainNewtonEuler::initKinematicBase ( const yarp::sig::Vector &  w0,
const yarp::sig::Vector &  dw0,
const yarp::sig::Vector &  ddp0 
)

[classic] Initialize the base with measured or known kinematics variables

Parameters
w0angular velocity
dw0angular acceleration
ddp0linear acceleration
Returns
true if succeeds, false otherwise

Definition at line 1818 of file iDynInv.cpp.

◆ initKinematicEnd()

bool OneChainNewtonEuler::initKinematicEnd ( const yarp::sig::Vector &  w0,
const yarp::sig::Vector &  dw0,
const yarp::sig::Vector &  ddp0 
)

[inverse] Initialize the end-effector finalLink with measured or known kinematics variables

Parameters
w0angular velocity
dw0angular acceleration
ddp0linear acceleration
Returns
true if succeeds, false otherwise

Definition at line 1823 of file iDynInv.cpp.

◆ initWrenchBase()

bool OneChainNewtonEuler::initWrenchBase ( const yarp::sig::Vector &  F0,
const yarp::sig::Vector &  Mu0 
)

[inverse] Initialize the base with measured or known wrench

Parameters
F0force
Mu0moment
Returns
true if succeeds, false otherwise

Definition at line 1833 of file iDynInv.cpp.

◆ initWrenchEnd()

bool OneChainNewtonEuler::initWrenchEnd ( const yarp::sig::Vector &  F0,
const yarp::sig::Vector &  Mu0 
)

[classic] Initialize the end-effector finalLink with measured or known wrench

Parameters
F0force
Mu0moment
Returns
true if succeeds, false otherwise

Definition at line 1828 of file iDynInv.cpp.

◆ setInfo()

void OneChainNewtonEuler::setInfo ( const std::string  _info)

Definition at line 1813 of file iDynInv.cpp.

◆ setMode()

void OneChainNewtonEuler::setMode ( const NewEulMode  _mode)

Definition at line 1806 of file iDynInv.cpp.

◆ setVerbose()

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

Definition at line 1799 of file iDynInv.cpp.

◆ toString()

string OneChainNewtonEuler::toString ( ) const

Useful to print some information.

Definition at line 1720 of file iDynInv.cpp.

Friends And Related Function Documentation

◆ iDynChain

friend class iDynChain
friend

Definition at line 883 of file iDynInv.h.

Member Data Documentation

◆ chain

iDyn::iDynChain* iCub::iDyn::OneChainNewtonEuler::chain
protected

the real kinematic/dynamic chain of the robot

Definition at line 888 of file iDynInv.h.

◆ info

std::string iCub::iDyn::OneChainNewtonEuler::info
protected

info or useful notes

Definition at line 900 of file iDynInv.h.

◆ mode

NewEulMode iCub::iDyn::OneChainNewtonEuler::mode
protected

static/dynamic/dynamicWrotor

Definition at line 898 of file iDynInv.h.

◆ neChain

OneLinkNewtonEuler** iCub::iDyn::OneChainNewtonEuler::neChain
protected

the chain of links/frames for Newton-Euler computations

Definition at line 890 of file iDynInv.h.

◆ nEndEff

unsigned int iCub::iDyn::OneChainNewtonEuler::nEndEff
protected

the index of the end-effector in the chain (the last frame)

Definition at line 895 of file iDynInv.h.

◆ nLinks

unsigned int iCub::iDyn::OneChainNewtonEuler::nLinks
protected

number of links

Definition at line 893 of file iDynInv.h.

◆ verbose

unsigned int iCub::iDyn::OneChainNewtonEuler::verbose
protected

verbosity flag

Definition at line 902 of file iDynInv.h.


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