IKGradientSolver Class Reference
Performs gradient descent on the joints to find a solution.
More...
#include <IKGradientSolver.h>
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 bool | solve (const Point &pEff, const Rotation &oriEff, KinematicJoint &j, const Position &pTgt, float posPri, const Orientation &oriTgt, float oriPri, unsigned int root) const |
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 |
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, unsigned int root) 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 | |
|
) |
| | |
IKGradientSolver::IKGradientSolver |
( |
unsigned int |
iter, |
|
|
float |
posTolerance, |
|
|
float |
oriTolerance, |
|
|
float |
qTolerance | |
|
) |
| | |
Member Function Documentation
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.
Referenced by IKCalliope::gradientSolve().
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, |
|
|
unsigned int |
root | |
|
) |
| | 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 28 of file IKGradientSolver.h.
Referenced by solve().
Member Data Documentation
since this is the default solver, also register as "" (empty name)
Definition at line 53 of file IKGradientSolver.h.
holds the class name, set via registration with the DeviceDriver registry
Definition at line 51 of file IKGradientSolver.h.
The documentation for this class was generated from the following files:
|