fix(robomme): expose episode language instruction

This commit is contained in:
Pepijn
2026-07-15 19:58:06 +02:00
parent 5c453c3786
commit 4627900be2
2 changed files with 27 additions and 1 deletions
+19 -1
View File
@@ -44,7 +44,10 @@ def _install_robomme_stub():
"joint_state_list": [np.zeros(7, dtype=np.float32)],
"gripper_state_list": [np.zeros(2, dtype=np.float32)],
}
env.reset.return_value = (obs, {"status": "ongoing", "task_goal": "pick the cube"})
env.reset.return_value = (
obs,
{"status": "ongoing", "task_goal": ["pick the cube", "pick the blue cube"]},
)
env.step.return_value = (obs, 0.0, False, False, {"status": "ongoing", "task_goal": ""})
return env
@@ -116,6 +119,21 @@ def test_robomme_features_action_dim_ee_pose():
# ---------------------------------------------------------------------------
def test_reset_exposes_episode_task_description():
"""VLA evaluation receives the episode-specific language instruction."""
_install_robomme_stub()
try:
from lerobot.envs.robomme import RoboMMEGymEnv
env = RoboMMEGymEnv(task="PickXtimes")
env.reset()
assert env.task == "PickXtimes"
assert env.task_description == "pick the cube"
finally:
_uninstall_robomme_stub()
def test_convert_obs_list_format():
"""_convert_obs takes the last element from list-format obs fields and
emits a nested ``pixels`` dict (image, wrist_image) plus ``agent_pos``.