Public Member Functions | Static Public Attributes | Private Types | Private Attributes | List of all members
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:
Inheritance graph
[legend]

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. More...
 
void getEstimatedJntTorque (JntArray &external_joint_torque)
 
int JntToExtWrench (const JntArray &joint_position, const JntArray &joint_velocity, const JntArray &joint_torque, Wrench &external_wrench)
 
int setInitialMomentum (const JntArray &joint_position, const JntArray &joint_velocity)
 
void setSVDEps (const double eps_in)
 
void setSVDMaxIter (const int maxiter_in)
 
virtual const char * strError (const int error) const
 
virtual void updateInternalDataStructures ()
 
 ~ChainExternalWrenchEstimator ()
 
- Public Member Functions inherited from KDL::SolverI
virtual int getError () const
 Return the latest error. More...
 
 SolverI ()
 Initialize latest error to E_NOERROR. More...
 
virtual ~SolverI ()
 

Static Public Attributes

static const int E_DYNPARAMSOLVERCORIOLIS_FAILED = -103
 Internally-used Dynamics Parameters (Mass) solver failed. More...
 
static const int E_DYNPARAMSOLVERGRAVITY_FAILED = -104
 Internally-used Dynamics Parameters (Coriolis) solver failed. More...
 
static const int E_DYNPARAMSOLVERMASS_FAILED = -102
 Internally-used Jacobian solver failed. More...
 
static const int E_FKSOLVERPOS_FAILED = -100
 
static const int E_JACSOLVER_FAILED = -101
 Internally-used Forward Position Kinematics (Recursive) solver failed. More...
 

Private Types

typedef Eigen::Matrix< double, 6, 1 > Vector6d
 

Private Attributes

const ChainCHAIN
 
JntArray coriolis_torque
 
const double DT_SEC
 
ChainDynParam dynparam_solver
 
JntArray estimated_ext_torque
 
JntArray estimated_momentum_integral
 
Eigen::VectorXd ESTIMATION_GAIN
 
const double FILTER_CONST
 
JntArray filtered_estimated_ext_torque
 
ChainFkSolverPos_recursive fk_pos_solver
 
JntArray gravity_torque
 
JntArray initial_jnt_momentum
 
Jacobian jacobian_end_eff
 
Eigen::MatrixXd jacobian_end_eff_transpose
 
Eigen::MatrixXd jacobian_end_eff_transpose_inv
 
ChainJntToJacSolver jacobian_solver
 
JntSpaceInertiaMatrix jnt_mass_matrix
 
JntSpaceInertiaMatrix jnt_mass_matrix_dot
 
unsigned int nj
 
unsigned int ns
 
JntSpaceInertiaMatrix previous_jnt_mass_matrix
 
Eigen::VectorXd S
 
Eigen::VectorXd S_inv
 
double svd_eps
 
int svd_maxiter
 
Eigen::VectorXd tmp
 
JntArray total_torque
 
Eigen::MatrixXd U
 
Eigen::MatrixXd V
 

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. More...
 

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.

Definition at line 43 of file chainexternalwrenchestimator.hpp.

Member Typedef Documentation

◆ Vector6d

typedef Eigen::Matrix<double, 6, 1 > KDL::ChainExternalWrenchEstimator::Vector6d
private

Definition at line 45 of file chainexternalwrenchestimator.hpp.

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.

Definition at line 25 of file chainexternalwrenchestimator.cpp.

◆ ~ChainExternalWrenchEstimator()

KDL::ChainExternalWrenchEstimator::~ChainExternalWrenchEstimator ( )
inline

Definition at line 68 of file chainexternalwrenchestimator.hpp.

Member Function Documentation

◆ getEstimatedJntTorque()

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

Definition at line 198 of file chainexternalwrenchestimator.cpp.

◆ 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

First-order momentum observer, an 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.


Part I: Estimation of the torques felt in joints as a result of the external wrench being applied on the robot


Part II: Propagate above-estimated joint torques to Cartesian wrench using a pseudo-inverse of Jacobian-Transpose

Definition at line 106 of file chainexternalwrenchestimator.cpp.

◆ 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.

Definition at line 74 of file chainexternalwrenchestimator.cpp.

◆ setSVDEps()

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

Definition at line 94 of file chainexternalwrenchestimator.cpp.

◆ setSVDMaxIter()

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

Definition at line 100 of file chainexternalwrenchestimator.cpp.

◆ strError()

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.

Definition at line 204 of file chainexternalwrenchestimator.cpp.

◆ updateInternalDataStructures()

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.

Definition at line 45 of file chainexternalwrenchestimator.cpp.

Member Data Documentation

◆ CHAIN

const Chain& KDL::ChainExternalWrenchEstimator::CHAIN
private

Definition at line 111 of file chainexternalwrenchestimator.hpp.

◆ coriolis_torque

JntArray KDL::ChainExternalWrenchEstimator::coriolis_torque
private

Definition at line 117 of file chainexternalwrenchestimator.hpp.

◆ DT_SEC

const double KDL::ChainExternalWrenchEstimator::DT_SEC
private

Definition at line 112 of file chainexternalwrenchestimator.hpp.

◆ dynparam_solver

ChainDynParam KDL::ChainExternalWrenchEstimator::dynparam_solver
private

Definition at line 122 of file chainexternalwrenchestimator.hpp.

◆ E_DYNPARAMSOLVERCORIOLIS_FAILED

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

Internally-used Dynamics Parameters (Mass) solver failed.

Definition at line 52 of file chainexternalwrenchestimator.hpp.

◆ E_DYNPARAMSOLVERGRAVITY_FAILED

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

Internally-used Dynamics Parameters (Coriolis) solver failed.

Definition at line 53 of file chainexternalwrenchestimator.hpp.

◆ E_DYNPARAMSOLVERMASS_FAILED

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

Internally-used Jacobian solver failed.

Definition at line 51 of file chainexternalwrenchestimator.hpp.

◆ E_FKSOLVERPOS_FAILED

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

Definition at line 49 of file chainexternalwrenchestimator.hpp.

◆ E_JACSOLVER_FAILED

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

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

Definition at line 50 of file chainexternalwrenchestimator.hpp.

◆ estimated_ext_torque

JntArray KDL::ChainExternalWrenchEstimator::estimated_ext_torque
private

Definition at line 117 of file chainexternalwrenchestimator.hpp.

◆ estimated_momentum_integral

JntArray KDL::ChainExternalWrenchEstimator::estimated_momentum_integral
private

Definition at line 117 of file chainexternalwrenchestimator.hpp.

◆ ESTIMATION_GAIN

Eigen::VectorXd KDL::ChainExternalWrenchEstimator::ESTIMATION_GAIN
private

Definition at line 121 of file chainexternalwrenchestimator.hpp.

◆ FILTER_CONST

const double KDL::ChainExternalWrenchEstimator::FILTER_CONST
private

Definition at line 112 of file chainexternalwrenchestimator.hpp.

◆ filtered_estimated_ext_torque

JntArray KDL::ChainExternalWrenchEstimator::filtered_estimated_ext_torque
private

Definition at line 117 of file chainexternalwrenchestimator.hpp.

◆ fk_pos_solver

ChainFkSolverPos_recursive KDL::ChainExternalWrenchEstimator::fk_pos_solver
private

Definition at line 124 of file chainexternalwrenchestimator.hpp.

◆ gravity_torque

JntArray KDL::ChainExternalWrenchEstimator::gravity_torque
private

Definition at line 117 of file chainexternalwrenchestimator.hpp.

◆ initial_jnt_momentum

JntArray KDL::ChainExternalWrenchEstimator::initial_jnt_momentum
private

Definition at line 117 of file chainexternalwrenchestimator.hpp.

◆ jacobian_end_eff

Jacobian KDL::ChainExternalWrenchEstimator::jacobian_end_eff
private

Definition at line 119 of file chainexternalwrenchestimator.hpp.

◆ jacobian_end_eff_transpose

Eigen::MatrixXd KDL::ChainExternalWrenchEstimator::jacobian_end_eff_transpose
private

Definition at line 120 of file chainexternalwrenchestimator.hpp.

◆ jacobian_end_eff_transpose_inv

Eigen::MatrixXd KDL::ChainExternalWrenchEstimator::jacobian_end_eff_transpose_inv
private

Definition at line 120 of file chainexternalwrenchestimator.hpp.

◆ jacobian_solver

ChainJntToJacSolver KDL::ChainExternalWrenchEstimator::jacobian_solver
private

Definition at line 123 of file chainexternalwrenchestimator.hpp.

◆ jnt_mass_matrix

JntSpaceInertiaMatrix KDL::ChainExternalWrenchEstimator::jnt_mass_matrix
private

Definition at line 116 of file chainexternalwrenchestimator.hpp.

◆ jnt_mass_matrix_dot

JntSpaceInertiaMatrix KDL::ChainExternalWrenchEstimator::jnt_mass_matrix_dot
private

Definition at line 116 of file chainexternalwrenchestimator.hpp.

◆ nj

unsigned int KDL::ChainExternalWrenchEstimator::nj
private

Definition at line 115 of file chainexternalwrenchestimator.hpp.

◆ ns

unsigned int KDL::ChainExternalWrenchEstimator::ns
private

Definition at line 115 of file chainexternalwrenchestimator.hpp.

◆ previous_jnt_mass_matrix

JntSpaceInertiaMatrix KDL::ChainExternalWrenchEstimator::previous_jnt_mass_matrix
private

Definition at line 116 of file chainexternalwrenchestimator.hpp.

◆ S

Eigen::VectorXd KDL::ChainExternalWrenchEstimator::S
private

Definition at line 121 of file chainexternalwrenchestimator.hpp.

◆ S_inv

Eigen::VectorXd KDL::ChainExternalWrenchEstimator::S_inv
private

Definition at line 121 of file chainexternalwrenchestimator.hpp.

◆ svd_eps

double KDL::ChainExternalWrenchEstimator::svd_eps
private

Definition at line 113 of file chainexternalwrenchestimator.hpp.

◆ svd_maxiter

int KDL::ChainExternalWrenchEstimator::svd_maxiter
private

Definition at line 114 of file chainexternalwrenchestimator.hpp.

◆ tmp

Eigen::VectorXd KDL::ChainExternalWrenchEstimator::tmp
private

Definition at line 121 of file chainexternalwrenchestimator.hpp.

◆ total_torque

JntArray KDL::ChainExternalWrenchEstimator::total_torque
private

Definition at line 117 of file chainexternalwrenchestimator.hpp.

◆ U

Eigen::MatrixXd KDL::ChainExternalWrenchEstimator::U
private

Definition at line 120 of file chainexternalwrenchestimator.hpp.

◆ V

Eigen::MatrixXd KDL::ChainExternalWrenchEstimator::V
private

Definition at line 120 of file chainexternalwrenchestimator.hpp.


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


orocos_kdl
Author(s):
autogenerated on Thu Apr 13 2023 02:19:15