10 #ifndef _IIT_RBD_INERTIAMATRIX_H_    11 #define _IIT_RBD_INERTIAMATRIX_H_    24 template<
typename SCALAR>
    28     EIGEN_MAKE_ALIGNED_OPERATOR_NEW
    40     template<
typename OtherDerived>
    43     template<
typename OtherDerived>
    69     void fill(Scalar m, 
const Vec3& com, 
const Mat33& tensor);
   132     template<
typename Vector>
   137     void set(Scalar m, 
const Vec3& com, 
const Mat33& I);
   141 template<
typename SCALAR>
   148 #define block33 this->template block<3,3>   149 #define data    (this->operator())   150 #define TPL     template<typename S>   151 #define CLASS   InertiaMatrixDense<S>   174     set(mass, cogPosition, tensor);
   178 inline void CLASS::fill(
Scalar mass, 
const Vec3& comPosition,
   181     set(mass, comPosition, tensor);
   185 inline typename CLASS::Scalar CLASS::getMass()
 const   200 inline const typename CLASS::Block33_const CLASS::get3x3Tensor()
 const   206 inline void CLASS::changeMass(
Scalar newMass) {
   209     this->block<3,6>(
AX,0) *= newMass/getMass();
   215 inline void CLASS::changeCOM(
const Vec3& newcom)
   218     setSkewSymmetricBlock(  getMass() * newcom, 
block33(
AX,
LX));
   236 inline void CLASS::changeRotationalInertia(
const Mat33& tensor)
   242 inline void CLASS::set(
   260 template<
typename OtherDerived>
   261 inline CLASS& CLASS::operator=
   262         (
const MatrixBase<OtherDerived>& other)
   279 template<
typename OtherDerived>
   280 inline CLASS& CLASS::operator+=
   281         (
const MatrixBase<OtherDerived>& other)
   292 inline void CLASS::setTheFixedZeros()
   300 template<
typename Vector>
   301 inline void CLASS::setSkewSymmetricBlock(
   302         const MatrixBase<Vector>& v, Block33_t block)
   304     block(
X,
Y) = - ( block(
Y,
X) = v(
Z) );
   305     block(
Z,
X) = - ( block(
X,
Z) = v(
Y) );
   306     block(
Y,
Z) = - ( block(
Z,
Y) = v(
X) );
 
#define CLASS
Definition: InertiaMatrix.h:151
void changeRotationalInertia(const Mat33 &tensor)
PlainMatrix< Scalar, 6, 6 > Matrix66
Definition: rbd.h:79
#define data
Definition: InertiaMatrix.h:149
InertiaMatrixDense< SCALAR > & operator+=(const MatrixBase< OtherDerived > &other)
ct::core::ADCodegenLinearizer< state_dim, control_dim >::ADCGScalar Scalar
typename Core< S >::Matrix33 Mat33
Definition: types.h:23
void changeCOM(const Vec3 &newcom)
Definition: InertiaMatrix.h:25
void fill(Scalar m, const Vec3 &com, const Mat33 &tensor)
void changeMass(Scalar m)
PlainMatrix< Scalar, 3, 3 > Matrix33
Definition: rbd.h:78
CppAD::AD< CppAD::cg::CG< double > > SCALAR
Eigen::Block< XprType, R, C > MatrixBlock
Definition: rbd.h:57
const Block33_const get3x3Tensor() const
InertiaMatrixDense< SCALAR > & operator=(const MatrixBase< OtherDerived > &other)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR Scalar
Definition: InertiaMatrix.h:30
tpl::InertiaMatrixDense< double > InertiaMatrixDense
Definition: InertiaMatrix.h:316
Eigen::MatrixBase< Derived > MatrixBase
Definition: rbd.h:51
void setSkewSymmetricBlock(const MatrixBase< Vector > &v, Block33_t block)
#define block33
Definition: InertiaMatrix.h:148
Definition: InertiaMatrix.h:142
#define TPL
Definition: InertiaMatrix.h:150
PlainMatrix< Scalar, 3, 1 > Vector3
Definition: rbd.h:80
typename Core< S >::Vector3 Vec3
Definition: types.h:25
Eigen::SparseMatrix< Scalar > SparseMatrix
Definition: rbd.h:60