Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::IKJReconfig< JacobianType > Class Template Reference
[InverseKinematics]

Used to calculate the inverse position solution using the active/inactive functionality. More...

#include <IKJReconfig.h>

Inheritance diagram for OSCAR::IKJReconfig< JacobianType >:

Inheritance graph
[legend]
List of all members.

Public Methods

 IKJReconfig (const JointVector &initialJointPosition, JacobianType *fkJacobian, OSCARError &err=DUMMY_ERROR(noError), EqnSolver *solver=0, double maxError=0.1, double rtScale=1000.0)
 IKJReconfig (const IKJReconfig &rhs)
virtual bool GetJointPosition (const Xform &desiredHandMatrix, JointVector &jointPosition)
virtual bool GetJointPosition (const HandPose &desiredHand, JointVector &jointPosition)
virtual bool GetJointVelocity (const HandPose &handVelocity, JointVector &jointVelocitySolution)
bool SetWeights (const Matrix &W)
void ClearWeights () const
IKJReconfig & operator= (const IKJReconfig &rhs)
virtual ~IKJReconfig ()

Protected Methods

virtual bool inverse ()
virtual void updateKinematicState (JointVector &jointPosition)
virtual double calculateErrorMagnitude (const Xform &desired, const Xform *current, HandPose &error)
bool getJointPosition (const Xform &desiredHandMatrix, JointVector &jointPosition, bool activeFlag)

Detailed Description

template<class JacobianType = FKJacobian>
class OSCAR::IKJReconfig< JacobianType >

Author:
Peter S. March & Chetan Kapoor
This class is used to calculate the inverse position solution using the active/inactive functionality provided in JointVector and HandPose. If a joint is declared Inactive, that joint will not move. If an HandPose element is declared Inactive, that coordinate will not be used in the inverse (i.e. it will be free to move). This class takes a template parameter that defines the forward position object that will be used in the internal algorithm. This object must be derived from Kinematics, FKPositionBase, and FKJacobianBase. This template parameter is defaulted to FKJacobian. An object using the default parameter can be initialized as follows:
IKJReconfig<> myIK(...);


Constructor & Destructor Documentation

template<class JacobianType = FKJacobian>
OSCAR::IKJReconfig< JacobianType >::IKJReconfig const JointVector   initialJointPosition,
JacobianType *    fkJacobian,
OSCARError   err = DUMMY_ERROR(noError),
EqnSolver   solver = 0,
double    maxError = 0.1,
double    rtScale = 1000.0
 

Constructor.

This is the constructor for an object of type IKJReconfig. Use this to create an IKJReconfig object from an FKJacobian object and an initial joint position. This class uses the Jacobian calculations from the FKJacobian class to perform a Resolved Rate inverse solution. As such, all functionality for setting and retrieving tool points and base poses should be done through the FKJacobian object. This class is also designed to use the Active/Inactive functionality present in JointVector and HandPose to perform an inverse. If a joint is declared Inactive, that joint will not move. If an HandPose element is declared Inactive, that coordinate will not be used in the inverse (i.e. it will be free to move).

Parameters:
initialJointPosition A DOF length vector of initial joint positions. This position will be used to create the object and should not be singular.
fkJacobian A pointer to a forward kinematics object. This object is a template parameter defined at object creation. It must be derived from Kinematics, FKPositionBase, and FKJacobianBase. This object will be used to generate the Jacobian used for the inverse. All necessary tool points and base poses should be set in this object. A user can supply their custom FKJacobian object for this purpose.
err An OSCARError object that on return will hold the value of any errors that were generated during the constructor call. If err is not equal to 'noError' you can call GetError() to get the details of the error code.
solver A pointer to an EqnSolver object. This parameter can be used to create custom methods for solving systems of linear equations. If not supplied, a default EqnSolver will be created.
maxError The maximum error allowed when converging on a solution. The default value is 0.1.
rtScale Used to scale orientation errors in the HandPose with translation errors. The default value is 1000. The formula used to compute maxError is: maxError = translationError + rtScale * orientationError
Exceptions:
vectorSizeMismatch vectorSizeMismatch

template<class JacobianType = FKJacobian>
OSCAR::IKJReconfig< JacobianType >::IKJReconfig const IKJReconfig< JacobianType > &    rhs
 

Copy Constructor.

This is the Copy constructor for an object of type IKJReconfig. Use this to construct an IKJReconfig object based on an existing IKJReconfig object.

Parameters:
rhs An IKJReconfig object that will be used to initialize this new object.

template<class JacobianType = FKJacobian>
virtual OSCAR::IKJReconfig< JacobianType >::~IKJReconfig   [virtual]
 

Destructor.

This is the destructor for an object of type IKJReconfig.


Member Function Documentation

template<class JacobianType = FKJacobian>
virtual double OSCAR::IKJReconfig< JacobianType >::calculateErrorMagnitude const Xform   desired,
const Xform   current,
HandPose   error
[protected, virtual]
 

Reimplemented from OSCAR::IKJacobian< JacobianType >.

template<class JacobianType = FKJacobian>
void OSCAR::IKJReconfig< JacobianType >::ClearWeights   const
 

Clear the Weighting Matrix.

This method is used to clear the internal Weighting matrix.

See also:
bool RedundantWithWeights(const Matrix& A, Vector& x, const Vector& b)

template<class JacobianType = FKJacobian>
bool OSCAR::IKJReconfig< JacobianType >::getJointPosition const Xform   desiredHandMatrix,
JointVector   jointPosition,
bool    activeFlag
[protected]
 

template<class JacobianType = FKJacobian>
virtual bool OSCAR::IKJReconfig< JacobianType >::GetJointPosition const HandPose   desiredHand,
JointVector   jointPosition
[virtual]
 

Get the current joint position for an end-effector position represented by an HandPose object.

This method is used to get the current joint position for an end-effector position represented by an HandPose object. Both the inputs (joints) and the ouputs (EEposition) can be set to Active-Inactive in this method. If a joint is declared Inactive, that joint will not move. If an HandPose element is declared Inactive, that coordinate will not be used in the inverse and will be free to move.

Parameters:
desiredHand A handpose vector representing the desired end-effector position. The Active-Inactive status of individual EE ouputs can be set here to perform an inverse where certain outputs are ignored.
jointPosition An nx1 vector (where n is the number of joints) The Active/Inactive status of individual joint inputs can be set here to perform an inverse where certain joints do not move.
Returns:
True if successful. Otherwise False. Call GetError() to get detailed error information.
Exceptions:
singularity singularity
minMOTReached minMOTReached
maxIterationCountReached maxIterationCountReached
vectorSizeMismatch vectorSizeMismatch
See also:
GetJointPosition(const Xform& desiredHandMatrix, JointVector& jointPosition)

GetSolutionProperties()

SetCoordinateStatus(unsigned int coordNo, RRCoordinateStatus status)

Reimplemented from OSCAR::IKJacobian< JacobianType >.

template<class JacobianType = FKJacobian>
virtual bool OSCAR::IKJReconfig< JacobianType >::GetJointPosition const Xform   desiredHandMatrix,
JointVector   jointPosition
[virtual]
 

Get the current joint position solution for an end-effector position represented by an Xform object.

This method is used to get the current joint position solution for an end-effector position represented by an Xform object. This method will assume that all of the ouputs are Active. This method will use the Active/Inactive information from jointPosition in the inverse.

Parameters:
desiredHandMatrix A transform matrix representing the desired end-effector position.
jointPosition A DOF long vector (where DOF is the number of joints or degrees of freedom). The Active/Inactive status of individual joint inputs can be set here to perform an inverse where certain joints do not move.
Returns:
True if successful. Otherwise False. Call GetError() to get detailed error information.
Exceptions:
singularity singularity
minMOTReached minMOTReached
maxIterationCountReached maxIterationCountReached
vectorSizeMismatch vectorSizeMismatch
See also:
GetJointPosition(const HandPose& desiredHand, JointVector& jointPosition)

GetSolutionProperties()

SetCoordinateStatus(unsigned int coordNo, RRCoordinateStatus status)

Reimplemented from OSCAR::IKJacobian< JacobianType >.

template<class JacobianType = FKJacobian>
virtual bool OSCAR::IKJReconfig< JacobianType >::GetJointVelocity const HandPose   handVelocity,
JointVector   jointVelocitySolution
[virtual]
 

Get the current joint velocity vector from a HandPose velocity vector.

This method is used to get the current joint velocity vector from a HandPose velocity vector. Both the inputs (joint velocities) and the ouputs (EE velocities) can be set in this method.

Parameters:
handVelocity An mx1 vector of handpose velocities. The Active/Inactive status of individual EE ouputs can be set here to perform an inverse where certain outputs are ignored.
jointVelocitySolution An nx1 vector to store the calculate joint velocities The Active/Inactive status of individual joint inputs can be set here to perform an inverse where certain joints do not move.
Returns:
True if successful. Otherwise False. Call GetError() to get detailed error information.
Exceptions:
singularity singularity
vectorSizeMismatch vectorSizeMismatch
See also:
GetJointPosition(const Xform& desiredHandMatrix, JointVector& jointPosition)

GetSolutionProperties()

Reimplemented from OSCAR::IKJacobian< JacobianType >.

Reimplemented in OSCAR::IKJAvoidLimits< JacobianType >.

template<class JacobianType = FKJacobian>
virtual bool OSCAR::IKJReconfig< JacobianType >::inverse   [protected, virtual]
 

Reimplemented from OSCAR::IKJacobian< JacobianType >.

Reimplemented in OSCAR::IKJAvoidLimits< JacobianType >.

template<class JacobianType = FKJacobian>
IKJReconfig& OSCAR::IKJReconfig< JacobianType >::operator= const IKJReconfig< JacobianType > &    rhs
 

Assignment operator.

This is the Assignment operator for an object of type IKJReconfig.

Parameters:
rhs An IKJReconfig object that goes on the right hand side of the = operator.
Returns:
A reference to the object on the left hand side of the = operator.

template<class JacobianType = FKJacobian>
bool OSCAR::IKJReconfig< JacobianType >::SetWeights const Matrix   W
 

Set the Weighting Matrix.

This method is used to set the Weighting Matrix to use in the inverse. This matrix should be nxn where n is the number of joints. Any resizing of this matrix that must be done due to Active/Inactive joints will be done internally. Once this matrix has been set, this object will always use that Weighting matrix to perform the inverse unless it is cleared using ClearWeights().

Parameters:
W A nxn matrix of weights. This matrix will be used for performing the pseudo-inverse.
Returns:
True if successful. Otherwise False. Call GetError() to get detailed error information.
See also:
bool RedundantWithWeights(const Matrix& A, Vector& x, const Vector& b)

ClearWeights()

template<class JacobianType = FKJacobian>
virtual void OSCAR::IKJReconfig< JacobianType >::updateKinematicState JointVector   jointPosition [protected, virtual]
 

Reimplemented from OSCAR::IKJacobian< JacobianType >.


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations