From 92e6a84d0333232cbeae0474c52bd6dcda1c37ab Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 5 Jul 2021 09:52:41 +0200 Subject: [PATCH] Adopt new interface structure --- README.md | 3 ++- alr_envs/open_ai/continuous_mountain_car/mp_wrapper.py | 2 +- alr_envs/open_ai/fetch/mp_wrapper.py | 2 +- alr_envs/open_ai/reacher_v2/mp_wrapper.py | 6 +----- reacher.egg-info/PKG-INFO | 10 ---------- reacher.egg-info/SOURCES.txt | 7 ------- reacher.egg-info/dependency_links.txt | 1 - reacher.egg-info/requires.txt | 1 - reacher.egg-info/top_level.txt | 1 - setup.py | 4 ++-- 10 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 reacher.egg-info/PKG-INFO delete mode 100644 reacher.egg-info/SOURCES.txt delete mode 100644 reacher.egg-info/dependency_links.txt delete mode 100644 reacher.egg-info/requires.txt delete mode 100644 reacher.egg-info/top_level.txt diff --git a/README.md b/README.md index 2ab4143..56ec0bf 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ This repository collects custom Robotics environments not included in benchmark suites like OpenAI gym, rllab, etc. Creating a custom (Mujoco) gym environment can be done according to [this guide](https://github.com/openai/gym/blob/master/docs/creating-environments.md). For stochastic search problems with gym interface use the `Rosenbrock-v0` reference implementation. -We also support to solve environments with DMPs. When adding new DMP tasks check the `ViaPointReacherDMP-v0` reference implementation. +We also support to solve environments with Dynamic Movement Primitives (DMPs) and Probabilistic Movement Primitives (DetPMP, we only consider the mean usually). +When adding new DMP tasks check the `ViaPointReacherDMP-v0` reference implementation. When simply using the tasks, you can also leverage the wrapper class `DmpWrapper` to turn normal gym environments in to DMP tasks. ## Environments diff --git a/alr_envs/open_ai/continuous_mountain_car/mp_wrapper.py b/alr_envs/open_ai/continuous_mountain_car/mp_wrapper.py index f0bccab..29378ed 100644 --- a/alr_envs/open_ai/continuous_mountain_car/mp_wrapper.py +++ b/alr_envs/open_ai/continuous_mountain_car/mp_wrapper.py @@ -1,7 +1,7 @@ from typing import Union import numpy as np -from mp_env_api.env_wrappers.mp_env_wrapper import MPEnvWrapper +from mp_env_api.interface_wrappers.mp_env_wrapper import MPEnvWrapper class MPWrapper(MPEnvWrapper): diff --git a/alr_envs/open_ai/fetch/mp_wrapper.py b/alr_envs/open_ai/fetch/mp_wrapper.py index acb07a3..6602a18 100644 --- a/alr_envs/open_ai/fetch/mp_wrapper.py +++ b/alr_envs/open_ai/fetch/mp_wrapper.py @@ -1,7 +1,7 @@ from typing import Union import numpy as np -from mp_env_api.env_wrappers.mp_env_wrapper import MPEnvWrapper +from mp_env_api.interface_wrappers.mp_env_wrapper import MPEnvWrapper class MPWrapper(MPEnvWrapper): diff --git a/alr_envs/open_ai/reacher_v2/mp_wrapper.py b/alr_envs/open_ai/reacher_v2/mp_wrapper.py index 7636f50..d3181b5 100644 --- a/alr_envs/open_ai/reacher_v2/mp_wrapper.py +++ b/alr_envs/open_ai/reacher_v2/mp_wrapper.py @@ -1,7 +1,7 @@ from typing import Union import numpy as np -from mp_env_api.env_wrappers.mp_env_wrapper import MPEnvWrapper +from mp_env_api.interface_wrappers.mp_env_wrapper import MPEnvWrapper class MPWrapper(MPEnvWrapper): @@ -14,10 +14,6 @@ class MPWrapper(MPEnvWrapper): def current_pos(self) -> Union[float, int, np.ndarray]: return self.sim.data.qpos[:2] - @property - def goal_pos(self): - return self.goal - @property def dt(self) -> Union[float, int]: return self.env.dt \ No newline at end of file diff --git a/reacher.egg-info/PKG-INFO b/reacher.egg-info/PKG-INFO deleted file mode 100644 index 9ea9f7e..0000000 --- a/reacher.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: reacher -Version: 0.0.1 -Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/reacher.egg-info/SOURCES.txt b/reacher.egg-info/SOURCES.txt deleted file mode 100644 index b771181..0000000 --- a/reacher.egg-info/SOURCES.txt +++ /dev/null @@ -1,7 +0,0 @@ -README.md -setup.py -reacher.egg-info/PKG-INFO -reacher.egg-info/SOURCES.txt -reacher.egg-info/dependency_links.txt -reacher.egg-info/requires.txt -reacher.egg-info/top_level.txt \ No newline at end of file diff --git a/reacher.egg-info/dependency_links.txt b/reacher.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/reacher.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/reacher.egg-info/requires.txt b/reacher.egg-info/requires.txt deleted file mode 100644 index 1e6c2dd..0000000 --- a/reacher.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -gym diff --git a/reacher.egg-info/top_level.txt b/reacher.egg-info/top_level.txt deleted file mode 100644 index 8b13789..0000000 --- a/reacher.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/setup.py b/setup.py index cc9445c..703bbee 100644 --- a/setup.py +++ b/setup.py @@ -3,14 +3,14 @@ from setuptools import setup setup( name='alr_envs', version='0.0.1', - packages=['alr_envs', 'alr_envs.classic_control', 'alr_envs.mujoco', 'alr_envs.stochastic_search', + packages=['alr_envs', 'alr_envs.classic_control', 'alr_envs.open_ai', 'alr_envs.mujoco', 'alr_envs.stochastic_search', 'alr_envs.utils'], install_requires=[ 'gym', 'PyQt5', 'matplotlib', 'mp_env_api @ git+ssh://git@github.com/ALRhub/motion_primitive_env_api.git', - 'mujoco_py', + 'mujoco-py<2.1,>=2.0', 'dm_control' ],