iCub-main
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
iCub::iDyn::iCubWholeBody Class Reference

A class for connecting UpperTorso and LowerTorso of the iCub, then getting the WholeBody in the dynamic framework. More...

#include <iDynBody.h>

Public Member Functions

 iCubWholeBody (version_tag _tag, const NewEulMode mode=DYNAMIC, unsigned int verbose=iCub::skinDynLib::VERBOSE)
 Constructor: build the nodes and creates the whole body.
 
 ~iCubWholeBody ()
 Standard destructor.
 
void attachLowerTorso (const yarp::sig::Vector &FM_right_leg, const yarp::sig::Vector &FM_left_leg)
 Connect upper and lower torso: this procedure handles the exchange of kinematic and wrench variables between the two parts.
 
bool computeCOM ()
 Performs the computation of the center of mass (COM) of the whole iCub.
 
bool getCOM (iCub::skinDynLib::BodyPart which_part, yarp::sig::Vector &COM, double &mass)
 Retrieves the result of the last COM computation.
 
bool getAllVelocities (yarp::sig::Vector &vel)
 Retrieves a vector containing the velocities of all the iCub joints, ordered in this way: left leg (6), right leg (6), torso (3), left arm (7), right arm (7), head (3).
 
bool getAllPositions (yarp::sig::Vector &pos)
 Retrieves a vector containing the anglular position of all the iCub joints, ordered in this way: left leg (6), right leg (6), torso (3), left arm (7), right arm (7), head (3).
 
bool EXPERIMENTAL_getCOMjacobian (iCub::skinDynLib::BodyPart which_part, yarp::sig::Matrix &jac)
 Retrieves the result of the last COM jacobian computation.
 
bool EXPERIMENTAL_computeCOMjacobian ()
 Performs the computation of the center of mass jacobian of the whole iCub.
 
bool EXPERIMENTAL_getCOMvelocity (iCub::skinDynLib::BodyPart which_part, yarp::sig::Vector &vel, yarp::sig::Vector &dq)
 Retrieves a 3x1 vector containing the velocity of the robot COM.
 

Public Attributes

iCubUpperTorsoupperTorso
 pointer to UpperTorso = head + right arm + left arm
 
iCubLowerTorsolowerTorso
 pointer to LowerTorso = torso + right leg + left leg
 
double whole_mass
 masses and position of the center of mass of the iCub sub-parts
 
double lower_mass
 
double upper_mass
 
yarp::sig::Vector whole_COM
 
yarp::sig::Vector upper_COM
 
yarp::sig::Vector lower_COM
 
yarp::sig::Matrix COM_Jacob
 
double sw_getcom
 

Protected Attributes

RigidBodyTransformationrbt
 the rigid body transformation linking the UpperTorso node with the final link of the iCubTorsoDyn chain, defining the connection between Upper and Lower Torso
 
version_tag tag
 

Detailed Description

A class for connecting UpperTorso and LowerTorso of the iCub, then getting the WholeBody in the dynamic framework.

It is merely a container: pointers to upper and lower torso objects are accessible, so all public methods of the two objects can be used.

Definition at line 1471 of file iDynBody.h.

Constructor & Destructor Documentation

◆ iCubWholeBody()

iCubWholeBody::iCubWholeBody ( version_tag  _tag,
const NewEulMode  mode = DYNAMIC,
unsigned int  verbose = iCub::skinDynLib::VERBOSE 
)

Constructor: build the nodes and creates the whole body.

Parameters
modethe computation mode: DYNAMIC/STATIC/DYNAMIC_W_ROTOR/DYNAMIC_CORIOLIS_GRAVITY
verbosethe verbosity level: NO_VERBOSE/VERBOSE/MORE_VERBOSE

Definition at line 2400 of file iDynBody.cpp.

◆ ~iCubWholeBody()

iCubWholeBody::~iCubWholeBody ( )

Standard destructor.

Definition at line 2414 of file iDynBody.cpp.

Member Function Documentation

◆ attachLowerTorso()

void iCubWholeBody::attachLowerTorso ( const yarp::sig::Vector &  FM_right_leg,
const yarp::sig::Vector &  FM_left_leg 
)

Connect upper and lower torso: this procedure handles the exchange of kinematic and wrench variables between the two parts.

Definition at line 2421 of file iDynBody.cpp.

◆ computeCOM()

bool iCubWholeBody::computeCOM ( )

Performs the computation of the center of mass (COM) of the whole iCub.

Returns
true if succeeds, false otherwise

Definition at line 2473 of file iDynBody.cpp.

◆ EXPERIMENTAL_computeCOMjacobian()

bool iCubWholeBody::EXPERIMENTAL_computeCOMjacobian ( )

Performs the computation of the center of mass jacobian of the whole iCub.

Returns
true if succeeds, false otherwise

Definition at line 2675 of file iDynBody.cpp.

◆ EXPERIMENTAL_getCOMjacobian()

bool iCubWholeBody::EXPERIMENTAL_getCOMjacobian ( iCub::skinDynLib::BodyPart  which_part,
yarp::sig::Matrix &  jac 
)

Retrieves the result of the last COM jacobian computation.

Parameters
jacthe jacobian matrix
Returns
true if succeeds, false otherwise

Definition at line 2746 of file iDynBody.cpp.

◆ EXPERIMENTAL_getCOMvelocity()

bool iCubWholeBody::EXPERIMENTAL_getCOMvelocity ( iCub::skinDynLib::BodyPart  which_part,
yarp::sig::Vector &  vel,
yarp::sig::Vector &  dq 
)

Retrieves a 3x1 vector containing the velocity of the robot COM.

Parameters
velthe velocity vector
Returns
true if succeeds, false otherwise

Definition at line 3016 of file iDynBody.cpp.

◆ getAllPositions()

bool iCubWholeBody::getAllPositions ( yarp::sig::Vector &  pos)

Retrieves a vector containing the anglular position of all the iCub joints, ordered in this way: left leg (6), right leg (6), torso (3), left arm (7), right arm (7), head (3).

Parameters
posthe position vector (size = 32)
Returns
true if succeeds, false otherwise

Definition at line 2607 of file iDynBody.cpp.

◆ getAllVelocities()

bool iCubWholeBody::getAllVelocities ( yarp::sig::Vector &  vel)

Retrieves a vector containing the velocities of all the iCub joints, ordered in this way: left leg (6), right leg (6), torso (3), left arm (7), right arm (7), head (3).

Parameters
velthe velocities vector (size = 32)
Returns
true if succeeds, false otherwise

Definition at line 2629 of file iDynBody.cpp.

◆ getCOM()

bool iCubWholeBody::getCOM ( iCub::skinDynLib::BodyPart  which_part,
yarp::sig::Vector &  COM,
double &  mass 
)

Retrieves the result of the last COM computation.

Parameters
which_partselects the result (e.g: LEFT_LEG, RIGHT_ARM, ALL, etc..)
COMthe computed COM of the selected part
massthe computed mass of the selected part
Returns
true if succeeds, false otherwise

Definition at line 2511 of file iDynBody.cpp.

Member Data Documentation

◆ COM_Jacob

yarp::sig::Matrix iCub::iDyn::iCubWholeBody::COM_Jacob

Definition at line 1493 of file iDynBody.h.

◆ lower_COM

yarp::sig::Vector iCub::iDyn::iCubWholeBody::lower_COM

Definition at line 1492 of file iDynBody.h.

◆ lower_mass

double iCub::iDyn::iCubWholeBody::lower_mass

Definition at line 1488 of file iDynBody.h.

◆ lowerTorso

iCubLowerTorso* iCub::iDyn::iCubWholeBody::lowerTorso

pointer to LowerTorso = torso + right leg + left leg

Definition at line 1484 of file iDynBody.h.

◆ rbt

RigidBodyTransformation* iCub::iDyn::iCubWholeBody::rbt
protected

the rigid body transformation linking the UpperTorso node with the final link of the iCubTorsoDyn chain, defining the connection between Upper and Lower Torso

Definition at line 1476 of file iDynBody.h.

◆ sw_getcom

double iCub::iDyn::iCubWholeBody::sw_getcom

Definition at line 1494 of file iDynBody.h.

◆ tag

version_tag iCub::iDyn::iCubWholeBody::tag
protected

Definition at line 1477 of file iDynBody.h.

◆ upper_COM

yarp::sig::Vector iCub::iDyn::iCubWholeBody::upper_COM

Definition at line 1491 of file iDynBody.h.

◆ upper_mass

double iCub::iDyn::iCubWholeBody::upper_mass

Definition at line 1489 of file iDynBody.h.

◆ upperTorso

iCubUpperTorso* iCub::iDyn::iCubWholeBody::upperTorso

pointer to UpperTorso = head + right arm + left arm

Definition at line 1482 of file iDynBody.h.

◆ whole_COM

yarp::sig::Vector iCub::iDyn::iCubWholeBody::whole_COM

Definition at line 1490 of file iDynBody.h.

◆ whole_mass

double iCub::iDyn::iCubWholeBody::whole_mass

masses and position of the center of mass of the iCub sub-parts

Definition at line 1487 of file iDynBody.h.


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