cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstRobot
robMass.h
Go to the documentation of this file.
1
/*
2
3
Author(s): Simon Leonard
4
Created on: Nov 11 2009
5
6
(C) Copyright 2008-2019 Johns Hopkins University (JHU), All Rights Reserved.
7
8
--- begin cisst license - do not edit ---
9
10
This software is provided "as is" under an open source license, with
11
no warranty. The complete license can be found in license.txt and
12
http://www.cisst.org/cisst/license.txt.
13
14
--- end cisst license ---
15
*/
16
17
#ifndef _robMass_h
18
#define _robMass_h
19
20
#include <iostream>
21
22
#include <
cisstVector/vctMatrixRotation3.h
>
23
#include <
cisstVector/vctFrame4x4.h
>
24
#if CISST_HAS_JSON
25
#include <json/json.h>
26
#endif
27
#include <
cisstRobot/robExport.h
>
28
29
class
CISST_EXPORT
robMass
{
30
public
:
31
32
enum
Errno
{
ESUCCESS
,
EFAILURE
};
33
34
private
:
35
37
double
mass;
38
40
47
vctFixedSizeVector<double,3>
com;
48
50
58
vctFixedSizeMatrix<double,3,3>
D;
59
61
73
vctMatrixRotation3<double>
V;
74
75
public
:
76
78
81
vctFixedSizeMatrix<double,3,3>
82
ParallelAxis
(
double
m,
83
const
vctFixedSizeVector<double,3>
& t,
84
const
vctFixedSizeMatrix<double,3,3>
& I )
const
;
85
86
88
91
robMass
();
92
93
robMass
(
double
m,
94
const
vctFixedSizeVector<double,3>
& com,
95
const
vctFixedSizeMatrix<double,3,3>
& D,
96
const
vctFixedSizeMatrix<double,3,3>
& V );
97
99
102
const
double
&
Mass
(
void
)
const
;
103
double
&
Mass
(
void
);
104
106
111
vctFixedSizeVector<double,3>
CenterOfMass
()
const
;
112
114
120
vctFixedSizeMatrix<double,3,3>
MomentOfInertia
()
const
;
121
122
vctFixedSizeMatrix<double,3,3>
MomentOfInertiaAtCOM
()
const
;
123
125
robMass::Errno
ReadMass
( std::istream& is );
126
#if CISST_HAS_JSON
127
robMass::Errno
ReadMass
(
const
Json::Value &config );
128
#endif
129
131
robMass::Errno
WriteMass
( std::ostream& os )
const
;
132
133
};
134
135
#endif
robMass::ReadMass
robMass::Errno ReadMass(std::istream &is)
Read the mass from a input stream.
robMass::ParallelAxis
vctFixedSizeMatrix< double, 3, 3 > ParallelAxis(double m, const vctFixedSizeVector< double, 3 > &t, const vctFixedSizeMatrix< double, 3, 3 > &I) const
Parallel Axis Theorem.
robMass::Mass
double & Mass(void)
robMass::WriteMass
robMass::Errno WriteMass(std::ostream &os) const
Write the mass from a output stream.
robMass::robMass
robMass()
Default constructor.
robMass::MomentOfInertia
vctFixedSizeMatrix< double, 3, 3 > MomentOfInertia() const
Return the moment of inertia tensor in the body frame.
robMass::CenterOfMass
vctFixedSizeVector< double, 3 > CenterOfMass() const
Return the center of mass.
robMass::MomentOfInertiaAtCOM
vctFixedSizeMatrix< double, 3, 3 > MomentOfInertiaAtCOM() const
robMass::Errno
Errno
Definition
robMass.h:32
robMass::EFAILURE
@ EFAILURE
Definition
robMass.h:32
robMass::ESUCCESS
@ ESUCCESS
Definition
robMass.h:32
robMass::Mass
const double & Mass(void) const
Return the mass.
robMass::robMass
robMass(double m, const vctFixedSizeVector< double, 3 > &com, const vctFixedSizeMatrix< double, 3, 3 > &D, const vctFixedSizeMatrix< double, 3, 3 > &V)
vctFixedSizeMatrix
Implementation of a fixed-size matrix using template metaprogramming.
Definition
vctFixedSizeMatrix.h:54
vctFixedSizeVector
Implementation of a fixed-size vector using template metaprogramming.
Definition
vctFixedSizeVector.h:54
vctMatrixRotation3
Define a rotation matrix for a space of dimension 3.
Definition
vctMatrixRotation3.h:51
CISST_EXPORT
#define CISST_EXPORT
Definition
cmnExportMacros.h:50
robExport.h
vctFrame4x4.h
Declaration of vctFrame4x4.
vctMatrixRotation3.h
Declaration of vctMatrixRotation3.
Generated by
1.18.0