- 3.0.2 rigid body dynamics module.
jsim.h
Go to the documentation of this file.
1 #ifndef IIT_TESTIRB4600_JSIM_H_
2 #define IIT_TESTIRB4600_JSIM_H_
3 
4 #include <iit/rbd/rbd.h>
6 
7 #include "declarations.h"
8 #include "transforms.h"
9 #include "inertia_properties.h"
12 
13 
14 namespace iit {
15 namespace testirb4600 {
16 namespace dyn {
17 
18 namespace tpl{
19 
23 template <class TRAIT>
24 class JSIM : public iit::rbd::StateDependentMatrix<iit::testirb4600::JointState, 6, 6, JSIM<TRAIT>>
25 {
26  public:
27  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
28  private:
30  public:
31  typedef typename TRAIT::Scalar SCALAR;
32  typedef typename Base::Index Index;
33  typedef Eigen::Matrix<SCALAR,6,6> MatrixType;
35  typedef iit::testirb4600::tpl::ForceTransforms<TRAIT> FTransforms;
37 
38  public:
39  JSIM(IProperties&, FTransforms&);
40  ~JSIM() {}
41 
43 
44 
48  void computeL();
55  void computeInverse();
59  const MatrixType& getL() const;
63  const MatrixType& getInverse() const;
64 
65  protected:
69  void computeLInverse();
70  private:
71  IProperties& linkInertias;
72  FTransforms* frcTransf;
73 
74  // The composite-inertia tensor for each link
75  InertiaMatrix link1_Ic;
76  InertiaMatrix link2_Ic;
77  InertiaMatrix link3_Ic;
78  InertiaMatrix link4_Ic;
79  InertiaMatrix link5_Ic;
80  const InertiaMatrix& link6_Ic;
81  InertiaMatrix Ic_spare;
82 
83  MatrixType L;
84  MatrixType Linv;
85  MatrixType inverse;
86 };
87 
88 template <class TRAIT>
89 inline const typename JSIM<TRAIT>::MatrixType& JSIM<TRAIT>::getL() const {
90  return L;
91 }
92 
93 template <class TRAIT>
94 inline const typename JSIM<TRAIT>::MatrixType& JSIM<TRAIT>::getInverse() const {
95  return inverse;
96 }
97 
98 
99 } // namespace tpl
100 
102 
103 }
104 }
105 }
106 
107 #include "jsim.impl.h"
108 
109 #endif
Definition: StateDependentMatrix.h:36
const MatrixType & getInverse() const
Definition: jsim.h:94
iit::rbd::tpl::InertiaMatrixDense< SCALAR > InertiaMatrix
Definition: jsim.h:36
Eigen::Matrix< SCALAR, 6, 6 > MatrixType
Definition: jsim.h:33
~JSIM()
Definition: jsim.h:40
iit::testirb4600::tpl::ForceTransforms< TRAIT > FTransforms
Definition: jsim.h:35
Definition: InertiaMatrix.h:25
Base::Index Index
Definition: jsim.h:32
Definition: inertia_properties.h:25
InertiaProperties< TRAIT > IProperties
Definition: jsim.h:34
const JSIM & update(const iit::testirb4600::JointState &)
Definition: jsim.impl.h:17
const MatrixType & getL() const
Definition: jsim.h:89
void computeInverse()
Definition: jsim.impl.h:207
void computeL()
Definition: jsim.impl.h:134
void computeLInverse()
Definition: jsim.impl.h:249
TRAIT::Scalar SCALAR
Definition: jsim.h:31
JSIM(IProperties &, FTransforms &)
Definition: jsim.impl.h:5
Column6d JointState
Definition: declarations.h:23