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

OSCAR::IKMitsubishi Class Reference
[InverseKinematics]

IKMitsubishi Implements a closed form solution for a standard Mitsubishi Robot. More...

#include <IKMitsubishiPA-10.h>

Inheritance diagram for OSCAR::IKMitsubishi:

Inheritance graph
[legend]
List of all members.

Public Methods

 IKMitsubishi (const String &dhParameterFileName, OSCARError &err=DUMMY_ERROR(noError), const String &name=String(""))
 IKMitsubishi (const DHData &dhData, OSCARError &err=DUMMY_ERROR(noError), const String &name=String(""))
 IKMitsubishi (const IKMitsubishi &rhs)
virtual ~IKMitsubishi ()
bool GetJointPosition (const Xform &handXform, JointVector &jointPositionSolution)
bool GetJointPosition (const HandPose &handPose, JointVector &jointPositionSolution)
bool GetLast3Joints (const Xform &handXform, JointVector &jointPosition)
void SetClosure (bool keepMiddle, bool elbowUp, bool wristUp)
void GetClosure (bool &keepMiddle, bool &elbowUp, bool &wristUp)
void SetApproximate (bool approximate)
void SetFirstJoint (double angleInRadians)
double GetFirstJoint () const
IKMitsubishi & operator= (const IKMitsubishi &rhs)
virtual bool SetJointPosition (const JointVector &jointPosition)
void TransformHandPose (const Xform &hand, Xform &modifiedHand)

Protected Methods

void applyFirstJointAngle (Xform &wristLocation, Xform &adjustedWristLocation)
void calculateWristOrientation (const JointVector &jointPos, const Xform &wristLocation, Rot3by3 &relativeWrist)
bool calculateLast3Joints (const Xform &wristLocation, JointVector &jointPos)
void quadrantChange (const double currentJointAngle, double &newJointAngle)

Protected Attributes

double d3
double d5
double firstJointVal
bool keepMiddle
bool elbowUp
bool wristUp
bool approximate
JointVector currentJointVector
Xform scratchXform1
Xform scratchXform2
Xform modifiedHand
Xform basePoseInv
Xform toolPoseInv
Rot3by3 wristPointOrientTrans
Rot3by3 handOrient
Rot3by3 relativeOrient
Orientation wristPointOrient

Detailed Description

Author:
Chetan Kapoor and Chalongrath Pholsiri
This class can be further extended to support tool point and base pose functionality by deriving from Kinematics


Constructor & Destructor Documentation

OSCAR::IKMitsubishi::IKMitsubishi const String   dhParameterFileName,
OSCARError   err = DUMMY_ERROR(noError),
const String   name = String("")
 

Constructor.

This is the constructor for an object of type IKMitsubishi. Use this to construct an IKMitsubishi object. Default closure is selected as elbow up

Parameters:
dhParameterFileName The name of a file that contains the DH parameters for the Mitsubishi PA-10 &C robot. This file should specify a 7 DOF robot in the standard Mitsubishi geometry. The standard Mitsubishi DH parameters are listed below. You can only change the values of the d(i) column.
-----------------------------------------------------------------------------------------

# This is a DH parameter file for a Mitsubishi PA-10 7 DOF robot. # The variable is specified by typing a "var' or a "VAR" in its # field. i.e. If the joint is revolute then it will be in the fourth # coulumn and if the joint is prismatic it will be in the third column # The notation is based on the "Introduction to Robotics, Mechanics and Controls" # book by John Craig.Units are in mm and degrees.

# The word below should specify the format of the DH Parameters (Craig or Featherstone) Craig
# Alpha(i-1) a(i-1) d(i) theta(i)
0 0 0 var # link 0-1
-90 0 0 var # link 1-2
90 0 450 var # link 2-3
-90 0 0 var # link3-4
90 0 480 var # link 4-5
-90 0 0 var # link 5-6
90 0 0 var # link6-7

# Note: The tool point for this robot is at approximately [0, 0, 70] at the tool plate # expressed in the last joints DH frame
-----------------------------------------------------------------------------------------

Parameters:
err An OSCARError reference that holds the value of the error code that was generated when the constructor was called. If this error was not 'noError' you can call GetError() to get the details of the error code.
name Name to assign to the object. Default is " "
Exceptions:
dhParamsIllFormed dhParamsIllFormed Call GetError() for more information.
fileOpenError fileOpenError Call GetError() for more information.
See also:
SetClosure(bool elbowDown)

GetClosure(bool& elbowDown)

OSCAR::IKMitsubishi::IKMitsubishi const DHData   dhData,
OSCARError   err = DUMMY_ERROR(noError),
const String   name = String("")
 

Constructor.

This is the constructor for an object of type IKMitsubishi. Use this to construct an IKMitsubishi object. Default closure is selected as elbow up

Parameters:
dhData An DHData object that contains the DH parameters for the Mitsubishi robot. This object should specify a 6 DOF robot in the standard Mitsubishi geometry. The standard Mitsubishi DH parameters are listed below. You can only change the values of a(i-1) columns and the d(i) column.
err An OSCARError reference that holds the value of the error code that was generated when the constructor was called. If this error was not 'noError' you can call GetError() to get the details of the error code.
name Name to assign to the object. Default is " "
Exceptions:
dhParamsIllFormed dhParamsIllFormed Call GetError() for more information.
See also:
SetClosure(bool elbowDown)

GetClosure(bool& elbowDown)

OSCAR::IKMitsubishi::IKMitsubishi const IKMitsubishi &    rhs
 

Copy Constructor.

This is the Copy Constructor for an object of type IKMitsubishi. Use this to construct an IKMitsubishi object from an existing IKMitsubishi object.

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

virtual OSCAR::IKMitsubishi::~IKMitsubishi   [virtual]
 

Destructor.

This is the Destructor for an object of type IKMitsubishi.


Member Function Documentation

void OSCAR::IKMitsubishi::applyFirstJointAngle Xform   wristLocation,
Xform   adjustedWristLocation
[protected]
 

bool OSCAR::IKMitsubishi::calculateLast3Joints const Xform   wristLocation,
JointVector   jointPos
[protected]
 

void OSCAR::IKMitsubishi::calculateWristOrientation const JointVector   jointPos,
const Xform   wristLocation,
Rot3by3   relativeWrist
[protected]
 

void OSCAR::IKMitsubishi::GetClosure bool &    keepMiddle,
bool &    elbowUp,
bool &    wristUp
 

Get the kinematic closure for the inverse solution.

This method is used to enquire the closure that has been set for the inverse position solution

Parameters:
keepMiddle A true value will set the inverse position solution to generate a solution with -90 < q3 < 90
elbowUp A true value will set the inverse position solution to generate a solution with q4 > 0
wristUp A true value will set the inverse position solution to generate a solution with q6 > 0
See also:
SetClosure(bool keepMiddle, bool elbowUp, bool wristUp)

double OSCAR::IKMitsubishi::GetFirstJoint   const
 

Gets the value at which the first joint is locked in radians.

See also:
SetFirstJoint(double angleInRadians)

bool OSCAR::IKMitsubishi::GetJointPosition const HandPose   handPose,
JointVector   jointPositionSolution
[virtual]
 

Computes the closed-form inverse position solution for the last link (or tool point) of a robot. Note: Since this is closed-form it will ignore the active/inactive status on the joint vector.

Parameters:
handPose A 6 long vector that that specifies the end-effector position and orientation (as FixedXYZ angles) for which an inverse solution needs to be calculated.
jointPositionSolution A JointVector of size equal to DOF of the robot. On return, this vector will contain the the inverse position solution.
Returns:
True if successful. Otherwise False. Call GetError() to get detailed error information.
See also:
GetJointPosition(const Xform& handXform, Vector& jointPositionSolution)

Implements OSCAR::IKPosition.

bool OSCAR::IKMitsubishi::GetJointPosition const Xform   handXform,
JointVector   jointPositionSolution
[virtual]
 

Computes the closed-form inverse position solution for the last link (or tool point) of a robot. Note: Since this is closed-form it will ignore the active/inactive status on the joint vector.

Parameters:
handXform A 4X4 transformation matrix that specifies the end-effector position and orientation for which an inverse solution needs to be calculated.
jointPositionSolution A JointVector of size equal to DOF of the robot. On return, this vector will contain the the inverse position solution.
Returns:
True if successful. Otherwise False. Call GetError() to get detailed error information.
See also:
GetJointPosition(const HandPose& handPose, Vector& jointPositionSolution)

Implements OSCAR::IKPosition.

bool OSCAR::IKMitsubishi::GetLast3Joints const Xform   handXform,
JointVector   jointPosition
 

Computes the last 3 joint angles for a given desired hand orientation using the closed-form inverse kinematics. Note: Since this is closed-form it will ignore the active/inactive status on the joint vector.

This method computes the the last 3 joint angles given the desired hand orientation and the first 4 joint angles. The orientation is specified in an Xform. The position part of the Xform is ignored.

Parameters:
handXform A 4X4 transformation matrix that specifies the end-effector position and orientation for which an inverse solution needs to be calculated. Note that the position part of this Xform is ignored.
jointPosition A JointVector of size equal to DOF of the robot. On return, this vector will contain the same values for the first 4 components and the inverse solution for the last 3.
Returns:
True if successful. Otherwise False. Call GetError() to get detailed error information.

IKMitsubishi& OSCAR::IKMitsubishi::operator= const IKMitsubishi &    rhs
 

Assignment Operator.

This is the Assignment Operator for an object of type IKMitsubishi.

Parameters:
rhs A IKMitsubishi 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

void OSCAR::IKMitsubishi::quadrantChange const double    currentJointAngle,
double &    newJointAngle
[protected]
 

void OSCAR::IKMitsubishi::SetApproximate bool    approximate
 

Set whether or not the inverse kinematics should return approximate solution.

This method is used to select whether you desire to have the inverse kinematic return approximate solution if the desired hand pose is unattainable (mostly because it's out of reach). If it's set to true, then a call to GetJointPosition will return an approximate solution that it thinks will provide the nearest hand pose. If it's set to false, then a call to GetJointPosition will return false if the desired hand pose is unattainable. The default is that IK will not provide approximate solution.

Parameters:
approximate A true value will set the IK to return an approximate solution. A false value will cause the IK to only return an exact solution.
See also:
GetJointPosition(const Xform& handXform, JointVector& jointPositionSolution)

GetJointPosition(const HandPose& handPose, JointVector& jointPositionSolution)

void OSCAR::IKMitsubishi::SetClosure bool    keepMiddle,
bool    elbowUp,
bool    wristUp
 

Set the kinematics closure for the inverse solution.

This method is used to choose a solution from the 8 (2^3) closures. This will have an effect only when the robot is at one of its inflection points, i.e. q3 at +/- 90 degrees, q4 at 0, or q6 at 0. If the current joint state is entirely in one of the closures, then this method will have no effect on the solution chosen. Choosing a proper closure is not trivial. We could use some kind of criteria to do it. For example, We could use Artificial Joint Torque (AJT) to choose a closure that will better avoid obstacles.

Parameters:
keepMiddle A true value will set the inverse position solution to generate a solution with -90 < q3 < 90
elbowUp A true value will set the inverse position solution to generate a solution with q4 > 0
wristUp A true value will set the inverse position solution to generate a solution with q6 > 0
See also:
GetClosure(bool& keepMiddle, bool& elbowUp, bool& wristUp)

void OSCAR::IKMitsubishi::SetFirstJoint double    angleInRadians
 

Sets the value of the first joint of the robot. Default is 0 radians.

This method is used to specify the value (angle) of the first joint at which it will be locked. Based on this locked value, an inverse is performed for the remaining 6 joints. Null space motion can be generated by successively changing the value of the locked joint and performing the inverse with the same end effector constraint.

Parameters:
angleInRadians Angle at which the first joint will be locked in radians
See also:
GetJointPosition(const Xform& handXform, Vector& jointPositionSolution)

GetJointPosition(const HandPose& handPose, Vector& jointPositionSolution)

virtual bool OSCAR::IKMitsubishi::SetJointPosition const JointVector   jointPosition [virtual]
 

Set the Joint Position.

This method is used to reset to a new internal joint position state. This is necessary when you want to arbitrarily start the inverse solution at a joint configuraiton that is different from where it previously was.

Parameters:
jointPosition An JointVector of size DOF that specifies the new joint angle state in Radians.
Returns:
true if jointPosition is of size DOF. If not, then false. Call GetError for more detailed error information.
See also:
GetJointPosition(const JointVector& jointPosition)
Exceptions:
vectorSizeMismatch vectorSizeMismatch

void OSCAR::IKMitsubishi::TransformHandPose const Xform   hand,
Xform   modifiedHand
 

Transform the desired hand pose to the robot's coordinates. It takes into account the robot's base pose and tool pose.

Parameters:
hand The desired hand pose in the world coordinates to be transformed.
modifiedHand The result of the transformation which will be the desired hand pose in the robot's coordinates.


Member Data Documentation

bool OSCAR::IKMitsubishi::approximate [protected]
 

Xform OSCAR::IKMitsubishi::basePoseInv [protected]
 

JointVector OSCAR::IKMitsubishi::currentJointVector [protected]
 

double OSCAR::IKMitsubishi::d3 [protected]
 

double OSCAR::IKMitsubishi::d5 [protected]
 

bool OSCAR::IKMitsubishi::elbowUp [protected]
 

double OSCAR::IKMitsubishi::firstJointVal [protected]
 

Rot3by3 OSCAR::IKMitsubishi::handOrient [protected]
 

bool OSCAR::IKMitsubishi::keepMiddle [protected]
 

Xform OSCAR::IKMitsubishi::modifiedHand [protected]
 

Rot3by3 OSCAR::IKMitsubishi::relativeOrient [protected]
 

Xform OSCAR::IKMitsubishi::scratchXform1 [protected]
 

Xform OSCAR::IKMitsubishi::scratchXform2 [protected]
 

Xform OSCAR::IKMitsubishi::toolPoseInv [protected]
 

Orientation OSCAR::IKMitsubishi::wristPointOrient [protected]
 

Rot3by3 OSCAR::IKMitsubishi::wristPointOrientTrans [protected]
 

bool OSCAR::IKMitsubishi::wristUp [protected]
 


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