iCub-main
Public Member Functions | List of all members
iCub::iDyn::iDynSensorLeg Class Reference

A class for computing joint force/moment/torque of an iCub leg (left/right) given the FT measurements of the sensor placed in the middle of the leg. More...

#include <iDynInv.h>

+ Inheritance diagram for iCub::iDyn::iDynSensorLeg:

Public Member Functions

 iDynSensorLeg (iDyn::iCubLegDyn *_c, const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::NO_VERBOSE)
 Constructor: the sensor is automatically set with "right" or "left" choice. More...
 
std::string getType () const
 
- Public Member Functions inherited from iCub::iDyn::iDynSensor
 iDynSensor (iDyn::iDynChain *_c, std::string _info, const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::NO_VERBOSE)
 Constructor without FT sensor: the sensor must be set with setSensor() More...
 
 iDynSensor (iDyn::iDynChain *_c, unsigned int i, const yarp::sig::Matrix &_H, const yarp::sig::Matrix &_HC, const double _m, const yarp::sig::Matrix &_I, std::string _info, const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::NO_VERBOSE)
 Constructor with FT sensor. More...
 
bool setSensorMeasures (const yarp::sig::Vector &F, const yarp::sig::Vector &Mu)
 Set the sensor measured force and moment. More...
 
bool setSensorMeasures (const yarp::sig::Vector &FM)
 Set the sensor measured force and moment at once. More...
 
virtual bool computeFromSensorNewtonEuler (const yarp::sig::Vector &F, const yarp::sig::Vector &Mu)
 The main computation method: given the FT sensor measurements, compute forces moments and torques in the iDynChain. More...
 
virtual bool computeFromSensorNewtonEuler (const yarp::sig::Vector &FMu)
 The main computation method: given the FT sensor measurements, compute forces moments and torques in the iDynChain. More...
 
virtual void computeFromSensorNewtonEuler ()
 The main computation method: given the FT sensor measurements, compute forces moments and torques in the iDynChain. More...
 
virtual void computeWrenchFromSensorNewtonEuler ()
 The main computation method: given the FT sensor measurements, compute forces moments and torques in the iDynChain. More...
 
yarp::sig::Matrix getForces () const
 Returns the links forces as a matrix, where the i-th col is the i-th force. More...
 
yarp::sig::Matrix getMoments () const
 Returns the links moments as a matrix, where the i-th col is the i-th moment. More...
 
yarp::sig::Vector getTorques () const
 Returns the links torque as a vector. More...
 
yarp::sig::Vector getForce (const unsigned int iLink) const
 Returns the i-th link force. More...
 
yarp::sig::Vector getMoment (const unsigned int iLink) const
 Returns the i-th link moment. More...
 
double getTorque (const unsigned int iLink) const
 Returns the i-th link torque. More...
 
yarp::sig::Matrix getForcesNewtonEuler () const
 Returns the links forces as a matrix, where the i-th col is the i-th force. More...
 
yarp::sig::Matrix getMomentsNewtonEuler () const
 Returns the links moments as a matrix, where the i-th col is the i-th moment. More...
 
yarp::sig::Vector getTorquesNewtonEuler () const
 Returns the links torque as a vector. More...
 
virtual yarp::sig::Vector getForceMomentEndEff () const
 Returns the end-effector force-moment as a single (6x1) vector. More...
 
- Public Member Functions inherited from iCub::iDyn::iDynInvSensor
 iDynInvSensor (iDyn::iDynChain *_c, const std::string &_info, const NewEulMode _mode=DYNAMIC, unsigned int verb=iCub::skinDynLib::NO_VERBOSE)
 Constructor without FT sensor: the sensor must be set with setSensor() More...
 
 iDynInvSensor (iDyn::iDynChain *_c, unsigned int i, const yarp::sig::Matrix &_H, const yarp::sig::Matrix &_HC, const double _m, const yarp::sig::Matrix &_I, const std::string &_info, const NewEulMode _mode=DYNAMIC, unsigned int verb=0)
 Constructor with FT sensor. More...
 
bool setSensor (unsigned int i, const yarp::sig::Matrix &_H, const yarp::sig::Matrix &_HC, const double _m, const yarp::sig::Matrix &_I)
 Set a new sensor or new sensor properties. More...
 
bool setSensor (unsigned int i, SensorLinkNewtonEuler *sensor)
 
void computeSensorForceMoment ()
 Compute forces and moments at the sensor frame; this method calls special Forward and Backward methods of SensorLink, using Newton-Euler's formula applied in the link where the sensor is placed on; the link is automatically found, being specified by the index in the chain and the chain itself; The case of a contact (ie external force) acting in the host link is not currently implemented. More...
 
std::string toString () const
 Print some information. More...
 
yarp::sig::Vector getSensorForce () const
 Returns the sensor estimated force. More...
 
yarp::sig::Vector getSensorMoment () const
 Returns the sensor estimated moment. More...
 
yarp::sig::Vector getSensorForceMoment () const
 Get the sensor force and moment in a single (6x1) vector. More...
 
yarp::sig::Matrix getH () const
 Get the sensor roto-translational matrix defining its position/orientation wrt the link. More...
 
double getMass () const
 Get the mass of the portion of link defined between sensor and i-th frame. More...
 
yarp::sig::Matrix getCOM () const
 Get the sensor roto-traslational matrix of the center of mass of the semi-link defined by the sensor in the i-th link. More...
 
yarp::sig::Matrix getInertia () const
 Get the inertia of the portion of link defined between sensor and i-th frame. More...
 
void setMode (const NewEulMode _mode=DYNAMIC)
 
void setVerbose (unsigned int verb=iCub::skinDynLib::VERBOSE)
 
void setInfo (const std::string &_info)
 
void setSensorInfo (const std::string &_info)
 
bool setDynamicParameters (const double _m, const yarp::sig::Matrix &_HC, const yarp::sig::Matrix &_I)
 Set the dynamic parameters of the the portion of link defined between sensor and i-th frame. More...
 
std::string getInfo () const
 
std::string getSensorInfo () const
 
unsigned int getSensorLink () const
 
yarp::sig::Vector getTorques () const
 
virtual ~iDynInvSensor ()
 

Additional Inherited Members

- Protected Attributes inherited from iCub::iDyn::iDynInvSensor
unsigned int lSens
 the link where the sensor is attached to More...
 
SensorLinkNewtonEulersens
 the sensor More...
 
iDynChainchain
 the iDynChain describing the robotic chain More...
 
NewEulMode mode
 static/dynamic/etc.. More...
 
unsigned int verbose
 verbosity flag More...
 
std::string info
 a string with useful information if needed More...
 

Detailed Description

A class for computing joint force/moment/torque of an iCub leg (left/right) given the FT measurements of the sensor placed in the middle of the leg.

The sensor parameters are automatically set by chosing left or right during initialization of iCubLegDyn.

Definition at line 1815 of file iDynInv.h.

Constructor & Destructor Documentation

◆ iDynSensorLeg()

iDynSensorLeg::iDynSensorLeg ( iDyn::iCubLegDyn _c,
const NewEulMode  _mode = DYNAMIC,
unsigned int  verb = iCub::skinDynLib::NO_VERBOSE 
)

Constructor: the sensor is automatically set with "right" or "left" choice.

Parameters
_ca pointer to the iCubLegDyn where the sensor is placed on
_modethe analysis mode (static/dynamic/etc)
verbflag for verbosity

Definition at line 2787 of file iDynInv.cpp.

Member Function Documentation

◆ getType()

string iDynSensorLeg::getType ( ) const
Returns
type the leg sensor type: left/arm

Definition at line 2810 of file iDynInv.cpp.


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