From a5f15db05700cab2b2be4420bad3a941bb10959f Mon Sep 17 00:00:00 2001 From: Simon Alibert Date: Fri, 23 May 2025 13:16:14 +0200 Subject: [PATCH] Add changes from #1117 --- lerobot/record.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lerobot/record.py b/lerobot/record.py index 0059752b8..8a3205c4e 100644 --- a/lerobot/record.py +++ b/lerobot/record.py @@ -167,6 +167,10 @@ def record_loop( if dataset is not None and fps is not None and dataset.fps != fps: raise ValueError(f"The dataset fps should be equal to requested fps ({dataset.fps} != {fps}).") + # if policy is given it needs cleaning up + if policy is not None: + policy.reset() + timestamp = 0 start_episode_t = time.perf_counter() while timestamp < control_time_s: