Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

robot::control::kinematics::IKORFullSpaceSolver Class Reference

Inheritance diagram for robot::control::kinematics::IKORFullSpaceSolver:

Inheritance graph
[legend]
Collaboration diagram for robot::control::kinematics::IKORFullSpaceSolver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IKORFullSpaceSolver ()
virtual String className () const
virtual Object & clone () const
virtual Matrix solve (const Matrix &A_in, const Vector &b_in, array< Int > &dependentRowsEliminated)
 Computes a set of vectors gi that can be used to find solutions to Ax=b for x.

virtual bool isSameKindAs (const ReferencedObject &) const
virtual bool isSameKindAs (const Object &) const
void reference () const
bool unreference () const
const int referenceCount () const
void enableOnUnreferenceCall (bool enabled)
virtual void onUnreference () const

Protected Types

enum  Status { Unknown = 0, Restricted, Complete, NotComplete }

Protected Member Functions

 IKORFullSpaceSolver (const IKORFullSpaceSolver &c)
void reduceA (const Matrix &A, Matrix &Ared, const Vector &b, Vector &bred, const Int M, const Int N, Int &Mred, Int &Nred, base::IVector &colElim, base::IVector &rowElim, Matrix &specialg, Int &numSpecialgs)
 Reduces the A matrix.

void blockColFindX (Vector &g, const base::IVector &tackon, const Vector &block, const Vector &b, const Matrix &A, const Int Mred, const Int Nred)
 calculate a new g vector for a given square blocking pattern

void restOfSoln (const Int M, const Int N, const Int Mred, const Int Nred, Int nextToFind, Matrix &block, Matrix &g, const Vector &bred, const Matrix &Ared, const base::IVector &tackon, base::IVector &firstOK)
 Finds the remaining solution vectors after the first has been selected.

bool dependency (const Matrix &A, const base::IVector &slRow, Int Nred, Int first, Int second) const
 returns true if the given two columns and dependent (used in special-case 1 detection)

bool checkRange (const Matrix &A, const Vector &b, const Matrix &g, const base::IVector &rowElim)
 returns true if the original b is in the range of A

void rebuildgs (Matrix &g, const Int M, const Int N, const Int Mred, const Int Nred, const base::IVector &colElim, const base::IVector &rowElim, const Matrix &specialg, const Int numSpecialgs)
 rebuilds the g Matrix


Static Protected Member Functions

bool isSmall (Real a)

Protected Attributes

bool systemComplete
Status status
int _refCount
bool onUnreferenceEnabled

Static Protected Attributes

const Int NotEleminated = 0
const Int Eliminated_ZeroOrRestriction = 1
const Int RowEliminated_Dependent = 2
const Int RowEliminated_Special = 1
const Int ColEliminated_SpecialCase1 = 2
const Int ColEliminated_SpecialCase2 = 3

Detailed Description

Solver that finds the Full-space using the IKOR project method (refer to the OpenSim manual and references publications for detail)

Definition at line 41 of file IKORFullSpaceSolver.


Member Enumeration Documentation

enum robot::control::kinematics::IKORFullSpaceSolver::Status [protected]
 

Enumeration values:
Unknown 
Restricted 
Complete 
NotComplete 

Definition at line 151 of file IKORFullSpaceSolver.


Constructor & Destructor Documentation

robot::control::kinematics::IKORFullSpaceSolver::IKORFullSpaceSolver  ) 
 

Referenced by clone().

robot::control::kinematics::IKORFullSpaceSolver::IKORFullSpaceSolver const IKORFullSpaceSolver c  )  [inline, protected]
 

Definition at line 65 of file IKORFullSpaceSolver.


Member Function Documentation

void robot::control::kinematics::IKORFullSpaceSolver::blockColFindX Vector g,
const base::IVector tackon,
const Vector block,
const Vector b,
const Matrix A,
const Int  Mred,
const Int  Nred
[protected]
 

calculate a new g vector for a given square blocking pattern

bool robot::control::kinematics::IKORFullSpaceSolver::checkRange const Matrix A,
const Vector b,
const Matrix g,
const base::IVector rowElim
[protected]
 

returns true if the original b is in the range of A

virtual String robot::control::kinematics::IKORFullSpaceSolver::className  )  const [inline, virtual]
 

return the name of the object's class type. Must be defined by derived classes.

Implements base::Object.

Definition at line 46 of file IKORFullSpaceSolver.

virtual Object& robot::control::kinematics::IKORFullSpaceSolver::clone  )  const [inline, virtual]
 

Definition at line 47 of file IKORFullSpaceSolver.

References IKORFullSpaceSolver(), and NewObj.

bool robot::control::kinematics::IKORFullSpaceSolver::dependency const Matrix A,
const base::IVector slRow,
Int  Nred,
Int  first,
Int  second
const [protected]
 

returns true if the given two columns and dependent (used in special-case 1 detection)

void base::Referenced::enableOnUnreferenceCall bool  enabled  )  [inline, inherited]
 

If enabled, each call to unreference() will also call virtual method onUnreference()

Definition at line 115 of file Referenced.

References base::Referenced::onUnreferenceEnabled.

virtual bool base::Object::isSameKindAs const Object  )  const [inline, virtual, inherited]
 

Definition at line 47 of file Object.

virtual bool base::ReferencedObject::isSameKindAs const ReferencedObject  )  const [inline, virtual, inherited]
 

Definition at line 52 of file ReferencedObject.

bool robot::control::kinematics::IKORFullSpaceSolver::isSmall Real  a  )  [inline, static, protected]
 

Definition at line 77 of file IKORFullSpaceSolver.

virtual void base::Referenced::onUnreference  )  const [inline, virtual, inherited]
 

Called by unreference() if enabled via enableOnUnreferenceCall(true). Typically overridden in subclasses that wish to know about unreference() calls - for example to handle manually breaking cyclic references

Reimplemented in robot::control::ControllableAdaptor::AdaptorControlInterface, and robot::control::ControllableAdaptor.

Definition at line 121 of file Referenced.

Referenced by base::Referenced::unreference().

void robot::control::kinematics::IKORFullSpaceSolver::rebuildgs Matrix g,
const Int  M,
const Int  N,
const Int  Mred,
const Int  Nred,
const base::IVector colElim,
const base::IVector rowElim,
const Matrix specialg,
const Int  numSpecialgs
[protected]
 

rebuilds the g Matrix

adds zeros in eliminated cols and tacks on the g vectors created by special-case 1

void robot::control::kinematics::IKORFullSpaceSolver::reduceA const Matrix A,
Matrix Ared,
const Vector b,
Vector bred,
const Int  M,
const Int  N,
Int &  Mred,
Int &  Nred,
base::IVector colElim,
base::IVector rowElim,
Matrix specialg,
Int &  numSpecialgs
[protected]
 

Reduces the A matrix.

This is what IKORv2.0 had to say (below). Again; why a general solution method for Matrices is talking about work spaces, joint etc. is a little concerning!

Restricted work space motions can be identified by rows of the A which only have one nonzero element. Since the corresponding column must be present in all final joint space solutions, the appropriate joint space motion will be calculated before any redundancy resolution is performed, and the appropriate motions and joints will be removed from the work space and A respectively. Also such cases as dependent rows, and SpecialCase1 must be identified and dealt with.

void base::Referenced::reference  )  const [inline, inherited]
 

Increment the reference count by one, indicating that this object has another pointer which is referencing it.

Definition at line 65 of file Referenced.

References base::Referenced::_refCount.

const int base::Referenced::referenceCount  )  const [inline, inherited]
 

Return the number pointers currently referencing this object.

Definition at line 112 of file Referenced.

References base::Referenced::_refCount.

Referenced by robot::control::ControllableAdaptor::AdaptorControlInterface::onUnreference().

void robot::control::kinematics::IKORFullSpaceSolver::restOfSoln const Int  M,
const Int  N,
const Int  Mred,
const Int  Nred,
Int  nextToFind,
Matrix block,
Matrix g,
const Vector bred,
const Matrix Ared,
const base::IVector tackon,
base::IVector firstOK
[protected]
 

Finds the remaining solution vectors after the first has been selected.

It is recursive and thus calls itself when a valid solution is found, if this solution leads to a dead end, it will pop back to last solution and build from there. This insures that all possible combinations of blocking patterns are available, given first one, in pattern which follows the algoritm presented in the article.

virtual Matrix robot::control::kinematics::IKORFullSpaceSolver::solve const Matrix A_in,
const Vector b_in,
array< Int > &  dependentRowsEliminated
[virtual]
 

Computes a set of vectors gi that can be used to find solutions to Ax=b for x.

Parameters:
A_in NxM Matrix
b_in N-dim Vector
dependentRowsEliminated is filled out with the indices of rows of A_in that are eliminated from the computation because they are dependent (actually if Ai|bi is dependent. If only Ai is dependent but bi conflicts an exception is throw because solution is impossible)
Returns:
returns the set of vector gis as columns of a Matrix
Exceptions:
std::invalid_argument if gis can't be found for the provided A & b

Implements robot::control::kinematics::FullSpaceSolver.

bool base::Referenced::unreference  )  const [inline, inherited]
 

Decrement the reference count by one, indicating that a pointer to this object is referencing it. If the refence count goes to zero, it is assumed that this object is nolonger referenced and is automatically deleted.

Definition at line 81 of file Referenced.

References base::Referenced::_refCount, Exception, base::Referenced::onUnreference(), and base::Referenced::onUnreferenceEnabled.


Member Data Documentation

int base::Referenced::_refCount [mutable, protected, inherited]
 

Definition at line 136 of file Referenced.

Referenced by base::Referenced::reference(), base::Referenced::referenceCount(), base::Referenced::Referenced(), base::Referenced::unreference(), and base::Referenced::~Referenced().

const Int robot::control::kinematics::IKORFullSpaceSolver::ColEliminated_SpecialCase1 = 2 [static, protected]
 

Definition at line 74 of file IKORFullSpaceSolver.

const Int robot::control::kinematics::IKORFullSpaceSolver::ColEliminated_SpecialCase2 = 3 [static, protected]
 

Definition at line 75 of file IKORFullSpaceSolver.

const Int robot::control::kinematics::IKORFullSpaceSolver::Eliminated_ZeroOrRestriction = 1 [static, protected]
 

Definition at line 71 of file IKORFullSpaceSolver.

const Int robot::control::kinematics::IKORFullSpaceSolver::NotEleminated = 0 [static, protected]
 

Definition at line 70 of file IKORFullSpaceSolver.

bool base::Referenced::onUnreferenceEnabled [protected, inherited]
 

Definition at line 137 of file Referenced.

Referenced by base::Referenced::enableOnUnreferenceCall(), base::Referenced::Referenced(), and base::Referenced::unreference().

const Int robot::control::kinematics::IKORFullSpaceSolver::RowEliminated_Dependent = 2 [static, protected]
 

Definition at line 72 of file IKORFullSpaceSolver.

const Int robot::control::kinematics::IKORFullSpaceSolver::RowEliminated_Special = 1 [static, protected]
 

Definition at line 73 of file IKORFullSpaceSolver.

Status robot::control::kinematics::IKORFullSpaceSolver::status [protected]
 

Definition at line 152 of file IKORFullSpaceSolver.

bool robot::control::kinematics::IKORFullSpaceSolver::systemComplete [protected]
 

Definition at line 149 of file IKORFullSpaceSolver.


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:42:36 2004 for OpenSim by doxygen 1.3.6