112550099NYCU commited on
Commit
b2155c5
·
verified ·
1 Parent(s): 751aa65

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -43,3 +43,13 @@ exp_all_changes/videos/ep_07_failed.mp4 filter=lfs diff=lfs merge=lfs -text
43
  exp_all_changes/videos/ep_08_failed.mp4 filter=lfs diff=lfs merge=lfs -text
44
  exp_all_changes/videos/ep_09_failed.mp4 filter=lfs diff=lfs merge=lfs -text
45
  exp_all_changes/videos/ep_10_failed.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
43
  exp_all_changes/videos/ep_08_failed.mp4 filter=lfs diff=lfs merge=lfs -text
44
  exp_all_changes/videos/ep_09_failed.mp4 filter=lfs diff=lfs merge=lfs -text
45
  exp_all_changes/videos/ep_10_failed.mp4 filter=lfs diff=lfs merge=lfs -text
46
+ exp_heights_only/videos/ep_01_success.mp4 filter=lfs diff=lfs merge=lfs -text
47
+ exp_heights_only/videos/ep_02_success.mp4 filter=lfs diff=lfs merge=lfs -text
48
+ exp_heights_only/videos/ep_03_failed.mp4 filter=lfs diff=lfs merge=lfs -text
49
+ exp_heights_only/videos/ep_04_success.mp4 filter=lfs diff=lfs merge=lfs -text
50
+ exp_heights_only/videos/ep_05_success.mp4 filter=lfs diff=lfs merge=lfs -text
51
+ exp_heights_only/videos/ep_06_failed.mp4 filter=lfs diff=lfs merge=lfs -text
52
+ exp_heights_only/videos/ep_07_failed.mp4 filter=lfs diff=lfs merge=lfs -text
53
+ exp_heights_only/videos/ep_08_failed.mp4 filter=lfs diff=lfs merge=lfs -text
54
+ exp_heights_only/videos/ep_09_failed.mp4 filter=lfs diff=lfs merge=lfs -text
55
+ exp_heights_only/videos/ep_10_failed.mp4 filter=lfs diff=lfs merge=lfs -text
exp_heights_only/CHANGES.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # exp_heights_only — what changed vs. main-branch FSM
2
+
3
+ This is the **diagnostic comparison run** for `exp_all_changes`. Phase durations
4
+ and IK speed are reverted to the original values, isolating the effect of the
5
+ **height changes alone**.
6
+
7
+ | Constant | Original (main) | This version | Why |
8
+ |---|---|---|---|
9
+ | `_LIFT_Z_OFFSET` | `0.20` | `0.15` | Lower transit altitude. |
10
+ | `_RELEASE_Z_OFFSET` | `0.09` | `0.06` | Gentler placement (cutlery drops from 6 cm vs 9 cm). |
11
+ | `_MAX_CARTESIAN_DELTA` | `0.018` | `0.018` | **Reverted** to original. |
12
+ | `_PHASE_DURATIONS_PER_OBJECT` | `(180, 130, 20, 160, 170, 15, 30)` | **`(180, 130, 20, 160, 170, 15, 30)`** | **Reverted** to original. |
13
+
14
+ ## Purpose
15
+ If `exp_all_changes` has high failure rate but this one doesn't, the timing
16
+ (phase durations × IK speed) is the culprit and we should be more conservative.
17
+ If both fail, the height changes themselves are bad.
18
+ If neither fails, all four changes can be applied safely.
19
+
20
+ ## Important caveat
21
+ Because phase durations are reverted, **this version will not fit in the 20s eval cap**
22
+ (each episode runs ~25s). That's expected. We're only testing whether the FSM **physically
23
+ completes the task** with the new heights.
24
+
25
+ ## What the videos should show
26
+ - Slower execution (~25s per episode, original timing)
27
+ - Same lower placement heights as `exp_all_changes`
exp_heights_only/SUMMARY.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FSM Experiment: exp_heights_only
2
+
3
+ - Date: Mon May 25 03:58:25 PM PST 2026
4
+ - Poses file: `data/umi/test_fsm_v3/object_poses_10_shared.json`
5
+ - Successes: **4** / Failures: **6**
6
+
7
+ ## FSM constants used in this run
8
+ ```python
9
+ _MAX_CARTESIAN_DELTA = 0.018 # heights-only experiment: reverted to original
10
+ _HOVER_Z_OFFSET = 0.15
11
+ _GRASP_Z_OFFSET = 0.08
12
+ _LIFT_Z_OFFSET = 0.15 # was 0.20; 0.10 was too low (held cutlery clipped plate edge during transport)
13
+ _RELEASE_Z_OFFSET = 0.06 # was 0.09; 0.04 was too low (gripper fingers hit plate/table)
14
+ _PHASE_DURATIONS_PER_OBJECT = (180, 130, 20, 160, 170, 15, 30) # heights-only experiment: reverted to original
15
+ _PHASES_PER_OBJECT = len(_PHASE_DURATIONS_PER_OBJECT)
16
+ def _clamp_delta(delta: torch.Tensor, max_norm: float = _MAX_CARTESIAN_DELTA) -> torch.Tensor:
17
+ MAX_STEPS: int = len(_PICK_ORDER) * sum(_PHASE_DURATIONS_PER_OBJECT) + 100
18
+ self._events_dt: list[int] = list(_PHASE_DURATIONS_PER_OBJECT) * len(_PICK_ORDER)
19
+ target[:, 2] += _HOVER_Z_OFFSET
20
+ target[:, 2] += _GRASP_Z_OFFSET
21
+ target[:, 2] += _GRASP_Z_OFFSET
22
+ target[:, 2] += _LIFT_Z_OFFSET
23
+ target[:, 2] += _LIFT_Z_OFFSET
24
+ target[:, 2] += _RELEASE_Z_OFFSET
25
+ target[:, 2] += _LIFT_Z_OFFSET
26
+ ```
27
+
28
+ ## Videos
29
+ Per-episode mp4 in `videos/` named `ep_NN_<success|failed>.mp4`. Side-by-side (wrist | front, 1280x480 @ 10 fps).
30
+
31
+ See `CHANGES.md` for what was modified in this version and why.
exp_heights_only/cutlery_arrangement.py ADDED
@@ -0,0 +1,482 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """State machine for the Franka cutlery-arrangement task."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import math
6
+
7
+ import torch
8
+ from isaaclab.utils.math import (
9
+ axis_angle_from_quat,
10
+ matrix_from_quat,
11
+ quat_apply,
12
+ quat_from_euler_xyz,
13
+ quat_inv,
14
+ quat_mul,
15
+ )
16
+
17
+ from leisaac.datagen.state_machine.base import StateMachineBase
18
+
19
+ # ---------------------------------------------------------------------------
20
+ # Module-level constants
21
+ # ---------------------------------------------------------------------------
22
+ _FORK_NAME = "fork"
23
+ _KNIFE_NAME = "knife"
24
+ _PLATE_NAME = "plate"
25
+ _EE_BODY_NAME = "panda_hand"
26
+ _FRANKA_ARM_JOINT_NAMES = (
27
+ "panda_joint1",
28
+ "panda_joint2",
29
+ "panda_joint3",
30
+ "panda_joint4",
31
+ "panda_joint5",
32
+ "panda_joint6",
33
+ "panda_joint7",
34
+ )
35
+
36
+ _GRIPPER_OPEN = 1.0
37
+ _GRIPPER_CLOSE = -1.0
38
+
39
+ _MAX_CARTESIAN_DELTA = 0.018 # heights-only experiment: reverted to original
40
+ _MAX_ROT_DELTA = 0.08
41
+ _IK_DLS_LAMBDA = 0.01
42
+
43
+ _HOVER_Z_OFFSET = 0.15
44
+ _GRASP_Z_OFFSET = 0.08
45
+ _LIFT_Z_OFFSET = 0.15 # was 0.20; 0.10 was too low (held cutlery clipped plate edge during transport)
46
+ _RELEASE_Z_OFFSET = 0.06 # was 0.09; 0.04 was too low (gripper fingers hit plate/table)
47
+ _GRIPPER_DOWN_ROLL_W = math.pi
48
+ _GRIPPER_DOWN_PITCH_W = 0.0
49
+ _GRIPPER_DOWN_YAW_OFFSET_RANGE = (-0.15, 0.15)
50
+ # Grasp yaw bias (rad) on top of the object's world yaw, before the random
51
+ # jitter. Cutlery items are elongated, so π/2 closes the fingers across the
52
+ # short axis. Per-USD orientation correction lives in env_cfg's
53
+ # ``per_object_yaw_offset``.
54
+ _GRASP_YAW_OFFSET: float = math.pi / 2.0
55
+ # Horizontal retreat (m) toward the robot base applied to approach + grasp
56
+ # targets. Per-object so each cutlery item can be tuned independently
57
+ # (e.g. knife may grab better with no retreat than fork).
58
+ _GRASP_RETREAT_PER_OBJECT: dict[str, float] = {
59
+ "fork": 0.025,
60
+ "knife": 0.025,
61
+ }
62
+
63
+ _PLACE_OFFSET = 0.10
64
+
65
+ _SUCCESS_MAX_DIST_XY = 0.15
66
+
67
+ _FRANKA_REST_JOINT_POS = {
68
+ "panda_joint1": 0.0,
69
+ "panda_joint2": -math.pi / 4.0,
70
+ "panda_joint3": 0.0,
71
+ "panda_joint4": -3.0 * math.pi / 4.0,
72
+ "panda_joint5": 0.0,
73
+ "panda_joint6": math.pi / 2.0,
74
+ "panda_joint7": math.pi / 4.0,
75
+ "panda_finger_joint1": 0.04,
76
+ "panda_finger_joint2": 0.04,
77
+ }
78
+
79
+ # Pick order: fork first (place on +y / left of plate), then knife (place on -y / right)
80
+ _PICK_ORDER = (_KNIFE_NAME, _FORK_NAME)
81
+ _PLACE_X_SIGNS = (-1.0, +1.0) # knife → -x of plate, fork → +x of plate
82
+
83
+ _PHASE_DURATIONS_PER_OBJECT = (180, 130, 20, 160, 170, 15, 30) # heights-only experiment: reverted to original
84
+ _PHASES_PER_OBJECT = len(_PHASE_DURATIONS_PER_OBJECT)
85
+
86
+
87
+ def _constant_gripper(num_envs: int, device: torch.device, value: float) -> torch.Tensor:
88
+ return torch.full((num_envs, 1), value, device=device)
89
+
90
+
91
+ def _clamp_delta(delta: torch.Tensor, max_norm: float = _MAX_CARTESIAN_DELTA) -> torch.Tensor:
92
+ norm = torch.linalg.norm(delta, dim=-1, keepdim=True).clamp_min(1e-6)
93
+ scale = torch.clamp(max_norm / norm, max=1.0)
94
+ return delta * scale
95
+
96
+
97
+ def _shortest_quat(quat: torch.Tensor) -> torch.Tensor:
98
+ return torch.where(quat[:, 0:1] < 0.0, -quat, quat)
99
+
100
+
101
+ def _retreat_xy_toward(
102
+ target_pos_w: torch.Tensor,
103
+ anchor_pos_w: torch.Tensor,
104
+ distance: float,
105
+ ) -> torch.Tensor:
106
+ """Pull ``target_pos_w`` xy toward ``anchor_pos_w`` by ``distance`` metres."""
107
+ out = target_pos_w.clone()
108
+ delta_xy = out[:, :2] - anchor_pos_w[:, :2]
109
+ norm = torch.linalg.norm(delta_xy, dim=-1, keepdim=True).clamp_min(1e-6)
110
+ out[:, :2] -= distance * (delta_xy / norm)
111
+ return out
112
+
113
+
114
+ def _yaw_from_quat_wxyz(quat_wxyz: torch.Tensor) -> torch.Tensor:
115
+ """Yaw (rotation about world z) from a (w, x, y, z) quaternion."""
116
+ w, x, y, z = quat_wxyz[:, 0], quat_wxyz[:, 1], quat_wxyz[:, 2], quat_wxyz[:, 3]
117
+ siny_cosp = 2.0 * (w * z + x * y)
118
+ cosy_cosp = 1.0 - 2.0 * (y * y + z * z)
119
+ return torch.atan2(siny_cosp, cosy_cosp)
120
+
121
+
122
+ def _find_body_index(robot, body_name: str) -> int:
123
+ if hasattr(robot, "find_bodies"):
124
+ body_ids, _ = robot.find_bodies(body_name)
125
+ if len(body_ids) > 0:
126
+ return int(body_ids[0])
127
+
128
+ body_names = getattr(robot.data, "body_names", None)
129
+ if body_names is not None and body_name in body_names:
130
+ return body_names.index(body_name)
131
+
132
+ return -1
133
+
134
+
135
+ # ---------------------------------------------------------------------------
136
+ # State machine
137
+ # ---------------------------------------------------------------------------
138
+
139
+
140
+ class CutleryArrangementStateMachine(StateMachineBase):
141
+ """Scripted Franka policy for arranging cutlery around a plate.
142
+
143
+ Picks up the fork and places it on the +y (left) side of the plate,
144
+ then picks up the knife and places it on the -y (right) side.
145
+
146
+ Each object goes through 7 phases:
147
+
148
+ 0. Move above object
149
+ 1. Approach down to object
150
+ 2. Close gripper to grasp
151
+ 3. Lift object upward
152
+ 4. Move above target position (beside plate)
153
+ 5. Lower and release
154
+ 6. Retreat upward
155
+
156
+ The action vector is ``[panda_joint1, ..., panda_joint7, gripper]``.
157
+ """
158
+
159
+ MAX_STEPS: int = len(_PICK_ORDER) * sum(_PHASE_DURATIONS_PER_OBJECT) + 100
160
+
161
+ def __init__(self) -> None:
162
+ self._step_count: int = 0
163
+ self._episode_done: bool = False
164
+ self._ee_body_idx: int = -1
165
+ self._jacobi_body_idx: int = -1
166
+ self._arm_joint_ids: list[int] = []
167
+ self._jacobi_joint_ids: list[int] = []
168
+ self._rest_joint_pos: torch.Tensor | None = None
169
+ self._rest_ee_pos_w: torch.Tensor | None = None
170
+ self._initial_ee_pos_w: torch.Tensor | None = None
171
+ self._gripper_down_yaw_w: torch.Tensor | None = None
172
+ self._gripper_down_yaw_offset_w: torch.Tensor | None = None
173
+ self._current_object_idx: int = 0
174
+ self._event: int = 0
175
+ self._events_dt: list[int] = list(_PHASE_DURATIONS_PER_OBJECT) * len(_PICK_ORDER)
176
+
177
+ # ------------------------------------------------------------------
178
+ # StateMachineBase interface
179
+ # ------------------------------------------------------------------
180
+
181
+ def setup(self, env) -> None:
182
+ robot = env.scene["robot"]
183
+ self._ee_body_idx = _find_body_index(robot, _EE_BODY_NAME)
184
+ joint_names = list(robot.data.joint_names)
185
+ missing = [j for j in _FRANKA_ARM_JOINT_NAMES if j not in joint_names]
186
+ if missing:
187
+ raise ValueError(f"Missing Franka joints {missing} in {joint_names}")
188
+ self._arm_joint_ids = [joint_names.index(j) for j in _FRANKA_ARM_JOINT_NAMES]
189
+
190
+ if self._ee_body_idx < 0:
191
+ raise ValueError(f"Could not find body '{_EE_BODY_NAME}' in Franka.")
192
+ if robot.is_fixed_base:
193
+ self._jacobi_body_idx = self._ee_body_idx - 1
194
+ self._jacobi_joint_ids = self._arm_joint_ids
195
+ else:
196
+ self._jacobi_body_idx = self._ee_body_idx
197
+ self._jacobi_joint_ids = [jid + 6 for jid in self._arm_joint_ids]
198
+
199
+ self._rest_joint_pos = torch.zeros(env.num_envs, len(joint_names), device=env.device)
200
+ for idx, name in enumerate(joint_names):
201
+ if name in _FRANKA_REST_JOINT_POS:
202
+ self._rest_joint_pos[:, idx] = _FRANKA_REST_JOINT_POS[name]
203
+
204
+ robot.write_joint_state_to_sim(
205
+ position=self._rest_joint_pos,
206
+ velocity=torch.zeros_like(self._rest_joint_pos),
207
+ )
208
+ env.sim.step(render=False)
209
+ env.scene.update(dt=env.physics_dt)
210
+ self._rest_ee_pos_w = self._ee_pos_w(robot).clone()
211
+
212
+ def check_success(self, env) -> bool:
213
+ plate_pos = env.scene[_PLATE_NAME].data.root_pos_w - env.scene.env_origins
214
+ fork_pos = env.scene[_FORK_NAME].data.root_pos_w - env.scene.env_origins
215
+ knife_pos = env.scene[_KNIFE_NAME].data.root_pos_w - env.scene.env_origins
216
+
217
+ done = torch.ones(env.num_envs, dtype=torch.bool, device=env.device)
218
+
219
+ fork_dist_xy = torch.norm(fork_pos[:, :2] - plate_pos[:, :2], dim=1)
220
+ knife_dist_xy = torch.norm(knife_pos[:, :2] - plate_pos[:, :2], dim=1)
221
+
222
+ done = torch.logical_and(done, fork_dist_xy <= _SUCCESS_MAX_DIST_XY)
223
+ done = torch.logical_and(done, knife_dist_xy <= _SUCCESS_MAX_DIST_XY)
224
+ done = torch.logical_and(done, fork_pos[:, 0] > plate_pos[:, 0]) # fork on +x
225
+ done = torch.logical_and(done, knife_pos[:, 0] < plate_pos[:, 0]) # knife on -x
226
+
227
+ return bool(done.all().item())
228
+
229
+ def pre_step(self, env) -> None:
230
+ pass
231
+
232
+ def get_action(self, env) -> torch.Tensor:
233
+ robot = env.scene["robot"]
234
+ robot.write_joint_damping_to_sim(damping=10.0)
235
+
236
+ device = env.device
237
+ num_envs = env.num_envs
238
+
239
+ obj_name = _PICK_ORDER[self._current_object_idx]
240
+ x_sign = _PLACE_X_SIGNS[self._current_object_idx]
241
+ obj_pos_w = env.scene[obj_name].data.root_pos_w.clone()
242
+ obj_quat_w = env.scene[obj_name].data.root_quat_w.clone()
243
+ plate_pos_w = env.scene[_PLATE_NAME].data.root_pos_w.clone()
244
+ robot_root_pos_w = robot.data.root_pos_w.clone()
245
+
246
+ place_target_w = plate_pos_w.clone()
247
+ place_target_w[:, 0] += x_sign * _PLACE_OFFSET
248
+
249
+ if self._step_count == 0 and self._event == 0:
250
+ self._initial_ee_pos_w = self._ee_pos_w(robot).clone()
251
+
252
+ phase_in_cycle = self._event % _PHASES_PER_OBJECT
253
+
254
+ target_quat_w = self._gripper_down_quat_w(
255
+ obj_quat_w,
256
+ obj_name,
257
+ num_envs,
258
+ device,
259
+ obj_quat_w.dtype,
260
+ yaw_offset=_GRASP_YAW_OFFSET,
261
+ )
262
+
263
+ grasp_anchor_w = _retreat_xy_toward(
264
+ obj_pos_w,
265
+ robot_root_pos_w,
266
+ _GRASP_RETREAT_PER_OBJECT.get(obj_name, 0.0),
267
+ )
268
+
269
+ if phase_in_cycle == 0:
270
+ target_pos_w, gripper_cmd = self._phase_move_above_object(obj_pos_w, num_envs, device)
271
+ elif phase_in_cycle == 1:
272
+ target_pos_w, gripper_cmd = self._phase_approach_object(grasp_anchor_w, num_envs, device)
273
+ elif phase_in_cycle == 2:
274
+ target_pos_w, gripper_cmd = self._phase_grasp(grasp_anchor_w, num_envs, device)
275
+ elif phase_in_cycle == 3:
276
+ target_pos_w, gripper_cmd = self._phase_lift(obj_pos_w, num_envs, device)
277
+ elif phase_in_cycle == 4:
278
+ target_pos_w, gripper_cmd = self._phase_move_above_place(place_target_w, num_envs, device)
279
+ elif phase_in_cycle == 5:
280
+ target_pos_w, gripper_cmd = self._phase_lower_to_release(place_target_w, num_envs, device)
281
+ else:
282
+ target_pos_w, gripper_cmd = self._phase_retreat(place_target_w, num_envs, device)
283
+
284
+ return self._joint_position_franka_action(env, target_pos_w, target_quat_w, gripper_cmd)
285
+
286
+ # ------------------------------------------------------------------
287
+ # Phase helpers
288
+ # ------------------------------------------------------------------
289
+
290
+ def _phase_move_above_object(self, obj_pos_w, num_envs, device):
291
+ target = obj_pos_w.clone()
292
+ target[:, 2] += _HOVER_Z_OFFSET
293
+ if self._initial_ee_pos_w is not None:
294
+ denom = max(self._events_dt[self._event] - 1, 1)
295
+ alpha = min(self._step_count / denom, 1.0)
296
+ target = (1.0 - alpha) * self._initial_ee_pos_w + alpha * target
297
+ return target, _constant_gripper(num_envs, device, _GRIPPER_OPEN)
298
+
299
+ def _phase_approach_object(self, obj_pos_w, num_envs, device):
300
+ target = obj_pos_w.clone()
301
+ target[:, 2] += _GRASP_Z_OFFSET
302
+ return target, _constant_gripper(num_envs, device, _GRIPPER_OPEN)
303
+
304
+ def _phase_grasp(self, obj_pos_w, num_envs, device):
305
+ # Hold the same height as the approach phase so the EE doesn't keep
306
+ # descending while the fingers are closing — that timing race causes
307
+ # empty grasps.
308
+ target = obj_pos_w.clone()
309
+ target[:, 2] += _GRASP_Z_OFFSET
310
+ return target, _constant_gripper(num_envs, device, _GRIPPER_CLOSE)
311
+
312
+ def _phase_lift(self, obj_pos_w, num_envs, device):
313
+ target = obj_pos_w.clone()
314
+ target[:, 2] += _LIFT_Z_OFFSET
315
+ return target, _constant_gripper(num_envs, device, _GRIPPER_CLOSE)
316
+
317
+ def _phase_move_above_place(self, place_pos_w, num_envs, device):
318
+ target = place_pos_w.clone()
319
+ target[:, 2] += _LIFT_Z_OFFSET
320
+ return target, _constant_gripper(num_envs, device, _GRIPPER_CLOSE)
321
+
322
+ def _phase_lower_to_release(self, place_pos_w, num_envs, device):
323
+ target = place_pos_w.clone()
324
+ target[:, 2] += _RELEASE_Z_OFFSET
325
+ return target, _constant_gripper(num_envs, device, _GRIPPER_CLOSE)
326
+
327
+ def _phase_retreat(self, place_pos_w, num_envs, device):
328
+ target = place_pos_w.clone()
329
+ target[:, 2] += _LIFT_Z_OFFSET
330
+ return target, _constant_gripper(num_envs, device, _GRIPPER_OPEN)
331
+
332
+ # ------------------------------------------------------------------
333
+ # Timeline
334
+ # ------------------------------------------------------------------
335
+
336
+ def advance(self) -> None:
337
+ if self._episode_done:
338
+ return
339
+
340
+ self._step_count += 1
341
+ if self._step_count < self._events_dt[self._event]:
342
+ return
343
+
344
+ self._event += 1
345
+ self._step_count = 0
346
+
347
+ if self._event >= len(self._events_dt):
348
+ self._episode_done = True
349
+ return
350
+
351
+ new_obj_idx = self._event // _PHASES_PER_OBJECT
352
+ if new_obj_idx != self._current_object_idx:
353
+ self._current_object_idx = new_obj_idx
354
+ self._initial_ee_pos_w = None
355
+ self._gripper_down_yaw_w = None
356
+ self._gripper_down_yaw_offset_w = None
357
+
358
+ def reset(self) -> None:
359
+ self._step_count = 0
360
+ self._episode_done = False
361
+ self._event = 0
362
+ self._current_object_idx = 0
363
+ self._initial_ee_pos_w = None
364
+ self._gripper_down_yaw_w = None
365
+ self._gripper_down_yaw_offset_w = None
366
+
367
+ # ------------------------------------------------------------------
368
+ # IK / control helpers (same as CupStackingStateMachine)
369
+ # ------------------------------------------------------------------
370
+
371
+ def _ee_pos_w(self, robot) -> torch.Tensor:
372
+ body_idx = self._ee_body_idx if self._ee_body_idx >= 0 else -1
373
+ return robot.data.body_pos_w[:, body_idx, :]
374
+
375
+ def _ee_quat_w(self, robot) -> torch.Tensor:
376
+ body_idx = self._ee_body_idx if self._ee_body_idx >= 0 else -1
377
+ return robot.data.body_quat_w[:, body_idx, :]
378
+
379
+ def _joint_position_franka_action(
380
+ self,
381
+ env,
382
+ target_pos_w: torch.Tensor,
383
+ target_quat_w: torch.Tensor,
384
+ gripper_cmd: torch.Tensor,
385
+ ) -> torch.Tensor:
386
+ robot = env.scene["robot"]
387
+ root_pos_w = robot.data.root_pos_w
388
+ root_quat_w = robot.data.root_quat_w
389
+ root_quat_inv = quat_inv(root_quat_w)
390
+
391
+ target_pos_root = quat_apply(root_quat_inv, target_pos_w - root_pos_w)
392
+ ee_pos_root = quat_apply(root_quat_inv, self._ee_pos_w(robot) - root_pos_w)
393
+ delta_pos_root = _clamp_delta(target_pos_root - ee_pos_root)
394
+
395
+ delta_quat_w = _shortest_quat(quat_mul(target_quat_w, quat_inv(self._ee_quat_w(robot))))
396
+ delta_rot_w = axis_angle_from_quat(delta_quat_w)
397
+ delta_rot_root = _clamp_delta(quat_apply(root_quat_inv, delta_rot_w), _MAX_ROT_DELTA)
398
+
399
+ pose_delta_root = torch.cat([delta_pos_root, delta_rot_root], dim=-1)
400
+ joint_pos_target = self._arm_joint_pos(robot) + self._compute_delta_joint_pos(
401
+ pose_delta_root, self._ee_jacobian_root(robot)
402
+ )
403
+ joint_pos_target = self._clamp_arm_joint_pos(robot, joint_pos_target)
404
+ return torch.cat([joint_pos_target, gripper_cmd], dim=-1)
405
+
406
+ def _arm_joint_pos(self, robot) -> torch.Tensor:
407
+ if not self._arm_joint_ids:
408
+ raise RuntimeError("setup() must run before requesting actions.")
409
+ return robot.data.joint_pos[:, self._arm_joint_ids]
410
+
411
+ def _ee_jacobian_root(self, robot) -> torch.Tensor:
412
+ if self._jacobi_body_idx < 0 or not self._jacobi_joint_ids:
413
+ raise RuntimeError("setup() must run before requesting actions.")
414
+
415
+ jacobian = robot.root_physx_view.get_jacobians()[
416
+ :, self._jacobi_body_idx, :, self._jacobi_joint_ids
417
+ ].clone()
418
+ root_rot_matrix = matrix_from_quat(quat_inv(robot.data.root_quat_w))
419
+ jacobian[:, :3, :] = torch.bmm(root_rot_matrix, jacobian[:, :3, :])
420
+ jacobian[:, 3:, :] = torch.bmm(root_rot_matrix, jacobian[:, 3:, :])
421
+ return jacobian
422
+
423
+ def _compute_delta_joint_pos(self, pose_delta: torch.Tensor, jacobian: torch.Tensor) -> torch.Tensor:
424
+ jacobian_t = torch.transpose(jacobian, dim0=1, dim1=2)
425
+ lambda_matrix = (_IK_DLS_LAMBDA**2) * torch.eye(
426
+ jacobian.shape[1], device=jacobian.device, dtype=jacobian.dtype
427
+ )
428
+ delta_joint_pos = (
429
+ jacobian_t @ torch.inverse(jacobian @ jacobian_t + lambda_matrix) @ pose_delta.unsqueeze(-1)
430
+ )
431
+ return delta_joint_pos.squeeze(-1)
432
+
433
+ def _clamp_arm_joint_pos(self, robot, joint_pos: torch.Tensor) -> torch.Tensor:
434
+ joint_pos_limits = getattr(robot.data, "soft_joint_pos_limits", None)
435
+ if joint_pos_limits is None:
436
+ joint_pos_limits = getattr(robot.data, "joint_pos_limits", None)
437
+ if joint_pos_limits is None:
438
+ return joint_pos
439
+ arm_joint_pos_limits = joint_pos_limits[:, self._arm_joint_ids, :]
440
+ return torch.clamp(joint_pos, arm_joint_pos_limits[..., 0], arm_joint_pos_limits[..., 1])
441
+
442
+ def _gripper_down_quat_w(
443
+ self,
444
+ obj_quat_w: torch.Tensor,
445
+ obj_name: str,
446
+ num_envs: int,
447
+ device: torch.device,
448
+ dtype: torch.dtype,
449
+ yaw_offset: float = 0.0,
450
+ ) -> torch.Tensor:
451
+ if self._gripper_down_yaw_w is None or self._gripper_down_yaw_w.shape[0] != num_envs:
452
+ base_yaw = _yaw_from_quat_wxyz(obj_quat_w).to(device=device, dtype=dtype) # gripper aligned with the orientation of the object
453
+ self._gripper_down_yaw_offset_w = torch.empty(num_envs, device=device, dtype=dtype).uniform_(
454
+ _GRIPPER_DOWN_YAW_OFFSET_RANGE[0],
455
+ _GRIPPER_DOWN_YAW_OFFSET_RANGE[1],
456
+ )
457
+ if obj_name == _KNIFE_NAME:
458
+ base_yaw = torch.zeros_like(base_yaw) # fixed direction
459
+ self._gripper_down_yaw_w = (
460
+ base_yaw + yaw_offset + self._gripper_down_yaw_offset_w
461
+ ).clone()
462
+
463
+ roll = torch.full((num_envs,), _GRIPPER_DOWN_ROLL_W, device=device, dtype=dtype)
464
+ pitch = torch.full((num_envs,), _GRIPPER_DOWN_PITCH_W, device=device, dtype=dtype)
465
+ yaw = self._gripper_down_yaw_w.to(device=device, dtype=dtype)
466
+ return quat_from_euler_xyz(roll, pitch, yaw)
467
+
468
+ # ------------------------------------------------------------------
469
+ # Properties
470
+ # ------------------------------------------------------------------
471
+
472
+ @property
473
+ def is_episode_done(self) -> bool:
474
+ return self._episode_done
475
+
476
+ @property
477
+ def step_count(self) -> int:
478
+ return self._step_count
479
+
480
+ @property
481
+ def task_object_names(self) -> tuple[str, ...]:
482
+ return (_FORK_NAME, _KNIFE_NAME, _PLATE_NAME)
exp_heights_only/datagen.log ADDED
@@ -0,0 +1,429 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Running exp_heights_only ===
2
+ Mon May 25 03:38:37 PM PST 2026
3
+
4
+ ==========
5
+ == CUDA ==
6
+ ==========
7
+
8
+ CUDA Version 12.8.1
9
+
10
+ Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
11
+
12
+ This container image and its contents are governed by the NVIDIA Deep Learning Container License.
13
+ By pulling and using the container, you accept the terms and conditions of this license:
14
+ https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
15
+
16
+ A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
17
+
18
+ debconf: delaying package configuration, since apt-utils is not installed
19
+ [INFO][AppLauncher]: Using device: cuda
20
+ [INFO][AppLauncher]: Loading experience file: /workspace/aicapstone/dependencies/IsaacLab/apps/isaaclab.python.headless.rendering.kit
21
+ [Info] [carb] Logging to file: /usr/local/lib/python3.11/dist-packages/isaacsim/kit/logs/Kit/Isaac-Sim/5.1/kit_20260525_074002.log
22
+ 2026-05-25T07:40:02Z [172ms] [Warning] [carb.windowing-glfw.plugin] GLFW initialization failed.
23
+ 2026-05-25T07:40:02Z [172ms] [Warning] [carb] Failed to startup plugin carb.windowing-glfw.plugin (interfaces: [carb::windowing::IGLContext v1.0],[carb::windowing::IWindowing v1.5]) (impl: carb.windowing-glfw.plugin)
24
+ 2026-05-25T07:40:02Z [182ms] [Warning] [omni.platforminfo.plugin] failed to open the default display. Can't verify X Server version.
25
+
26
+ |---------------------------------------------------------------------------------------------|
27
+ | Driver Version: 580.159.03 | Graphics API: Vulkan
28
+ |=============================================================================================|
29
+ | GPU | Name | Active | LDA | GPU Memory | Vendor-ID | LUID |
30
+ | | | | | | Device-ID | UUID |
31
+ | | | | | | Bus-ID | |
32
+ |---------------------------------------------------------------------------------------------|
33
+ | 0 | NVIDIA GeForce RTX 3060 | Yes: 0 | | 12534 MB | 10de | 0 |
34
+ | | | | | | 2504 | 032c9579.. |
35
+ | | | | | | 1 | |
36
+ |=============================================================================================|
37
+ | OS: 22.04.5 LTS (Jammy Jellyfish) ubuntu, Version: 22.04.5, Kernel: 6.17.0-29-generic
38
+ | Processor: Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz
39
+ | Cores: 6 | Logical Cores: 12
40
+ |---------------------------------------------------------------------------------------------|
41
+ | Total Memory (MB): 31934 | Free Memory: 29452
42
+ | Total Page/Swap (MB): 4095 | Free Page/Swap: 0
43
+ |---------------------------------------------------------------------------------------------|
44
+ 2026-05-25T07:40:03Z [816ms] [Warning] [gpu.foundation.plugin] CPU performance profile is set to powersave. This profile sets the CPU to the lowest frequency reducing performance.
45
+ 2026-05-25T07:40:03Z [1,407ms] [Warning] [carb.windowing-glfw.plugin] GLFW initialization failed.
46
+ 2026-05-25T07:40:03Z [1,407ms] [Warning] [carb] Failed to startup plugin carb.windowing-glfw.plugin (interfaces: [carb::windowing::IGLContext v1.0],[carb::windowing::IWindowing v1.5]) (impl: carb.windowing-glfw.plugin)
47
+ 2026-05-25T07:40:03Z [1,536ms] [Warning] [carb.windowing-glfw.plugin] GLFW initialization failed.
48
+ 2026-05-25T07:40:03Z [1,536ms] [Warning] [carb] Failed to startup plugin carb.windowing-glfw.plugin (interfaces: [carb::windowing::IGLContext v1.0],[carb::windowing::IWindowing v1.5]) (impl: carb.windowing-glfw.plugin)
49
+ 2026-05-25T07:40:03Z [1,544ms] [Warning] [carb.windowing-glfw.plugin] GLFW initialization failed.
50
+ 2026-05-25T07:40:03Z [1,544ms] [Warning] [carb] Failed to startup plugin carb.windowing-glfw.plugin (interfaces: [carb::windowing::IGLContext v1.0],[carb::windowing::IWindowing v1.5]) (impl: carb.windowing-glfw.plugin)
51
+ 2026-05-25T07:40:03Z [1,552ms] [Warning] [carb.windowing-glfw.plugin] GLFW initialization failed.
52
+ 2026-05-25T07:40:03Z [1,552ms] [Warning] [carb] Failed to startup plugin carb.windowing-glfw.plugin (interfaces: [carb::windowing::IGLContext v1.0],[carb::windowing::IWindowing v1.5]) (impl: carb.windowing-glfw.plugin)
53
+ 2026-05-25T07:40:03Z [1,554ms] [Warning] [carb.windowing-glfw.plugin] GLFW initialization failed.
54
+ 2026-05-25T07:40:03Z [1,554ms] [Warning] [carb] Failed to startup plugin carb.windowing-glfw.plugin (interfaces: [carb::windowing::IGLContext v1.0],[carb::windowing::IWindowing v1.5]) (impl: carb.windowing-glfw.plugin)
55
+ 2026-05-25T07:40:03Z [1,555ms] [Warning] [carb.windowing-glfw.plugin] GLFW initialization failed.
56
+ 2026-05-25T07:40:03Z [1,555ms] [Warning] [carb] Failed to startup plugin carb.windowing-glfw.plugin (interfaces: [carb::windowing::IGLContext v1.0],[carb::windowing::IWindowing v1.5]) (impl: carb.windowing-glfw.plugin)
57
+ 2026-05-25T07:40:04Z [1,742ms] [Warning] [omni.log] Source: omni.hydra was already registered.
58
+ 2026-05-25T07:40:04Z [2,113ms] [Warning] [carb] Acquiring non optional plugin interface which is not listed as dependency: [omni::physx::IPhysxBenchmarks v1.0] (plugin: <default plugin>), by client: omni.physics.physx.plugin. Add it to CARB_PLUGIN_IMPL_DEPS() macro of a client.
59
+ 2026-05-25T07:40:04Z [2,125ms] [Warning] [omni.isaac.dynamic_control] omni.isaac.dynamic_control is deprecated as of Isaac Sim 4.5. No action is needed from end-users.
60
+ 2026-05-25T07:40:06Z [4,486ms] [Warning] [pxr.Semantics] pxr.Semantics is deprecated - please use Semantics instead
61
+ 2026-05-25T07:40:06Z [4,663ms] [Warning] [omni.graph.core.plugin] Found duplicate of category 'Replicator' - was 'Annotators', adding 'Fabric Reader'
62
+ 2026-05-25T07:40:06Z [4,663ms] [Warning] [omni.graph.core.plugin] Category 'Replicator' not accepted on node type 'omni.replicator.core.FabricReader' in extension 'omni.replicator.core'
63
+ 2026-05-25T07:40:06Z [4,663ms] [Warning] [omni.replicator.core.scripts.extension] No material configuration file, adding configuration to material settings directly.
64
+ 2026-05-25T07:40:55Z [53,211ms] [Warning] [omni.fabric.plugin] Warning: attribute viewportHandle not found for bucket id 7
65
+
66
+ [INFO]: Parsing configuration from: simulator.tasks.cutlery_arrangement.cutlery_arrangement_env_cfg:CutleryArrangementEnvCfg
67
+ Loaded 10 replay episodes from data/umi/test_fsm_v3/object_poses_10_shared.json
68
+
69
+ ======================================================================================
70
+ [INFO][IsaacLab]: Logging to file: /tmp/isaaclab/logs/isaaclab_2026-05-25_07-42-40.log
71
+ ======================================================================================
72
+
73
+ 07:42:41 [simulation_context.py] WARNING: The `enable_external_forces_every_iteration` parameter in the PhysxCfg is set to False. If you are experiencing noisy velocities, consider enabling this flag. You may need to slightly increase the number of velocity iterations (setting it to 1 or 2 rather than 0), together with this flag, to improve the accuracy of velocity updates.
74
+ [INFO]: Base environment:
75
+ Environment device : cuda:0
76
+ Environment seed : 1779694960
77
+ Physics step-size : 0.016666666666666666
78
+ Rendering step-size : 0.016666666666666666
79
+ Environment step-size : 0.016666666666666666
80
+ 07:42:43 [prims.py] WARNING: Could not perform 'modify_mass_properties' on any prims under: '/World/envs/env_0/Scene/plate'. This might be because of the following reasons:
81
+ (1) The desired attribute does not exist on any of the prims.
82
+ (2) The desired attribute exists on an instanced prim.
83
+ Discovered list of instanced prim paths: []
84
+ 07:42:43 [prims.py] WARNING: Could not perform 'modify_mass_properties' on any prims under: '/World/envs/env_0/Scene/knife'. This might be because of the following reasons:
85
+ (1) The desired attribute does not exist on any of the prims.
86
+ (2) The desired attribute exists on an instanced prim.
87
+ Discovered list of instanced prim paths: []
88
+ 07:42:43 [prims.py] WARNING: Could not perform 'modify_mass_properties' on any prims under: '/World/envs/env_0/Scene/fork'. This might be because of the following reasons:
89
+ (1) The desired attribute does not exist on any of the prims.
90
+ (2) The desired attribute exists on an instanced prim.
91
+ Discovered list of instanced prim paths: []
92
+ [INFO]: Time taken for scene creation : 1.596632 seconds
93
+ [INFO]: Scene manager: <class InteractiveScene>
94
+ Number of environments: 1
95
+ Environment spacing : 8.0
96
+ Source prim name : /World/envs/env_0
97
+ Global prim paths : []
98
+ Replicate physics : True
99
+ [INFO]: Starting the simulation. This may take a few seconds. Please wait...
100
+ 2026-05-25T07:42:49Z [167,004ms] [Warning] [rtx.postprocessing.plugin] DLSS increasing input dimensions: Render resolution of (371, 278) is below minimal input resolution of 300.
101
+ [INFO]: Time taken for simulation start : 6.438627 seconds
102
+ [INFO] Command Manager: <CommandManager> contains 0 active terms.
103
+ +------------------------+
104
+ | Active Command Terms |
105
+ +--------+-------+-------+
106
+ | Index | Name | Type |
107
+ +--------+-------+-------+
108
+ +--------+-------+-------+
109
+
110
+ [INFO] Event Manager: <EventManager> contains 1 active terms.
111
+ +---------------------------------+
112
+ | Active Event Terms in Mode: 'reset' |
113
+ +------------+--------------------+
114
+ | Index | Name |
115
+ +------------+--------------------+
116
+ | 0 | reset_all |
117
+ +------------+--------------------+
118
+
119
+ [INFO] Recorder Manager: <RecorderManager> contains 5 active terms.
120
+ +--------------------------------------------------+
121
+ | Active Recorder Terms |
122
+ +-------+------------------------------------------+
123
+ | Index | Name |
124
+ +-------+------------------------------------------+
125
+ | 0 | record_initial_state |
126
+ | 1 | record_post_step_states |
127
+ | 2 | record_pre_step_actions |
128
+ | 3 | record_pre_step_flat_policy_observations |
129
+ | 4 | record_post_step_processed_actions |
130
+ +-------+------------------------------------------+
131
+
132
+ [INFO] Action Manager: <ActionManager> contains 2 active terms.
133
+ +------------------------------------+
134
+ | Active Action Terms (shape: 8) |
135
+ +-------+----------------+-----------+
136
+ | Index | Name | Dimension |
137
+ +-------+----------------+-----------+
138
+ | 0 | arm_action | 7 |
139
+ | 1 | gripper_action | 1 |
140
+ +-------+----------------+-----------+
141
+
142
+ [INFO] Observation Manager: <ObservationManager> contains 1 groups.
143
+ +-----------------------------------------------+
144
+ | Active Observation Terms in Group: 'policy' |
145
+ +--------+--------------------+-----------------+
146
+ | Index | Name | Shape |
147
+ +--------+--------------------+-----------------+
148
+ | 0 | joint_pos | (9,) |
149
+ | 1 | joint_vel | (9,) |
150
+ | 2 | joint_pos_rel | (9,) |
151
+ | 3 | joint_vel_rel | (9,) |
152
+ | 4 | actions | (8,) |
153
+ | 5 | wrist | (480, 640, 3) |
154
+ | 6 | front | (480, 640, 3) |
155
+ | 7 | joint_pos_target | (9,) |
156
+ +--------+--------------------+-----------------+
157
+
158
+ [INFO] Termination Manager: <TerminationManager> contains 1 active terms.
159
+ +----------------------------+
160
+ | Active Termination Terms |
161
+ +-------+---------+----------+
162
+ | Index | Name | Time Out |
163
+ +-------+---------+----------+
164
+ | 0 | success | False |
165
+ +-------+---------+----------+
166
+
167
+ [INFO] Reward Manager: <RewardManager> contains 0 active terms.
168
+ +-----------------------+
169
+ | Active Reward Terms |
170
+ +-------+------+--------+
171
+ | Index | Name | Weight |
172
+ +-------+------+--------+
173
+ +-------+------+--------+
174
+
175
+ [INFO] Curriculum Manager: <CurriculumManager> contains 0 active terms.
176
+ +----------------------+
177
+ | Active Curriculum Terms |
178
+ +-----------+----------+
179
+ | Index | Name |
180
+ +-----------+----------+
181
+ +-----------+----------+
182
+
183
+ [INFO]: Completed setting up the environment...
184
+ [pose] fork: pos=(0.599, -0.172, 0.050) yaw= -0.0°
185
+ [pose] knife: pos=(0.503, -0.261, 0.050) yaw=+180.0°
186
+ Start Recording!!!
187
+ 2026-05-25T07:42:53Z [171,430ms] [Warning] [carb] Client gpu.foundation.plugin has acquired [gpu::unstable::IMemoryBudgetManagerFactory v0.1] 100 times. Consider accessing this interface with carb::getCachedInterface() (Performance warning)
188
+ Episode success!
189
+ Stop Recording!!!
190
+
191
+ Svt[info]: -------------------------------------------
192
+ Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v3.0.0
193
+ Svt[info]: SVT [build] : GCC 14.2.1 20250110 (Red Hat 14.2.1-7) 64 bit
194
+ Svt[info]: LIB Build date: Jul 3 2025 03:14:07
195
+ Svt[info]: -------------------------------------------
196
+ Svt[warn]: Preset M12 is mapped to M10.
197
+ Svt[info]: Level of Parallelism: 5
198
+ Svt[info]: Number of PPCS 76
199
+ Svt[info]: [asm level on system : up to avx2]
200
+ Svt[info]: [asm level selected : up to avx2]
201
+ Svt[info]: -------------------------------------------
202
+ Svt[info]: SVT [config]: main profile tier (auto) level (auto)
203
+ Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 640 / 480 / 30 / 1
204
+ Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
205
+ Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access
206
+ Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 2 / 16 / key frame
207
+ Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 30
208
+ Svt[info]: SVT [config]: AQ mode / variance boost : 2 / 0
209
+ Svt[info]: SVT [config]: sharpness / luminance-based QP bias : 0 / 0
210
+ Svt[info]: Svt[info]: -------------------------------------------
211
+ Svt[warn]: Failed to set thread priority: Invalid argument
212
+ Svt[info]: -------------------------------------------
213
+ Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v3.0.0
214
+ Svt[info]: SVT [build] : GCC 14.2.1 20250110 (Red Hat 14.2.1-7) 64 bit
215
+ Svt[info]: LIB Build date: Jul 3 2025 03:14:07
216
+ Svt[info]: -------------------------------------------
217
+ Svt[warn]: Preset M12 is mapped to M10.
218
+ Svt[info]: Level of Parallelism: 5
219
+ Svt[info]: Number of PPCS 76
220
+ Svt[info]: [asm level on system : up to avx2]
221
+ Svt[info]: [asm level selected : up to avx2]
222
+ Svt[info]: -------------------------------------------
223
+ Svt[info]: SVT [config]: main profile tier (auto) level (auto)
224
+ Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 640 / 480 / 30 / 1
225
+ Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
226
+ Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access
227
+ Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 2 / 16 / key frame
228
+ Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 30
229
+ Svt[info]: SVT [config]: AQ mode / variance boost : 2 / 0
230
+ Svt[info]: SVT [config]: sharpness / luminance-based QP bias : 0 / 0
231
+ Svt[info]: Svt[info]: -------------------------------------------
232
+ [pose] fork: pos=(0.348, -0.264, 0.050) yaw= -0.0°
233
+ [pose] knife: pos=(0.475, -0.230, 0.050) yaw=+180.0°
234
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_01_success.mp4 (235 frames)
235
+ [Data Usage]1/10 success.
236
+ Start Recording!!!
237
+ Episode success!
238
+ Stop Recording!!!
239
+
240
+ Svt[info]: -------------------------------------------
241
+ Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v3.0.0
242
+ Svt[info]: SVT [build] : GCC 14.2.1 20250110 (Red Hat 14.2.1-7) 64 bit
243
+ Svt[info]: LIB Build date: Jul 3 2025 03:14:07
244
+ Svt[info]: -------------------------------------------
245
+ Svt[warn]: Preset M12 is mapped to M10.
246
+ Svt[info]: Level of Parallelism: 5
247
+ Svt[info]: Number of PPCS 76
248
+ Svt[info]: [asm level on system : up to avx2]
249
+ Svt[info]: [asm level selected : up to avx2]
250
+ Svt[info]: -------------------------------------------
251
+ Svt[info]: SVT [config]: main profile tier (auto) level (auto)
252
+ Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 640 / 480 / 30 / 1
253
+ Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
254
+ Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access
255
+ Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 2 / 16 / key frame
256
+ Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 30
257
+ Svt[info]: SVT [config]: AQ mode / variance boost : 2 / 0
258
+ Svt[info]: SVT [config]: sharpness / luminance-based QP bias : 0 / 0
259
+ Svt[info]: Svt[info]: -------------------------------------------
260
+ [mp4 @ 0x74ee75d0fd40] Starting second pass: moving the moov atom to the beginning of the file
261
+ Svt[info]: -------------------------------------------
262
+ Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v3.0.0
263
+ Svt[info]: SVT [build] : GCC 14.2.1 20250110 (Red Hat 14.2.1-7) 64 bit
264
+ Svt[info]: LIB Build date: Jul 3 2025 03:14:07
265
+ Svt[info]: -------------------------------------------
266
+ Svt[warn]: Preset M12 is mapped to M10.
267
+ Svt[info]: Level of Parallelism: 5
268
+ Svt[info]: Number of PPCS 76
269
+ Svt[info]: [asm level on system : up to avx2]
270
+ Svt[info]: [asm level selected : up to avx2]
271
+ Svt[info]: -------------------------------------------
272
+ Svt[info]: SVT [config]: main profile tier (auto) level (auto)
273
+ Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 640 / 480 / 30 / 1
274
+ Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
275
+ Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access
276
+ Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 2 / 16 / key frame
277
+ Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 30
278
+ Svt[info]: SVT [config]: AQ mode / variance boost : 2 / 0
279
+ Svt[info]: SVT [config]: sharpness / luminance-based QP bias : 0 / 0
280
+ Svt[info]: Svt[info]: -------------------------------------------
281
+ [mp4 @ 0x74ee75f87d40] Starting second pass: moving the moov atom to the beginning of the file
282
+ [pose] fork: pos=(0.408, -0.010, 0.050) yaw= -0.0°
283
+ [pose] knife: pos=(0.626, -0.034, 0.050) yaw=+180.0°
284
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_02_success.mp4 (235 frames)
285
+ [Data Usage]2/10 success.
286
+ Start Recording!!!
287
+ Episode failed!
288
+ Stop Recording!!!
289
+ [pose] knife: pos=(0.136, -0.188, 0.050) yaw=+180.0°
290
+ [pose] fork: pos=(0.310, -0.261, 0.050) yaw= -0.0°
291
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_03_failed.mp4 (235 frames)
292
+ [Data Usage]3/10 fail.
293
+ Start Recording!!!
294
+ Episode success!
295
+ Stop Recording!!!
296
+
297
+ Svt[info]: -------------------------------------------
298
+ Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v3.0.0
299
+ Svt[info]: SVT [build] : GCC 14.2.1 20250110 (Red Hat 14.2.1-7) 64 bit
300
+ Svt[info]: LIB Build date: Jul 3 2025 03:14:07
301
+ Svt[info]: -------------------------------------------
302
+ Svt[warn]: Preset M12 is mapped to M10.
303
+ Svt[info]: Level of Parallelism: 5
304
+ Svt[info]: Number of PPCS 76
305
+ Svt[info]: [asm level on system : up to avx2]
306
+ Svt[info]: [asm level selected : up to avx2]
307
+ Svt[info]: -------------------------------------------
308
+ Svt[info]: SVT [config]: main profile tier (auto) level (auto)
309
+ Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 640 / 480 / 30 / 1
310
+ Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
311
+ Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access
312
+ Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 2 / 16 / key frame
313
+ Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 30
314
+ Svt[info]: SVT [config]: AQ mode / variance boost : 2 / 0
315
+ Svt[info]: SVT [config]: sharpness / luminance-based QP bias : 0 / 0
316
+ Svt[info]: Svt[info]: -------------------------------------------
317
+ [mp4 @ 0x74ee76075d40] Starting second pass: moving the moov atom to the beginning of the file
318
+ Svt[info]: -------------------------------------------
319
+ Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v3.0.0
320
+ Svt[info]: SVT [build] : GCC 14.2.1 20250110 (Red Hat 14.2.1-7) 64 bit
321
+ Svt[info]: LIB Build date: Jul 3 2025 03:14:07
322
+ Svt[info]: -------------------------------------------
323
+ Svt[warn]: Preset M12 is mapped to M10.
324
+ Svt[info]: Level of Parallelism: 5
325
+ Svt[info]: Number of PPCS 76
326
+ Svt[info]: [asm level on system : up to avx2]
327
+ Svt[info]: [asm level selected : up to avx2]
328
+ Svt[info]: -------------------------------------------
329
+ Svt[info]: SVT [config]: main profile tier (auto) level (auto)
330
+ Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 640 / 480 / 30 / 1
331
+ Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
332
+ Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access
333
+ Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 2 / 16 / key frame
334
+ Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 30
335
+ Svt[info]: SVT [config]: AQ mode / variance boost : 2 / 0
336
+ Svt[info]: SVT [config]: sharpness / luminance-based QP bias : 0 / 0
337
+ Svt[info]: Svt[info]: -------------------------------------------
338
+ [mp4 @ 0x74ee3f51f080] Starting second pass: moving the moov atom to the beginning of the file
339
+ [pose] knife: pos=(0.138, -0.101, 0.050) yaw=+180.0°
340
+ [pose] fork: pos=(0.273, -0.355, 0.050) yaw= -0.0°
341
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_04_success.mp4 (235 frames)
342
+ [Data Usage]3/10 success.
343
+ Start Recording!!!
344
+ Episode success!
345
+ Stop Recording!!!
346
+
347
+ Svt[info]: -------------------------------------------
348
+ Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v3.0.0
349
+ Svt[info]: SVT [build] : GCC 14.2.1 20250110 (Red Hat 14.2.1-7) 64 bit
350
+ Svt[info]: LIB Build date: Jul 3 2025 03:14:07
351
+ Svt[info]: -------------------------------------------
352
+ Svt[warn]: Preset M12 is mapped to M10.
353
+ Svt[info]: Level of Parallelism: 5
354
+ Svt[info]: Number of PPCS 76
355
+ Svt[info]: [asm level on system : up to avx2]
356
+ Svt[info]: [asm level selected : up to avx2]
357
+ Svt[info]: -------------------------------------------
358
+ Svt[info]: SVT [config]: main profile tier (auto) level (auto)
359
+ Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 640 / 480 / 30 / 1
360
+ Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
361
+ Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access
362
+ Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 2 / 16 / key frame
363
+ Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 30
364
+ Svt[info]: SVT [config]: AQ mode / variance boost : 2 / 0
365
+ Svt[info]: SVT [config]: sharpness / luminance-based QP bias : 0 / 0
366
+ Svt[info]: Svt[info]: -------------------------------------------
367
+ [mp4 @ 0x74ee76075d40] Starting second pass: moving the moov atom to the beginning of the file
368
+ Svt[info]: -------------------------------------------
369
+ Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v3.0.0
370
+ Svt[info]: SVT [build] : GCC 14.2.1 20250110 (Red Hat 14.2.1-7) 64 bit
371
+ Svt[info]: LIB Build date: Jul 3 2025 03:14:07
372
+ Svt[info]: -------------------------------------------
373
+ Svt[warn]: Preset M12 is mapped to M10.
374
+ Svt[info]: Level of Parallelism: 5
375
+ Svt[info]: Number of PPCS 76
376
+ Svt[info]: [asm level on system : up to avx2]
377
+ Svt[info]: [asm level selected : up to avx2]
378
+ Svt[info]: -------------------------------------------
379
+ Svt[info]: SVT [config]: main profile tier (auto) level (auto)
380
+ Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 640 / 480 / 30 / 1
381
+ Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
382
+ Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access
383
+ Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 2 / 16 / key frame
384
+ Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 30
385
+ Svt[info]: SVT [config]: AQ mode / variance boost : 2 / 0
386
+ Svt[info]: SVT [config]: sharpness / luminance-based QP bias : 0 / 0
387
+ Svt[info]: Svt[info]: -------------------------------------------
388
+ [mp4 @ 0x74ee75cc9d40] Starting second pass: moving the moov atom to the beginning of the file
389
+ [pose] knife: pos=(0.113, -0.284, 0.050) yaw=+180.0°
390
+ [pose] fork: pos=(0.137, -0.081, 0.050) yaw= -0.0°
391
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_05_success.mp4 (235 frames)
392
+ [Data Usage]4/10 success.
393
+ Start Recording!!!
394
+ Episode failed!
395
+ Stop Recording!!!
396
+ [pose] fork: pos=(0.171, -0.498, 0.050) yaw= -0.0°
397
+ [pose] knife: pos=(0.452, -0.561, 0.050) yaw=+180.0°
398
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_06_failed.mp4 (235 frames)
399
+ [Data Usage]5/10 fail.
400
+ Start Recording!!!
401
+ Episode failed!
402
+ Stop Recording!!!
403
+ [pose] fork: pos=(0.385, -0.486, 0.050) yaw= -0.0°
404
+ [pose] knife: pos=(0.314, -0.241, 0.050) yaw=+180.0°
405
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_07_failed.mp4 (235 frames)
406
+ [Data Usage]5/10 fail.
407
+ Start Recording!!!
408
+ Episode failed!
409
+ Stop Recording!!!
410
+ [pose] fork: pos=(0.133, -0.028, 0.050) yaw= -0.0°
411
+ [pose] knife: pos=(0.130, -0.237, 0.050) yaw=+180.0°
412
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_08_failed.mp4 (235 frames)
413
+ [Data Usage]5/10 fail.
414
+ Start Recording!!!
415
+ Episode failed!
416
+ Stop Recording!!!
417
+ [pose] knife: pos=(0.350, -0.499, 0.050) yaw=+180.0°
418
+ [pose] fork: pos=(0.383, -0.364, 0.050) yaw= -0.0°
419
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_09_failed.mp4 (235 frames)
420
+ [Data Usage]5/10 fail.
421
+ Start Recording!!!
422
+ Episode failed!
423
+ Stop Recording!!!
424
+ Replayed all 10 episodes. Exiting the app.
425
+ [video] saved /workspace/aicapstone/fsm_experiments/exp_heights_only/videos/ep_10_failed.mp4 (235 frames)
426
+ [Data Usage]5/10 fail.
427
+ /usr/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
428
+ warnings.warn('resource_tracker: There appear to be %d '
429
+ === exp_heights_only done. S=4 F=6 ===
exp_heights_only/videos/ep_01_success.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc2480b26aa6d5a3ab339dcd114efe27a9382335ea82f579a9d8835af4e2f318
3
+ size 2225474
exp_heights_only/videos/ep_02_success.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e087838689bd80f00e62ff3e483a66548c4aa219071e03be50f0f61148e23032
3
+ size 2107601
exp_heights_only/videos/ep_03_failed.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21bd4b84a60f5d7760a574a4e513db7988f8c71f1beaf2f9c534cd4920376756
3
+ size 2357798
exp_heights_only/videos/ep_04_success.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38a39ae3d97142238efffa3e6799b9b69fcf0422b521923f1df6b531e826fd7f
3
+ size 2103742
exp_heights_only/videos/ep_05_success.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3eac809792ae2414a3d8d48f657882ee44058a963d55708367a9b116fb812b40
3
+ size 2131129
exp_heights_only/videos/ep_06_failed.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b766adcd6d1d1937da0700326ebdc2f744f2d476e479942fdb8fe3f98826eb49
3
+ size 2101816
exp_heights_only/videos/ep_07_failed.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a55d811c9468934d213d76c463ad95d0319fb2c5011be92ad73b27278ab6868
3
+ size 1789343
exp_heights_only/videos/ep_08_failed.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b2d80d47d96130adabf02b6672000347fd79783c10f76556bb70e05d2a9af66
3
+ size 2118298
exp_heights_only/videos/ep_09_failed.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40b36ca82321c81bd3f21ed3eff948aa692ddf9bcf43fd18077ee5dab552604b
3
+ size 2106725
exp_heights_only/videos/ep_10_failed.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3ac24ca0f9bb1198c2520a24ed48e120985254c0fb9c7de1eb80dc22e9a78aa
3
+ size 1865896