Update lerobot/common/envs/utils.py

这个提交包含在:
Remi
2024-04-11 10:35:17 +02:00
提交者 GitHub
父节点 35069bb3e2
当前提交 9229226522

查看文件

@ -19,6 +19,7 @@ def preprocess_observation(observation, transform=None):
img = einops.rearrange(img, "b h w c -> b c h w")
obs[imgkey] = img
# TODO(rcadene): enable pixels only baseline with `obs_type="pixels"` in environment by removing requirement for "agent_pos"
obs["observation.state"] = torch.from_numpy(observation["agent_pos"]).float()
# apply same transforms as in training