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

A class for computing force/moment of a sensor placed anywhere in a kinematic chain; its position in the chain is defined wrt a certain link in the chain; this class can be useful to estimate the FT measurements of the sensor. More...

#include <iDynInv.h>

+ Inheritance diagram for iCub::iDyn::iDynInvSensor:

Public Member Functions

 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()
 
 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.
 
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.
 
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.
 
std::string toString () const
 Print some information.
 
yarp::sig::Vector getSensorForce () const
 Returns the sensor estimated force.
 
yarp::sig::Vector getSensorMoment () const
 Returns the sensor estimated moment.
 
yarp::sig::Vector getSensorForceMoment () const
 Get the sensor force and moment in a single (6x1) vector.
 
yarp::sig::Matrix getH () const
 Get the sensor roto-translational matrix defining its position/orientation wrt the link.
 
double getMass () const
 Get the mass of the portion of link defined between sensor and i-th frame.
 
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.
 
yarp::sig::Matrix getInertia () const
 Get the inertia of the portion of link defined between sensor and i-th frame.
 
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.
 
std::string getInfo () const
 
std::string getSensorInfo () const
 
unsigned int getSensorLink () const
 
yarp::sig::Vector getTorques () const
 
virtual ~iDynInvSensor ()
 

Protected Attributes

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

Friends

class iFTransformation
 

Detailed Description

A class for computing force/moment of a sensor placed anywhere in a kinematic chain; its position in the chain is defined wrt a certain link in the chain; this class can be useful to estimate the FT measurements of the sensor.

Definition at line 1222 of file iDynInv.h.

Constructor & Destructor Documentation

◆ iDynInvSensor() [1/2]

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()

Parameters
_ca pointer to the iDynChain where the sensor is placed on
_infoa string with information
_modethe analysis mode (STATIC/DYNAMIC)
verbflag for verbosity

Definition at line 2025 of file iDynInv.cpp.

◆ iDynInvSensor() [2/2]

iCub::iDyn::iDynInvSensor::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.

Parameters
_ca pointer to the iDynChain where the sensor is placed on
ithe i-th link to whom the sensor is attached
_Hthe roto-traslational matrix from the reference frame of the i-th link to the sensor
_HCthe roto-traslational matrix of the center of mass of the semi-link defined by the sensor in the i-th link
_mthe mass of the semi-link
_Ithe inertia of the semi-link
_infoa string with information
_modethe analysis mode (STATIC/DYNAMIC)
verbflag for verbosity

◆ ~iDynInvSensor()

iDynInvSensor::~iDynInvSensor ( )
virtual

Definition at line 2047 of file iDynInv.cpp.

Member Function Documentation

◆ computeSensorForceMoment()

void iDynInvSensor::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.

Definition at line 2102 of file iDynInv.cpp.

◆ getCOM()

Matrix iDynInvSensor::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.

Returns
a (4x4) matrix

Definition at line 2223 of file iDynInv.cpp.

◆ getH()

Matrix iDynInvSensor::getH ( ) const

Get the sensor roto-translational matrix defining its position/orientation wrt the link.

Returns
a (4x4) matrix

Definition at line 2197 of file iDynInv.cpp.

◆ getInertia()

Matrix iDynInvSensor::getInertia ( ) const

Get the inertia of the portion of link defined between sensor and i-th frame.

Returns
a (3x3) matrix, inertia of the semi-link

Definition at line 2240 of file iDynInv.cpp.

◆ getInfo()

string iDynInvSensor::getInfo ( ) const

Definition at line 2195 of file iDynInv.cpp.

◆ getMass()

double iDynInvSensor::getMass ( ) const

Get the mass of the portion of link defined between sensor and i-th frame.

Returns
the mass of the semi-link

Definition at line 2210 of file iDynInv.cpp.

◆ getSensorForce()

Vector iDynInvSensor::getSensorForce ( ) const

Returns the sensor estimated force.

Returns
the force at the sensor frame

Definition at line 2118 of file iDynInv.cpp.

◆ getSensorForceMoment()

Vector iDynInvSensor::getSensorForceMoment ( ) const

Get the sensor force and moment in a single (6x1) vector.

Returns
a (6x1) vector where 0:2=force 3:5=moment

Definition at line 2265 of file iDynInv.cpp.

◆ getSensorInfo()

string iDynInvSensor::getSensorInfo ( ) const

Definition at line 2253 of file iDynInv.cpp.

◆ getSensorLink()

unsigned int iDynInvSensor::getSensorLink ( ) const

Definition at line 2277 of file iDynInv.cpp.

◆ getSensorMoment()

Vector iDynInvSensor::getSensorMoment ( ) const

Returns the sensor estimated moment.

Returns
the moment at the sensor frame

Definition at line 2130 of file iDynInv.cpp.

◆ getTorques()

Vector iDynInvSensor::getTorques ( ) const

Definition at line 2142 of file iDynInv.cpp.

◆ setDynamicParameters()

bool iDynInvSensor::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.

Parameters
_mis the semi-link mass
_HCis the rototranslation matrix from the link frame to the center of mass
_Iis the Inertia matrix
Returns
true if operation is successful (ie matrices size is correct, and the sensor is defined), false otherwise

Definition at line 2175 of file iDynInv.cpp.

◆ setInfo()

void iDynInvSensor::setInfo ( const std::string &  _info)

Definition at line 2165 of file iDynInv.cpp.

◆ setMode()

void iDynInvSensor::setMode ( const NewEulMode  _mode = DYNAMIC)

Definition at line 2153 of file iDynInv.cpp.

◆ setSensor() [1/2]

bool iCub::iDyn::iDynInvSensor::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.

Parameters
ithe i-th link to whom the sensor is attached
_Hthe roto-traslational matrix from the reference frame of the i-th link to the sensor
_HCthe roto-traslational matrix of the center of mass of the semi-link defined by the sensor in the i-th link
_mthe mass of the semi-link
_Ithe inertia of the semi-link
Returns
true if the operation is successful, false otherwise (eg if index is out of range)

◆ setSensor() [2/2]

bool iDynInvSensor::setSensor ( unsigned int  i,
SensorLinkNewtonEuler sensor 
)

Definition at line 2090 of file iDynInv.cpp.

◆ setSensorInfo()

void iDynInvSensor::setSensorInfo ( const std::string &  _info)

Definition at line 2170 of file iDynInv.cpp.

◆ setVerbose()

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

Definition at line 2159 of file iDynInv.cpp.

◆ toString()

string iDynInvSensor::toString ( ) const

Print some information.

Definition at line 2057 of file iDynInv.cpp.

Friends And Related Symbol Documentation

◆ iFTransformation

friend class iFTransformation
friend

Definition at line 1224 of file iDynInv.h.

Member Data Documentation

◆ chain

iDynChain* iCub::iDyn::iDynInvSensor::chain
protected

the iDynChain describing the robotic chain

Definition at line 1232 of file iDynInv.h.

◆ info

std::string iCub::iDyn::iDynInvSensor::info
protected

a string with useful information if needed

Definition at line 1238 of file iDynInv.h.

◆ lSens

unsigned int iCub::iDyn::iDynInvSensor::lSens
protected

the link where the sensor is attached to

Definition at line 1228 of file iDynInv.h.

◆ mode

NewEulMode iCub::iDyn::iDynInvSensor::mode
protected

static/dynamic/etc..

Definition at line 1234 of file iDynInv.h.

◆ sens

SensorLinkNewtonEuler* iCub::iDyn::iDynInvSensor::sens
protected

the sensor

Definition at line 1230 of file iDynInv.h.

◆ verbose

unsigned int iCub::iDyn::iDynInvSensor::verbose
protected

verbosity flag

Definition at line 1236 of file iDynInv.h.


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