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

A class for connecting torso, left and right leg of the iCub, and exchanging kinematic and wrench information between limbs, when both legs have FT sensors and the torso use the kinematic and wrench information coming from UpperTorso. More...

#include <iDynBody.h>

+ Inheritance diagram for iCub::iDyn::iCubLowerTorso:

Public Member Functions

 iCubLowerTorso (version_tag _tag, const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::VERBOSE)
 Constructor.
 
 ~iCubLowerTorso ()
 Destructor.
 
- Public Member Functions inherited from iCub::iDyn::iDynSensorTorsoNode
 iDynSensorTorsoNode (const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::VERBOSE)
 Constructor.
 
 iDynSensorTorsoNode (const std::string &_info, const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::VERBOSE)
 Constructor.
 
 ~iDynSensorTorsoNode ()
 Destructor.
 
bool update ()
 Main method for solving kinematics and wrench among limbs, where information are shared.
 
bool update (const yarp::sig::Vector &FM_right, const yarp::sig::Vector &FM_left, bool afterAttach=true)
 Main method for solving kinematics and wrench among limbs, where information are shared.
 
bool update (const yarp::sig::Vector &w0, const yarp::sig::Vector &dw0, const yarp::sig::Vector &ddp0, const yarp::sig::Vector &FM_right, const yarp::sig::Vector &FM_left, const yarp::sig::Vector &FM_up)
 Main method for solving kinematics and wrench among limbs, where information are shared.
 
yarp::sig::Matrix getHLeft ()
 Return HLeft, i.e.
 
yarp::sig::Matrix getHRight ()
 Return HRight, i.e.
 
yarp::sig::Matrix getHUp ()
 Return HUp, i.e.
 
yarp::sig::Matrix getForces (const std::string &limbType)
 Return the chosen limb forces, as a 6xN matrix.
 
yarp::sig::Vector getForce (const std::string &limbType, const unsigned int iLink) const
 Return the chosen limb-link force, as a 3x1 vector.
 
yarp::sig::Matrix getMoments (const std::string &limbType)
 Return the chosen limb moments, as a 6xN matrix.
 
yarp::sig::Vector getMoment (const std::string &limbType, const unsigned int iLink) const
 Return the chosen limb-link moment, as a 3x1 vector.
 
yarp::sig::Vector getTorques (const std::string &limbType)
 Return the chosen limb torques, as a Nx1 vector.
 
double getTorque (const std::string &limbType, const unsigned int iLink) const
 Return the chosen limb-link torque, as a real value.
 
bool computeCOM ()
 Performs the computation of the center of mass (COM) of the node.
 
bool EXPERIMENTAL_computeCOMjacobian ()
 Performs the computation of the center of mass jacobian of the node.
 
yarp::sig::Vector getTorsoForce () const
 Return the torso force.
 
yarp::sig::Vector getTorsoMoment () const
 Return the torso moment.
 
yarp::sig::Vector getTorsoAngVel () const
 Return the torso angular velocity.
 
yarp::sig::Vector getTorsoAngAcc () const
 Return the torso angular acceleration.
 
yarp::sig::Vector getTorsoLinAcc () const
 Return the torso linear acceleration.
 
bool setInertialMeasure (const yarp::sig::Vector &w0, const yarp::sig::Vector &dw0, const yarp::sig::Vector &ddp0)
 Set the inertial sensor measurements on the central-up limb.
 
bool setSensorMeasurement (const yarp::sig::Vector &FM_right, const yarp::sig::Vector &FM_left)
 Set the FT sensor measurements on the sensor in right and left limb.
 
bool setSensorMeasurement (const yarp::sig::Vector &FM_right, const yarp::sig::Vector &FM_left, const yarp::sig::Vector &FM_up)
 Set the FT sensor measurements on the sensor in right and left limb.
 
yarp::sig::Vector setAng (const std::string &limbType, const yarp::sig::Vector &_q)
 Set joints angle position in the chosen limb.
 
yarp::sig::Vector getAng (const std::string &limbType)
 Get joints angle position in the chosen limb.
 
double setAng (const std::string &limbType, const unsigned int i, double _q)
 Set the i-th joint angle position in the chosen limb.
 
double getAng (const std::string &limbType, const unsigned int i)
 Get a joint angle position in the chosen limb.
 
yarp::sig::Vector setDAng (const std::string &limbType, const yarp::sig::Vector &_dq)
 Set joints angle velocity in the chosen limb.
 
yarp::sig::Vector getDAng (const std::string &limbType)
 Get joints angle velocity in the chosen limb.
 
double setDAng (const std::string &limbType, const unsigned int i, double _dq)
 Set the i-th joint angle velocity in the chosen limb.
 
double getDAng (const std::string &limbType, const unsigned int i)
 Get a joint angle velocity in the chosen limb.
 
yarp::sig::Vector setD2Ang (const std::string &limbType, const yarp::sig::Vector &_ddq)
 Set joints angle acceleration in the chosen limb.
 
yarp::sig::Vector getD2Ang (const std::string &limbType)
 Get joints angle acceleration in the chosen limb.
 
double setD2Ang (const std::string &limbType, const unsigned int i, double _ddq)
 Set the i-th joint angle acceleration in the chosen limb.
 
double getD2Ang (const std::string &limbType, const unsigned int i)
 Get a joint angle acceleration in the chosen limb.
 
unsigned int getNLinks (const std::string &limbType) const
 
yarp::sig::Matrix estimateSensorsWrench (const yarp::sig::Matrix &FM, bool afterAttach=false)
 Redefinition from iDynSensorNode.
 
void clearContactList ()
 
- Public Member Functions inherited from iCub::iDyn::iDynSensorNode
 iDynSensorNode (const NewEulMode _mode=DYNAMIC)
 Default constructor.
 
 iDynSensorNode (const std::string &_info, const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::VERBOSE)
 Constructor.
 
virtual void addLimb (iDyn::iDynLimb *limb, const yarp::sig::Matrix &H, const FlowType kinFlow=RBT_NODE_OUT, const FlowType wreFlow=RBT_NODE_IN)
 Add one limb to the node, defining its RigidBodyTransformation.
 
void addLimb (iDyn::iDynLimb *limb, const yarp::sig::Matrix &H, iDyn::iDynSensor *sensor, const FlowType kinFlow=RBT_NODE_OUT, const FlowType wreFlow=RBT_NODE_IN)
 Add one limb to the node, defining its RigidBodyTransformation and the iDynSensor used to solve it after FT sensor measurements.
 
virtual bool solveWrench ()
 Main function to manage the exchange of wrench information among the limbs attached to the node.
 
virtual bool setWrenchMeasure (const yarp::sig::Matrix &F, const yarp::sig::Matrix &M, bool afterAttach=false)
 Set the Wrench measures on the limbs attached to the node.
 
virtual bool setWrenchMeasure (const yarp::sig::Matrix &FM, bool afterAttach=false)
 Set the Wrench measures on the limbs attached to the node.
 
yarp::sig::Matrix estimateSensorsWrench (const yarp::sig::Matrix &FM, bool afterAttach=false)
 Exploit iDynInvSensor methods to retrieve FT sensor measurements after solving wrenches in the limbs.
 
- Public Member Functions inherited from iCub::iDyn::iDynNode
 iDynNode (const NewEulMode _mode=DYNAMIC)
 Default constructor.
 
 iDynNode (const std::string &_info, const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::VERBOSE)
 Constructor with parameters.
 
virtual void addLimb (iDyn::iDynLimb *limb, const yarp::sig::Matrix &H, const FlowType kinFlow=RBT_NODE_OUT, const FlowType wreFlow=RBT_NODE_IN, bool hasSensor=false)
 Add one limb to the node, defining its RigidBodyTransformation.
 
yarp::sig::Matrix getRBT (unsigned int iLimb) const
 Return the RBT matrix of a certain limb attached to the node.
 
bool solveKinematics (const yarp::sig::Vector &w0, const yarp::sig::Vector &dw0, const yarp::sig::Vector &ddp0)
 Main function to manage the exchange of kinematic information among the limbs attached to the node.
 
bool solveKinematics ()
 Main function to manage the exchange of kinematic information among the limbs attached to the node.
 
bool setKinematicMeasure (const yarp::sig::Vector &w0, const yarp::sig::Vector &dw0, const yarp::sig::Vector &ddp0)
 Set the kinematic measurement (w,dw,ddp) on the limb where the kinematic flow is of type RBT_NODE_IN.
 
bool solveWrench (const yarp::sig::Matrix &FM)
 This is to manage the exchange of wrench information among the limbs attached to the node.
 
bool solveWrench (const yarp::sig::Matrix &F, const yarp::sig::Matrix &M)
 This is to manage the exchange of wrench information among the limbs attached to the node.
 
virtual bool setWrenchMeasure (const yarp::sig::Matrix &F, const yarp::sig::Matrix &M)
 Set the wrench measure on the limbs with input wrench.
 
virtual bool setWrenchMeasure (const yarp::sig::Matrix &FM)
 Set the wrench measure on the limbs with input wrench.
 
yarp::sig::Vector getForce () const
 Return the node force.
 
yarp::sig::Vector getMoment () const
 Return the node moment.
 
yarp::sig::Vector getAngVel () const
 Return the node angular velocity.
 
yarp::sig::Vector getAngAcc () const
 Return the node angular acceleration.
 
yarp::sig::Vector getLinAcc () const
 Return the node linear acceleration.
 
yarp::sig::Matrix computeJacobian (unsigned int iChain)
 Compute the Jacobian of the limb with index iChain in the node, in its default direction (as it would be done by iKin).
 
yarp::sig::Matrix computeJacobian (unsigned int iChain, unsigned int iLink)
 Compute the Jacobian of the i-th link of the limb with index iChain in the node, in its default direction (as it would be done by iKin).
 
yarp::sig::Matrix computeJacobian (unsigned int iChainA, JacobType dirA, unsigned int iChainB, JacobType dirB)
 Compute the Jacobian between two links in two different chains.
 
yarp::sig::Matrix computeJacobian (unsigned int iChainA, JacobType dirA, unsigned int iChainB, unsigned int iLinkB, JacobType dirB)
 Compute the Jacobian between two links in two different chains.
 
yarp::sig::Vector computePose (unsigned int iChainA, JacobType dirA, unsigned int iChainB, JacobType dirB, const bool axisRep)
 Compute the Pose of the end-effector, given a "virtual" chain connecting two limbs.
 
yarp::sig::Vector computePose (unsigned int iChainA, JacobType dirA, unsigned int iChainB, unsigned int iLinkB, JacobType dirB, const bool axisRep)
 Compute the Pose of the end-effector, given a "virtual" chain connecting two limbs.
 
yarp::sig::Matrix TESTING_computeCOMJacobian (unsigned int iChain, unsigned int iLink)
 Compute the Jacobian of the COM of the i-th link of the limb with index iChain in the node.
 
yarp::sig::Matrix TESTING_computeCOMJacobian (unsigned int iChainA, JacobType dirA, unsigned int iChainB, unsigned int iLinkB, JacobType dirB)
 Compute the Jacobian of the COM of link iLinkB, in chainB, when two different chains (A and B) are connected.
 

Protected Member Functions

void build ()
 
- Protected Member Functions inherited from iCub::iDyn::iDynSensorNode
unsigned int howManySensors () const
 
- Protected Member Functions inherited from iCub::iDyn::iDynNode
void zero ()
 Reset all data to zero.
 
void compute_Pn_HAN (unsigned int iChainA, JacobType dirA, unsigned int iChainB, JacobType dirB, yarp::sig::Matrix &Pn, yarp::sig::Matrix &H_A_Node)
 Compute Pn and H_A_Node matrices given two chains.
 
void compute_Pn_HAN (unsigned int iChainA, JacobType dirA, unsigned int iChainB, unsigned int iLinkB, JacobType dirB, yarp::sig::Matrix &Pn, yarp::sig::Matrix &H_A_Node)
 Compute Pn and H_A_Node matrices given two chains.
 
void compute_Pn_HAN_COM (unsigned int iChainA, JacobType dirA, unsigned int iChainB, unsigned int iLinkB, JacobType dirB, yarp::sig::Matrix &Pn, yarp::sig::Matrix &H_A_Node)
 Compute Pn and H_A_Node matrices given two chains.
 
unsigned int howManyWrenchInputs (bool afterAttach=false) const
 Return the number of limbs with wrench input, i.e.
 
unsigned int howManyKinematicInputs (bool afterAttach=false) const
 Return the number of limbs with kinematic input, i.e.
 

Protected Attributes

version_tag tag
 Build the node.
 
- Protected Attributes inherited from iCub::iDyn::iDynSensorNode
std::deque< iDyn::iDynSensor * > sensorList
 the list of iDynSensors used to solve each limb after FT sensor measurements
 
- Protected Attributes inherited from iCub::iDyn::iDynNode
std::deque< RigidBodyTransformationrbtList
 the list of RBT
 
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 w
 angular velocity
 
yarp::sig::Vector dw
 angular acceleration
 
yarp::sig::Vector ddp
 linear acceleration
 
yarp::sig::Vector F
 force
 
yarp::sig::Vector Mu
 moment
 
yarp::sig::Vector COM
 COM position of the node.
 
double mass
 total mass of the node
 

Additional Inherited Members

- Public Attributes inherited from iCub::iDyn::iDynSensorTorsoNode
yarp::sig::Matrix HUp
 roto-translational matrix defining the central-up base frame with respect to the torso node
 
yarp::sig::Matrix HLeft
 roto-translational matrix defining the left limb base frame with respect to the torso node
 
yarp::sig::Matrix HRight
 roto-translational matrix defining the right limb base frame with respect to the torso node
 
std::string left_name
 name of left limb
 
std::string right_name
 name of right limb
 
std::string up_name
 name of central-up limb
 
std::string name
 the torso node name
 
iDyn::iDynContactSolverleftSensor
 Build the node.
 
iDyn::iDynContactSolverrightSensor
 right FT sensor and solver
 
iDyn::iDynLimbleft
 left limb
 
iDyn::iDynLimbright
 right limb
 
iDyn::iDynLimbup
 central-up limb
 
yarp::sig::Vector total_COM_UP
 COMs and masses of the limbs.
 
yarp::sig::Vector total_COM_LF
 
yarp::sig::Vector total_COM_RT
 
double total_mass_UP
 
double total_mass_LF
 
double total_mass_RT
 
yarp::sig::Matrix COM_jacob_UP
 
yarp::sig::Matrix COM_jacob_LF
 
yarp::sig::Matrix COM_jacob_RT
 

Detailed Description

A class for connecting torso, left and right leg of the iCub, and exchanging kinematic and wrench information between limbs, when both legs have FT sensors and the torso use the kinematic and wrench information coming from UpperTorso.

The correct connection bewteen UpperTorso and LowerTorso is not handled here; it is supposed that LowerTorso receives correct kinematic and wrench variables for the initialization of the kinematic and wrench phases.

Definition at line 1437 of file iDynBody.h.

Constructor & Destructor Documentation

◆ iCubLowerTorso()

iCubLowerTorso::iCubLowerTorso ( version_tag  _tag,
const NewEulMode  _mode = DYNAMIC,
unsigned int  verb = iCub::skinDynLib::VERBOSE 
)

Constructor.

Parameters
_infosome information, ie the node name
_modethe computation mode for kinematic/wrench using Newton-Euler's formula
verbverbosity flag

Definition at line 2317 of file iDynBody.cpp.

◆ ~iCubLowerTorso()

iCubLowerTorso::~iCubLowerTorso ( )

Destructor.

Definition at line 2387 of file iDynBody.cpp.

Member Function Documentation

◆ build()

void iCubLowerTorso::build ( )
protected

Definition at line 2324 of file iDynBody.cpp.

Member Data Documentation

◆ tag

version_tag iCub::iDyn::iCubLowerTorso::tag
protected

Build the node.

Definition at line 1443 of file iDynBody.h.


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