iCub-main
|
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. More...
#include <iDynInv.h>
Public Member Functions | |
BaseLinkNewtonEuler (const yarp::sig::Matrix &_H0, const NewEulMode _mode, unsigned int verb=iCub::skinDynLib::NO_VERBOSE) | |
Default constructor. | |
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. | |
bool | setAsBase (const yarp::sig::Vector &_w, const yarp::sig::Vector &_dw, const yarp::sig::Vector &_ddp) |
Sets the base data. | |
bool | setAsBase (const yarp::sig::Vector &_F, const yarp::sig::Vector &_Mu) |
Sets the base data. | |
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. | |
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. | |
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) | |
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) | |
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) | |
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) | |
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) | |
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) | |
std::string | toString () const |
Useful to print some information. | |
Public Member Functions inherited from iCub::iDyn::OneLinkNewtonEuler | |
OneLinkNewtonEuler (iDyn::iDynLink *dlink=NULL) | |
Default constructor. | |
OneLinkNewtonEuler (const NewEulMode _mode, unsigned int verb=iCub::skinDynLib::NO_VERBOSE, iDyn::iDynLink *dlink=NULL) | |
Constructor, with initialization of some data. | |
virtual | ~OneLinkNewtonEuler () |
Destructor. | |
void | zero () |
Set everything to zero; R is set to an identity matrix. | |
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. | |
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. | |
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. | |
virtual bool | setMeasuredTorque (const double _Tau) |
Set measured torque in a joint torque sensor frame | |
void | setVerbose (unsigned int verb=iCub::skinDynLib::VERBOSE) |
Set the verbosity level of comments during operations. | |
void | setMode (const NewEulMode _mode) |
Set the operation mode (static,dynamic etc) | |
bool | setZM (const yarp::sig::Vector &_zm) |
Set the zM vector. | |
void | setInfo (const std::string &_info) |
Set some information about this OneLink class. | |
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 | |
void | BackwardKinematics (OneLinkNewtonEuler *prev) |
[Backward Kinematic computation] Compute w, dw, ddp, ddpC, dwM | |
void | BackwardWrench (OneLinkNewtonEuler *next) |
[Backward Newton-Euler] Compute F, Mu, Tau | |
void | ForwardWrench (OneLinkNewtonEuler *prev) |
[Inverse Newton-Euler] Compute F, Mu, Tau | |
virtual void | computeTorque (OneLinkNewtonEuler *prev) |
[all] Compute joint torque; moment must be pre-computed | |
Protected Attributes | |
yarp::sig::Vector | w |
initial angular velocity | |
yarp::sig::Vector | dw |
initial angular acceleration | |
yarp::sig::Vector | ddp |
initial linear acceleration | |
yarp::sig::Matrix | H0 |
base roto-traslation (if necessary) | |
yarp::sig::Vector | F |
initial force | |
yarp::sig::Vector | Mu |
initial moment | |
yarp::sig::Vector | Mu0 |
initial moment | |
double | Tau |
corresponding torque | |
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. | |
std::string | info |
info or useful notes | |
unsigned int | verbose |
verbosity flag | |
yarp::sig::Vector | z0 |
z0=[0 0 1]' | |
yarp::sig::Vector | zm |
z^{i-1}_{m_{i}} versor rotating solidally with link i, projected in frame i ==>> constant | |
iDyn::iDynLink * | link |
the corresponding iDynLink | |
Additional Inherited Members | |
Protected Member Functions inherited from iCub::iDyn::OneLinkNewtonEuler | |
void | computeAngVel (OneLinkNewtonEuler *prev) |
[Forward Newton-Euler] compute angular velocity of the link | |
void | computeAngVelBackward (OneLinkNewtonEuler *prev) |
[Forward Newton-Euler] compute angular velocity of the previous link frame | |
void | computeAngAcc (OneLinkNewtonEuler *prev) |
[Forward Newton-Euler] compute angular acceleration of the link | |
void | computeAngAccBackward (OneLinkNewtonEuler *prev) |
[Forward Newton-Euler] compute angular acceleration of the previous link frame | |
void | computeLinAcc (OneLinkNewtonEuler *prev) |
[Forward Newton-Euler] compute linear acceleration of the reference frame of the link | |
void | computeLinAccBackward (OneLinkNewtonEuler *prev) |
[Forward Newton-Euler] compute linear acceleration of the reference frame of the previous link | |
void | computeLinAccC () |
[Forward Newton-Euler] compute linear acceleration of the center of mass | |
void | computeAngAccM (OneLinkNewtonEuler *prev) |
[Forward Newton-Euler] compute angular acceleration of the rotor | |
void | computeForceBackward (OneLinkNewtonEuler *next) |
[Backward Newton-Euler] compute force from the following link | |
void | computeForceForward (OneLinkNewtonEuler *prev) |
[Inverse Newton-Euler] compute force from the previous link | |
void | computeMomentBackward (OneLinkNewtonEuler *next) |
[Backward Newton-Euler] compute moment from the following link | |
void | computeMomentForward (OneLinkNewtonEuler *prev) |
[Inverse Newton-Euler] compute moment from the previous link | |
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.
iCub::iDyn::BaseLinkNewtonEuler::BaseLinkNewtonEuler | ( | const yarp::sig::Matrix & | _H0, |
const NewEulMode | _mode, | ||
unsigned int | verb = iCub::skinDynLib::NO_VERBOSE |
||
) |
Default constructor.
_H0 | the base roto-translation |
_mode | the analysis mode (static/dynamic) |
verb | flag for verbosity |
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.
_H0 | the base roto-translation |
_w | the initial angular velocity |
_dw | the initial angular acceleration |
_ddp | the initial linear acceleration |
_mode | the analysis mode (static/dynamic) |
verb | flag for verbosity |
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 875 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 877 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 873 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 896 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 897 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 883 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 894 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 895 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 893 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 900 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 898 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 879 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 881 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 899 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 884 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 891 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 901 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 892 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 902 of file iDynInv.cpp.
|
virtual |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 890 of file iDynInv.cpp.
|
virtual |
Set the OneLink angular acceleration (dw), ie the corresponding iDynLink angular acceleration (dw) (in the child classes derived from OneLink, it depends)
_dw | angular acceleration |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 955 of file iDynInv.cpp.
|
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)
_dwM | angular acceleration of the motor |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 994 of file iDynInv.cpp.
|
virtual |
Set the OneLink angular velocity (w), ie the corresponding iDynLink angular velocity (w) (in the child classes derived from OneLink, it depends)
_w | angular velocity |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 939 of file iDynInv.cpp.
|
virtual |
Sets the base data.
_F | the initial angular velocity |
_Mu | the initial angular acceleration |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
|
virtual |
Sets the base data.
_w | the initial angular velocity |
_dw | the initial angular acceleration |
_ddp | the initial linear acceleration |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
|
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.
_F | a (3x1) vector of forces |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 904 of file iDynInv.cpp.
|
virtual |
Set the OneLink linear acceleration (ddp), ie the corresponding iDynLink linear acceleration (ddp) (in the child classes derived from OneLink, it depends)
_ddp | linear acceleration |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 971 of file iDynInv.cpp.
|
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)
_ddpC | linear acceleration of the COM |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 987 of file iDynInv.cpp.
|
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.
_Mu | a 3x1 vector of moments |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 920 of file iDynInv.cpp.
|
virtual |
Set the OneLink torque, ie the corresponding iDynLink joint torque (nothing in the child classes derived from OneLink, such as SensorLink)
_Tau | a real torque value |
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 937 of file iDynInv.cpp.
|
virtual |
Useful to print some information.
Reimplemented from iCub::iDyn::OneLinkNewtonEuler.
Definition at line 852 of file iDynInv.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |