change to 256
Browse files- src/robomme/robomme_env/BinFill.py +1 -1
- src/robomme/robomme_env/ButtonUnmask.py +1 -1
- src/robomme/robomme_env/ButtonUnmaskSwap.py +1 -1
- src/robomme/robomme_env/InsertPeg.py +1 -1
- src/robomme/robomme_env/MoveCube.py +1 -1
- src/robomme/robomme_env/PatternLock.py +1 -1
- src/robomme/robomme_env/PickHighlight.py +1 -1
- src/robomme/robomme_env/PickXtimes.py +1 -1
- src/robomme/robomme_env/RouteStick.py +1 -1
- src/robomme/robomme_env/StopCube.py +1 -1
- src/robomme/robomme_env/SwingXtimes.py +1 -1
- src/robomme/robomme_env/VideoPlaceButton.py +1 -1
- src/robomme/robomme_env/VideoPlaceOrder.py +1 -2
- src/robomme/robomme_env/VideoRepick.py +1 -1
- src/robomme/robomme_env/VideoUnmask.py +1 -1
- src/robomme/robomme_env/VideoUnmaskSwap.py +1 -1
- tests/dataset/test_obs_config.py +29 -0
src/robomme/robomme_env/BinFill.py
CHANGED
|
@@ -162,7 +162,7 @@ class BinFill(BaseEnv):
|
|
| 162 |
pose = sapien_utils.look_at(
|
| 163 |
eye=camera_eye, target=camera_target
|
| 164 |
)
|
| 165 |
-
return [CameraConfig("base_camera", pose,
|
| 166 |
|
| 167 |
@property
|
| 168 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 162 |
pose = sapien_utils.look_at(
|
| 163 |
eye=camera_eye, target=camera_target
|
| 164 |
)
|
| 165 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 166 |
|
| 167 |
@property
|
| 168 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/ButtonUnmask.py
CHANGED
|
@@ -150,7 +150,7 @@ class ButtonUnmask(BaseEnv):
|
|
| 150 |
pose = sapien_utils.look_at(
|
| 151 |
eye=camera_eye, target=camera_target
|
| 152 |
)
|
| 153 |
-
return [CameraConfig("base_camera", pose,
|
| 154 |
|
| 155 |
@property
|
| 156 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 150 |
pose = sapien_utils.look_at(
|
| 151 |
eye=camera_eye, target=camera_target
|
| 152 |
)
|
| 153 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 154 |
|
| 155 |
@property
|
| 156 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/ButtonUnmaskSwap.py
CHANGED
|
@@ -176,7 +176,7 @@ class ButtonUnmaskSwap(BaseEnv):
|
|
| 176 |
pose = sapien_utils.look_at(
|
| 177 |
eye=camera_eye, target=camera_target
|
| 178 |
)
|
| 179 |
-
return [CameraConfig("base_camera", pose,
|
| 180 |
|
| 181 |
@property
|
| 182 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 176 |
pose = sapien_utils.look_at(
|
| 177 |
eye=camera_eye, target=camera_target
|
| 178 |
)
|
| 179 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 180 |
|
| 181 |
@property
|
| 182 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/InsertPeg.py
CHANGED
|
@@ -124,7 +124,7 @@ class InsertPeg(BaseEnv):
|
|
| 124 |
pose = sapien_utils.look_at(
|
| 125 |
eye=camera_eye, target=camera_target
|
| 126 |
)
|
| 127 |
-
return [CameraConfig("base_camera", pose,
|
| 128 |
|
| 129 |
@property
|
| 130 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 124 |
pose = sapien_utils.look_at(
|
| 125 |
eye=camera_eye, target=camera_target
|
| 126 |
)
|
| 127 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 128 |
|
| 129 |
@property
|
| 130 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/MoveCube.py
CHANGED
|
@@ -125,7 +125,7 @@ class MoveCube(BaseEnv):
|
|
| 125 |
pose = sapien_utils.look_at(
|
| 126 |
eye=camera_eye, target=camera_target
|
| 127 |
)
|
| 128 |
-
return [CameraConfig("base_camera", pose,
|
| 129 |
|
| 130 |
@property
|
| 131 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 125 |
pose = sapien_utils.look_at(
|
| 126 |
eye=camera_eye, target=camera_target
|
| 127 |
)
|
| 128 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 129 |
|
| 130 |
@property
|
| 131 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/PatternLock.py
CHANGED
|
@@ -155,7 +155,7 @@ class PatternLock(BaseEnv):
|
|
| 155 |
pose = sapien_utils.look_at(
|
| 156 |
eye=camera_eye, target=camera_target
|
| 157 |
)
|
| 158 |
-
return [CameraConfig("base_camera", pose,
|
| 159 |
|
| 160 |
@property
|
| 161 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 155 |
pose = sapien_utils.look_at(
|
| 156 |
eye=camera_eye, target=camera_target
|
| 157 |
)
|
| 158 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 159 |
|
| 160 |
@property
|
| 161 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/PickHighlight.py
CHANGED
|
@@ -147,7 +147,7 @@ class PickHighlight(BaseEnv):
|
|
| 147 |
pose = sapien_utils.look_at(
|
| 148 |
eye=camera_eye, target=camera_target
|
| 149 |
)
|
| 150 |
-
return [CameraConfig("base_camera", pose,
|
| 151 |
|
| 152 |
@property
|
| 153 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 147 |
pose = sapien_utils.look_at(
|
| 148 |
eye=camera_eye, target=camera_target
|
| 149 |
)
|
| 150 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 151 |
|
| 152 |
@property
|
| 153 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/PickXtimes.py
CHANGED
|
@@ -152,7 +152,7 @@ class PickXtimes(BaseEnv):
|
|
| 152 |
pose = sapien_utils.look_at(
|
| 153 |
eye=camera_eye, target=camera_target
|
| 154 |
)
|
| 155 |
-
return [CameraConfig("base_camera", pose,
|
| 156 |
|
| 157 |
@property
|
| 158 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 152 |
pose = sapien_utils.look_at(
|
| 153 |
eye=camera_eye, target=camera_target
|
| 154 |
)
|
| 155 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 156 |
|
| 157 |
@property
|
| 158 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/RouteStick.py
CHANGED
|
@@ -165,7 +165,7 @@ class RouteStick(BaseEnv):
|
|
| 165 |
pose = sapien_utils.look_at(
|
| 166 |
eye=camera_eye, target=camera_target
|
| 167 |
)
|
| 168 |
-
return [CameraConfig("base_camera", pose,
|
| 169 |
|
| 170 |
@property
|
| 171 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 165 |
pose = sapien_utils.look_at(
|
| 166 |
eye=camera_eye, target=camera_target
|
| 167 |
)
|
| 168 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 169 |
|
| 170 |
@property
|
| 171 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/StopCube.py
CHANGED
|
@@ -124,7 +124,7 @@ class StopCube(BaseEnv):
|
|
| 124 |
pose = sapien_utils.look_at(
|
| 125 |
eye=camera_eye, target=camera_target
|
| 126 |
)
|
| 127 |
-
return [CameraConfig("base_camera", pose,
|
| 128 |
|
| 129 |
@property
|
| 130 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 124 |
pose = sapien_utils.look_at(
|
| 125 |
eye=camera_eye, target=camera_target
|
| 126 |
)
|
| 127 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 128 |
|
| 129 |
@property
|
| 130 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/SwingXtimes.py
CHANGED
|
@@ -155,7 +155,7 @@ class SwingXtimes(BaseEnv):
|
|
| 155 |
pose = sapien_utils.look_at(
|
| 156 |
eye=camera_eye, target=camera_target
|
| 157 |
)
|
| 158 |
-
return [CameraConfig("base_camera", pose,
|
| 159 |
|
| 160 |
@property
|
| 161 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 155 |
pose = sapien_utils.look_at(
|
| 156 |
eye=camera_eye, target=camera_target
|
| 157 |
)
|
| 158 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 159 |
|
| 160 |
@property
|
| 161 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/VideoPlaceButton.py
CHANGED
|
@@ -162,7 +162,7 @@ class VideoPlaceButton(BaseEnv):
|
|
| 162 |
pose = sapien_utils.look_at(
|
| 163 |
eye=camera_eye, target=camera_target
|
| 164 |
)
|
| 165 |
-
return [CameraConfig("base_camera", pose,
|
| 166 |
|
| 167 |
@property
|
| 168 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 162 |
pose = sapien_utils.look_at(
|
| 163 |
eye=camera_eye, target=camera_target
|
| 164 |
)
|
| 165 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 166 |
|
| 167 |
@property
|
| 168 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/VideoPlaceOrder.py
CHANGED
|
@@ -160,7 +160,7 @@ class VideoPlaceOrder(BaseEnv):
|
|
| 160 |
pose = sapien_utils.look_at(
|
| 161 |
eye=camera_eye, target=camera_target
|
| 162 |
)
|
| 163 |
-
return [CameraConfig("base_camera", pose,
|
| 164 |
|
| 165 |
@property
|
| 166 |
def _default_human_render_camera_configs(self):
|
|
@@ -599,4 +599,3 @@ class VideoPlaceOrder(BaseEnv):
|
|
| 599 |
)
|
| 600 |
obs, reward, terminated, truncated, info = super().step(action)
|
| 601 |
return obs, reward, terminated, truncated, info
|
| 602 |
-
|
|
|
|
| 160 |
pose = sapien_utils.look_at(
|
| 161 |
eye=camera_eye, target=camera_target
|
| 162 |
)
|
| 163 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 164 |
|
| 165 |
@property
|
| 166 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 599 |
)
|
| 600 |
obs, reward, terminated, truncated, info = super().step(action)
|
| 601 |
return obs, reward, terminated, truncated, info
|
|
|
src/robomme/robomme_env/VideoRepick.py
CHANGED
|
@@ -160,7 +160,7 @@ class VideoRepick(BaseEnv):
|
|
| 160 |
pose = sapien_utils.look_at(
|
| 161 |
eye=camera_eye, target=camera_target
|
| 162 |
)
|
| 163 |
-
return [CameraConfig("base_camera", pose,
|
| 164 |
|
| 165 |
@property
|
| 166 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 160 |
pose = sapien_utils.look_at(
|
| 161 |
eye=camera_eye, target=camera_target
|
| 162 |
)
|
| 163 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 164 |
|
| 165 |
@property
|
| 166 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/VideoUnmask.py
CHANGED
|
@@ -145,7 +145,7 @@ class VideoUnmask(BaseEnv):
|
|
| 145 |
pose = sapien_utils.look_at(
|
| 146 |
eye=camera_eye, target=camera_target
|
| 147 |
)
|
| 148 |
-
return [CameraConfig("base_camera", pose,
|
| 149 |
|
| 150 |
@property
|
| 151 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 145 |
pose = sapien_utils.look_at(
|
| 146 |
eye=camera_eye, target=camera_target
|
| 147 |
)
|
| 148 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 149 |
|
| 150 |
@property
|
| 151 |
def _default_human_render_camera_configs(self):
|
src/robomme/robomme_env/VideoUnmaskSwap.py
CHANGED
|
@@ -161,7 +161,7 @@ class VideoUnmaskSwap(BaseEnv):
|
|
| 161 |
pose = sapien_utils.look_at(
|
| 162 |
eye=camera_eye, target=camera_target
|
| 163 |
)
|
| 164 |
-
return [CameraConfig("base_camera", pose,
|
| 165 |
|
| 166 |
@property
|
| 167 |
def _default_human_render_camera_configs(self):
|
|
|
|
| 161 |
pose = sapien_utils.look_at(
|
| 162 |
eye=camera_eye, target=camera_target
|
| 163 |
)
|
| 164 |
+
return [CameraConfig("base_camera", pose, 256, 256, np.pi / 2, 0.01, 100)]
|
| 165 |
|
| 166 |
@property
|
| 167 |
def _default_human_render_camera_configs(self):
|
tests/dataset/test_obs_config.py
CHANGED
|
@@ -70,6 +70,8 @@ INFO_ALWAYS_FIELDS = [
|
|
| 70 |
"task_goal",
|
| 71 |
]
|
| 72 |
|
|
|
|
|
|
|
| 73 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 74 |
# Helpers
|
| 75 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
@@ -137,6 +139,26 @@ def _check_optional_absent(obs, info, tag):
|
|
| 137 |
assert field not in info, f"[{tag}] optional info field '{field}' should be absent but is present"
|
| 138 |
|
| 139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 141 |
# Test cases
|
| 142 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
@@ -154,6 +176,7 @@ def test_all_included(video_unmaskswap_train_ep0_dataset):
|
|
| 154 |
obs, info = env.reset()
|
| 155 |
_check_always_present(obs, info, "reset/all-included")
|
| 156 |
_check_optional_present(obs, info, "reset/all-included")
|
|
|
|
| 157 |
print(" RESET: all optional fields present β")
|
| 158 |
|
| 159 |
action = resolver.get_step("joint_angle", 0)
|
|
@@ -161,6 +184,7 @@ def test_all_included(video_unmaskswap_train_ep0_dataset):
|
|
| 161 |
obs, reward, terminated, truncated, info = env.step(action)
|
| 162 |
_check_always_present(obs, info, "step/all-included")
|
| 163 |
_check_optional_present(obs, info, "step/all-included")
|
|
|
|
| 164 |
print(" STEP: all optional fields present β")
|
| 165 |
|
| 166 |
# Spot-check dtypes of optional fields from last obs/info
|
|
@@ -231,6 +255,7 @@ def test_all_excluded(video_unmaskswap_train_ep0_dataset):
|
|
| 231 |
obs, info = env.reset()
|
| 232 |
_check_always_present(obs, info, "reset/all-excluded")
|
| 233 |
_check_optional_absent(obs, info, "reset/all-excluded")
|
|
|
|
| 234 |
print(" RESET: all optional fields absent, always-present fields ok β")
|
| 235 |
|
| 236 |
action = resolver.get_step("joint_angle", 0)
|
|
@@ -238,6 +263,7 @@ def test_all_excluded(video_unmaskswap_train_ep0_dataset):
|
|
| 238 |
obs, reward, terminated, truncated, info = env.step(action)
|
| 239 |
_check_always_present(obs, info, "step/all-excluded")
|
| 240 |
_check_optional_absent(obs, info, "step/all-excluded")
|
|
|
|
| 241 |
print(" STEP: all optional fields absent, always-present fields ok β")
|
| 242 |
finally:
|
| 243 |
env.close()
|
|
@@ -265,6 +291,7 @@ def test_selective_front_depth_only(video_unmaskswap_train_ep0_dataset):
|
|
| 265 |
try:
|
| 266 |
obs, info = env.reset()
|
| 267 |
_check_always_present(obs, info, "reset/selective")
|
|
|
|
| 268 |
# front_depth should be present
|
| 269 |
assert "front_depth_list" in obs, "front_depth_list should be present"
|
| 270 |
item = obs["front_depth_list"][-1]
|
|
@@ -282,6 +309,7 @@ def test_selective_front_depth_only(video_unmaskswap_train_ep0_dataset):
|
|
| 282 |
if action is not None:
|
| 283 |
obs, reward, terminated, truncated, info = env.step(action)
|
| 284 |
_check_always_present(obs, info, "step/selective")
|
|
|
|
| 285 |
assert "front_depth_list" in obs, "front_depth_list should be present in step"
|
| 286 |
for field in ["maniskill_obs", "wrist_depth_list", "front_camera_extrinsic_list", "wrist_camera_extrinsic_list"]:
|
| 287 |
assert field not in obs, f"obs['{field}'] should be absent in step"
|
|
@@ -311,6 +339,7 @@ def test_always_present_unaffected():
|
|
| 311 |
try:
|
| 312 |
obs, info = env.reset()
|
| 313 |
_check_always_present(obs, info, f"reset/{flag_desc}")
|
|
|
|
| 314 |
print(f" RESET [{flag_desc}]: always-present fields ok β")
|
| 315 |
finally:
|
| 316 |
env.close()
|
|
|
|
| 70 |
"task_goal",
|
| 71 |
]
|
| 72 |
|
| 73 |
+
EXPECTED_FRONT_CAMERA_HW = (256, 256)
|
| 74 |
+
|
| 75 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 76 |
# Helpers
|
| 77 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 139 |
assert field not in info, f"[{tag}] optional info field '{field}' should be absent but is present"
|
| 140 |
|
| 141 |
|
| 142 |
+
def _check_front_camera_shapes(obs, tag):
|
| 143 |
+
"""Assert wrapped front camera outputs stay at the env-configured base resolution."""
|
| 144 |
+
front_rgb = obs["front_rgb_list"][-1]
|
| 145 |
+
assert isinstance(front_rgb, np.ndarray), (
|
| 146 |
+
f"[{tag}] front_rgb_list item should be ndarray, got {type(front_rgb)}"
|
| 147 |
+
)
|
| 148 |
+
assert front_rgb.shape[:2] == EXPECTED_FRONT_CAMERA_HW, (
|
| 149 |
+
f"[{tag}] front_rgb_list shape={front_rgb.shape[:2]}, expected {EXPECTED_FRONT_CAMERA_HW}"
|
| 150 |
+
)
|
| 151 |
+
|
| 152 |
+
if "front_depth_list" in obs:
|
| 153 |
+
front_depth = obs["front_depth_list"][-1]
|
| 154 |
+
assert isinstance(front_depth, np.ndarray), (
|
| 155 |
+
f"[{tag}] front_depth_list item should be ndarray, got {type(front_depth)}"
|
| 156 |
+
)
|
| 157 |
+
assert front_depth.shape[:2] == EXPECTED_FRONT_CAMERA_HW, (
|
| 158 |
+
f"[{tag}] front_depth_list shape={front_depth.shape[:2]}, expected {EXPECTED_FRONT_CAMERA_HW}"
|
| 159 |
+
)
|
| 160 |
+
|
| 161 |
+
|
| 162 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 163 |
# Test cases
|
| 164 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 176 |
obs, info = env.reset()
|
| 177 |
_check_always_present(obs, info, "reset/all-included")
|
| 178 |
_check_optional_present(obs, info, "reset/all-included")
|
| 179 |
+
_check_front_camera_shapes(obs, "reset/all-included")
|
| 180 |
print(" RESET: all optional fields present β")
|
| 181 |
|
| 182 |
action = resolver.get_step("joint_angle", 0)
|
|
|
|
| 184 |
obs, reward, terminated, truncated, info = env.step(action)
|
| 185 |
_check_always_present(obs, info, "step/all-included")
|
| 186 |
_check_optional_present(obs, info, "step/all-included")
|
| 187 |
+
_check_front_camera_shapes(obs, "step/all-included")
|
| 188 |
print(" STEP: all optional fields present β")
|
| 189 |
|
| 190 |
# Spot-check dtypes of optional fields from last obs/info
|
|
|
|
| 255 |
obs, info = env.reset()
|
| 256 |
_check_always_present(obs, info, "reset/all-excluded")
|
| 257 |
_check_optional_absent(obs, info, "reset/all-excluded")
|
| 258 |
+
_check_front_camera_shapes(obs, "reset/all-excluded")
|
| 259 |
print(" RESET: all optional fields absent, always-present fields ok β")
|
| 260 |
|
| 261 |
action = resolver.get_step("joint_angle", 0)
|
|
|
|
| 263 |
obs, reward, terminated, truncated, info = env.step(action)
|
| 264 |
_check_always_present(obs, info, "step/all-excluded")
|
| 265 |
_check_optional_absent(obs, info, "step/all-excluded")
|
| 266 |
+
_check_front_camera_shapes(obs, "step/all-excluded")
|
| 267 |
print(" STEP: all optional fields absent, always-present fields ok β")
|
| 268 |
finally:
|
| 269 |
env.close()
|
|
|
|
| 291 |
try:
|
| 292 |
obs, info = env.reset()
|
| 293 |
_check_always_present(obs, info, "reset/selective")
|
| 294 |
+
_check_front_camera_shapes(obs, "reset/selective")
|
| 295 |
# front_depth should be present
|
| 296 |
assert "front_depth_list" in obs, "front_depth_list should be present"
|
| 297 |
item = obs["front_depth_list"][-1]
|
|
|
|
| 309 |
if action is not None:
|
| 310 |
obs, reward, terminated, truncated, info = env.step(action)
|
| 311 |
_check_always_present(obs, info, "step/selective")
|
| 312 |
+
_check_front_camera_shapes(obs, "step/selective")
|
| 313 |
assert "front_depth_list" in obs, "front_depth_list should be present in step"
|
| 314 |
for field in ["maniskill_obs", "wrist_depth_list", "front_camera_extrinsic_list", "wrist_camera_extrinsic_list"]:
|
| 315 |
assert field not in obs, f"obs['{field}'] should be absent in step"
|
|
|
|
| 339 |
try:
|
| 340 |
obs, info = env.reset()
|
| 341 |
_check_always_present(obs, info, f"reset/{flag_desc}")
|
| 342 |
+
_check_front_camera_shapes(obs, f"reset/{flag_desc}")
|
| 343 |
print(f" RESET [{flag_desc}]: always-present fields ok β")
|
| 344 |
finally:
|
| 345 |
env.close()
|