add tests for replanning env & adapt observation space for box pushing & add max_planning_times to replanning tasks
This commit is contained in:
@@ -11,13 +11,13 @@ All_ProDMP_IDS = fancy_gym.ALL_MOVEMENT_PRIMITIVE_ENVIRONMENTS['ProDMP']
|
||||
|
||||
|
||||
|
||||
@pytest.mark.parametrize('env_id', Fancy_ProDMP_IDS)
|
||||
@pytest.mark.parametrize('env_id', All_ProDMP_IDS)
|
||||
def test_replanning_envs(env_id: str):
|
||||
"""Tests that ProDMP environments run without errors using random actions."""
|
||||
run_env(env_id, iterations=4)
|
||||
run_env(env_id)
|
||||
|
||||
# @pytest.mark.parametrize('env_id', All_ProDMP_IDS)
|
||||
# def test_replanning_determinism(env_id: str):
|
||||
# """Tests that ProDMP environments are deterministic."""
|
||||
# run_env_determinism(env_id, 0)
|
||||
@pytest.mark.parametrize('env_id', All_ProDMP_IDS)
|
||||
def test_replanning_determinism(env_id: str):
|
||||
"""Tests that ProDMP environments are deterministic."""
|
||||
run_env_determinism(env_id, 0)
|
||||
|
||||
|
||||
+2
-2
@@ -49,8 +49,8 @@ def run_env(env_id, iterations=None, seed=0, render=False):
|
||||
|
||||
if done:
|
||||
break
|
||||
|
||||
assert done, "Done flag is not True after end of episode."
|
||||
if not hasattr(env, "replanning_schedule"):
|
||||
assert done, "Done flag is not True after end of episode."
|
||||
observations.append(obs)
|
||||
env.close()
|
||||
del env
|
||||
|
||||
Reference in New Issue
Block a user