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>
|
| 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 () |
|
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.
◆ iDynInvSensor() [1/2]
Constructor without FT sensor: the sensor must be set with setSensor()
- Parameters
-
_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.
◆ 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
-
_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 |
◆ ~iDynInvSensor()
iDynInvSensor::~iDynInvSensor |
( |
| ) |
|
|
virtual |
◆ 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 |
◆ 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 |
◆ getSensorLink()
unsigned int iDynInvSensor::getSensorLink |
( |
| ) |
const |
◆ 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 |
◆ 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
-
_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 |
- 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 | ) |
|
◆ setMode()
◆ 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
-
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 |
- Returns
- true if the operation is successful, false otherwise (eg if index is out of range)
◆ setSensor() [2/2]
◆ setSensorInfo()
void iDynInvSensor::setSensorInfo |
( |
const std::string & |
_info | ) |
|
◆ setVerbose()
◆ toString()
string iDynInvSensor::toString |
( |
| ) |
const |
◆ iFTransformation
◆ chain
◆ 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
◆ sens
◆ verbose
unsigned int iCub::iDyn::iDynInvSensor::verbose |
|
protected |
The documentation for this class was generated from the following files:
- icub-main/src/libraries/iDyn/include/iCub/iDyn/iDynInv.h
- icub-main/src/libraries/iDyn/src/iDynInv.cpp