feat(juice_shot): v3 — gate at visible disengagement, longer travel, easier twist

#31
by Everloom - opened
assets/local_juice_shot/juice_shot.urdf CHANGED
@@ -12,15 +12,16 @@
12
  fix_base_link=False, matching the MuJoCo freejoint.
13
 
14
  SCREW COUPLING CAVEAT (same as bottle_cap.urdf): URDF cannot express the
15
- MJCF joint equality (cap_slide = 0.000477465 * cap_twist, 3 mm/turn), so
16
  this twin chains the two joints WITHOUT the coupling; wiring it on the
17
  Isaac side is part of the documented one-time USD conversion follow-up.
18
  MuJoCo — the physics backend of record — is unaffected.
19
 
20
  Real-world reference (sim2real): Trader Joe's Organic Mighty Turmeric
21
  juice shot, 2 fl oz / 59 mL — ~85 mm tall, 38 mm body, 29 mm white ribbed
22
- cap, 33 mm support flange, thread 3.0 mm/turn (28 mm PCO-1881 reference
23
- 2.7 mm), ~1.7 turns to open, ~75 g filled. -->
 
24
  <robot name="juice_shot">
25
  <link name="bottle">
26
  <inertial>
@@ -81,7 +82,7 @@
81
  <child link="cap_screw"/>
82
  <origin xyz="0 0 0.069"/>
83
  <axis xyz="0 0 1"/>
84
- <limit lower="0.0" upper="16.7552" effort="2" velocity="20.0"/>
85
  <dynamics damping="0.005" friction="0.02"/>
86
  </joint>
87
  <joint name="cap_slide" type="prismatic">
@@ -89,7 +90,7 @@
89
  <child link="cap"/>
90
  <origin xyz="0 0 0"/>
91
  <axis xyz="0 0 1"/>
92
- <limit lower="0.0" upper="0.008" effort="50" velocity="0.5"/>
93
  <dynamics damping="0.2" friction="0.0"/>
94
  </joint>
95
  </robot>
 
12
  fix_base_link=False, matching the MuJoCo freejoint.
13
 
14
  SCREW COUPLING CAVEAT (same as bottle_cap.urdf): URDF cannot express the
15
+ MJCF joint equality (cap_slide = 0.00128916 * cap_twist, 8.1 mm/turn), so
16
  this twin chains the two joints WITHOUT the coupling; wiring it on the
17
  Isaac side is part of the documented one-time USD conversion follow-up.
18
  MuJoCo — the physics backend of record — is unaffected.
19
 
20
  Real-world reference (sim2real): Trader Joe's Organic Mighty Turmeric
21
  juice shot, 2 fl oz / 59 mL — ~85 mm tall, 38 mm body, 29 mm white ribbed
22
+ cap, 33 mm support flange, 3-START thread with a 2.7 mm ridge-to-ridge
23
+ pitch => LEAD 8.1 mm of rise per turn (28 mm PCO-1881 finish), ~0.6 turn
24
+ to open, ~75 g filled. -->
25
  <robot name="juice_shot">
26
  <link name="bottle">
27
  <inertial>
 
82
  <child link="cap_screw"/>
83
  <origin xyz="0 0 0.069"/>
84
  <axis xyz="0 0 1"/>
85
+ <limit lower="0.0" upper="62.832" effort="2" velocity="20.0"/>
86
  <dynamics damping="0.005" friction="0.02"/>
87
  </joint>
88
  <joint name="cap_slide" type="prismatic">
 
90
  <child link="cap"/>
91
  <origin xyz="0 0 0"/>
92
  <axis xyz="0 0 1"/>
93
+ <limit lower="0.0" upper="0.040" effort="50" velocity="0.5"/>
94
  <dynamics damping="0.2" friction="0.0"/>
95
  </joint>
96
  </robot>
assets/local_juice_shot/juice_shot.xml CHANGED
@@ -1,5 +1,5 @@
1
  <mujoco model="juice_shot">
2
- <!-- 59 mL juice-shot bottle + FINE-PITCH screw cap for the open_juice_shot
3
  task — a sim2real twin of a real retail bottle (Trader Joe's Organic
4
  Mighty Turmeric juice shot, NET 2 fl oz / 59 mL), dimensioned from the
5
  maintainer's reference photos + standard PET shot-bottle specs:
@@ -7,23 +7,70 @@
7
  total height (closed) ~85 mm body OD ~38 mm
8
  cap OD ~29 mm cap height ~15.5 mm
9
  support flange OD ~33 mm tamper band stays on the neck
10
- thread pitch 3.0 mm/turn, single-start FINE
11
- (reference: 28 mm PCO-1881 beverage finish =
12
- 2.7 mm/turn), ~1.7 turns to disengage
 
13
  filled mass ~75 g (59 g juice + ~11 g PET + ~5 g cap)
14
 
15
  The cap is the same screw mechanism as local_bottle_cap v2 — SLIDE
16
  (cap_slide, listed FIRST for the parrot_sim overlay's first-joint
17
- contract) + coaxial HINGE (cap_twist), tied by the joint equality below:
18
- slide = PITCH * twist, PITCH = 0.003 / 2π = 0.000477465 m/rad. The only
19
- way the cap rises is by TURNING counter-clockwise: ~1.7 turns to the
20
- task's 5 mm gate, ~2.7 turns to the 8 mm stop. Dry thread friction
21
- (0.02 N·m) means a straight pull must back-drive the FINE screw at
22
- frictionloss / PITCH 42 N the finer pitch gives the thread MORE
23
- mechanical advantage than the big bottle's 18 mm/turn, so this tiny cap
24
- is even harder to yank off, exactly as with real beverage closures
25
- (measured: 20 N pulls deflect ~0.45 mm elastically; ~42 N+ slips the
26
- thread and the cap backs off ROTATING, like a stripped real cap).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  The BOTTLE BASE IS FREE (cfg fix_base_link=False): at ~75 g the bottle
28
  spins with the cap unless the other hand pins it — bimanual by
29
  mechanics, and light enough that a table-friction-only "no-hands" cheat
@@ -35,15 +82,25 @@
35
  is SKIPPED when the parent welds to the world, i.e. exactly in the
36
  fixed-base standalone loads the asset regression tests use;
37
  - solreffriction stiffens the friction constraint (no creep: cap weight
38
- back-drives at ~4e-5 N·m, 500x below the 0.02 N·m thread friction);
39
- - collision = primitive cylinders (group 3, hidden) with the calibrated
40
- grasp friction/priority; visuals = group-1 meshes from
41
- gen_juice_shot_meshes.py (deterministic; the visible thread helix is
42
- generated at the SAME 3 mm/turn pitch as the equality);
 
 
 
 
 
 
 
 
 
43
  - the juice visual cylinder carries the liquid mass (density 1000);
44
  - success is the cap's base-relative displacement (articulated_open,
45
- min_open_m = 0.005): qpos 0 = closed, slide range top 0.008;
46
- cap origin (0 0 0.069) == the checker's closed_rel_pos_m;
 
47
  - loaded as ArticulationObjCfg(fix_base_link=False); the root body
48
  carries no pos/quat (set via the cfg default_position). -->
49
  <compiler angle="radian" meshdir="meshes"/>
@@ -64,13 +121,13 @@
64
  <body name="bottle">
65
  <!-- collision (hidden group 3) -->
66
  <geom name="shot_body_col" type="cylinder" size="0.019 0.026" pos="0 0 0.026" group="3"
67
- density="220" friction="2.0 0.1 0.005" priority="2" rgba="0.2 0.2 0.2 0"/>
68
  <geom name="shot_neck_col" type="cylinder" size="0.0125 0.0075" pos="0 0 0.0595" group="3"
69
- density="800" friction="2.0 0.1 0.005" priority="2" rgba="0.2 0.2 0.2 0"/>
70
  <geom name="shot_flange_col" type="cylinder" size="0.0165 0.001" pos="0 0 0.0665" group="3"
71
- density="800" friction="2.0 0.1 0.005" priority="2" rgba="0.2 0.2 0.2 0"/>
72
  <geom name="shot_topneck_col" type="cylinder" size="0.0122 0.0075" pos="0 0 0.0745" group="3"
73
- density="600" friction="2.0 0.1 0.005" priority="2" rgba="0.2 0.2 0.2 0"/>
74
  <!-- visual -->
75
  <geom name="shot_juice_vis" type="cylinder" size="0.0163 0.0225" pos="0 0 0.0275"
76
  material="mat_juice" contype="0" conaffinity="0" group="1" density="1000"/>
@@ -88,19 +145,27 @@
88
  contype="0" conaffinity="0" group="1" density="100"/>
89
  <body name="cap" pos="0 0 0.069">
90
  <!-- slide FIRST (overlay contract — see header) -->
91
- <!-- The high slide armature models the fine screw's TRANSLATIONAL
92
- REFLECTED INERTIA (I_twist / pitch² ≈ 440 kg-equivalent for this
93
- thread — 1.0 is conservative): a yank meets thread mechanical
94
- advantage inertially, and gravity settle tightens 0.10 0.003 mm.
95
- It does NOT fix the equality's elastic leak under load that
96
- lever is the equality solimp (measured; see the equality comment).
97
- Twist-side cost is negligible (armature · pitch² 2e-7 kg·m²). -->
98
- <joint name="cap_slide" type="slide" axis="0 0 1" range="0 0.008"
 
99
  damping="0.2" armature="1.0"/>
100
- <joint name="cap_twist" type="hinge" axis="0 0 1" range="0 16.7552"
101
- frictionloss="0.02" damping="0.005" armature="0.0001" solreffriction="0.004 1"/>
 
 
 
 
 
 
 
102
  <geom name="shot_cap_col" type="cylinder" size="0.0145 0.00775" pos="0 0 0.00775" group="3"
103
- density="800" friction="2.0 0.1 0.005" priority="2" rgba="0.2 0.2 0.2 0"/>
104
  <geom name="shot_cap_vis" type="mesh" mesh="shot_cap_mesh" material="mat_cap_white"
105
  contype="0" conaffinity="0" group="1" density="100"/>
106
  </body>
@@ -110,14 +175,14 @@
110
  <exclude body1="bottle" body2="cap"/>
111
  </contact>
112
  <equality>
113
- <!-- The fine screw: cap_slide = 0.000477465 * cap_twist (3 mm per 2π turn). -->
114
  <!-- solimp is deliberately extreme: with a 10 g cap and the solref
115
  timeconst floored at 2*dt, the equality's REGULARIZATION (efc_R,
116
  set by 1-impedance) is what a pull deflects against — measured, a
117
  20 N pull "opened" 3.2 mm at the bottle_cap-style 0.99 impedance
118
  with the thread friction NOT slipping. 0.999/0.9999 brings that
119
  elastic leak to 0.45 mm while twist-opening is unaffected. -->
120
- <joint joint1="cap_slide" joint2="cap_twist" polycoef="0 0.000477465 0 0 0"
121
  solref="0.004 1" solimp="0.999 0.9999 0.0005"/>
122
  </equality>
123
  </mujoco>
 
1
  <mujoco model="juice_shot">
2
+ <!-- 59 mL juice-shot bottle + 3-START screw cap for the open_juice_shot
3
  task — a sim2real twin of a real retail bottle (Trader Joe's Organic
4
  Mighty Turmeric juice shot, NET 2 fl oz / 59 mL), dimensioned from the
5
  maintainer's reference photos + standard PET shot-bottle specs:
 
7
  total height (closed) ~85 mm body OD ~38 mm
8
  cap OD ~29 mm cap height ~15.5 mm
9
  support flange OD ~33 mm tamper band stays on the neck
10
+ thread 3-START, 2.7 mm ridge-to-ridge pitch =>
11
+ LEAD 8.1 mm of cap rise per turn (28 mm
12
+ PCO-1881 beverage finish), ~0.6 turn to
13
+ disengage — the half-turn open of a real bottle
14
  filled mass ~75 g (59 g juice + ~11 g PET + ~5 g cap)
15
 
16
  The cap is the same screw mechanism as local_bottle_cap v2 — SLIDE
17
  (cap_slide, listed FIRST for the parrot_sim overlay's first-joint
18
+ contract) + coaxial HINGE (cap_twist), tied by the named joint equality
19
+ "cap_screw" below: slide = LEAD * twist, LEAD = 0.0081 / 2π =
20
+ 0.00128916 m/rad WITH a v3 twist-then-PULL-OFF release on top.
21
+
22
+ v3 release mechanism (2026-08-10, operator feedback, second iteration —
23
+ "I want the cap completely out of the bottle"):
24
+ * ENGAGED (slide < 8 mm): the screw equality binds rise to twist —
25
+ the only way up is turning ccw, a straight pull must back-drive the
26
+ thread at ~19 N. ~1 full turn covers the engaged band exactly the
27
+ travel the first 19 recorded takes delivered (5.4-8.1 mm, two
28
+ parked on the old 8 mm stop).
29
+ * RELEASED (slide >= 8 mm): the TASK deactivates "cap_screw"
30
+ (data.eq_active, a stateless per-step rule wrapped around
31
+ handler.simulate, so teleop / collect / eval all share it — the
32
+ MJCF alone cannot express a conditional equality). The cap slides
33
+ freely: the operator PULLS it straight off, like a real bottle
34
+ after its last thread lets go. Dropping it lets it sink back and
35
+ re-seat (armature 1.0 slows the fall; re-engagement is seamless
36
+ when the cap was not spun while free).
37
+ * SUCCESS (task gate, min_open_m = 0.015): cap risen 15 mm — its
38
+ skirt bottom (0.069 + rise) is then 2 mm ABOVE the entire neck
39
+ finish (lip at 0.082), i.e. the cap is visibly clear of the whole
40
+ bottle, held in the fingers. Slide range tops at 40 mm so the
41
+ lift-off has real headroom; twist is UNLIMITED (a freed spinning
42
+ cap must not hit a phantom stop).
43
+
44
+ History of the gate: v2 latched at 5 mm — kinematically where a 3-start
45
+ closure disengages, but the skirt still covered 5 mm of visible thread
46
+ (SUCCESS looked premature) and the 8 mm stop truncated the unscrew.
47
+ The first v3 draft moved the gate to 10 mm on a longer screw; operator
48
+ feedback pushed further: the point is not "more screwing", it is the
49
+ cap COMING OFF — hence the release mechanism instead of more turns.
50
+
51
+ Thread friction is 0.025 N·m (operator-chosen; breakaway headroom vs
52
+ the measured >=0.047 N·m: 1.88x). The cap knurl grip is 4.0 (ribbed
53
+ interlock; grip friction is the sanctioned "easier to twist" lever —
54
+ it multiplies deliverable torque at the 14.5 mm radius without
55
+ weakening the thread's pull resistance).
56
+
57
+ LEAD, NOT PITCH — this is the modelling point of the asset. PCO-1881 is
58
+ a 3-START thread: ridges are 2.7 mm apart along the axis, but one turn
59
+ advances the cap past all three of them, so it rises 8.1 mm per turn and
60
+ the closure disengages in about half a turn. That is why a real bottle
61
+ opens with ONE wrist rotation. Treating the 2.7 mm pitch as the lead
62
+ (v1 of this asset, single-start 3 mm/turn) models a closure 3x finer
63
+ than the bottle it is a twin of, and turns "open the bottle" into ~1.7
64
+ turns — 4 regrasps for a teleoperator, which is why not one of the first
65
+ 22 recorded takes reached the gate (best 475° = 84% of it).
66
+
67
+ Yank guard (engaged band): a straight pull must back-drive the screw
68
+ at ≈ frictionloss / LEAD ≈ 19 N sustained through the whole 8 mm
69
+ engaged band (~0.16 J) before the release frees the cap — past a
70
+ fingertip pinch, and the settle gate still demands a controlled hold
71
+ at the 15 mm gate (a ballistic pop is rejected). Real caps strip too;
72
+ the guard's job is pricing the cheat above honest twisting, not
73
+ making it impossible.
74
  The BOTTLE BASE IS FREE (cfg fix_base_link=False): at ~75 g the bottle
75
  spins with the cap unless the other hand pins it — bimanual by
76
  mechanics, and light enough that a table-friction-only "no-hands" cheat
 
82
  is SKIPPED when the parent welds to the world, i.e. exactly in the
83
  fixed-base standalone loads the asset regression tests use;
84
  - solreffriction stiffens the friction constraint (no creep: cap weight
85
+ back-drives at ~1.2e-4 N·m, 208x below the 0.025 N·m thread friction
86
+ measured settle -0.003 mm over 4 s);
87
+ - collision = primitive cylinders (group 3, hidden): the bottle body
88
+ carries the pack's authored grasp friction 3.0 0.15 0.01 + priority 2
89
+ (the same tuple the box_task props use); the CAP knurl carries 4.0
90
+ since v3 (ribbed interlock). The ribbed cap and the pinned body are
91
+ BOTH grasp targets here, and grip friction is the lever that gives the operator
92
+ twisting torque WITHOUT weakening the thread's yank resistance: a
93
+ higher mu multiplies the tangential force a pinch can deliver at the
94
+ 14.5 mm cap radius, while the straight-pull threshold stays a property
95
+ of the thread (friction / lead). Visuals = group-1 meshes from
96
+ gen_juice_shot_meshes.py (deterministic; the visible helix is
97
+ generated as the SAME 3 starts at the SAME 8.1 mm lead as the
98
+ equality, so what is drawn is the screw that is simulated);
99
  - the juice visual cylinder carries the liquid mass (density 1000);
100
  - success is the cap's base-relative displacement (articulated_open,
101
+ min_open_m = 0.015): qpos 0 = closed, release at 0.008 (task rule),
102
+ slide range top 0.040; cap origin (0 0 0.069) == the checker's
103
+ closed_rel_pos_m;
104
  - loaded as ArticulationObjCfg(fix_base_link=False); the root body
105
  carries no pos/quat (set via the cfg default_position). -->
106
  <compiler angle="radian" meshdir="meshes"/>
 
121
  <body name="bottle">
122
  <!-- collision (hidden group 3) -->
123
  <geom name="shot_body_col" type="cylinder" size="0.019 0.026" pos="0 0 0.026" group="3"
124
+ density="220" friction="3.0 0.15 0.01" priority="2" rgba="0.2 0.2 0.2 0"/>
125
  <geom name="shot_neck_col" type="cylinder" size="0.0125 0.0075" pos="0 0 0.0595" group="3"
126
+ density="800" friction="3.0 0.15 0.01" priority="2" rgba="0.2 0.2 0.2 0"/>
127
  <geom name="shot_flange_col" type="cylinder" size="0.0165 0.001" pos="0 0 0.0665" group="3"
128
+ density="800" friction="3.0 0.15 0.01" priority="2" rgba="0.2 0.2 0.2 0"/>
129
  <geom name="shot_topneck_col" type="cylinder" size="0.0122 0.0075" pos="0 0 0.0745" group="3"
130
+ density="600" friction="3.0 0.15 0.01" priority="2" rgba="0.2 0.2 0.2 0"/>
131
  <!-- visual -->
132
  <geom name="shot_juice_vis" type="cylinder" size="0.0163 0.0225" pos="0 0 0.0275"
133
  material="mat_juice" contype="0" conaffinity="0" group="1" density="1000"/>
 
145
  contype="0" conaffinity="0" group="1" density="100"/>
146
  <body name="cap" pos="0 0 0.069">
147
  <!-- slide FIRST (overlay contract — see header) -->
148
+ <!-- The high slide armature models the screw's TRANSLATIONAL REFLECTED
149
+ INERTIA (I_twist / lead² ≈ 60 kg-equivalent at this 3-start lead,
150
+ was 440 at the single-start one — 1.0 stays conservative either
151
+ way): a yank meets thread mechanical advantage inertially, and
152
+ gravity settle tightens 0.10 0.003 mm. It does NOT fix the
153
+ equality's elastic leak under load that lever is the equality
154
+ solimp (measured; see the equality comment). Twist-side cost is
155
+ negligible (armature · lead² 1.7e-6 kg·m²). -->
156
+ <joint name="cap_slide" type="slide" axis="0 0 1" range="0 0.040"
157
  damping="0.2" armature="1.0"/>
158
+ <!-- Twist range (v3): the FLOOR at 0 is what blocks the tighten
159
+ direction (the slide floor alone loses to the much stiffer screw
160
+ equality), and the 200 rad ceiling (~32 turns) is unlimited for
161
+ any real take — once the task's release rule disengages the
162
+ equality (slide >= 8 mm) a spinning freed cap must not hit a
163
+ phantom stop. frictionloss sets the straight-pull threshold
164
+ while engaged, ≈ 19 N — see the header. -->
165
+ <joint name="cap_twist" type="hinge" axis="0 0 1" range="0 200"
166
+ frictionloss="0.025" damping="0.005" armature="0.0001" solreffriction="0.004 1"/>
167
  <geom name="shot_cap_col" type="cylinder" size="0.0145 0.00775" pos="0 0 0.00775" group="3"
168
+ density="800" friction="4.0 0.15 0.01" priority="2" rgba="0.2 0.2 0.2 0"/>
169
  <geom name="shot_cap_vis" type="mesh" mesh="shot_cap_mesh" material="mat_cap_white"
170
  contype="0" conaffinity="0" group="1" density="100"/>
171
  </body>
 
175
  <exclude body1="bottle" body2="cap"/>
176
  </contact>
177
  <equality>
178
+ <!-- The screw: cap_slide = 0.00128916 * cap_twist (8.1 mm per 2π turn). -->
179
  <!-- solimp is deliberately extreme: with a 10 g cap and the solref
180
  timeconst floored at 2*dt, the equality's REGULARIZATION (efc_R,
181
  set by 1-impedance) is what a pull deflects against — measured, a
182
  20 N pull "opened" 3.2 mm at the bottle_cap-style 0.99 impedance
183
  with the thread friction NOT slipping. 0.999/0.9999 brings that
184
  elastic leak to 0.45 mm while twist-opening is unaffected. -->
185
+ <joint name="cap_screw" joint1="cap_slide" joint2="cap_twist" polycoef="0 0.00128916 0 0 0"
186
  solref="0.004 1" solimp="0.999 0.9999 0.0005"/>
187
  </equality>
188
  </mujoco>