Aldebaran documentation
|
C++ Libraries
|
index
libalmath
2.5.11.14a
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
almath
scenegraph
bodymass.h
Go to the documentation of this file.
1
/*
2
* Copyright 2015 Aldebaran. All rights reserved.
3
*
4
*/
5
#ifndef LIB_ALMATH_SCENEGRAPH_BODYMASS_H
6
#define LIB_ALMATH_SCENEGRAPH_BODYMASS_H
7
8
#include <Eigen/Dense>
9
10
namespace
AL {
11
namespace
Math {
12
13
// Mass of a rigid body, described in an implcitly-defined "body frame".
14
template
<
typename
T>
15
struct
BodyMass
{
16
typedef
T
Scalar
;
17
typedef
Eigen::Matrix<Scalar, 3, 1, Eigen::DontAlign>
Vector3
;
18
typedef
Eigen::Matrix<Scalar, 3, 3, Eigen::DontAlign>
Matrix3
;
19
20
Scalar
mass
;
21
// center of mass, expressed in the body frame.
22
Vector3
center_of_mass
;
23
// rotational inertia, expressed at the body center of mass, the body frame
24
// basis.
25
Matrix3
rotational_inertia
;
26
27
template
<
typename
S>
28
BodyMass<S>
cast
()
const
{
29
return
BodyMass<S>
{
static_cast<
S
>
(
mass
),
center_of_mass
.template cast<S>(),
30
rotational_inertia
.template cast<S>()};
31
}
32
};
33
}
34
}
35
36
#endif
AL::Math::BodyMass::center_of_mass
Vector3 center_of_mass
Definition:
bodymass.h:22
AL::Math::BodyMass::mass
Scalar mass
Definition:
bodymass.h:20
AL::Math::BodyMass
Definition:
bodymass.h:15
AL::Math::BodyMass::Matrix3
Eigen::Matrix< Scalar, 3, 3, Eigen::DontAlign > Matrix3
Definition:
bodymass.h:18
AL::Math::BodyMass::Vector3
Eigen::Matrix< Scalar, 3, 1, Eigen::DontAlign > Vector3
Definition:
bodymass.h:17
AL::Math::BodyMass::cast
BodyMass< S > cast() const
Definition:
bodymass.h:28
AL::Math::BodyMass::Scalar
T Scalar
Definition:
bodymass.h:16
AL::Math::BodyMass::rotational_inertia
Matrix3 rotational_inertia
Definition:
bodymass.h:25
Copyright Aldebaran Robotics