- 3.0.2 models module.
inertia_properties.h
Go to the documentation of this file.
1 #ifndef IIT_ROBOT_CT_DOUBLEINVERTEDPENDULUM_INERTIA_PROPERTIES_H_
2 #define IIT_ROBOT_CT_DOUBLEINVERTEDPENDULUM_INERTIA_PROPERTIES_H_
3 
4 #include <iit/rbd/rbd.h>
6 #include <iit/rbd/utils.h>
8 
9 #include "declarations.h"
10 
11 namespace iit {
12 namespace ct_DoubleInvertedPendulum {
17 namespace dyn {
18 
20 
21 namespace tpl {
22 
23 template <typename TRAIT>
25  public:
26  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
27 
28  typedef typename TRAIT::Scalar Scalar;
31  typedef typename CoreS::Vector3 Vec3d;
32 
35  const IMatrix& getTensor_Link1() const;
36  const IMatrix& getTensor_Link2() const;
37  Scalar getMass_Link1() const;
38  Scalar getMass_Link2() const;
39  const Vec3d& getCOM_Link1() const;
40  const Vec3d& getCOM_Link2() const;
41  Scalar getTotalMass() const;
42 
43  private:
44 
45  IMatrix tensor_Link1;
46  IMatrix tensor_Link2;
47  Vec3d com_Link1;
48  Vec3d com_Link2;
49 };
50 
51 template <typename TRAIT>
53 
54 template <typename TRAIT>
56  return this->tensor_Link1;
57 }
58 template <typename TRAIT>
60  return this->tensor_Link2;
61 }
62 template <typename TRAIT>
64  return this->tensor_Link1.getMass();
65 }
66 template <typename TRAIT>
68  return this->tensor_Link2.getMass();
69 }
70 template <typename TRAIT>
72  return this->com_Link1;
73 }
74 template <typename TRAIT>
76  return this->com_Link2;
77 }
78 
79 template <typename TRAIT>
81  return 1.0 + 1.0;
82 }
83 
84 }
85 
87 
88 }
89 }
90 }
91 
93 
94 #endif
CoreS::Vector3 Vec3d
Definition: inertia_properties.h:31
Scalar getMass_Link1() const
Definition: inertia_properties.h:63
const Vec3d & getCOM_Link2() const
Definition: inertia_properties.h:75
const IMatrix & getTensor_Link1() const
Definition: inertia_properties.h:55
ct::core::ADCodegenLinearizer< state_dim, control_dim >::ADCGScalar Scalar
Definition: HyALinearizationCodeGen.cpp:23
iit::rbd::Core< Scalar > CoreS
Definition: inertia_properties.h:29
const Vec3d & getCOM_Link1() const
Definition: inertia_properties.h:71
InertiaProperties()
Definition: inertia_properties.impl.h:2
const IMatrix & getTensor_Link2() const
Definition: inertia_properties.h:59
tpl::InertiaMatrixDense< double > InertiaMatrixDense
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef TRAIT::Scalar Scalar
Definition: inertia_properties.h:28
~InertiaProperties()
Definition: inertia_properties.h:52
iit::rbd::tpl::InertiaMatrixDense< Scalar > IMatrix
Definition: inertia_properties.h:30
PlainMatrix< Scalar, 3, 1 > Vector3
Scalar getMass_Link2() const
Definition: inertia_properties.h:67
Scalar getTotalMass() const
Definition: inertia_properties.h:80