RML  1.0
Robotics Mathematical Library
Loading...
Searching...
No Matches
rml::NewtonEuler Class Reference

Implementation of the Newton-Euler equation for rigid-body chains. More...

#include <NewtonEuler.h>

Public Member Functions

 NewtonEuler (std::shared_ptr< RobotModel > &model, std::string &armID, std::string &toolID)
 
virtual ~NewtonEuler ()
 
void EvaluateAlgorithmStep (const Eigen::VectorXd &q, const Eigen::VectorXd &q_dot, const Eigen::VectorXd &q_ddot, const Eigen::Vector3d &gravity, Eigen::VectorXd &torques)
 
auto Gravityvector () -> Eigen::Vector3d &
 
Eigen::MatrixXd InertiaMatrix ()
 
Eigen::VectorXd GravityEffect ()
 
Eigen::VectorXd CoriolisGravityExternalForcesEffect ()
 
void PrintVars () const
 

Detailed Description

Implementation of the Newton-Euler equation for rigid-body chains.

This class makes use of rml::RobotModel to find the forces and moments acting on the manipulator. Some facilites equations are provided to use the class in order to simulated dynamic systems. The nomenclature used for the manipulators dynamic equation is the following:

$ A(q)\ddot{q} + B(q_,\dot{q})\dot{q} + C(q) = m + \hat{m} $

where $ \hat{m} $ are the external forces.

I can evaluate the various A, B, C matrix by imposing q_dot, q_ddot equal to zero. After, I can compute q_ddot by inverting the above mentioned formula. Defined $ \tilde{m} = B\dot{q} + C $, we can write:

$ \ddot{q} = A^{-1}[ m + \hat{m} - \tilde{m}] $

The newton euler algorithm can be used to evaulate the $ A $ matrix and the $ \tilde{m} $ , and the functions InertiaMatrix() and CoriolisGravityExternalForcesEffect() provide this functionalities.

Note
Don't forget to set the dynamic properties of the ArmModel links before using the algorithms in this class, by calling RobotLink::SetDynamicProperties().

Constructor & Destructor Documentation

◆ NewtonEuler()

rml::NewtonEuler::NewtonEuler ( std::shared_ptr< RobotModel > &  model,
std::string &  armID,
std::string &  toolID 
)

◆ ~NewtonEuler()

virtual rml::NewtonEuler::~NewtonEuler ( )
virtual

Member Function Documentation

◆ CoriolisGravityExternalForcesEffect()

Eigen::VectorXd rml::NewtonEuler::CoriolisGravityExternalForcesEffect ( )
Returns
$ \tilde{m} = B\dot{q} + C $

◆ EvaluateAlgorithmStep()

void rml::NewtonEuler::EvaluateAlgorithmStep ( const Eigen::VectorXd &  q,
const Eigen::VectorXd &  q_dot,
const Eigen::VectorXd &  q_ddot,
const Eigen::Vector3d &  gravity,
Eigen::VectorXd &  torques 
)

◆ GravityEffect()

Eigen::VectorXd rml::NewtonEuler::GravityEffect ( )
Returns
matrix of the effect of gravity in the joint space

◆ Gravityvector()

auto rml::NewtonEuler::Gravityvector ( ) -> Eigen::Vector3d&
inline

set the gravity vector

◆ InertiaMatrix()

Eigen::MatrixXd rml::NewtonEuler::InertiaMatrix ( )
Returns
the inertia matrix matrix

◆ PrintVars()

void rml::NewtonEuler::PrintVars ( ) const

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