A type of gripper that we define some particular optimizations for. More...
#include <mcGrip.h>
Public Member Functions | |
void | getJointDisplacementMatrix (Matrix **J) |
Gets a diagonal matrix containing joint displacements in this pose. | |
double | getJointRadius () const |
Returns the construction paramters joint radius. | |
double | getLinkLength () const |
Returns the construction paramters link length. | |
void | getRoutingMatrices (Matrix **B, Matrix **a) |
Computes the full routing matrices that relate construction parameters to joint torques. | |
int | jointTorqueEquilibrium () |
Checks for joint equilibrium in the current pose. | |
virtual int | loadFromXml (const TiXmlElement *root, QString rootPath) |
Disables passive tendon force application. | |
McGrip (World *w, const char *name) | |
Sets some fixed construction parameters and initializes grasp to the specialized class. | |
Private Member Functions | |
void | assembleTorqueMatrices (int refJointNum, int thisJointNum, int nextJointNum, double tx, double ty, double theta, double theta_n, Matrix &B, Matrix &a) |
Computes the contribution of insertion points from a given link on a given joint. | |
Private Attributes | |
double | mJointRadius |
Construction paramter, for now fixed and hard-coded in the constructor. | |
double | mLinkLength |
Construction paramter, for now fixed and hard-coded in the constructor. |
A type of gripper that we define some particular optimizations for.
This is a simple two-fingered gripper that we use as a testbed for some optimization methods. We assume some very specific tendon actuation methods and parameters that we optimize for. This class can compute some of the relationships involved in this optimization, such as the relationship between tendon forces and joint torques.
For example, we assume a relationship of the form tau = f * (B*l + a) where f is tendon force, l is a vector of tendon routing parameters and B and a depend on the current values of the joints. This class can compute and return B and a.
For any joint i, the torque tau_i will depend on the tendon routing and joint angles at both joint i and joint i+1. The relationship is of the form
tau_i = a_i + b_i * l_i + c_i * l_i+1
where a_i, b_i, and c_i depend on the joint values (at joint i and i+1) and l_i and l_i+1 are the tendon routing parameters at the same joints. See notes for math details.
Some of this maybe should (and will) end up in a DOF subclass.
For now, this inherits from the HumanHand class so that we can use the explicit tendon framework that is encapsulated in that class for comparisons. That tendon framework probably need to make it into its own DOF subclass at some point as well.
Definition at line 67 of file mcGrip.h.
McGrip::McGrip | ( | World * | w, | |
const char * | name | |||
) |
Sets some fixed construction parameters and initializes grasp to the specialized class.
Also sets the construction parameters which for now are fixed and hard-coded in.
Initializes instance of Grap class to the specialized version McGripGrasp
Definition at line 39 of file mcGrip.cpp.
void McGrip::assembleTorqueMatrices | ( | int | refJointNum, | |
int | thisJointNum, | |||
int | nextJointNum, | |||
double | tx, | |||
double | ty, | |||
double | theta, | |||
double | theta_n, | |||
Matrix & | B, | |||
Matrix & | a | |||
) | [private] |
Computes the contribution of insertion points from a given link on a given joint.
Definition at line 74 of file mcGrip.cpp.
void McGrip::getJointDisplacementMatrix | ( | Matrix ** | J | ) |
Gets a diagonal matrix containing joint displacements in this pose.
Definition at line 307 of file mcGrip.cpp.
double McGrip::getJointRadius | ( | ) | const [inline] |
double McGrip::getLinkLength | ( | ) | const [inline] |
Computes the full routing matrices that relate construction parameters to joint torques.
The overall matrices B and a relate hand construction parameters and tendon force to joint torques:
(B [l r d]^t + a) * f = tau
By definition, the matrix of unknowns is thus
[l0 l1 l2 l3 l4 l5 r d]^T
This takes into account the influence of all insertion points on *all* joints that come before them (like a Jacobian for example).
The contribution of each individual insertion point on all joints is computed in the reference system of the link that the insertion point is on, and considered on all proximal joints. The contributions are computed separately, in the assembleTorqueMatrices(...) function.
With the current assumptions, it turns out that only l_i influences the torque at joint i, not any l_j with j > i. Therefore, the part of the B matrix that corresponds to the l entries is diagonal.
Definition at line 170 of file mcGrip.cpp.
int McGrip::jointTorqueEquilibrium | ( | ) |
Checks for joint equilibrium in the current pose.
Definition at line 240 of file mcGrip.cpp.
int McGrip::loadFromXml | ( | const TiXmlElement * | root, | |
QString | rootPath | |||
) | [virtual] |
Disables passive tendon force application.
The tendons that we model here are not connected to spring-like muscles and we assume there is no passive force.
Reimplemented from HumanHand.
Definition at line 52 of file mcGrip.cpp.
double McGrip::mJointRadius [private] |
double McGrip::mLinkLength [private] |