iCub-main
|
Classes for force/torque computation in a dynamic chain, where a single FT sensor is placed. More...
Classes | |
class | iCub::iDyn::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. More... | |
class | iCub::iDyn::iDynInvSensorArm |
A class for computing force/moment of the FT sensor placed in the middle of the iCub's left or right arm. More... | |
class | iCub::iDyn::iDynInvSensorArmNoTorso |
A class for computing force/moment of the FT sensor placed in the middle of the iCub's left or right arm. More... | |
class | iCub::iDyn::iDynInvSensorLeg |
A class for computing force/moment of the FT sensor placed in the middle of the iCub's left or right leg. More... | |
class | iCub::iDyn::iDynSensor |
A class for computing forces and torques in a iDynChain, when a force/torque sensor is placed in the middle of the kinematic chain and it is the only available sensor for measuring forces and moments; the sensor position in the chain must be set; the computation of joint forces, moments and torques is performed by an Inverse Newton-Euler method. More... | |
class | iCub::iDyn::iDynSensorArm |
A class for computing joint force/moment/torque of an iCub arm (left/right) given the FT measurements of the sensor placed in the middle of the arm. More... | |
class | iCub::iDyn::iDynSensorArmNoTorso |
A class for computing joint force/moment/torque of an iCub arm (left/right) given the FT measurements of the sensor placed in the middle of the arm. More... | |
class | iCub::iDyn::iDynSensorLeg |
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... | |
Classes for force/torque computation in a dynamic chain, where a single FT sensor is placed.
Using Newton-Euler formula it is possible to compute an estimate of the FT sensor measurements. iDynInvSensor is the generic class which takes a iDynChain, sets a generic sensor attached to the chain, and manages the proper computations. iDynInvSensorArm and iDynInvSensorLeg are specific classes performing computations for iCub arms and legs: by choosing left/right part, they automatically set the proper FT sensor parameters. Given single FT sensor measurements it is also possible to compute link/joint force/moment/torque. As iDynInvSensor, iDynSensor attachs a FT sensor into a iDynChain; exploiting the sensor force/moment measurements, and applying the inverse formula of Newton-Euler recursive algorithm, it is possible to compute joint torques given single FT measurements. The dynamical parameters necessary to the algorithm are read automatically from the iDynChain (consisting of iDynLinks), whereas the FT sensor must be set from iDynSensor constructor.
Windows
Set a iDynInvSensor for iCub's left arm, with force/moment computation in the static case (STATIC), and verbose (VERBOSE==1) output:
iCubArmDyn *arm = new iCubArmDyn("left");
iDynInvSensorArm armWSensorSolver = new iDynInvSensorArm(arm,STATIC,VERBOSE);
Note that by setting the arm as "left", the sensor is automatically set as the left sensor of the arm. Then start retrieving the sensor force/moment. First the chain must be updated with the current angle configuration:
arm->setAng(q);
arm->setDAng(dq);
arm->setD2Ang(ddq);
Then the arm dynamics must be solved, in order to find each links' force/moment, etc:
arm->computeNewtonEuler(w0,dw0,d2p0,Fend,Mend);
Finally we can compute the sensor force and moment, attaching the sensor to its link (whose force/moment have been previously computed):
armWSensorSolver->computeSensorForceMoment();
The sensor force/moment can be retrieved separately (3x1 vectors) or together (6x1 vector).
Vector F = armWSensorSolver->getSensorForce();
Vector Mu = armWSensorSolver->getSensorMoment();
Vector FMu = armWSensorSolver->getSensorForceMoment();
Set a iDynSensor for iCub's left arm, with force/moment computation in the static case (STATIC), and verbose (VERBOSE==1) output:
iCubArmDyn *arm = new iCubArmDyn("left");
iDynSensorArm armWSensorSolver = new iDynSensorArm(arm,STATIC,VERBOSE);
Note that by setting the arm as "left", the sensor is automatically set as the left sensor of the arm. The chain must be updated with the current angle configuration, and the sensor measurements must be put into two (3x1) vectors or one (6x1).
arm->setAng(q);
Vector FM = measureFromSensor();
Vector F = measureForceFromSensor();
Vector M = measureMomentFromSensor();
In both cases, we can give the compute method our measurements:
armWSensorSolver->computeFromSensorNewtonEuler(FM);
armWSensorSolver->computeFromSensorNewtonEuler(F,M);
The arm joints force/moment/torque can be now retrieved:
Matrix F = armWSensorSolver->getForces();
Matrix Mu = armWSensorSolver->getMoments();
Vector Tau = armWSensorSolver->getTorques();
Copyright (C) 2010 RobotCub Consortium CopyPolicy: Released under the terms of the GNU GPL v2.0.