Recursive newton euler inverse dynamics solver. More...
#include <treeidsolver_recursive_newton_euler.hpp>
Classes | |
struct | Entry |
struct | JntEntry |
Public Member Functions | |
int | CartToJnt (const JntArray &q, const JntArray &q_dot, const JntArray &q_dotdot, const Wrenches &f_ext, JntArray &torques) |
int | CartToJnt (const std::vector< double > &q, const std::vector< double > &q_dot, const std::vector< double > &q_dotdot, const Wrenches &f_ext, JntArray &torques) |
TreeIdSolver_RNE (const Tree &tree, Vector grav) | |
~TreeIdSolver_RNE () | |
Private Attributes | |
Twist | ag |
indexed by joint name | |
std::map< std::string, Entry > | db |
std::map< std::string, JntEntry > | jntdb |
indexed by segment name | |
std::string | root_name |
Tree | tree |
Recursive newton euler inverse dynamics solver.
The algorithm implementation is based on the book "Rigid Body Dynamics Algorithms" of Roy Featherstone, 2008 (ISBN:978-0-387-74314-1) See page 96 for the pseudo-code.
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.
Definition at line 39 of file treeidsolver_recursive_newton_euler.hpp.
KDL::TreeIdSolver_RNE::TreeIdSolver_RNE | ( | const Tree & | tree, |
Vector | grav | ||
) |
Constructor for the solver, it will allocate all the necessary memory
chain | The kinematic chain to calculate the inverse dynamics for, an internal copy will be made. |
grav | The gravity vector to use during the calculation. |
Definition at line 36 of file treeidsolver_recursive_newton_euler.cpp.
KDL::TreeIdSolver_RNE::~TreeIdSolver_RNE | ( | ) | [inline] |
Definition at line 47 of file treeidsolver_recursive_newton_euler.hpp.
int KDL::TreeIdSolver_RNE::CartToJnt | ( | const JntArray & | q, |
const JntArray & | q_dot, | ||
const JntArray & | q_dotdot, | ||
const Wrenches & | f_ext, | ||
JntArray & | torques | ||
) | [virtual] |
Function to calculate from Cartesian forces to joint torques. Input parameters;
q | The current joint positions |
q_dot | The current joint velocities |
q_dotdot | The current joint accelerations |
f_ext | The external forces (no gravity) on the segments Output parameters: |
torques | the resulting torques for the joints |
these are not RT safe... maps are dangerous because might create element inadvertently
Implements KDL::TreeIdSolver.
Definition at line 187 of file treeidsolver_recursive_newton_euler.cpp.
int KDL::TreeIdSolver_RNE::CartToJnt | ( | const std::vector< double > & | q, |
const std::vector< double > & | q_dot, | ||
const std::vector< double > & | q_dotdot, | ||
const Wrenches & | f_ext, | ||
JntArray & | torques | ||
) | [virtual] |
these are not RT safe... maps are dangerous because might create element inadvertently
Implements KDL::TreeIdSolver.
Definition at line 67 of file treeidsolver_recursive_newton_euler.cpp.
Twist KDL::TreeIdSolver_RNE::ag [private] |
indexed by joint name
Definition at line 96 of file treeidsolver_recursive_newton_euler.hpp.
std::map<std::string, Entry> KDL::TreeIdSolver_RNE::db [private] |
Definition at line 91 of file treeidsolver_recursive_newton_euler.hpp.
std::map<std::string, JntEntry> KDL::TreeIdSolver_RNE::jntdb [private] |
indexed by segment name
Definition at line 92 of file treeidsolver_recursive_newton_euler.hpp.
std::string KDL::TreeIdSolver_RNE::root_name [private] |
Definition at line 81 of file treeidsolver_recursive_newton_euler.hpp.
Tree KDL::TreeIdSolver_RNE::tree [private] |
Definition at line 80 of file treeidsolver_recursive_newton_euler.hpp.