stop policy when we dont teleop yet

This commit is contained in:
Pepijn
2026-01-02 13:12:22 +01:00
parent 464b65cfb0
commit cf1d8c3d5b
2 changed files with 12 additions and 3 deletions
+7 -2
View File
@@ -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
+5 -1
View File
@@ -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)