Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

IKCalliope Class Reference

Kinematics solver for the 5-DOF Calliope Arm. More...

#include <IKCalliope.h>

Inheritance diagram for IKCalliope:

Detailed Description

Kinematics solver for the 5-DOF Calliope Arm.

Definition at line 34 of file IKCalliope.h.

List of all members.

Classes

struct  Solutions
 Struct to enclose joint angles for 5-dof solution. More...

Public Member Functions

 IKCalliope ()
 constructor
virtual bool solve (const Point &pEff, const Rotation &oriEff, KinematicJoint &j, const Position &pTgt, float posPri, const Orientation &oriTgt, float oriPri) const
 Perform IK.
virtual StepResult_t step (const Point &pEff, const Rotation &oriEff, KinematicJoint &j, const Position &pTgt, float pDist, float posPri, const Orientation &oriTgt, float oriDist, float oriPri) const
 Carried over from other implementations.

Static Public Attributes

static const float EPSILON = 1e-3

Protected Member Functions

Solutions closestThreeLinkIK (const fmat::Column< 2 > &t, bool posPri, float prefPhi, const fmat::Column< 2 > &delta) const
 Attempt to find 3-link IK solution, for target point t, effector offset pEff, and preferred tool angle prefPhi.
Solutions pointToward (const fmat::Column< 2 > &target, bool posPri, float prefPhi) const
 Reaches the arm straight out in the direction of the target.
Solutions validAngles (Solutions solutions) const
 Determines whether the angles that we've solved for are valid.
Solutions threeLinkIK (fmat::Column< 2 > t, float phi) const
 Performs 3-link IK.
fmat::Matrix< 2, 2 > twoLinkIK (fmat::Column< 2 > t) const
 Performs 2-link IK.
int closestSolution (KinematicJoint &j, Solutions s) const
 Returns the index of the closest solution (0 or 1).
void assureOrientation (Solutions &s, float phi) const
 Assures that the arm is in the given orientation.

Static Protected Member Functions

static bool isSideGrasp (const Rotation &oriEff, const Orientation &oriTgt)
 Test if a side grasp is being requested.
static bool isOverheadGrasp (const Rotation &oriEff, const Orientation &oriTgt)
 Test if an overhead grasp is being requested.
static bool analyticallySolvable (const Rotation &oriEff, const Position &pTgt, const Orientation &oriTgt)
 Test if constraints are simple enough to solve analytically.
static bool gradientSolve (const Point &pEff, const Rotation &oriEff, KinematicJoint &j, const Position &pTgt, float posPri, const Orientation &oriTgt, float oriPri)
 Provides fall back to the gradient solver if we can't solve analytically.

Protected Attributes

float L1
 Length of backarm and forearm.
float L2
float jointLimits [3][2]
 Limits of rotation of Calliope's Arm Joints.
float qGripper
 Extra angle between the base and the gripper to be taken into account.
float qWristRot
 Extra angle between the base and the wrist rotate to be taken into account.
float qOffset
 qOffset of the ArmBaseOffset
fmat::Transform baseToArm
 Transforms from the BaseFrame to the ArmBase.
fmat::Quaternion baseToArmRot
 Rotation from BaseFrame to the ArmBase.
float shoulderOffset
 Distance from the arm base to the shoulder position.

Static Protected Attributes

static const std::string autoRegisterIKCalliope = IKSolver::getRegistry().registerType<IKCalliope>("IKCalliope")
 holds the class name, set via registration with the DeviceDriver registry

Constructor & Destructor Documentation

IKCalliope::IKCalliope (  ) 

constructor

Definition at line 52 of file IKCalliope.cc.


Member Function Documentation

bool IKCalliope::analyticallySolvable ( const Rotation oriEff,
const Position pTgt,
const Orientation oriTgt 
) [static, protected]

Test if constraints are simple enough to solve analytically.

Definition at line 481 of file IKCalliope.cc.

Referenced by solve().

void IKCalliope::assureOrientation ( IKCalliope::Solutions s,
float  phi 
) const [protected]

Assures that the arm is in the given orientation.

For use when we need to constrain orientation, and aren't concerned with position as much.

Definition at line 377 of file IKCalliope.cc.

Referenced by closestThreeLinkIK().

int IKCalliope::closestSolution ( KinematicJoint j,
IKCalliope::Solutions  s 
) const [protected]

Returns the index of the closest solution (0 or 1).

If there's only one solution, returns 0.

Definition at line 354 of file IKCalliope.cc.

Referenced by solve().

IKCalliope::Solutions IKCalliope::closestThreeLinkIK ( const fmat::Column< 2 > &  t,
bool  posPri,
float  prefPhi,
const fmat::Column< 2 > &  delta 
) const [protected]

Attempt to find 3-link IK solution, for target point t, effector offset pEff, and preferred tool angle prefPhi.

If a solution cannot be found, try ±1°, ±2°, ±3°, etc, until a valid solution is found. If no valid solution can be found for any angle, just point the effector toward the target.

Definition at line 267 of file IKCalliope.cc.

Referenced by solve().

bool IKCalliope::gradientSolve ( const Point pEff,
const Rotation oriEff,
KinematicJoint j,
const Position pTgt,
float  posPri,
const Orientation oriTgt,
float  oriPri 
) [static, protected]

Provides fall back to the gradient solver if we can't solve analytically.

Definition at line 497 of file IKCalliope.cc.

Referenced by solve().

bool IKCalliope::isOverheadGrasp ( const Rotation oriEff,
const Orientation oriTgt 
) [static, protected]

Test if an overhead grasp is being requested.

Definition at line 475 of file IKCalliope.cc.

Referenced by analyticallySolvable().

bool IKCalliope::isSideGrasp ( const Rotation oriEff,
const Orientation oriTgt 
) [static, protected]

Test if a side grasp is being requested.

Definition at line 469 of file IKCalliope.cc.

Referenced by analyticallySolvable().

IKCalliope::Solutions IKCalliope::pointToward ( const fmat::Column< 2 > &  target,
bool  posPri,
float  prefPhi 
) const [protected]

Reaches the arm straight out in the direction of the target.

For use in case we cannot reach the target point with any tool angle phi

Definition at line 327 of file IKCalliope.cc.

Referenced by closestThreeLinkIK().

bool IKCalliope::solve ( const Point pEff,
const Rotation oriEff,
KinematicJoint j,
const Position pTgt,
float  posPri,
const Orientation oriTgt,
float  oriPri 
) const [virtual]

Perform IK.

Implements IKSolver.

Definition at line 88 of file IKCalliope.cc.

Referenced by step().

IKSolver::StepResult_t IKCalliope::step ( const Point pEff,
const Rotation oriEff,
KinematicJoint j,
const Position pTgt,
float  pDist,
float  posPri,
const Orientation oriTgt,
float  oriDist,
float  oriPri 
) const [virtual]

Carried over from other implementations.

Implements IKSolver.

Definition at line 449 of file IKCalliope.cc.

IKCalliope::Solutions IKCalliope::threeLinkIK ( fmat::Column< 2 >  t,
float  phi 
) const [protected]

Performs 3-link IK.

Calls twoLinkIK, then populates solution struct with tool angle phi.

Definition at line 305 of file IKCalliope.cc.

Referenced by closestThreeLinkIK().

fmat::Matrix< 2, 2 > IKCalliope::twoLinkIK ( fmat::Column< 2 >  t  )  const [protected]

Performs 2-link IK.

Brings the base of the wrist to the target point t

Definition at line 341 of file IKCalliope.cc.

Referenced by threeLinkIK().

IKCalliope::Solutions IKCalliope::validAngles ( IKCalliope::Solutions  solutions  )  const [protected]

Determines whether the angles that we've solved for are valid.

Basically, we're checking to see if any angles in either solution are outside of Calliope's joint limits.

Definition at line 418 of file IKCalliope.cc.

Referenced by threeLinkIK().


Member Data Documentation

const std::string IKCalliope::autoRegisterIKCalliope = IKSolver::getRegistry().registerType<IKCalliope>("IKCalliope") [static, protected]

holds the class name, set via registration with the DeviceDriver registry

Definition at line 105 of file IKCalliope.h.

Transforms from the BaseFrame to the ArmBase.

Definition at line 123 of file IKCalliope.h.

Referenced by IKCalliope(), and solve().

Rotation from BaseFrame to the ArmBase.

Definition at line 126 of file IKCalliope.h.

Referenced by IKCalliope(), and solve().

const float IKCalliope::EPSILON = 1e-3 [static]

Definition at line 36 of file IKCalliope.h.

Referenced by closestSolution(), and solve().

float IKCalliope::jointLimits[3][2] [protected]

Limits of rotation of Calliope's Arm Joints.

Definition at line 111 of file IKCalliope.h.

Referenced by assureOrientation(), IKCalliope(), pointToward(), and validAngles().

float IKCalliope::L1 [protected]

Length of backarm and forearm.

Definition at line 108 of file IKCalliope.h.

Referenced by IKCalliope(), threeLinkIK(), and twoLinkIK().

float IKCalliope::L2 [protected]

Definition at line 108 of file IKCalliope.h.

Referenced by IKCalliope(), threeLinkIK(), and twoLinkIK().

Extra angle between the base and the gripper to be taken into account.

Definition at line 114 of file IKCalliope.h.

Referenced by IKCalliope(), and solve().

qOffset of the ArmBaseOffset

Definition at line 120 of file IKCalliope.h.

Referenced by IKCalliope(), and solve().

Extra angle between the base and the wrist rotate to be taken into account.

Definition at line 117 of file IKCalliope.h.

Referenced by IKCalliope(), and solve().

Distance from the arm base to the shoulder position.

Definition at line 129 of file IKCalliope.h.

Referenced by IKCalliope(), and solve().


The documentation for this class was generated from the following files:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:09 2016 by Doxygen 1.6.3