From 2c95e55b91704db28123e5a7e206930083e3665a Mon Sep 17 00:00:00 2001 From: Jaimin Patel Date: Fri, 29 May 2026 15:56:22 -0400 Subject: [PATCH] Fix wrong feature key dropped in delta-action transform_features MapDeltaActionToRobotActionStep.transform_features iterated over ["x", "y", "z", "gripper"] and popped f"delta_{axis}", producing "delta_gripper" for the last item. No "delta_gripper" feature is ever created: the upstream MapTensorToDeltaActionDictStep registers the gripper input under the key "gripper", and this step's own action() method pops "gripper" at runtime. As a result the gripper action feature was never removed from the feature dict, so the declared features diverged from the actual runtime transition. Pop "gripper" explicitly so transform_features matches action(). --- src/lerobot/processor/delta_action_processor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lerobot/processor/delta_action_processor.py b/src/lerobot/processor/delta_action_processor.py index 86b2feec1..a75432d50 100644 --- a/src/lerobot/processor/delta_action_processor.py +++ b/src/lerobot/processor/delta_action_processor.py @@ -132,8 +132,9 @@ class MapDeltaActionToRobotActionStep(RobotActionProcessorStep): def transform_features( self, features: dict[PipelineFeatureType, dict[str, PolicyFeature]] ) -> dict[PipelineFeatureType, dict[str, PolicyFeature]]: - for axis in ["x", "y", "z", "gripper"]: + for axis in ["x", "y", "z"]: features[PipelineFeatureType.ACTION].pop(f"delta_{axis}", None) + features[PipelineFeatureType.ACTION].pop("gripper", None) for feat in ["enabled", "target_x", "target_y", "target_z", "target_wx", "target_wy", "target_wz"]: features[PipelineFeatureType.ACTION][f"{feat}"] = PolicyFeature(