From 068efce3f87f516d45303db6d54649cb6346bd68 Mon Sep 17 00:00:00 2001 From: Pradeep Kadubandi Date: Wed, 15 Jan 2025 01:50:38 -0800 Subject: [PATCH] Fix for the issue https://github.com/huggingface/lerobot/issues/638 (#639) --- lerobot/scripts/control_robot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerobot/scripts/control_robot.py b/lerobot/scripts/control_robot.py index 8187e8a3..9f266e2f 100644 --- a/lerobot/scripts/control_robot.py +++ b/lerobot/scripts/control_robot.py @@ -309,7 +309,7 @@ def record( # TODO(rcadene): add an option to enable teleoperation during reset # Skip reset for the last episode to be recorded if not events["stop_recording"] and ( - (dataset.num_episodes < num_episodes - 1) or events["rerecord_episode"] + (recorded_episodes < num_episodes - 1) or events["rerecord_episode"] ): log_say("Reset the environment", play_sounds) if reset_follower: