Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
KDL::ChainIdSolver_Vereshchagin Class Reference

Dynamics calculations by constraints based on Vereshchagin 1989. for a chain. This class creates instance of hybrid dynamics solver. The solver calculates total joint space accelerations in a chain when a constraint force(s) is applied to the chain's end-effector (task space/cartesian space). More...

#include <chainidsolver_vereshchagin.hpp>

Inheritance diagram for KDL::ChainIdSolver_Vereshchagin:
Inheritance graph


struct  segment_info

Public Member Functions

int CartToJnt (const JntArray &q, const JntArray &q_dot, JntArray &q_dotdot, const Jacobian &alfa, const JntArray &beta, const Wrenches &f_ext, JntArray &torques)
 ChainIdSolver_Vereshchagin (const Chain &chain, Twist root_acc, unsigned int nc)
virtual void updateInternalDataStructures ()
 ~ChainIdSolver_Vereshchagin ()

Private Types

typedef std::vector< FrameFrames
typedef Eigen::Matrix< double, 6, 6 > Matrix6d
typedef Eigen::Matrix< double, 6, Eigen::Dynamic > Matrix6Xd
typedef std::vector< TwistTwists
typedef Eigen::Matrix< double, 6, 1 > Vector6d
- Private Types inherited from KDL::SolverI
enum  {

Private Member Functions

void constraint_calculation (const JntArray &beta)
void downwards_sweep (const Jacobian &alfa, const JntArray &torques)
void final_upwards_sweep (JntArray &q_dotdot, JntArray &torques)
void initial_upwards_sweep (const JntArray &q, const JntArray &q_dot, const JntArray &q_dotdot, const Wrenches &f_ext)
- Private Member Functions inherited from KDL::SolverI
virtual int getError () const
 Return the latest error. More...
 SolverI ()
 Initialize latest error to E_NOERROR. More...
virtual const char * strError (const int error) const
virtual ~SolverI ()

Private Attributes

Twist acc_root
Jacobian alfa_N
Jacobian alfa_N2
JntArray beta_N
const Chainchain
Frame F_total
Eigen::MatrixXd M_0_inverse
unsigned int nc
unsigned int nj
unsigned int ns
Eigen::VectorXd nu
Eigen::VectorXd nu_sum
Wrench qdotdot_sum
std::vector< segment_info, Eigen::aligned_allocator< segment_info > > results
Eigen::VectorXd Sm
Eigen::VectorXd tmpm
Eigen::MatrixXd Um
Eigen::MatrixXd Vm
- Private Attributes inherited from KDL::SolverI
int error
 Latest error, initialized to E_NOERROR in constructor. More...

Detailed Description

Dynamics calculations by constraints based on Vereshchagin 1989. for a chain. This class creates instance of hybrid dynamics solver. The solver calculates total joint space accelerations in a chain when a constraint force(s) is applied to the chain's end-effector (task space/cartesian space).

Definition at line 40 of file chainidsolver_vereshchagin.hpp.

Member Typedef Documentation

◆ Frames

typedef std::vector<Frame> KDL::ChainIdSolver_Vereshchagin::Frames

Definition at line 43 of file chainidsolver_vereshchagin.hpp.

◆ Matrix6d

typedef Eigen::Matrix<double, 6, 6 > KDL::ChainIdSolver_Vereshchagin::Matrix6d

Definition at line 45 of file chainidsolver_vereshchagin.hpp.

◆ Matrix6Xd

typedef Eigen::Matrix<double, 6, Eigen::Dynamic> KDL::ChainIdSolver_Vereshchagin::Matrix6Xd

Definition at line 46 of file chainidsolver_vereshchagin.hpp.

◆ Twists

typedef std::vector<Twist> KDL::ChainIdSolver_Vereshchagin::Twists

Definition at line 42 of file chainidsolver_vereshchagin.hpp.

◆ Vector6d

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

Definition at line 44 of file chainidsolver_vereshchagin.hpp.

Constructor & Destructor Documentation

◆ ChainIdSolver_Vereshchagin()

KDL::ChainIdSolver_Vereshchagin::ChainIdSolver_Vereshchagin ( const Chain chain,
Twist  root_acc,
unsigned int  nc 

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

chainThe kinematic chain to calculate the inverse dynamics for, an internal copy will be made.
root_accThe acceleration vector of the root to use during the calculation.(most likely contains gravity)

Definition at line 33 of file chainidsolver_vereshchagin.cpp.

◆ ~ChainIdSolver_Vereshchagin()

KDL::ChainIdSolver_Vereshchagin::~ChainIdSolver_Vereshchagin ( )

Definition at line 57 of file chainidsolver_vereshchagin.hpp.

Member Function Documentation

◆ CartToJnt()

int KDL::ChainIdSolver_Vereshchagin::CartToJnt ( const JntArray q,
const JntArray q_dot,
JntArray q_dotdot,
const Jacobian alfa,
const JntArray beta,
const Wrenches f_ext,
JntArray torques 

This method calculates joint space constraint torques and total joint space acceleration. It returns 0 when it succeeds, otherwise -1 or -2 for unmatching matrix and array sizes. Input parameters;

qThe current joint positions
q_dotThe current joint velocities
f_extThe external forces (no gravity, it is given in root acceleration) on the segments. Output parameters:
q_dotdotThe joint accelerations
torquesthe resulting constraint torques for the joints
error/success code

Definition at line 53 of file chainidsolver_vereshchagin.cpp.

◆ constraint_calculation()

void KDL::ChainIdSolver_Vereshchagin::constraint_calculation ( const JntArray beta)

This method calculates constraint force magnitudes.

Definition at line 251 of file chainidsolver_vereshchagin.cpp.

◆ downwards_sweep()

void KDL::ChainIdSolver_Vereshchagin::downwards_sweep ( const Jacobian alfa,
const JntArray torques 

This method is a force balance sweep. It calculates articulated body inertias and bias forces. Additionally, acceleration energies generated by bias forces and unit forces are calculated here.

Definition at line 135 of file chainidsolver_vereshchagin.cpp.

◆ final_upwards_sweep()

void KDL::ChainIdSolver_Vereshchagin::final_upwards_sweep ( JntArray q_dotdot,
JntArray torques 

This method puts all acceleration contributions (constraint, bias, nullspace and parent accelerations) together.

Definition at line 286 of file chainidsolver_vereshchagin.cpp.

◆ initial_upwards_sweep()

void KDL::ChainIdSolver_Vereshchagin::initial_upwards_sweep ( const JntArray q,
const JntArray q_dot,
const JntArray q_dotdot,
const Wrenches f_ext 

This method calculates all cartesian space poses, twists, bias accelerations. External forces are also taken into account in this outward sweep.

Definition at line 74 of file chainidsolver_vereshchagin.cpp.

◆ updateInternalDataStructures()

void KDL::ChainIdSolver_Vereshchagin::updateInternalDataStructures ( )

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 48 of file chainidsolver_vereshchagin.cpp.

Member Data Documentation

◆ acc_root

Twist KDL::ChainIdSolver_Vereshchagin::acc_root

Definition at line 129 of file chainidsolver_vereshchagin.hpp.

◆ alfa_N

Jacobian KDL::ChainIdSolver_Vereshchagin::alfa_N

Definition at line 130 of file chainidsolver_vereshchagin.hpp.

◆ alfa_N2

Jacobian KDL::ChainIdSolver_Vereshchagin::alfa_N2

Definition at line 131 of file chainidsolver_vereshchagin.hpp.

◆ beta_N

JntArray KDL::ChainIdSolver_Vereshchagin::beta_N

Definition at line 135 of file chainidsolver_vereshchagin.hpp.

◆ chain

const Chain& KDL::ChainIdSolver_Vereshchagin::chain

Definition at line 125 of file chainidsolver_vereshchagin.hpp.

◆ F_total

Frame KDL::ChainIdSolver_Vereshchagin::F_total

Definition at line 141 of file chainidsolver_vereshchagin.hpp.

◆ M_0_inverse

Eigen::MatrixXd KDL::ChainIdSolver_Vereshchagin::M_0_inverse

Definition at line 132 of file chainidsolver_vereshchagin.hpp.

◆ nc

unsigned int KDL::ChainIdSolver_Vereshchagin::nc

Definition at line 128 of file chainidsolver_vereshchagin.hpp.

◆ nj

unsigned int KDL::ChainIdSolver_Vereshchagin::nj

Definition at line 126 of file chainidsolver_vereshchagin.hpp.

◆ ns

unsigned int KDL::ChainIdSolver_Vereshchagin::ns

Definition at line 127 of file chainidsolver_vereshchagin.hpp.

◆ nu

Eigen::VectorXd KDL::ChainIdSolver_Vereshchagin::nu

Definition at line 136 of file chainidsolver_vereshchagin.hpp.

◆ nu_sum

Eigen::VectorXd KDL::ChainIdSolver_Vereshchagin::nu_sum

Definition at line 137 of file chainidsolver_vereshchagin.hpp.

◆ qdotdot_sum

Wrench KDL::ChainIdSolver_Vereshchagin::qdotdot_sum

Definition at line 140 of file chainidsolver_vereshchagin.hpp.

◆ results

std::vector<segment_info, Eigen::aligned_allocator<segment_info> > KDL::ChainIdSolver_Vereshchagin::results

Definition at line 188 of file chainidsolver_vereshchagin.hpp.

◆ Sm

Eigen::VectorXd KDL::ChainIdSolver_Vereshchagin::Sm

Definition at line 138 of file chainidsolver_vereshchagin.hpp.

◆ tmpm

Eigen::VectorXd KDL::ChainIdSolver_Vereshchagin::tmpm

Definition at line 139 of file chainidsolver_vereshchagin.hpp.

◆ Um

Eigen::MatrixXd KDL::ChainIdSolver_Vereshchagin::Um

Definition at line 133 of file chainidsolver_vereshchagin.hpp.

◆ Vm

Eigen::MatrixXd KDL::ChainIdSolver_Vereshchagin::Vm

Definition at line 134 of file chainidsolver_vereshchagin.hpp.

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

autogenerated on Mon Oct 19 2020 03:19:17