added names in record_dataset function of gym_manipulator

This commit is contained in:
Michel Aractingi
2025-05-07 13:58:24 +02:00
committed by AdilZouitine
parent 35743b72de
commit f762e2758f
2 changed files with 8 additions and 4 deletions

View File

@@ -462,7 +462,7 @@ def dataset_to_policy_features(features: dict[str, dict]) -> dict[str, PolicyFea
names = ft["names"]
# Backward compatibility for "channel" which is an error introduced in LeRobotDataset v2.0 for ported datasets.
if names and names[2] in ["channel", "channels"]: # (h, w, c) -> (c, h, w)
if names[2] in ["channel", "channels"]: # (h, w, c) -> (c, h, w)
shape = (shape[2], shape[0], shape[1])
elif key == "observation.environment_state":
type = FeatureType.ENV