kinematics-dynamics
Loading...
Searching...
No Matches
roboticslab::ChainIkSolverPos_ID Class Reference

IK solver using infinitesimal displacement twists. More...

#include <ChainIkSolverPos_ID.hpp>

Inheritance diagram for roboticslab::ChainIkSolverPos_ID:

Public Member Functions

 ChainIkSolverPos_ID (const KDL::Chain &chain, const KDL::JntArray &q_min, const KDL::JntArray &q_max, KDL::ChainFkSolverPos &fksolver)
 Constructor.
int CartToJnt (const KDL::JntArray &q_init, const KDL::Frame &p_in, KDL::JntArray &q_out) override
 Calculate inverse position kinematics.
void updateInternalDataStructures () override
 Update the internal data structures.
const char * strError (const int error) const override
 Return a description of the last error.

Static Public Attributes

static const int E_FKSOLVERPOS_FAILED = -100
 Return code, internal FK position solver failed.
static const int E_JACSOLVER_FAILED = -101
 Return code, internal Jacobian solver failed.

Private Member Functions

KDL::JntArray computeDiffInvKin (const KDL::Twist &delta_twist)

Private Attributes

const KDL::Chain & chain
unsigned int nj
KDL::JntArray qMin
KDL::JntArray qMax
KDL::ChainFkSolverPos & fkSolverPos
KDL::ChainJntToJacSolver jacSolver
KDL::Jacobian jacobian

Detailed Description

Re-implementation of KDL::ChainIkSolverPos_NR_JL in which only one iteration step is performed. Aimed to provide a quick means of obtaining IK whenever the displacements are small enough.

Constructor & Destructor Documentation

◆ ChainIkSolverPos_ID()

ChainIkSolverPos_ID::ChainIkSolverPos_ID ( const KDL::Chain & chain,
const KDL::JntArray & q_min,
const KDL::JntArray & q_max,
KDL::ChainFkSolverPos & fksolver )
Parameters
chainThe chain to calculate the inverse position for.
q_minThe minimum joint positions.
q_maxThe maximum joint positions.
fksolverA forward position kinematics solver.
iksolverAn inverse velocity kinematics solver.

Member Function Documentation

◆ CartToJnt()

int ChainIkSolverPos_ID::CartToJnt ( const KDL::JntArray & q_init,
const KDL::Frame & p_in,
KDL::JntArray & q_out )
override
Parameters
q_initInitial guess of the joint coordinates (unused).
p_inInput cartesian coordinates.
q_outOutput joint coordinates.
Returns
Return code, E_SOLUTION_NOT_FOUND if there is no solution or E_NOT_REACHABLE if at least one of them is out of reach.

◆ strError()

const char * ChainIkSolverPos_ID::strError ( const int error) const
override
Parameters
errorError code.
Returns
If error is known then a description of error, otherwise "UNKNOWN ERROR".

◆ updateInternalDataStructures()

void ChainIkSolverPos_ID::updateInternalDataStructures ( )
override

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


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