fix(recording): re-recording episode doesn't increase count of recording episodes (#1395)

This commit is contained in:
Steven Palma
2025-06-27 16:02:51 +02:00
committed by GitHub
parent 2f9ba4e2cc
commit 69901b9b6a
2 changed files with 6 additions and 9 deletions

View File

@@ -226,7 +226,8 @@ _init_rerun(session_name="recording")
robot.connect()
teleop.connect()
for episode_idx in range(NUM_EPISODES):
episode_idx = 0
while episode_idx < NUM_EPISODES and not events["stop_recording"]:
log_say(f"Recording episode {episode_idx + 1} of {NUM_EPISODES}")
record_loop(
@@ -261,10 +262,7 @@ for episode_idx in range(NUM_EPISODES):
continue
dataset.save_episode()
if events["stop_recording"]:
log_say("Exiting session")
break
episode_idx += 1
# Clean up
log_say("Stop recording")