Skip to content

Commit 6163daa

Browse files
authored
Fix: emptying action queue between resets (#1117)
1 parent 8e2a394 commit 6163daa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lerobot/common/robot_devices/control_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ def control_loop(
243243

244244
timestamp = 0
245245
start_episode_t = time.perf_counter()
246+
247+
# Controls starts, if policy is given it needs cleaning up
248+
if policy is not None:
249+
policy.reset()
250+
246251
while timestamp < control_time_s:
247252
start_loop_t = time.perf_counter()
248253

0 commit comments

Comments
 (0)