diff --git a/examples/rac/rac_data_collection.py b/examples/rac/rac_data_collection.py index 17a9f7890..177d949ec 100644 --- a/examples/rac/rac_data_collection.py +++ b/examples/rac/rac_data_collection.py @@ -379,13 +379,18 @@ def rac_rollout_loop( frame_buffer.append(frame) stats["total_frames"] += 1 - elif events["policy_paused"] and not waiting_for_takeover: + elif waiting_for_takeover: + # Waiting for START - policy stopped, no recording, robot holds position + if last_robot_action is not None: + robot.send_action(last_robot_action) + stats["paused_frames"] += 1 + + elif events["policy_paused"]: # Paused and user acknowledged - hold last position, don't record if last_robot_action is not None: robot.send_action(last_robot_action) stats["paused_frames"] += 1 robot_action = last_robot_action - # Don't record frames during pause else: # Normal policy execution - record diff --git a/examples/rac/rac_data_collection_openarms.py b/examples/rac/rac_data_collection_openarms.py index bda118c26..204f826d1 100644 --- a/examples/rac/rac_data_collection_openarms.py +++ b/examples/rac/rac_data_collection_openarms.py @@ -397,7 +397,11 @@ def rac_rollout_loop( frame_buffer.append(frame) stats["total_frames"] += 1 - elif events["policy_paused"] and not waiting_for_takeover: + elif waiting_for_takeover: + # Waiting for START - policy stopped, no recording, robot holds position + stats["paused_frames"] += 1 + + elif events["policy_paused"]: # Paused and user acknowledged - teleop tracks robot position, don't record robot_action = {k: v for k, v in obs_filtered.items() if k.endswith(".pos")} teleop.send_feedback(robot_action)