orocos_kdl
chainfdsolver_recursive_newton_euler.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018 Craig Carignan <craigc at ssl dot umd dot edu>
2 
3 // Version: 1.0
4 // Author: Craig Carignan <craigc at ssl dot umd dot edu>
5 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
6 // URL: http://www.orocos.org/kdl
7 
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #ifndef KDL_CHAIN_FDSOLVER_RECURSIVE_NEWTON_EULER_HPP
23 #define KDL_CHAIN_FDSOLVER_RECURSIVE_NEWTON_EULER_HPP
24 
25 #include "chainfdsolver.hpp"
27 #include "chaindynparam.hpp"
28 
29 namespace KDL{
43  public:
49  ChainFdSolver_RNE(const Chain& chain, Vector grav);
51 
62  int CartToJnt(const JntArray &q, const JntArray &q_dot, const JntArray &torques, const Wrenches& f_ext, JntArray &q_dotdot);
63 
65  virtual void updateInternalDataStructures();
66 
89  void RK4Integrator(unsigned int& nj, const double& t, double& dt, KDL::JntArray& q, KDL::JntArray& q_dot,
90  KDL::JntArray& torques, KDL::Wrenches& f_ext, KDL::ChainFdSolver_RNE& fdsolver,
91  KDL::JntArray& q_dotdot, KDL::JntArray& dq, KDL::JntArray& dq_dot,
92  KDL::JntArray& q_temp, KDL::JntArray& q_dot_temp);
93 
94  private:
95  const Chain& chain;
98  unsigned int nj;
99  unsigned int ns;
100  JntSpaceInertiaMatrix H;
102  Eigen::MatrixXd H_eig;
103  Eigen::VectorXd Tzeroacc_eig;
104  Eigen::MatrixXd L_eig;
105  Eigen::VectorXd D_eig;
106  Eigen::VectorXd r_eig;
107  Eigen::VectorXd acc_eig;
108  };
109 }
110 
111 #endif
KDL::ChainIdSolver_RNE
Recursive newton euler inverse dynamics solver.
Definition: chainidsolver_recursive_newton_euler.hpp:40
KDL::ChainFdSolver_RNE::ChainFdSolver_RNE
ChainFdSolver_RNE(const Chain &chain, Vector grav)
Definition: chainfdsolver_recursive_newton_euler.cpp:29
KDL::JntArray
Definition: jntarray.hpp:69
std::vector
KDL::ChainFdSolver_RNE::chain
const Chain & chain
Definition: chainfdsolver_recursive_newton_euler.hpp:95
KDL::ChainFdSolver_RNE::ns
unsigned int ns
Definition: chainfdsolver_recursive_newton_euler.hpp:99
chainidsolver_recursive_newton_euler.hpp
chainfdsolver.hpp
KDL::ChainFdSolver_RNE::DynSolver
ChainDynParam DynSolver
Definition: chainfdsolver_recursive_newton_euler.hpp:96
KDL::ChainDynParam
Definition: chaindynparam.hpp:47
KDL::ChainFdSolver_RNE::H
JntSpaceInertiaMatrix H
Definition: chainfdsolver_recursive_newton_euler.hpp:100
KDL
Definition: kukaLWR_DHnew.cpp:25
KDL::ChainFdSolver
This abstract class encapsulates the inverse dynamics solver for a KDL::Chain.
Definition: chainfdsolver.hpp:41
chaindynparam.hpp
KDL::Vector
A concrete implementation of a 3 dimensional vector class.
Definition: frames.hpp:162
KDL::ChainFdSolver_RNE::D_eig
Eigen::VectorXd D_eig
Definition: chainfdsolver_recursive_newton_euler.hpp:105
KDL::ChainFdSolver_RNE
Recursive newton euler forward dynamics solver.
Definition: chainfdsolver_recursive_newton_euler.hpp:42
KDL::ChainFdSolver_RNE::CartToJnt
int CartToJnt(const JntArray &q, const JntArray &q_dot, const JntArray &torques, const Wrenches &f_ext, JntArray &q_dotdot)
Definition: chainfdsolver_recursive_newton_euler.cpp:51
KDL::ChainFdSolver_RNE::L_eig
Eigen::MatrixXd L_eig
Definition: chainfdsolver_recursive_newton_euler.hpp:104
KDL::ChainFdSolver_RNE::r_eig
Eigen::VectorXd r_eig
Definition: chainfdsolver_recursive_newton_euler.hpp:106
KDL::ChainFdSolver_RNE::Tzeroacc_eig
Eigen::VectorXd Tzeroacc_eig
Definition: chainfdsolver_recursive_newton_euler.hpp:103
KDL::ChainFdSolver_RNE::acc_eig
Eigen::VectorXd acc_eig
Definition: chainfdsolver_recursive_newton_euler.hpp:107
KDL::ChainFdSolver_RNE::updateInternalDataStructures
virtual void updateInternalDataStructures()
Definition: chainfdsolver_recursive_newton_euler.cpp:46
KDL::ChainFdSolver_RNE::~ChainFdSolver_RNE
~ChainFdSolver_RNE()
Definition: chainfdsolver_recursive_newton_euler.hpp:50
KDL::ChainFdSolver_RNE::Tzeroacc
JntArray Tzeroacc
Definition: chainfdsolver_recursive_newton_euler.hpp:101
KDL::ChainFdSolver_RNE::IdSolver
ChainIdSolver_RNE IdSolver
Definition: chainfdsolver_recursive_newton_euler.hpp:97
KDL::ChainFdSolver_RNE::nj
unsigned int nj
Definition: chainfdsolver_recursive_newton_euler.hpp:98
KDL::Chain
This class encapsulates a serial kinematic interconnection structure. It is built out of segments.
Definition: chain.hpp:35
KDL::ChainFdSolver_RNE::RK4Integrator
void RK4Integrator(unsigned int &nj, const double &t, double &dt, KDL::JntArray &q, KDL::JntArray &q_dot, KDL::JntArray &torques, KDL::Wrenches &f_ext, KDL::ChainFdSolver_RNE &fdsolver, KDL::JntArray &q_dotdot, KDL::JntArray &dq, KDL::JntArray &dq_dot, KDL::JntArray &q_temp, KDL::JntArray &q_dot_temp)
Definition: chainfdsolver_recursive_newton_euler.cpp:95
KDL::ChainFdSolver_RNE::H_eig
Eigen::MatrixXd H_eig
Definition: chainfdsolver_recursive_newton_euler.hpp:102