From 7308aa57a2de3566705537cc8073e42a90aaf333 Mon Sep 17 00:00:00 2001 From: Steven Palma Date: Wed, 28 May 2025 15:36:21 +0200 Subject: [PATCH] fix(scripts): reconstructs action dict from policy output (#1162) Co-authored-by: Simon Alibert <75076266+aliberts@users.noreply.github.com> --- lerobot/record.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lerobot/record.py b/lerobot/record.py index 733955b1b..6b1fdeb78 100644 --- a/lerobot/record.py +++ b/lerobot/record.py @@ -186,9 +186,10 @@ def record_loop( observation_frame = build_dataset_frame(dataset.features, observation, prefix="observation") if policy is not None: - action = predict_action( + action_values = predict_action( observation_frame, policy, get_safe_torch_device(policy.config.device), policy.config.use_amp ) + action = {key: action_values[i] for i, key in enumerate(robot.action_features)} else: action = teleop.get_action()