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

OSCAR::GeneralKinematicsHandler Class Reference

#include <KinematicsHandler.h>

Inheritance diagram for OSCAR::GeneralKinematicsHandler:

Inheritance graph
[legend]
List of all members.

Public Methods

 GeneralKinematicsHandler (const OSCAR::DHData &dhData, const OSCAR::Vector &offsets, const OSCAR::Limits &limits, OSCAR::OSCARError &err=DUMMY_ERROR(OSCAR::noError))
virtual ~GeneralKinematicsHandler ()
virtual bool Initialize (const OSCAR::JointVector &initialJoints, OSCAR::AngleUnits angle=OSCAR::Radians)
virtual bool UpdateJointState (const OSCAR::Xform &targetHand)
virtual bool UpdateJointState (const OSCAR::HandPose &targetHand, OSCAR::AngleUnits angle=OSCAR::Radians)
virtual bool UpdateHandState (const OSCAR::JointVector &targetJoints, OSCAR::AngleUnits angle=OSCAR::Radians)
virtual bool SetTool (const OSCAR::Xform &toolPose)
virtual bool SetBase (const OSCAR::Xform &basePose)
virtual bool SetMinimumMOT (double minMOT)
virtual double GetMiniumMOT () const
virtual bool SetErrorTolerance (double maxError, double rotationErrorScale)
virtual bool GetErrorTolerance (double &positionError, double &rotationErrorScale)
virtual bool SetMaximumIterations (unsigned int noMaxIterations)
unsigned int GetMaximumIterations () const
virtual double GetSolutionProperties (void) const
bool ComputeHandVelocity (const OSCAR::JointVector &jointSpeed, OSCAR::HandPose &handSpeed)
virtual bool ComputeFK (const JointVector &inputJointPosition, Xform &handPosition, OSCAR::AngleUnits angle=Radians)
virtual bool ComputeFK (const JointVector &inputJointPosition, HandPose &handPosition, OSCAR::AngleUnits angle=Radians)
virtual bool ComputeIK (const HandPose &inputHandPosition, JointVector &jointPosition, OSCAR::AngleUnits angle=Radians, bool Interpolate=false)
virtual bool ComputeIK (const Xform &inputHandPosition, JointVector &jointPosition, OSCAR::AngleUnits angle=Radians, bool Interpolate=false)

Protected Methods

 GeneralKinematicsHandler (const GeneralKinematicsHandler &)
GeneralKinematicsHandler operator= (const GeneralKinematicsHandler &) const

Protected Attributes

OSCAR::FKJacobianfk
OSCAR::IKJacobian< > * ik

Constructor & Destructor Documentation

OSCAR::GeneralKinematicsHandler::GeneralKinematicsHandler const OSCAR::DHData   dhData,
const OSCAR::Vector   offsets,
const OSCAR::Limits   limits,
OSCAR::OSCARError   err = DUMMY_ERROR(OSCAR::noError)
 

virtual OSCAR::GeneralKinematicsHandler::~GeneralKinematicsHandler   [virtual]
 

OSCAR::GeneralKinematicsHandler::GeneralKinematicsHandler const GeneralKinematicsHandler &    [protected]
 


Member Function Documentation

virtual bool OSCAR::GeneralKinematicsHandler::ComputeFK const JointVector   inputJointPosition,
HandPose   handPosition,
OSCAR::AngleUnits    angle = Radians
[virtual]
 

Computes the forward position solution without altering the joint state or the cartesian state of the robot.

Parameters:
inputJointPosition A JointVector of size DOF for which the corresponding carteisan position is computed. This parameter is bound checked only in Debug mode (#define _DEBUG). The units of revolute joint positions should be specified in the angle parameter.
handPosition A HandPose that holds the computed hand position. Bt default, the orientation is computed in radians. The angle parameter can be used to specify the units in which the orientation should be computed.
angle Specifies whether the inputJointPosition is in Degrees or Radians. It also specifies the units in which the orientation of component of handPosition is computed. Default is Radians.
Returns:
true if no error. false if error.

Implements OSCAR::KinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::ComputeFK const JointVector   inputJointPosition,
Xform   handPosition,
OSCAR::AngleUnits    angle = Radians
[virtual]
 

Computes the forward position solution without altering the joint state or the cartesian state of the robot.

Parameters:
inputJointPosition A JointVector of size DOF for which the corresponding carteisan position is computed. This parameter is bound checked only in Debug mode (#define _DEBUG). The units of revolute joint positions should be specified in the angle parameter.
handPosition An Xform that holds the computed hand position.
angle Specifies whether the inputJointPosition is in Degrees or Radians. It also specifies the units in which the orientation of component of handPosition is computed. Default is Radians.
Returns:
true if no error. false if error.

Implements OSCAR::KinematicsHandler.

bool OSCAR::GeneralKinematicsHandler::ComputeHandVelocity const OSCAR::JointVector   jointSpeed,
OSCAR::HandPose   handSpeed
 

Use this method to compute end effector speed for a given joint speed. This method uses the current joint state of the robot in its speed calculation. Calling this method does not alter the current joint or cartesian state of the system.

Parameters:
jointSpeed A JointVector of size DOF that specifies the joint speeds. This parameter is checked for size == DOF only in Debug mode (#define _DEBUG). Rotation units for speed should be specified in Radians.
handSpeed The computed cartesian speed is returned in it. The orientation speed is expressed in FixedXYZ coordinates. The units of the orientation speed are Radians. true if successful. false if not.

virtual bool OSCAR::GeneralKinematicsHandler::ComputeIK const Xform   inputHandPosition,
JointVector   jointPosition,
OSCAR::AngleUnits    angle = Radians,
bool    Interpolate = false
[virtual]
 

Computes the inverse position solution without altering the joint state or the cartesian state of the robot.

Parameters:
inputHandPosition A HandPose for which the corresponding joint position is computed. The units in which the orientation is expressedshould be specified in the angle parameter.
jointPosition A JointVector of size DOF that holds the computed joint position. Bt default, the joint position of the revolute joints is computed in radians. The angle parameter can be used to specify the units in which the revolute joint positions should be computed. This parameter is bound checked only in Debug mode (#define _DEBUG).
angle Specifies whether the inputHandPosition orientation is in Degrees or Radians. It also specifies the units in which the revolute joint positions of are computed. Default is Radians.
interpolate Use this parameter to specify whether the IK should iterate and jog towards the inputHandPosition (from the current Hand state). This is useful if the inverse algorithm is iterative. It will not be relevant for closed form inverses. Default is false, i.e., do not interpolate. As this class implements an iterative solution, this parameter should be set to true, if inputHandPosition is significantly different from the current cartesian state.
Returns:
true if no error. false if error.

Implements OSCAR::KinematicsHandler.

Reimplemented in OSCAR::RedundantKinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::ComputeIK const HandPose   inputHandPosition,
JointVector   jointPosition,
OSCAR::AngleUnits    angle = Radians,
bool    Interpolate = false
[virtual]
 

Computes the inverse position solution without altering the joint state or the cartesian state of the robot.

Parameters:
inputHandPosition A HandPose for which the corresponding joint position is computed. The units in which the orientation is expressedshould be specified in the angle parameter.
jointPosition A JointVector of size DOF that holds the computed joint position. Bt default, the joint position of the revolute joints is computed in radians. The angle parameter can be used to specify the units in which the revolute joint positions should be computed. This parameter is bound checked only in Debug mode (#define _DEBUG).
angle Specifies whether the inputHandPosition orientation is in Degrees or Radians. It also specifies the units in which the revolute joint positions of are computed. Default is Radians.
interpolate Use this parameter to specify whether the IK should iterate and jog towards the inputHandPosition (from the current Hand state). This is useful if the inverse algorithm is iterative. It will not be relevant for closed form inverses. Default is false, i.e., do not interpolate.
Returns:
true if no error. false if error.

Implements OSCAR::KinematicsHandler.

Reimplemented in OSCAR::RedundantKinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::GetErrorTolerance double &    positionError,
double &    rotationErrorScale
[inline, virtual]
 

Reimplemented in OSCAR::RedundantKinematicsHandler.

unsigned int OSCAR::GeneralKinematicsHandler::GetMaximumIterations void    const [inline]
 

Reimplemented in OSCAR::RedundantKinematicsHandler.

virtual double OSCAR::GeneralKinematicsHandler::GetMiniumMOT   const [inline, virtual]
 

Reimplemented in OSCAR::RedundantKinematicsHandler.

virtual double OSCAR::GeneralKinematicsHandler::GetSolutionProperties void    const [inline, virtual]
 

Get the Solution Properties.

This method is used to determine the solution properties of the inverse.

Returns:
The MOT calculated in the inverse.
See also:
GetSolutionProperties(unsigned int& iteration)

GetSolutionProperties(double& errorMagnitude)

Reimplemented in OSCAR::RedundantKinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::Initialize const OSCAR::JointVector   initialJoints,
OSCAR::AngleUnits    angle = OSCAR::Radians
[virtual]
 

Sets the initial state of the object. This method should be called prior to any other calls. Use this methoid to initialize the object with the initial position of the robot. The current hand position and current joint position of the robot is accordingly updated.

Parameters:
initialJoints A JointVector object of size DOF that specifies the starting position of the robot. The revolute joints can be expressed in Degrees or Radians. The size of the initialJoints is bound checked only in debug mode (#define _DEBUG). In release mode, program will fail.
angle Specifies the units used to express the position of revolute joints in the initialJoints parameter.
Exceptions:
argumentSizeIncorrect argumentSizeIncorrect. This error is generated when the size of the input parameter initialJoints does not match the DOF defined by the dhData parameter. This error is only generated in _DEBUG mode.

Reimplemented from OSCAR::KinematicsHandler.

GeneralKinematicsHandler OSCAR::GeneralKinematicsHandler::operator= const GeneralKinematicsHandler &    const [protected]
 

virtual bool OSCAR::GeneralKinematicsHandler::SetBase const OSCAR::Xform   basePose [virtual]
 

Reimplemented from OSCAR::KinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::SetErrorTolerance double    maxError,
double    rotationErrorScale
[inline, virtual]
 

Parameters:
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.

Reimplemented in OSCAR::RedundantKinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::SetMaximumIterations unsigned int    noMaxIterations [inline, virtual]
 

Reimplemented in OSCAR::RedundantKinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::SetMinimumMOT double    minMOT [inline, virtual]
 

Reimplemented in OSCAR::RedundantKinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::SetTool const OSCAR::Xform   toolPose [virtual]
 

Reimplemented from OSCAR::KinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::UpdateHandState const OSCAR::JointVector   targetJoints,
OSCAR::AngleUnits    angle = OSCAR::Radians
[virtual]
 

child classes should implement this.

Basically, perform FK. Implementation should check for limits if limitCheck is set to true

Implements OSCAR::KinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::UpdateJointState const OSCAR::HandPose   targetHand,
OSCAR::AngleUnits    angle = OSCAR::Radians
[virtual]
 

child classes should implement this.

Basically, perform FK. Implementation should check for limits if limitCheck is set to true

Implements OSCAR::KinematicsHandler.

Reimplemented in OSCAR::RedundantKinematicsHandler.

virtual bool OSCAR::GeneralKinematicsHandler::UpdateJointState const OSCAR::Xform   targetHand [virtual]
 

child classes should implement this.

Basically, perform IK. Implementation should check for limits if limitCheck is set to true

Implements OSCAR::KinematicsHandler.

Reimplemented in OSCAR::RedundantKinematicsHandler.


Member Data Documentation

OSCAR::FKJacobian* OSCAR::GeneralKinematicsHandler::fk [protected]
 

OSCAR::IKJacobian< >* OSCAR::GeneralKinematicsHandler::ik [protected]
 


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