Add test_aloha env test

这个提交包含在:
Simon Alibert
2024-03-26 16:23:34 +01:00
父节点 58df2066a9
当前提交 6bddcb647e
共有 2 个文件被更改,包括 23 次插入 和 1 次删除

查看文件

@ -7,6 +7,7 @@ from lerobot.common.datasets.factory import make_offline_buffer
from lerobot.common.envs.factory import make_env
from lerobot.common.envs.pusht.env import PushtEnv
from lerobot.common.envs.simxarm.env import SimxarmEnv
from lerobot.common.envs.aloha.env import AlohaEnv
from .utils import DEVICE, init_config
@ -38,6 +39,27 @@ def print_spec_rollout(env):
print("data from rollout:", simple_rollout(100))
@pytest.mark.parametrize(
"task,from_pixels,pixels_only",
[
("sim_insertion", True, False),
("sim_insertion", True, True),
("sim_transfer_cube", True, False),
("sim_transfer_cube", True, True),
# TODO(aliberts): Add aloha other tasks
],
)
def test_aloha(task, from_pixels, pixels_only):
env = AlohaEnv(
task,
from_pixels=from_pixels,
pixels_only=pixels_only,
image_size=[3, 480, 640] if from_pixels else None,
)
# print_spec_rollout(env)
check_env_specs(env)
@pytest.mark.parametrize(
"task,from_pixels,pixels_only",
[