-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathur5e_with_DIGIT_primitive_hexagon.xml
More file actions
266 lines (225 loc) · 16.7 KB
/
Copy pathur5e_with_DIGIT_primitive_hexagon.xml
File metadata and controls
266 lines (225 loc) · 16.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!-- UR5e with RH-P12-RN Gripper Integration -->
<!-- HEXAGON HOLE WITH 6 BOX PRIMITIVES (NO DECOMPOSITION) -->
<mujoco model="ur5e_with_rh_p12_rn">
<compiler angle="radian" meshdir="assets/ur5e" inertiagrouprange="0 0"/>
<option impratio="20" cone="elliptic" density="1.2" viscosity="0.00002" integrator="implicitfast" gravity="0 0 -9.81"/>
<size nconmax="5000" njmax="5000"/>
<!-- Default settings -->
<default>
<material specular="0.5" shininess="0.25"/>
<joint axis="0 1 0" range="-3.14 3.14" armature="0.1"/>
<geom type="mesh" contype="1" conaffinity="1" group="2" solref="0.002 1" solimp="0.95 0.99 0.001" friction="1.0 0.005 0.0001"/>
<site size="0.001" rgba="0.5 0.5 0.5 0.3" group="4"/>
</default>
<!-- Collision settings -->
<contact>
<exclude body1="ur5e_base" body2="shoulder_link"/>
<exclude body1="shoulder_link" body2="upper_arm_link"/>
<exclude body1="upper_arm_link" body2="forearm_link"/>
<exclude body1="forearm_link" body2="wrist_1_link"/>
<exclude body1="wrist_1_link" body2="wrist_2_link"/>
<exclude body1="wrist_2_link" body2="wrist_3_link"/>
<exclude body1="wrist_3_link" body2="rh_p12_rn_base"/>
<exclude body1="rh_p12_rn_base" body2="rh_p12_rn_r1"/>
<exclude body1="rh_p12_rn_base" body2="rh_p12_rn_l1"/>
<exclude body1="rh_p12_rn_r1" body2="rh_p12_rn_r2"/>
<exclude body1="rh_p12_rn_l1" body2="rh_p12_rn_l2"/>
<!-- DIGIT sensor collision exclusions -->
<exclude body1="rh_p12_rn_r2" body2="digit_geltip_right"/>
<exclude body1="rh_p12_rn_l2" body2="digit_geltip_left"/>
</contact>
<!-- UR5e assets -->
<include file="assets/ur5e/ur5e_assets.xml"/>
<!-- RH-P12-RN Gripper assets -->
<include file="assets/gripper/rh_p12_rn_assets.xml"/>
<!-- DIGIT sensor assets -->
<asset>
<!-- DIGIT sensor materials -->
<material name="digit_gel" rgba="0.564 0.835 1 0.7"/>
<material name="digit_base" rgba="0.1 0.1 0.1 1"/>
<!-- DIGIT GelTip sensor meshes (only right and left) -->
<mesh name="digit_geltip_right" file="../../RH-P12-RN/rh_p12_rn_description/meshes/Geltip_right.stl" scale="0.001 0.001 0.001"/>
<mesh name="digit_geltip_left" file="../../RH-P12-RN/rh_p12_rn_description/meshes/Geltip_left.stl" scale="0.001 0.001 0.001"/>
<!-- Hexagon peg mesh (same for visual and collision) -->
<mesh name="hexagon_peg_mesh" file="assets/Objects/hexagon.STL" scale="0.001 0.001 0.001"/>
<!-- Hexagon hole - VISUAL ONLY (no decomposition meshes) -->
<mesh name="hole_hexagon_visual_mesh" file="assets/Objects/Hole_hexa.STL" scale="0.001 0.001 0.001"/>
<!-- Hexagon wall piece for creating hole collision -->
<mesh name="hexagon_wall_piece" file="assets/Objects/Wall1.STL" scale="0.001 0.001 0.001"/>
</asset>
<!-- Arena -->
<include file="assets/common_arena/optical_breadboard.xml"/>
<!-- Main robot body with gripper -->
<worldbody>
<!-- UR5e Base -->
<body name="ur5e_base" pos="0 0 0.8" quat="0 0 0 -1">
<inertial mass="4.0" pos="0 0 0" diaginertia="0.00443333156 0.00443333156 0.0072"/>
<geom mesh="base_0" material="black" type="mesh" group="2"/>
<geom mesh="base_1" material="jointgray" type="mesh" group="2"/>
<!-- Robot base coordinate frame -->
<site name="robot_frame" pos="0 0 0" size="0.05" type="sphere" rgba="1 1 0 0.5"/>
<geom name="robot_x_axis" type="cylinder" pos="0.03 0 0" size="0.003 0.06" rgba="1 0 0 1" quat="0.707 0 0.707 0"/>
<geom name="robot_y_axis" type="cylinder" pos="0 0.03 0" size="0.003 0.06" rgba="0 1 0 1" quat="0.707 0.707 0 0"/>
<geom name="robot_z_axis" type="cylinder" pos="0 0 0.03" size="0.003 0.06" rgba="0 0 1 1"/>
<!-- Shoulder Link -->
<body name="shoulder_link" pos="0 0 0.163">
<inertial mass="3.7" pos="0 0 0" diaginertia="0.0102675 0.0102675 0.00666"/>
<joint name="shoulder_pan_joint" axis="0 0 1" range="0 6.28319" armature="0.1"/>
<geom mesh="shoulder_0" material="urblue" type="mesh" group="2"/>
<geom mesh="shoulder_1" material="black" type="mesh" group="2"/>
<geom mesh="shoulder_2" material="jointgray" type="mesh" group="2"/>
<geom type="capsule" size="0.06 0.06" pos="0 0 -0.04" group="3"/>
<!-- Upper Arm Link -->
<body name="upper_arm_link" pos="0 0.138 0" quat="1 0 1 0">
<inertial mass="8.393" pos="0 0 0.2125" diaginertia="0.133886 0.133886 0.0151074"/>
<joint name="shoulder_lift_joint" axis="0 1 0" range="-6.28319 6.28319" armature="0.1"/>
<geom mesh="upperarm_0" material="linkgray" type="mesh" group="2"/>
<geom mesh="upperarm_1" material="black" type="mesh" group="2"/>
<geom mesh="upperarm_2" material="jointgray" type="mesh" group="2"/>
<geom mesh="upperarm_3" material="urblue" type="mesh" group="2"/>
<geom type="capsule" pos="0 -0.04 0" quat="1 1 0 0" size="0.06 0.06" group="3"/>
<geom type="capsule" size="0.05 0.2" pos="0 0 0.2" group="3"/>
<!-- Forearm Link -->
<body name="forearm_link" pos="0 -0.131 0.425">
<inertial mass="2.275" pos="0 0 0.196" diaginertia="0.0311796 0.0311796 0.004095"/>
<joint name="elbow_joint" axis="0 1 0" range="-3.1415 3.1415" armature="0.1"/>
<geom mesh="forearm_0" material="urblue" type="mesh" group="2"/>
<geom mesh="forearm_1" material="linkgray" type="mesh" group="2"/>
<geom mesh="forearm_2" material="black" type="mesh" group="2"/>
<geom mesh="forearm_3" material="jointgray" type="mesh" group="2"/>
<geom type="capsule" pos="0 0.08 0" quat="1 1 0 0" size="0.055 0.06" group="3"/>
<geom type="capsule" size="0.038 0.19" pos="0 0 0.2" group="3"/>
<!-- Wrist 1 Link -->
<body name="wrist_1_link" pos="0 0 0.392" quat="1 0 1 0">
<inertial mass="1.219" pos="0 0.127 0" diaginertia="0.0025599 0.0025599 0.0021942"/>
<joint name="wrist_1_joint" axis="0 1 0" range="-6.28319 6.28319" armature="0.1"/>
<geom mesh="wrist1_0" material="black" type="mesh" group="2"/>
<geom mesh="wrist1_1" material="urblue" type="mesh" group="2"/>
<geom mesh="wrist1_2" material="jointgray" type="mesh" group="2"/>
<geom type="capsule" pos="0 0.05 0" quat="1 1 0 0" size="0.04 0.07" group="3"/>
<!-- Wrist 2 Link -->
<body name="wrist_2_link" pos="0 0.127 0">
<inertial mass="1.219" pos="0 0 0.1" diaginertia="0.0025599 0.0025599 0.0021942"/>
<joint name="wrist_2_joint" axis="0 0 1" range="-6.28319 6.28319" armature="0.1"/>
<geom mesh="wrist2_0" material="black" type="mesh" group="2"/>
<geom mesh="wrist2_1" material="urblue" type="mesh" group="2"/>
<geom mesh="wrist2_2" material="jointgray" type="mesh" group="2"/>
<geom type="capsule" size="0.04 0.06" pos="0 0 0.04" group="3"/>
<geom type="capsule" pos="0 0.02 0.1" quat="1 1 0 0" size="0.04 0.04" group="3"/>
<!-- Wrist 3 Link -->
<body name="wrist_3_link" pos="0 0 0.1">
<inertial mass="0.1889" pos="0 0.0771683 0" quat="1 0 0 1"
diaginertia="0.000132134 9.90863e-05 9.90863e-05"/>
<joint name="wrist_3_joint" axis="0 1 0" range="-6.28319 6.28319" armature="0.1"/>
<geom material="linkgray" mesh="wrist3" type="mesh" group="2"/>
<geom type="cylinder" pos="0 0.08 0" quat="1 1 0 0" size="0.04 0.02" group="3"/>
<!-- RH-P12-RN Gripper attached to end effector with adapter offset -->
<!-- The gripper is at Y=0.1 from wrist_3_link, this is the actual end effector -->
<body name="rh_p12_rn_base" pos="0 0.1 0" quat="0 0 0.707 0.707">
<inertial mass="0.236" pos="0 0 0.032" diaginertia="0.00017 0.00011 0.00017"/>
<geom mesh="base" material="gripper_grey" type="mesh"/>
<!-- End Effector Site at gripper base -->
<site name="eef_base" pos="0 0 0" size="0.005" rgba="0.5 0.5 0.5 0.5"/>
<!-- Extended EE Site at grasping center (between fingers, forward in X) -->
<!-- Approximately 80mm forward along X-axis from gripper base -->
<site name="eef_site" pos="0.0 0 0.15" size="0.01" rgba="1 1 0 0.9"/>
<!-- EE marker axes - visual only (group 1, contype/conaffinity 0 for no collision) -->
<geom name="ee_marker_axis_x" type="capsule" fromto="0 0 0.15 0.05 0 0.15" size="0.004" rgba="1 0 0 1" group="1" contype="0" conaffinity="0"/>
<geom name="ee_marker_axis_y" type="capsule" fromto="0 0 0.15 0.0 0.05 0.15" size="0.004" rgba="0 1 0 1" group="1" contype="0" conaffinity="0"/>
<geom name="ee_marker_axis_z" type="capsule" fromto="0 0 0.15 0.0 0 0.2" size="0.004" rgba="0 0 1 1" group="1" contype="0" conaffinity="0"/>
<!-- Right Finger Chain -->
<body name="rh_p12_rn_r1" pos="0 0.008 0.048">
<inertial mass="0.068" pos="0 0.034 0.004" diaginertia="0.00004 0.00002 0.00002"/>
<joint name="rh_p12_rn_right" axis="1 0 0" range="0 1.1" armature="0.01" damping="0.7"/>
<geom mesh="r1" material="gripper_grey" type="mesh"/>
<!-- Right Finger Tip -->
<body name="rh_p12_rn_r2" pos="0 0.0493634 0.0285">
<inertial mass="0.022" pos="0 0.006 0.011" diaginertia="0.00001 0.00001 0.00001"/>
<joint name="rh_r2" axis="-1 0 0" range="0 1.0" armature="0.005" damping="0.7"/>
<geom mesh="r2" material="gripper_dark" type="mesh"/>
<!-- DIGIT GelTip Right Sensor -->
<body name="digit_geltip_right" pos="0.0 0.0 0.0" quat="1.0 0.0 0.0 0 ">
<inertial mass="0.01" pos="0 0 0" diaginertia="0.00001 0.00001 0.00001"/>
<geom name="digit_geltip_right_geom" mesh="digit_geltip_right" material="digit_gel" type="mesh" contype="1" conaffinity="1"
friction="2.0 0.1 0.05" solref="0.001 1" solimp="0.99 0.999 0.0001"/>
<!-- Sensor coordinate frame -->
<site name="digit_right_frame" pos="0 0 0" size="0.002" type="sphere" rgba="0.564 0.835 1 0.7"/>
</body>
</body>
</body>
<!-- Left Finger Chain -->
<body name="rh_p12_rn_l1" pos="0 -0.008 0.048">
<inertial mass="0.068" pos="0 -0.034 0.004" diaginertia="0.00004 0.00002 0.00002"/>
<joint name="rh_p12_rn_left" axis="-1 0 0" range="0 1.1" armature="0.01" damping="0.7"/>
<geom mesh="l1" material="gripper_grey" type="mesh"/>
<!-- Left Finger Tip -->
<body name="rh_p12_rn_l2" pos="0 -0.0493634 0.0285">
<inertial mass="0.022" pos="0 -0.006 0.011" diaginertia="0.00001 0.00001 0.00001"/>
<joint name="rh_l2" axis="1 0 0" range="0 1.0" armature="0.005" damping="0.7"/>
<geom mesh="l2" material="gripper_dark" type="mesh"/>
<!-- DIGIT GelTip Left Sensor -->
<body name="digit_geltip_left" pos="0.0 -0.0 0.0" quat="1.0 0.0 0.0 0">
<inertial mass="0.01" pos="0 0 0" diaginertia="0.00001 0.00001 0.00001"/>
<geom name="digit_geltip_left_geom" mesh="digit_geltip_left" material="digit_gel" type="mesh" contype="1" conaffinity="1"
friction="2.0 0.1 0.05" solref="0.001 1" solimp="0.99 0.999 0.0001"/>
<!-- Sensor coordinate frame -->
<site name="digit_left_frame" pos="0 0 0" size="0.002" type="sphere" rgba="0.564 0.835 1 0.7"/>
</body>
</body>
</body>
</body>
</body>
</body>
</body>
</body>
</body>
</body>
</body>
<!-- ========== HEXAGON PEG AND HOLE ========== -->
<!-- Peg starts higher above the hole -->
<body name="hexagon_peg_body" pos="0.629 0.0 0.875" euler="0 0 0.5236">
<freejoint/>
<inertial mass="0.02" pos="0 0 0" diaginertia="0.0005 0.0005 0.0005"/>
<geom name="hexagon_peg_visual" type="mesh" mesh="hexagon_peg_mesh" rgba="0.8 0.2 0.8 1" contype="0" conaffinity="0"/>
<geom name="hexagon_peg_collision" type="mesh" mesh="hexagon_peg_mesh" rgba="0.8 0.2 0.8 0.3"
friction="1.0 0.005 0.0001" contype="1" conaffinity="1" solref="0.001 1" solimp="0.99 0.999 0.0001" margin="0.0"/>
</body>
<!-- ========== HEXAGON HOLE WITH 6 BOX PRIMITIVES ========== -->
<!-- Fixed to world - no joints, very heavy, acts like fixed obstacle -->
<!-- Hole center at peg position: 0.629, 0.029 -->
<!-- Inner diameter: 34mm, wall thickness: 3mm -->
<body name="hexagon_hole_body" pos="0.629 0.029 0.8">
<!-- Make it extremely heavy so it doesn't move -->
<inertial mass="10000" pos="0 0 0" diaginertia="1000 1000 1000"/>
<!-- Bottom plate to prevent peg falling through -->
<geom name="hex_bottom_plate" type="box" size="0.025 0.025 0.001" pos="0 0 -0.011"
rgba="0.3 0.3 0.3 0.5" friction="1.0 0.005 0.0001" contype="1" conaffinity="1" solref="0.001 1" solimp="0.99 0.999 0.0001"/>
<!-- Visual mesh - 보이는 것 (collision 없음) -->
<geom name="hexagon_hole_visual" type="mesh" mesh="hole_hexagon_visual_mesh" pos="-0.029 -0.029 0.0" rgba="0.2 0.6 0.8 1" contype="0" conaffinity="0"/>
<!-- 6 Wall1.STL pieces forming hexagon hole - 60도씩 회전 -->
<!-- Wall 1: 0도 -->
<geom name="hex_wall_0" type="mesh" mesh="hexagon_wall_piece" euler="0 0 0"
rgba="1 0 0 0.7" friction="1.0 0.005 0.0001" contype="1" conaffinity="1" solref="0.001 1" solimp="0.99 0.999 0.0001"/>
<!-- Wall 2: 60도 -->
<geom name="hex_wall_1" type="mesh" mesh="hexagon_wall_piece" euler="0 0 1.0472"
rgba="1 0.5 0 0.7" friction="1.0 0.005 0.0001" contype="1" conaffinity="1" solref="0.001 1" solimp="0.99 0.999 0.0001"/>
<!-- Wall 3: 120도 -->
<geom name="hex_wall_2" type="mesh" mesh="hexagon_wall_piece" euler="0 0 2.0944"
rgba="1 1 0 0.7" friction="1.0 0.005 0.0001" contype="1" conaffinity="1" solref="0.001 1" solimp="0.99 0.999 0.0001"/>
<!-- Wall 4: 180도 -->
<geom name="hex_wall_3" type="mesh" mesh="hexagon_wall_piece" euler="0 0 3.1416"
rgba="0 1 0 0.7" friction="1.0 0.005 0.0001" contype="1" conaffinity="1" solref="0.001 1" solimp="0.99 0.999 0.0001"/>
<!-- Wall 5: 240도 -->
<geom name="hex_wall_4" type="mesh" mesh="hexagon_wall_piece" euler="0 0 4.1888"
rgba="0 1 1 0.7" friction="1.0 0.005 0.0001" contype="1" conaffinity="1" solref="0.001 1" solimp="0.99 0.999 0.0001"/>
<!-- Wall 6: 300도 -->
<geom name="hex_wall_5" type="mesh" mesh="hexagon_wall_piece" euler="0 0 5.2360"
rgba="0 0 1 0.7" friction="1.0 0.005 0.0001" contype="1" conaffinity="1" solref="0.001 1" solimp="0.99 0.999 0.0001"/>
<site name="hexagon_hole_center" pos="0 0 0" size="0.005" rgba="0 1 0 1"/>
</body>
</worldbody>
<!-- UR5e actuators -->
<include file="assets/ur5e/ur5e_actuators.xml"/>
<!-- RH-P12-RN Gripper actuators -->
<include file="assets/gripper/rh_p12_rn_actuators.xml"/>
</mujoco>