Orocos KDL
chaindynparam.hpp
1// Copyright (C) 2009 Dominick Vanthienen <dominick dot vanthienen at intermodalics dot eu>
2
3// Version: 1.0
4// Author: Dominick Vanthienen <dominick dot vanthienen at intermodalics dot eu>
5// Maintainer: Ruben Smits <ruben dot smits at intermodalics dot eu>
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 KDLCHAINDYNPARAM_HPP
23#define KDLCHAINDYNPARAM_HPP
24
25#include "chainidsolver_recursive_newton_euler.hpp"
26#include "articulatedbodyinertia.hpp"
27#include "jntspaceinertiamatrix.hpp"
28#include <Eigen/StdVector>
29
30namespace KDL {
31
47 class ChainDynParam : public SolverI
48 {
49 public:
50 ChainDynParam(const Chain& chain, Vector _grav);
51 virtual ~ChainDynParam();
52
53 virtual int JntToCoriolis(const JntArray &q, const JntArray &q_dot, JntArray &coriolis);
54 virtual int JntToMass(const JntArray &q, JntSpaceInertiaMatrix& H);
55 virtual int JntToGravity(const JntArray &q,JntArray &gravity);
56
59
60 private:
61 const Chain& chain;
62 int nr; // unused, remove in a future version
63 unsigned int nj;
64 unsigned int ns;
65 Vector grav;
66 Vector vectornull;
67 JntArray jntarraynull;
68 ChainIdSolver_RNE chainidsolver_coriolis;
69 ChainIdSolver_RNE chainidsolver_gravity;
70 std::vector<Wrench> wrenchnull;
71 std::vector<Frame> X;
72 std::vector<Twist> S;
73 //std::vector<RigidBodyInertia> I;
74 std::vector<ArticulatedBodyInertia, Eigen::aligned_allocator<ArticulatedBodyInertia> > Ic;
75 Wrench F;
76 Twist ag;
77
78 };
79
80}
81
82#endif
virtual int JntToCoriolis(const JntArray &q, const JntArray &q_dot, JntArray &coriolis)
virtual int JntToGravity(const JntArray &q, JntArray &gravity)
virtual void updateInternalDataStructures()
virtual ~ChainDynParam()
virtual int JntToMass(const JntArray &q, JntSpaceInertiaMatrix &H)
ChainDynParam(const Chain &chain, Vector _grav)
Recursive newton euler inverse dynamics solver.
Definition chainidsolver_recursive_newton_euler.hpp:40
This class encapsulates a serial kinematic interconnection structure. It is built out of segments.
Definition chain.hpp:35
Definition jntarray.hpp:70
SolverI()
Initialize latest error to E_NOERROR.
Definition solveri.hpp:111
represents both translational and rotational velocities.
Definition frames.hpp:723
A concrete implementation of a 3 dimensional vector class.
Definition frames.hpp:163
represents both translational and rotational acceleration.
Definition frames.hpp:882
Definition articulatedbodyinertia.hpp:32