Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

IKGradientSolver Class Reference

Performs gradient descent on the joints to find a solution. More...

#include <IKGradientSolver.h>

Inheritance diagram for IKGradientSolver:

Detailed Description

Performs gradient descent on the joints to find a solution.

This is intended as a generic fallback for IK requests that cannot be handled analytically.

Definition at line 10 of file IKGradientSolver.h.

List of all members.

Public Member Functions

 IKGradientSolver (unsigned int iter=75, float posTolerance=0.5f, float oriTolerance=.001f)
 constructor
 IKGradientSolver (unsigned int iter, float posTolerance, float oriTolerance, float qTolerance)
 constructor
virtual bool solve (const Point &pEff, const Rotation &oriEff, KinematicJoint &j, const Position &pTgt, float posPri, const Orientation &oriTgt, float oriPri) const
 Solve to get an 'effector' (pEff, oriEff, relative to link following j) to a solution of pTgt, oriTgt (or at least a local minimum).
virtual IKSolver::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
 Move an 'effector' (pEff, oriEff, relative to link following j) towards a solution of pTgt, oriTgt (or at least a local minimum).
virtual IKSolver::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, bool successInReach) const

Protected Attributes

const float PTOL
 position tolerance
const float OTOL
 orientation tolerance
const float QTOL
 joint angle tolerance
const unsigned int MAX_ITER
 maximum number of iterations to attempt

Static Private Attributes

static const std::string autoRegisterIKGradientSolver = IKSolver::getRegistry().registerType<IKGradientSolver>("IKGradientSolver")
 holds the class name, set via registration with the DeviceDriver registry
static const std::string autoRegisterDefaultIKSolver = IKSolver::getRegistry().registerType<IKGradientSolver>("")
 since this is the default solver, also register as "" (empty name)

Constructor & Destructor Documentation

IKGradientSolver::IKGradientSolver ( unsigned int  iter = 75,
float  posTolerance = 0.5f,
float  oriTolerance = .001f 
)

constructor

Definition at line 13 of file IKGradientSolver.h.

IKGradientSolver::IKGradientSolver ( unsigned int  iter,
float  posTolerance,
float  oriTolerance,
float  qTolerance 
)

constructor

Definition at line 17 of file IKGradientSolver.h.


Member Function Documentation

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

Solve to get an 'effector' (pEff, oriEff, relative to link following j) to a solution of pTgt, oriTgt (or at least a local minimum).

Parameters:
pEff The point on the effector that should be brought to the target. Typically [0,0,0] if the effector is GripperFrame.
oriEff Rotation of the effector's reference frame; used to align some effector axis with the target's Orientation axes. For example, if oriTgt is a Parallel constraint, the effector will be free to rotate about the target's z-axis. If we want the effector to rotate about its y-axis, we use oriEff to rotate the effector y-axis to the target's z-axis.
j The kinematic joint at the end of the chain (e.g., GripperFrame)
pTgt The Position constraint that pEff should satisfy, i.e., the target location
oriTgt The Orientation constraint that pEff should satisfy at the target location
posPri,oriPri Relative priorities (weightings) of position and orientation solutions in case they are mutually exclusive

Implements IKSolver.

Definition at line 11 of file IKGradientSolver.cc.

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

Definition at line 86 of file IKGradientSolver.cc.

virtual IKSolver::StepResult_t IKGradientSolver::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]

Move an 'effector' (pEff, oriEff, relative to link following j) towards a solution of pTgt, oriTgt (or at least a local minimum).

pDist and oriDist specifies the maximum distance to move towards each solution; posPri and oriPri specify relative weighting of each solution in case they are mutually exclusive

Implements IKSolver.

Definition at line 24 of file IKGradientSolver.h.

Referenced by solve().


Member Data Documentation

const std::string IKGradientSolver::autoRegisterDefaultIKSolver = IKSolver::getRegistry().registerType<IKGradientSolver>("") [static, private]

since this is the default solver, also register as "" (empty name)

Definition at line 46 of file IKGradientSolver.h.

const std::string IKGradientSolver::autoRegisterIKGradientSolver = IKSolver::getRegistry().registerType<IKGradientSolver>("IKGradientSolver") [static, private]

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

Definition at line 44 of file IKGradientSolver.h.

const unsigned int IKGradientSolver::MAX_ITER [protected]

maximum number of iterations to attempt

Definition at line 40 of file IKGradientSolver.h.

Referenced by solve().

const float IKGradientSolver::OTOL [protected]

orientation tolerance

Definition at line 38 of file IKGradientSolver.h.

Referenced by step().

const float IKGradientSolver::PTOL [protected]

position tolerance

Definition at line 37 of file IKGradientSolver.h.

Referenced by step().

const float IKGradientSolver::QTOL [protected]

joint angle tolerance

Definition at line 39 of file IKGradientSolver.h.

Referenced by solve(), and step().


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

Tekkotsu v5.1CVS
Generated Sat May 4 06:33:16 2013 by Doxygen 1.6.3