Crawlerモデルファイル全記述内容¶
ステップ0: Crawlerモデルの作成 で解説したCrawlerモデルを記述しているモデルファイルの全テキストを以下に掲載します。本モデルは HAIROWorldPluginの “sample/tutorial/Crawler/crawler.body” というファイルに格納されています。
1format: ChoreonoidBody
2formatVersion: 1.0
3angleUnit: degree
4name: Crawler
5
6links:
7 -
8 name: CHASSIS
9 translation: [ 0, 0, 0.1 ]
10 jointType: free
11 centerOfMass: [ 0, 0, 0 ]
12 mass: 8.0
13 inertia: [
14 0.1, 0, 0,
15 0, 0.1, 0,
16 0, 0, 0.5 ]
17 elements:
18 Shape:
19 geometry:
20 type: Box
21 size: [ 0.45, 0.3, 0.1 ]
22 appearance: &BodyAppearance
23 material:
24 diffuseColor: [ 0.6, 0, 0 ]
25 specularColor: [ 0.8, 0.2, 0.2 ]
26 shininess: 0.6
27 -
28 name: TURRET_Y
29 parent: CHASSIS
30 translation: [ 0.1, 0, 0.1 ]
31 jointType: revolute
32 jointAxis: -Z
33 jointRange: unlimited
34 maxJointVelocity: 90
35 jointId: 0
36 centerOfMass: [ 0, 0, 0.025 ]
37 mass: 4.0
38 inertia: [
39 0.1, 0, 0,
40 0, 0.1, 0,
41 0, 0, 0.1 ]
42 elements:
43 Shape:
44 geometry:
45 type: Box
46 size: [ 0.2, 0.2, 0.1 ]
47 appearance: *BodyAppearance
48 -
49 name: TURRET_P
50 parent: TURRET_Y
51 translation: [ 0, 0, 0.05 ]
52 jointType: revolute
53 jointAxis: -Y
54 jointRange: [ -10, 45 ]
55 maxJointVelocity: 90
56 jointId: 1
57 elements:
58 -
59 # Turret
60 type: RigidBody
61 centerOfMass: [ 0, 0, 0 ]
62 mass: 3.0
63 inertia: [
64 0.1, 0, 0,
65 0, 0.1, 0,
66 0, 0, 0.1 ]
67 elements:
68 Shape:
69 geometry:
70 type: Cylinder
71 height: 0.1
72 radius: 0.1
73 appearance: *BodyAppearance
74 -
75 type: SpotLight
76 name: Light
77 translation: [ 0.08, 0, 0.1 ]
78 direction: [ 1, 0, 0 ]
79 beamWidth: 36
80 cutOffAngle: 40
81 cutOffExponent: 6
82 attenuation: [ 1, 0, 0.01 ]
83 elements:
84 Shape:
85 rotation: [ 0, 0, 1, 90 ]
86 translation: [ -0.02, 0, 0 ]
87 geometry:
88 type: Cone
89 height: 0.04
90 radius: 0.025
91 appearance:
92 material:
93 diffuseColor: [ 1.0, 1.0, 0.4 ]
94 ambientIntensity: 0.3
95 emissiveColor: [ 0.8, 0.8, 0.3 ]
96 -
97 type: Camera
98 name: Camera
99 translation: [ 0.1, 0, 0.05 ]
100 rotation: [ [ 1, 0, 0, 90 ], [ 0, 1, 0, -90 ] ]
101 format: COLOR
102 fieldOfView: 62
103 nearClipDistance: 0.02
104 width: 640
105 height: 480
106 frameRate: 30
107 elements:
108 Shape:
109 rotation: [ 1, 0, 0, 90 ]
110 geometry:
111 type: Cylinder
112 radius: 0.02
113 height: 0.02
114 appearance:
115 material:
116 diffuseColor: [ 0.2, 0.2, 0.8 ]
117 specularColor: [ 0.6, 0.6, 1.0 ]
118 shininess: 0.6
119 -
120 name: TRACK_L
121 parent: CHASSIS
122 translation: [ 0, 0.2, 0 ]
123 jointType: pseudo_continuous_track
124 jointAxis: Y
125 centerOfMass: [ 0, 0, 0 ]
126 mass: 1.0
127 inertia: [
128 0.02, 0, 0,
129 0, 0.02, 0,
130 0, 0, 0.02 ]
131 elements:
132 Shape: &TRACK
133 geometry:
134 type: Extrusion
135 crossSection: [
136 -0.22, -0.08,
137 0.22, -0.08,
138 0.34, 0.00,
139 0.22, 0.08,
140 -0.22, 0.08,
141 -0.34, 0.00,
142 -0.22, -0.08
143 ]
144 spine: [ 0, -0.05, 0, 0, 0.05, 0 ]
145 appearance:
146 material:
147 diffuseColor: [ 0.2, 0.2, 0.2 ]
148 -
149 name: TRACK_R
150 parent: CHASSIS
151 translation: [ 0, -0.2, 0 ]
152 jointType: pseudo_continuous_track
153 jointAxis: Y
154 centerOfMass: [ 0, 0, 0 ]
155 mass: 1.0
156 inertia: [
157 0.02, 0, 0,
158 0, 0.02, 0,
159 0, 0, 0.02 ]
160 elements:
161 Shape: *TRACK
162 -
163 name: HINGE_L
164 parent: TRACK_L
165 translation: [ 0.22, 0.055, 0 ]
166 jointType: revolute
167 jointAxis: -Y
168 jointRange: [ -45, 90 ]
169 maxJointVelocity: 90
170 jointId: 2
171 centerOfMass: [ 0, 0, 0 ]
172 mass: 2.0
173 inertia: [
174 0.1, 0, 0,
175 0, 0.1, 0,
176 0, 0, 0.1 ]
177 elements:
178 Shape: &HINGE
179 geometry:
180 type: Cylinder
181 height: 0.01
182 radius: 0.05
183 appearance: *BodyAppearance
184 -
185 name: HINGE_R
186 parent: TRACK_R
187 translation: [ 0.22, -0.055, 0 ]
188 jointType: revolute
189 jointAxis: -Y
190 jointRange: [ -45, 90 ]
191 maxJointVelocity: 90
192 jointId: 3
193 centerOfMass: [ 0, 0, 0 ]
194 mass: 2.0
195 inertia: [
196 0.1, 0, 0,
197 0, 0.1, 0,
198 0, 0, 0.1 ]
199 elements:
200 Shape: *HINGE
201 -
202 name: TRACK_FL
203 parent: HINGE_L
204 translation: [ 0.11, 0.03, 0 ]
205 jointType: pseudo_continuous_track
206 jointAxis: Y
207 centerOfMass: [ 0, 0, 0 ]
208 mass: 0.05
209 inertia: [
210 0.02, 0, 0,
211 0, 0.02, 0,
212 0, 0, 0.02 ]
213 elements:
214 Shape: &SUBTRACK
215 geometry:
216 type: Extrusion
217 crossSection: [
218 -0.11, -0.07,
219 0.17, 0.00,
220 -0.11, 0.07,
221 -0.17, 0.00,
222 -0.11, -0.07
223 ]
224 spine: [ 0, -0.025, 0, 0, 0.025, 0 ]
225 appearance:
226 material:
227 diffuseColor: [ 0.2, 0.2, 0.2 ]
228 -
229 name: TRACK_FR
230 parent: HINGE_R
231 translation: [ 0.11, -0.03, 0 ]
232 jointType: pseudo_continuous_track
233 jointAxis: Y
234 centerOfMass: [ 0, 0, 0 ]
235 mass: 0.05
236 inertia: [
237 0.02, 0, 0,
238 0, 0.02, 0,
239 0, 0, 0.02 ]
240 elements:
241 Shape: *SUBTRACK