Orocos KDL
KDL::ChainExternalWrenchEstimator Class Reference

First-order momentum observer for the estimation of external wrenches applied on the robot's end-effector. More...

#include <chainexternalwrenchestimator.hpp>

Inheritance diagram for KDL::ChainExternalWrenchEstimator:
KDL::SolverI

Public Member Functions

 ChainExternalWrenchEstimator (const Chain &chain, const Vector &gravity, const double sample_frequency, const double estimation_gain, const double filter_constant, const double eps=0.00001, const int maxiter=150)
 Internally-used Dynamics Parameters (Gravity) solver failed.
 ~ChainExternalWrenchEstimator ()
int setInitialMomentum (const JntArray &joint_position, const JntArray &joint_velocity)
void setSVDEps (const double eps_in)
void setSVDMaxIter (const int maxiter_in)
int JntToExtWrench (const JntArray &joint_position, const JntArray &joint_velocity, const JntArray &joint_torque, Wrench &external_wrench)
void getEstimatedJntTorque (JntArray &external_joint_torque)
virtual void updateInternalDataStructures ()
virtual const char * strError (const int error) const
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_FKSOLVERPOS_FAILED = -100
static const int E_JACSOLVER_FAILED = -101
 Internally-used Forward Position Kinematics (Recursive) solver failed.
static const int E_DYNPARAMSOLVERMASS_FAILED = -102
 Internally-used Jacobian solver failed.
static const int E_DYNPARAMSOLVERCORIOLIS_FAILED = -103
 Internally-used Dynamics Parameters (Mass) solver failed.
static const int E_DYNPARAMSOLVERGRAVITY_FAILED = -104
 Internally-used Dynamics Parameters (Coriolis) solver failed.

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

First-order momentum observer for the estimation of external wrenches applied on the robot's end-effector.

Implementation based on: S. Haddadin, A. De Luca and A. Albu-Schäffer, "Robot Collisions: A Survey on Detection, Isolation, and Identification," in IEEE Transactions on Robotics, vol. 33(6), pp. 1292-1312, 2017.

Note: This component assumes that the external wrench is applied on the end-effector (last) link of the robot's chain.

Constructor & Destructor Documentation

◆ ChainExternalWrenchEstimator()

KDL::ChainExternalWrenchEstimator::ChainExternalWrenchEstimator ( const Chain & chain,
const Vector & gravity,
const double sample_frequency,
const double estimation_gain,
const double filter_constant,
const double eps = 0.00001,
const int maxiter = 150 )

Internally-used Dynamics Parameters (Gravity) solver failed.

Constructor for the estimator, it will allocate all the necessary memory

Parameters
chainThe kinematic chain of the robot, an internal copy will be made.
gravityThe gravity-acceleration vector to use during the calculation.
sample_frequencyFrequency at which users updates it estimation loop (in Hz).
estimation_gainParameter used to control the estimator's convergence
filter_constantParameter defining how much the estimated signal should be filtered by the low-pass filter. This input value should be between 0 and 1. Higher the number means more noise needs to be filtered-out. The filter can be turned off by setting this value to 0.
epsIf a SVD-singular value is below this value, its inverse is set to zero. Default: 0.00001
maxiterMaximum iterations for the SVD computations. Default: 150.

◆ ~ChainExternalWrenchEstimator()

KDL::ChainExternalWrenchEstimator::~ChainExternalWrenchEstimator ( )
inline

Member Function Documentation

◆ getEstimatedJntTorque()

void KDL::ChainExternalWrenchEstimator::getEstimatedJntTorque ( JntArray & external_joint_torque)

◆ JntToExtWrench()

int KDL::ChainExternalWrenchEstimator::JntToExtWrench ( const JntArray & joint_position,
const JntArray & joint_velocity,
const JntArray & joint_torque,
Wrench & external_wrench )

This method calculates the external wrench that is applied on the robot's end-effector. Input parameters:

Parameters
joint_positionThe current (measured) joint positions.
joint_velocityThe current (measured) joint velocities.
joint_torqueThe joint space torques. Depending on the user's choice, this array can represent commanded or measured joint torques. A particular choice depends on the available sensors in robot's joint. For more details see the above-referenced article.

Output parameters:

Parameters
external_wrenchThe estimated external wrench applied on the robot's end-effector. The wrench will be expressed w.r.t. end-effector's frame.
Returns
error/success code

◆ setInitialMomentum()

int KDL::ChainExternalWrenchEstimator::setInitialMomentum ( const JntArray & joint_position,
const JntArray & joint_velocity )

Calculates robot's initial momentum in the joint space. Basically, sets the offset for future estimation (momentum calculation). If this method is not called by the user, zero values will be taken for the initial momentum.

◆ setSVDEps()

void KDL::ChainExternalWrenchEstimator::setSVDEps ( const double eps_in)

◆ setSVDMaxIter()

void KDL::ChainExternalWrenchEstimator::setSVDMaxIter ( const int maxiter_in)

◆ strError()

virtual const char * KDL::ChainExternalWrenchEstimator::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::ChainExternalWrenchEstimator::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::SolverI.

Member Data Documentation

◆ E_DYNPARAMSOLVERCORIOLIS_FAILED

const int KDL::ChainExternalWrenchEstimator::E_DYNPARAMSOLVERCORIOLIS_FAILED = -103
static

Internally-used Dynamics Parameters (Mass) solver failed.

◆ E_DYNPARAMSOLVERGRAVITY_FAILED

const int KDL::ChainExternalWrenchEstimator::E_DYNPARAMSOLVERGRAVITY_FAILED = -104
static

Internally-used Dynamics Parameters (Coriolis) solver failed.

◆ E_DYNPARAMSOLVERMASS_FAILED

const int KDL::ChainExternalWrenchEstimator::E_DYNPARAMSOLVERMASS_FAILED = -102
static

Internally-used Jacobian solver failed.

◆ E_FKSOLVERPOS_FAILED

const int KDL::ChainExternalWrenchEstimator::E_FKSOLVERPOS_FAILED = -100
static

◆ E_JACSOLVER_FAILED

const int KDL::ChainExternalWrenchEstimator::E_JACSOLVER_FAILED = -101
static

Internally-used Forward Position Kinematics (Recursive) solver failed.


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