Choreonoid
1.1
メインページ
関連ページ
ネームスペース
クラス
ファイル
ファイル一覧
ファイルメンバ
src
Body
Link.h
説明を見る。
1
6
#ifndef CNOID_BODY_LINK_H_INCLUDED
7
#define CNOID_BODY_LINK_H_INCLUDED
8
9
#include <string>
10
#include <ostream>
11
#include <vector>
12
#include <cnoid/EigenTypes>
13
#include <cnoid/ColdetModel>
14
#include "
exportdecl.h
"
15
16
namespace
cnoid {
17
class
Link;
18
}
19
20
CNOID_EXPORT
std::ostream&
operator<<
(std::ostream &out,
cnoid::Link
& link);
21
22
namespace
cnoid {
23
24
class
Body;
25
26
class
CNOID_EXPORT
Link
{
27
28
public
:
29
30
Link
();
31
Link
(
const
Link
& link);
32
~
Link
();
33
34
inline
const
std::string&
name
() {
35
return
name_;
36
}
37
inline
void
setName
(
const
std::string& name){
38
name_ = name;
39
}
40
41
inline
bool
isValid
() {
return
(index >= 0); }
42
void
addChild(
Link
* link);
43
bool
detachChild(
Link
* link);
44
inline
bool
isRoot
() {
return
!parent; }
45
46
inline
void
setAttitude
(
const
Matrix3
& R) { this->R = R * Rs.transpose(); }
47
inline
Matrix3
attitude
() {
return
this->R * Rs; }
48
inline
Matrix3
calcRfromAttitude
(
const
Matrix3
& R) {
return
R * Rs.transpose(); }
49
54
void
calcSubMassCM();
55
59
inline
void
setSegmentAttitude
(
const
Matrix3
& R) { this->R = R * Rs.transpose(); }
60
64
inline
Matrix3
segmentAttitude
() {
return
this->R * Rs; }
65
66
void
updateColdetModelPosition
() {
67
coldetModel->setPosition(R, p);
68
}
69
70
Body
*
body
;
71
72
int
index
;
73
int
jointId
;
74
75
enum
JointType
{
76
FIXED_JOINT
,
77
FREE_JOINT
,
78
ROTATIONAL_JOINT
,
79
SLIDE_JOINT
80
};
81
82
JointType
jointType
;
83
84
Link
*
parent
;
85
Link
*
sibling
;
86
Link
*
child
;
87
88
Vector3
p
;
89
98
Matrix3
R
;
99
100
Vector3
v
;
101
Vector3
w
;
102
Vector3
dv
;
103
Vector3
dw
;
104
105
double
q
;
106
double
dq
;
107
double
ddq
;
108
double
u
;
109
110
Vector3
a
;
111
Vector3
d
;
112
Vector3
b
;
113
114
Matrix3
Rs
;
115
116
double
m
;
117
Matrix3
I
;
118
Vector3
c
;
119
Vector3
wc
;
120
121
Vector3
vo
;
122
Vector3
dvo
;
123
126
Vector3
sw
;
127
130
Vector3
sv
;
131
132
Vector3
cv
;
133
Vector3
cw
;
134
135
Vector3
fext
;
136
Vector3
tauext
;
137
138
// needed ?
139
//Vector3 f; ///< force from the parent link
140
//Vector3 tau; ///< torque from the parent link
141
142
Matrix3
Iww
;
143
Matrix3
Iwv
;
144
Matrix3
Ivv
;
145
Vector3
pf
;
146
Vector3
ptau
;
147
Vector3
hhv
;
148
Vector3
hhw
;
149
double
uu
;
150
double
dd
;
151
152
double
Jm2
;
153
154
double
ulimit
;
155
double
llimit
;
156
double
uvlimit
;
157
double
lvlimit
;
158
159
double
defaultJointValue
;
160
double
torqueConst
;
161
double
encoderPulse
;
162
double
Ir
;
163
double
gearRatio
;
164
double
gearEfficiency
;
165
double
rotorResistor
;
166
167
bool
isHighGainMode
;
168
169
ColdetModelPtr
coldetModel
;
170
171
struct
ConstraintForce
{
172
Vector3
point
;
173
Vector3
force
;
174
};
175
176
typedef
std::vector<ConstraintForce>
ConstraintForceArray
;
177
ConstraintForceArray
constraintForces
;
178
179
double
subm
;
180
Vector3
submwc
;
181
182
private
:
183
184
std::string name_;
185
186
Link
& operator=(
const
Link
& link);
// no implementation is given to disable the copy operator
187
void
setBodyIter(
Body
* body);
188
friend
std::ostream& ::operator<<(std::ostream &out,
Link
& link);
189
void
putInformation(std::ostream& out);
// for the iostream output
190
};
191
192
};
193
194
195
#endif
Choreonoidに対してMon May 27 2013 21:54:56に生成されました。
1.8.1.2