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().
This commit is contained in:
Jaimin Patel
2026-05-29 15:56:22 -04:00
parent 24017e960c
commit 2c95e55b91
@@ -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(