mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-27 19:56:09 +00:00
fix(robomme): expose episode language instruction
This commit is contained in:
@@ -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``.
|
||||
|
||||
Reference in New Issue
Block a user