Orocos KDL
KDL::TreeIdSolver_RNE Class Reference

Recursive newton euler inverse dynamics solver for kinematic trees. More...

#include <treeidsolver_recursive_newton_euler.hpp>

Inheritance diagram for KDL::TreeIdSolver_RNE:
KDL::TreeIdSolver KDL::SolverI

Public Member Functions

 TreeIdSolver_RNE (const Tree &tree, Vector grav)
int CartToJnt (const JntArray &q, const JntArray &q_dot, const JntArray &q_dotdot, const WrenchMap &f_ext, JntArray &torques)
virtual void updateInternalDataStructures ()
Public Member Functions inherited from KDL::SolverI
 SolverI ()
 Initialize latest error to E_NOERROR.
virtual ~SolverI ()
virtual int getError () const
 Return the latest error.
virtual const char * strError (const int error) const

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

Recursive newton euler inverse dynamics solver for kinematic trees.

It calculates the torques for the joints, given the motion of the joints (q,qdot,qdotdot), external forces on the segments (expressed in the segments reference frame) and the dynamical parameters of the segments.

This is an extension of the inverse dynamic solver for kinematic chains,

See also
ChainIdSolver_RNE. The main difference is the use of STL maps instead of vectors to represent external wrenches (as well as internal variables exploited during the recursion).

Constructor & Destructor Documentation

◆ TreeIdSolver_RNE()

KDL::TreeIdSolver_RNE::TreeIdSolver_RNE ( const Tree & tree,
Vector grav )

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

Parameters
treeThe kinematic tree to calculate the inverse dynamics for, an internal reference will be stored.
gravThe gravity vector to use during the calculation.

Member Function Documentation

◆ CartToJnt()

int KDL::TreeIdSolver_RNE::CartToJnt ( const JntArray & q,
const JntArray & q_dot,
const JntArray & q_dotdot,
const WrenchMap & f_ext,
JntArray & torques )
virtual

Function to calculate from Cartesian forces to joint torques. Input parameters;

Parameters
qThe current joint positions
q_dotThe current joint velocities
q_dotdotThe current joint accelerations
f_extThe external forces (no gravity) on the segments Output parameters:
torquesthe resulting torques for the joints

Implements KDL::TreeIdSolver.

◆ updateInternalDataStructures()

virtual void KDL::TreeIdSolver_RNE::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.


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