A single eigengrasp direction. More...
#include <eigenGrasp.h>
Public Member Functions | |
double | dot (double *d) |
This is the main function that is used: dot the EG against another mSize-dimensional vector. | |
EigenGrasp (const EigenGrasp *orig) | |
Copy constructor. | |
EigenGrasp (int size, double e=0) | |
Initializes an empty eigengrasp of a given size. | |
void | fix (double a) |
Tells this eigengrasp that it is fixed at the given value. | |
double | getAxisValue (int i) const |
Returns the comonent of this eigengrasp along the i-th dimension. | |
void | getEigenGrasp (double *eg) const |
Returns the mSize-dimensional vector itself. | |
double | getEigenValue () const |
Gets the eigenvalue associated w. this eigengrasp; not used. | |
int | getSize () const |
double | normalize () |
Normalizes this eigengrasp to norm 1. | |
void | readFromFile (FILE *fp) |
int | readFromStream (QTextStream *stream) |
void | setAxisValue (int i, double val) |
Sets the component of this eigengrasp along the i-th dimension. | |
void | setEigenGrasp (const double *eg) |
Sets the mSize-dimensional vector itself. | |
void | setEigenValue (double e) |
Sets the eigenvalue associated w. this eigengrasp; not used. | |
void | setOnes () |
Sets this eigengrasp to the vector [1,...,1]. | |
void | unfix () |
Tells this eigengrasp that it can move freely. | |
void | writeToFile (FILE *fp) |
~EigenGrasp () | |
Public Attributes | |
double | fixedAmplitude |
If this eigengrasp is fixed, this is the value that is was fixed at. | |
bool | mFixed |
Remembers if the amplitude along this EG is fixed (no motion along this EG is allowed). | |
double | mMax |
Stores the max value along this eigengrasp that is inside the legal joint range. | |
double | mMin |
Stores the min value along this eigengrasp that is inside the legal joint range. | |
Private Attributes | |
double | mEigenValue |
The eigenvalue corresponding to this EG. Not actually used anywhere, just here if ever needed. | |
int | mSize |
Dimension of this eigengrasp. | |
double * | mVals |
The actual vector. |
A single eigengrasp direction.
An eigengrasp holds a generalized direction of motion in mSize dimensions. mSize is assumed to be the number of dofs of the robot that this is used for. It is essentially an msize-dimensional vector.
mMin and mMax store the min and max amplitudes of motion along this eigengrasp that will not take the robot outside the acceptable DOF range. They only make sense when defined relative to an ORIGIN of motion!
Definition at line 56 of file eigenGrasp.h.
EigenGrasp::EigenGrasp | ( | int | size, | |
double | e = 0 | |||
) |
Initializes an empty eigengrasp of a given size.
The eigengrasp is initialized to all 0s
Definition at line 41 of file eigenGrasp.cpp.
EigenGrasp::EigenGrasp | ( | const EigenGrasp * | orig | ) |
Copy constructor.
Definition at line 55 of file eigenGrasp.cpp.
EigenGrasp::~EigenGrasp | ( | ) |
Definition at line 66 of file eigenGrasp.cpp.
double EigenGrasp::dot | ( | double * | d | ) |
This is the main function that is used: dot the EG against another mSize-dimensional vector.
Definition at line 139 of file eigenGrasp.cpp.
void EigenGrasp::fix | ( | double | a | ) | [inline] |
Tells this eigengrasp that it is fixed at the given value.
Definition at line 113 of file eigenGrasp.h.
double EigenGrasp::getAxisValue | ( | int | i | ) | const [inline] |
Returns the comonent of this eigengrasp along the i-th dimension.
Definition at line 98 of file eigenGrasp.h.
void EigenGrasp::getEigenGrasp | ( | double * | eg | ) | const |
Returns the mSize-dimensional vector itself.
Definition at line 72 of file eigenGrasp.cpp.
double EigenGrasp::getEigenValue | ( | ) | const [inline] |
Gets the eigenvalue associated w. this eigengrasp; not used.
Definition at line 90 of file eigenGrasp.h.
int EigenGrasp::getSize | ( | ) | const [inline] |
Definition at line 82 of file eigenGrasp.h.
double EigenGrasp::normalize | ( | ) |
Normalizes this eigengrasp to norm 1.
Definition at line 86 of file eigenGrasp.cpp.
void EigenGrasp::readFromFile | ( | FILE * | fp | ) |
Definition at line 111 of file eigenGrasp.cpp.
int EigenGrasp::readFromStream | ( | QTextStream * | stream | ) |
Definition at line 123 of file eigenGrasp.cpp.
void EigenGrasp::setAxisValue | ( | int | i, | |
double | val | |||
) | [inline] |
Sets the component of this eigengrasp along the i-th dimension.
Definition at line 100 of file eigenGrasp.h.
void EigenGrasp::setEigenGrasp | ( | const double * | eg | ) |
Sets the mSize-dimensional vector itself.
Definition at line 79 of file eigenGrasp.cpp.
void EigenGrasp::setEigenValue | ( | double | e | ) | [inline] |
Sets the eigenvalue associated w. this eigengrasp; not used.
Definition at line 92 of file eigenGrasp.h.
void EigenGrasp::setOnes | ( | ) | [inline] |
Sets this eigengrasp to the vector [1,...,1].
Definition at line 95 of file eigenGrasp.h.
void EigenGrasp::unfix | ( | ) | [inline] |
Tells this eigengrasp that it can move freely.
Definition at line 115 of file eigenGrasp.h.
void EigenGrasp::writeToFile | ( | FILE * | fp | ) |
Definition at line 101 of file eigenGrasp.cpp.
double EigenGrasp::fixedAmplitude |
If this eigengrasp is fixed, this is the value that is was fixed at.
Definition at line 74 of file eigenGrasp.h.
double EigenGrasp::mEigenValue [private] |
The eigenvalue corresponding to this EG. Not actually used anywhere, just here if ever needed.
Definition at line 64 of file eigenGrasp.h.
bool EigenGrasp::mFixed |
Remembers if the amplitude along this EG is fixed (no motion along this EG is allowed).
Definition at line 72 of file eigenGrasp.h.
double EigenGrasp::mMax |
Stores the max value along this eigengrasp that is inside the legal joint range.
Definition at line 70 of file eigenGrasp.h.
double EigenGrasp::mMin |
Stores the min value along this eigengrasp that is inside the legal joint range.
Definition at line 68 of file eigenGrasp.h.
int EigenGrasp::mSize [private] |
Dimension of this eigengrasp.
Definition at line 60 of file eigenGrasp.h.
double* EigenGrasp::mVals [private] |
The actual vector.
Definition at line 62 of file eigenGrasp.h.