2024-02-26 01:42:47 +08:00
|
|
|
import pytest
|
Add Aloha env and ACT policy
WIP Aloha env tests pass
Rendering works (fps look fast tho? TODO action bounding is too wide [-1,1])
Update README
Copy past from act repo
Remove download.py add a WIP for Simxarm
Remove download.py add a WIP for Simxarm
Add act yaml (TODO: try train.py)
Training can runs (TODO: eval)
Add tasks without end_effector that are compatible with dataset, Eval can run (TODO: training and pretrained model)
Add AbstractEnv, Refactor AlohaEnv, Add rendering_hook in env, Minor modifications, (TODO: Refactor Pusht and Simxarm)
poetry lock
fix bug in compute_stats for action normalization
fix more bugs in normalization
fix training
fix import
PushtEnv inheriates AbstractEnv, Improve factory Normalization
Add _make_env to EnvAbstract
Add call_rendering_hooks to pusht env
SimxarmEnv inherites from AbstractEnv (NOT TESTED)
Add aloha tests artifacts + update pusht stats
fix image normalization: before env was in [0,1] but dataset in [0,255], and now both in [0,255]
Small fix on simxarm
Add next to obs
Add top camera to Aloha env (TODO: make it compatible with set of cameras)
Add top camera to Aloha env (TODO: make it compatible with set of cameras)
2024-03-08 17:47:39 +08:00
|
|
|
import torch
|
2024-02-26 01:42:47 +08:00
|
|
|
|
|
|
|
from lerobot.common.datasets.factory import make_offline_buffer
|
|
|
|
|
2024-03-12 22:14:39 +08:00
|
|
|
from .utils import DEVICE, init_config
|
2024-02-26 01:42:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.parametrize(
|
2024-03-06 21:55:12 +08:00
|
|
|
"env_name,dataset_id",
|
2024-02-26 01:42:47 +08:00
|
|
|
[
|
2024-03-06 21:55:12 +08:00
|
|
|
# TODO(rcadene): simxarm is depreciated for now
|
|
|
|
# ("simxarm", "lift"),
|
|
|
|
("pusht", "pusht"),
|
2024-03-07 22:57:38 +08:00
|
|
|
# TODO(aliberts): add aloha when dataset is available on hub
|
Add Aloha env and ACT policy
WIP Aloha env tests pass
Rendering works (fps look fast tho? TODO action bounding is too wide [-1,1])
Update README
Copy past from act repo
Remove download.py add a WIP for Simxarm
Remove download.py add a WIP for Simxarm
Add act yaml (TODO: try train.py)
Training can runs (TODO: eval)
Add tasks without end_effector that are compatible with dataset, Eval can run (TODO: training and pretrained model)
Add AbstractEnv, Refactor AlohaEnv, Add rendering_hook in env, Minor modifications, (TODO: Refactor Pusht and Simxarm)
poetry lock
fix bug in compute_stats for action normalization
fix more bugs in normalization
fix training
fix import
PushtEnv inheriates AbstractEnv, Improve factory Normalization
Add _make_env to EnvAbstract
Add call_rendering_hooks to pusht env
SimxarmEnv inherites from AbstractEnv (NOT TESTED)
Add aloha tests artifacts + update pusht stats
fix image normalization: before env was in [0,1] but dataset in [0,255], and now both in [0,255]
Small fix on simxarm
Add next to obs
Add top camera to Aloha env (TODO: make it compatible with set of cameras)
Add top camera to Aloha env (TODO: make it compatible with set of cameras)
2024-03-08 17:47:39 +08:00
|
|
|
("aloha", "sim_insertion_human"),
|
|
|
|
("aloha", "sim_insertion_scripted"),
|
|
|
|
("aloha", "sim_transfer_cube_human"),
|
|
|
|
("aloha", "sim_transfer_cube_scripted"),
|
2024-02-26 01:42:47 +08:00
|
|
|
],
|
|
|
|
)
|
2024-03-06 21:55:12 +08:00
|
|
|
def test_factory(env_name, dataset_id):
|
2024-03-12 22:14:39 +08:00
|
|
|
cfg = init_config(overrides=[f"env={env_name}", f"env.task={dataset_id}", f"device={DEVICE}"])
|
2024-02-26 01:42:47 +08:00
|
|
|
offline_buffer = make_offline_buffer(cfg)
|
Add Aloha env and ACT policy
WIP Aloha env tests pass
Rendering works (fps look fast tho? TODO action bounding is too wide [-1,1])
Update README
Copy past from act repo
Remove download.py add a WIP for Simxarm
Remove download.py add a WIP for Simxarm
Add act yaml (TODO: try train.py)
Training can runs (TODO: eval)
Add tasks without end_effector that are compatible with dataset, Eval can run (TODO: training and pretrained model)
Add AbstractEnv, Refactor AlohaEnv, Add rendering_hook in env, Minor modifications, (TODO: Refactor Pusht and Simxarm)
poetry lock
fix bug in compute_stats for action normalization
fix more bugs in normalization
fix training
fix import
PushtEnv inheriates AbstractEnv, Improve factory Normalization
Add _make_env to EnvAbstract
Add call_rendering_hooks to pusht env
SimxarmEnv inherites from AbstractEnv (NOT TESTED)
Add aloha tests artifacts + update pusht stats
fix image normalization: before env was in [0,1] but dataset in [0,255], and now both in [0,255]
Small fix on simxarm
Add next to obs
Add top camera to Aloha env (TODO: make it compatible with set of cameras)
Add top camera to Aloha env (TODO: make it compatible with set of cameras)
2024-03-08 17:47:39 +08:00
|
|
|
for key in offline_buffer.image_keys:
|
|
|
|
img = offline_buffer[0].get(key)
|
|
|
|
assert img.dtype == torch.float32
|
|
|
|
# TODO(rcadene): we assume for now that image normalization takes place in the model
|
|
|
|
assert img.max() <= 1.0
|
|
|
|
assert img.min() >= 0.0
|