Skip to content

Commit a9e050b

Browse files
committed
- code cleanup
1 parent f812e9b commit a9e050b

8 files changed

Lines changed: 56 additions & 1562 deletions

File tree

mpx/data/boston_dynamics_spot/scene_arm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<mujoco model="spot with arm scene">
2-
<include file="spot_arm_full.xml"/>
2+
<include file="spot_arm.xml"/>
33

44
<statistic center="0.15 0.1 0.38" extent=".8" meansize="0.05"/>
55

mpx/data/boston_dynamics_spot/spot_arm.xml

Lines changed: 55 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@
7070
<default>
7171
<default class="spot">
7272
<geom solref="0.004 1"/>
73-
<joint actuatorfrcrange="-1000 1000"/>
74-
<position kp="500" kv="40" inheritrange="1"/>
7573
<default class="visual">
7674
<geom group="2" type="mesh" contype="0" conaffinity="0"/>
7775
</default>
@@ -83,6 +81,21 @@
8381
</default>
8482
</default>
8583
</default>
84+
85+
<joint damping="0.6" armature="0.01" frictionloss="0.2"/>
86+
87+
<default class="hip">
88+
<motor ctrlrange="-144.4 144.4"/>
89+
</default>
90+
<default class="thigh">
91+
<motor ctrlrange="-135.278 135.278"/>
92+
</default>
93+
<default class="calf">
94+
<motor ctrlrange="-135.278 135.278"/>
95+
</default>
96+
<default class="arm">
97+
<motor ctrlrange="-100 100"/>
98+
</default>
8699
</default>
87100

88101
<worldbody>
@@ -136,7 +149,7 @@
136149
<body name="arm_link_wr1">
137150
<inertial pos="0.125168 0.000101374 -0.013998" quat="1 1 1 1" mass="0.785"
138151
diaginertia="0.00176281 0.00168181 0.000767414"/>
139-
<!-- <joint name="arm_wr1" axis="1 0 0" range="-2.87979 2.87979"/> -->
152+
<joint name="arm_wr1" axis="1 0 0" range="-2.87979 2.87979"/>
140153
<geom mesh="arm_link_wr1_0" material="wrap" class="visual"/>
141154
<geom mesh="arm_link_wr1_1" material="BlackAbs" class="visual"/>
142155
<!-- <geom class="collision" mesh="arm_link_wr1_coll"/>
@@ -146,7 +159,7 @@
146159
<body name="arm_link_fngr" pos="0.11745 0 0.01482">
147160
<inertial pos="0.0478787 -0.000206768 -0.0162879" quat="0 1 0 1" mass="0.2"
148161
diaginertia="0.000391278 0.000300713 0.000143996"/>
149-
<!-- <joint name="arm_f1x" axis="0 1 0" range="-1.57 0"/> -->
162+
<joint name="arm_f1x" axis="0 1 0" range="-1.57 0"/>
150163
<geom mesh="arm_link_fngr_0" material="wrap" class="visual"/>
151164
<geom mesh="arm_link_fngr_1" material="BlackAbs" class="visual"/>
152165
<!-- <geom class="collision" mesh="left_hinge_coll"/>
@@ -241,7 +254,7 @@
241254
<inertial pos="0.00225794 4.6076e-05 -0.180082" quat="1 0 0 1" mass="0.35"
242255
diaginertia="0.00405032 0.00399902 0.00014934"/>
243256
<joint name="hr_kn" axis="0 1 0" range="-2.7929 -0.248282"/>
244-
<geom material="BlackAbs" mesh="rear_left_lower_leg" class="visual"/>
257+
<geom material="BlackAbs" mesh="rear_right_lower_leg" class="visual"/>
245258
<!-- <geom mesh="right_lower_leg_collision" class="collision"/> -->
246259
<geom name="HR" class="foot"/>
247260
</body>
@@ -251,65 +264,64 @@
251264
</worldbody>
252265

253266
<contact>
267+
<exclude body1="body" body2="arm_link_sh0"/>
268+
<exclude body1="body" body2="arm_link_sh1"/>
269+
<exclude body1="body" body2="arm_link_el0"/>
270+
<exclude body1="body" body2="arm_link_el1"/>
271+
<exclude body1="body" body2="arm_link_wr0"/>
272+
<exclude body1="body" body2="arm_link_wr1"/>
254273
<exclude body1="body" body2="fl_uleg"/>
255274
<exclude body1="body" body2="fr_uleg"/>
256275
<exclude body1="body" body2="hl_uleg"/>
257276
<exclude body1="body" body2="hr_uleg"/>
277+
<exclude body1="body" body2="fl_lleg"/>
278+
<exclude body1="body" body2="fr_lleg"/>
279+
<exclude body1="body" body2="hl_lleg"/>
280+
<exclude body1="body" body2="hr_lleg"/>
281+
<exclude body1="body" body2="fl_hip"/>
282+
<exclude body1="body" body2="fr_hip"/>
283+
<exclude body1="body" body2="hl_hip"/>
284+
<exclude body1="body" body2="hr_hip"/>
258285
</contact>
259286

260287
<actuator>
261-
<position class="spot" name="fl_hx" joint="fl_hx"/>
262-
<position class="spot" name="fl_hy" joint="fl_hy"/>
263-
<position class="spot" name="fl_kn" joint="fl_kn"/>
264-
<position class="spot" name="fr_hx" joint="fr_hx"/>
265-
<position class="spot" name="fr_hy" joint="fr_hy"/>
266-
<position class="spot" name="fr_kn" joint="fr_kn"/>
267-
<position class="spot" name="hl_hx" joint="hl_hx"/>
268-
<position class="spot" name="hl_hy" joint="hl_hy"/>
269-
<position class="spot" name="hl_kn" joint="hl_kn"/>
270-
<position class="spot" name="hr_hx" joint="hr_hx"/>
271-
<position class="spot" name="hr_hy" joint="hr_hy"/>
272-
<position class="spot" name="hr_kn" joint="hr_kn"/>
288+
<motor name="arm_sh0" class="arm" gear="1" joint="arm_sh0"/>
289+
<motor name="arm_sh1" class="arm" gear="1" joint="arm_sh1"/>
290+
<motor name="arm_el0" class="arm" gear="1" joint="arm_el0"/>
291+
<motor name="arm_el1" class="arm" gear="1" joint="arm_el1"/>
292+
<motor name="arm_wr0" class="arm" gear="1" joint="arm_wr0"/>
293+
<motor name="arm_wr1" class="arm" gear="1" joint="arm_wr1"/>
294+
<motor name="arm_f1x" class="arm" gear="1" joint="arm_f1x"/>
273295

274-
<position class="spot" name="arm_sh0" joint="arm_sh0"/>
275-
<position class="spot" name="arm_sh1" joint="arm_sh1"/>
276-
<position class="spot" name="arm_el0" joint="arm_el0"/>
277-
<position class="spot" name="arm_el1" joint="arm_el1"/>
278-
<position class="spot" name="arm_wr0" joint="arm_wr0"/>
279-
<!-- <position class="spot" name="arm_wr1" joint="arm_wr1"/>
280-
<position class="spot" name="arm_f1x" joint="arm_f1x"/> -->
296+
<motor class="hip" gear="1" name="fl_hx" joint="fl_hx"/>
297+
<motor class="thigh" gear="1" name="fl_hy" joint="fl_hy"/>
298+
<motor class="calf" gear="1" name="fl_kn" joint="fl_kn"/>
299+
<motor class="hip" gear="1" name="fr_hx" joint="fr_hx"/>
300+
<motor class="thigh" gear="1" name="fr_hy" joint="fr_hy"/>
301+
<motor class="calf" gear="1" name="fr_kn" joint="fr_kn"/>
302+
<motor class="hip" gear="1" name="hl_hx" joint="hl_hx"/>
303+
<motor class="thigh" gear="1" name="hl_hy" joint="hl_hy"/>
304+
<motor class="calf" gear="1" name="hl_kn" joint="hl_kn"/>
305+
<motor class="hip" gear="1" name="hr_hx" joint="hr_hx"/>
306+
<motor class="thigh" gear="1" name="hr_hy" joint="hr_hy"/>
307+
<motor class="calf" gear="1" name="hr_kn" joint="hr_kn"/>
281308
</actuator>
282309

283310
<keyframe>
284-
<!-- <key name="home"
285-
qpos="
286-
0 0 0.46
287-
1 0 0 0
288-
0 1.04 -1.8
289-
0 1.04 -1.8
290-
0 1.04 -1.8
291-
0 1.04 -1.8
292-
0 -3.14 3.06 0 0 0 0"
293-
ctrl="
294-
0 1.04 -1.8
295-
0 1.04 -1.8
296-
0 1.04 -1.8
297-
0 1.04 -1.8
298-
0 -3.14 3.06 0 0 0 0"/> -->
299311
<key name="home"
300312
qpos="
301313
0 0 0.46
302314
1 0 0 0
315+
0 -3.14 3.06 0 0 0 0
303316
0 1.04 -1.8
304317
0 1.04 -1.8
305318
0 1.04 -1.8
306-
0 1.04 -1.8
307-
0 -3.14 3.06 0 0"
319+
0 1.04 -1.8"
308320
ctrl="
321+
0 -3.14 3.06 0 0 0 0
309322
0 1.04 -1.8
310323
0 1.04 -1.8
311324
0 1.04 -1.8
312-
0 1.04 -1.8
313-
0 -3.14 3.06 0 0"/>
325+
0 1.04 -1.8"/>
314326
</keyframe>
315327
</mujoco>

0 commit comments

Comments
 (0)