Orocos KDL
KDL::ChainIkSolverVel_pinv Class Reference

#include <chainiksolvervel_pinv.hpp>

Inheritance diagram for KDL::ChainIkSolverVel_pinv:
KDL::ChainIkSolverVel KDL::SolverI

Public Member Functions

 ChainIkSolverVel_pinv (const Chain &chain, double eps=0.00001, int maxiter=150)
 ~ChainIkSolverVel_pinv ()
virtual int CartToJnt (const JntArray &q_in, const Twist &v_in, JntArray &qdot_out)
virtual int CartToJnt (const JntArray &, const FrameVel &, JntArrayVel &)
unsigned int getNrZeroSigmas () const
int getSVDResult () const
virtual const char * strError (const int error) const
virtual void updateInternalDataStructures ()
Public Member Functions inherited from KDL::ChainIkSolverVel
virtual ~ChainIkSolverVel ()
Public Member Functions inherited from KDL::SolverI
 SolverI ()
 Initialize latest error to E_NOERROR.
virtual ~SolverI ()
virtual int getError () const
 Return the latest error.

Static Public Attributes

static const int E_CONVERGE_PINV_SINGULAR = +100
 solution converged but (pseudo)inverse is singular

Additional Inherited Members

Public Types inherited from KDL::SolverI
enum  {
  E_DEGRADED = +1 , E_NOERROR = 0 , E_NO_CONVERGE = -1 , E_UNDEFINED = -2 ,
  E_NOT_UP_TO_DATE = -3 , E_SIZE_MISMATCH = -4 , E_MAX_ITERATIONS_EXCEEDED = -5 , E_OUT_OF_RANGE = -6 ,
  E_NOT_IMPLEMENTED = -7 , E_SVD_FAILED = -8
}
Protected Attributes inherited from KDL::SolverI
int error
 Latest error, initialized to E_NOERROR in constructor.

Detailed Description

Implementation of a inverse velocity kinematics algorithm based on the generalize pseudo inverse to calculate the velocity transformation from Cartesian to joint space of a general KDL::Chain. It uses a svd-calculation based on householders rotations.

Constructor & Destructor Documentation

◆ ChainIkSolverVel_pinv()

KDL::ChainIkSolverVel_pinv::ChainIkSolverVel_pinv ( const Chain & chain,
double eps = 0.00001,
int maxiter = 150 )
explicit

Constructor of the solver

Parameters
chainthe chain to calculate the inverse velocity kinematics for
epsif a singular value is below this value, its inverse is set to zero, default: 0.00001
maxitermaximum iterations for the svd calculation, default: 150

◆ ~ChainIkSolverVel_pinv()

KDL::ChainIkSolverVel_pinv::~ChainIkSolverVel_pinv ( )

Member Function Documentation

◆ CartToJnt() [1/2]

virtual int KDL::ChainIkSolverVel_pinv::CartToJnt ( const JntArray & ,
const FrameVel & ,
JntArrayVel &  )
inlinevirtual

not (yet) implemented.

Implements KDL::ChainIkSolverVel.

◆ CartToJnt() [2/2]

virtual int KDL::ChainIkSolverVel_pinv::CartToJnt ( const JntArray & q_in,
const Twist & v_in,
JntArray & qdot_out )
virtual

Find an output joint velocity qdot_out, given a starting joint pose q_init and a desired cartesian velocity v_in

Returns
E_NOERROR=solution converged to <eps in maxiter E_SVD_FAILED=SVD computation failed E_CONVERGE_PINV_SINGULAR=solution converged but (pseudo)inverse is singular
Note
if E_CONVERGE_PINV_SINGULAR returned then converged and can continue motion, but have degraded solution
If E_SVD_FAILED returned, then getSvdResult() returns the error code from the SVD algorithm.

Implements KDL::ChainIkSolverVel.

◆ getNrZeroSigmas()

unsigned int KDL::ChainIkSolverVel_pinv::getNrZeroSigmas ( ) const
inline

Retrieve the number of singular values of the jacobian that are < eps; if the number of near zero singular values is > jac.col()-jac.row(), then the jacobian pseudoinverse is singular

◆ getSVDResult()

int KDL::ChainIkSolverVel_pinv::getSVDResult ( ) const
inline

Retrieve the latest return code from the SVD algorithm

Returns
0 if CartToJnt() not yet called, otherwise latest SVD result code.

◆ strError()

virtual const char * KDL::ChainIkSolverVel_pinv::strError ( const int error) const
virtual

Return a description of the latest error

Returns
if error is known then a description of error, otherwise "UNKNOWN ERROR"

Reimplemented from KDL::SolverI.

◆ updateInternalDataStructures()

virtual void KDL::ChainIkSolverVel_pinv::updateInternalDataStructures ( )
virtual

Update the internal data structures. This is required if the number of segments or number of joints of a chain/tree have changed. This provides a single point of contact for solver memory allocations.

Implements KDL::ChainIkSolverVel.

Member Data Documentation

◆ E_CONVERGE_PINV_SINGULAR

const int KDL::ChainIkSolverVel_pinv::E_CONVERGE_PINV_SINGULAR = +100
static

solution converged but (pseudo)inverse is singular


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