iCub-main
|
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>
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() 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 () |
Protected Attributes | |
unsigned int | lSens |
the link where the sensor is attached to More... | |
SensorLinkNewtonEuler * | sens |
the sensor More... | |
iDynChain * | chain |
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... | |
Friends | |
class | iFTransformation |
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.
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()
_c | a pointer to the iDynChain where the sensor is placed on |
_info | a string with information |
_mode | the analysis mode (STATIC/DYNAMIC) |
verb | flag for verbosity |
Definition at line 2025 of file iDynInv.cpp.
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.
_c | a pointer to the iDynChain where the sensor is placed on |
i | the i-th link to whom the sensor is attached |
_H | the roto-traslational matrix from the reference frame of the i-th link to the sensor |
_HC | the roto-traslational matrix of the center of mass of the semi-link defined by the sensor in the i-th link |
_m | the mass of the semi-link |
_I | the inertia of the semi-link |
_info | a string with information |
_mode | the analysis mode (STATIC/DYNAMIC) |
verb | flag for verbosity |
|
virtual |
Definition at line 2047 of file iDynInv.cpp.
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.
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.
Definition at line 2223 of file iDynInv.cpp.
Matrix iDynInvSensor::getH | ( | ) | const |
Get the sensor roto-translational matrix defining its position/orientation wrt the link.
Definition at line 2197 of file iDynInv.cpp.
Matrix iDynInvSensor::getInertia | ( | ) | const |
Get the inertia of the portion of link defined between sensor and i-th frame.
Definition at line 2240 of file iDynInv.cpp.
string iDynInvSensor::getInfo | ( | ) | const |
Definition at line 2195 of file iDynInv.cpp.
double iDynInvSensor::getMass | ( | ) | const |
Get the mass of the portion of link defined between sensor and i-th frame.
Definition at line 2210 of file iDynInv.cpp.
Vector iDynInvSensor::getSensorForce | ( | ) | const |
Returns the sensor estimated force.
Definition at line 2118 of file iDynInv.cpp.
Vector iDynInvSensor::getSensorForceMoment | ( | ) | const |
Get the sensor force and moment in a single (6x1) vector.
Definition at line 2265 of file iDynInv.cpp.
string iDynInvSensor::getSensorInfo | ( | ) | const |
Definition at line 2253 of file iDynInv.cpp.
unsigned int iDynInvSensor::getSensorLink | ( | ) | const |
Definition at line 2277 of file iDynInv.cpp.
Vector iDynInvSensor::getSensorMoment | ( | ) | const |
Returns the sensor estimated moment.
Definition at line 2130 of file iDynInv.cpp.
Vector iDynInvSensor::getTorques | ( | ) | const |
Definition at line 2142 of file iDynInv.cpp.
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.
_m | is the semi-link mass |
_HC | is the rototranslation matrix from the link frame to the center of mass |
_I | is the Inertia matrix |
Definition at line 2175 of file iDynInv.cpp.
void iDynInvSensor::setInfo | ( | const std::string & | _info | ) |
Definition at line 2165 of file iDynInv.cpp.
void iDynInvSensor::setMode | ( | const NewEulMode | _mode = DYNAMIC | ) |
Definition at line 2153 of file iDynInv.cpp.
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.
i | the i-th link to whom the sensor is attached |
_H | the roto-traslational matrix from the reference frame of the i-th link to the sensor |
_HC | the roto-traslational matrix of the center of mass of the semi-link defined by the sensor in the i-th link |
_m | the mass of the semi-link |
_I | the inertia of the semi-link |
bool iDynInvSensor::setSensor | ( | unsigned int | i, |
SensorLinkNewtonEuler * | sensor | ||
) |
Definition at line 2090 of file iDynInv.cpp.
void iDynInvSensor::setSensorInfo | ( | const std::string & | _info | ) |
Definition at line 2170 of file iDynInv.cpp.
void iDynInvSensor::setVerbose | ( | unsigned int | verb = iCub::skinDynLib::VERBOSE | ) |
Definition at line 2159 of file iDynInv.cpp.
string iDynInvSensor::toString | ( | ) | const |
Print some information.
Definition at line 2057 of file iDynInv.cpp.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |