From 9f20e405413bd54ed5eac217285386c88e4fbaa2 Mon Sep 17 00:00:00 2001 From: Benelot Date: Thu, 17 Aug 2017 00:06:01 +0200 Subject: [PATCH] Rename old humanoid gym to simple humanoid gym. --- examples/pybullet/gym/envs/__init__.py | 12 ++++++------ examples/pybullet/gym/envs/bullet/__init__.py | 2 +- .../envs/bullet/{humanoid.py => simpleHumanoid.py} | 2 +- .../{humanoidGymEnv.py => simpleHumanoidGymEnv.py} | 6 +++--- ...noidGymEnvTest.py => simpleHumanoidGymEnvTest.py} | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) rename examples/pybullet/gym/envs/bullet/{humanoid.py => simpleHumanoid.py} (99%) rename examples/pybullet/gym/envs/bullet/{humanoidGymEnv.py => simpleHumanoidGymEnv.py} (93%) rename examples/pybullet/gym/{humanoidGymEnvTest.py => simpleHumanoidGymEnvTest.py} (79%) diff --git a/examples/pybullet/gym/envs/__init__.py b/examples/pybullet/gym/envs/__init__.py index 29e0efed0..c328958d3 100644 --- a/examples/pybullet/gym/envs/__init__.py +++ b/examples/pybullet/gym/envs/__init__.py @@ -30,12 +30,12 @@ register( reward_threshold=5.0, ) -# register( -# id='HumanoidBulletEnv-v0', -# entry_point='envs.bullet:HumanoidGymEnv', -# timestep_limit=1000, -# reward_threshold=5.0, -# ) +register( + id='SimpleHumanoidBulletEnv-v0', + entry_point='envs.bullet:SimpleHumanoidGymEnv', + timestep_limit=1000, + reward_threshold=5.0, +) register( id='KukaBulletEnv-v0', diff --git a/examples/pybullet/gym/envs/bullet/__init__.py b/examples/pybullet/gym/envs/bullet/__init__.py index f86a691b1..394788f73 100644 --- a/examples/pybullet/gym/envs/bullet/__init__.py +++ b/examples/pybullet/gym/envs/bullet/__init__.py @@ -2,6 +2,6 @@ from envs.bullet.cartpole_bullet import CartPoleBulletEnv from envs.bullet.minitaur_bullet import MinitaurBulletEnv from envs.bullet.racecarGymEnv import RacecarGymEnv from envs.bullet.racecarZEDGymEnv import RacecarZEDGymEnv -from envs.bullet.humanoidGymEnv import HumanoidGymEnv +from envs.bullet.simpleHumanoidGymEnv import SimpleHumanoidGymEnv from envs.bullet.kukaGymEnv import KukaGymEnv from envs.bullet.kukaCamGymEnv import KukaCamGymEnv \ No newline at end of file diff --git a/examples/pybullet/gym/envs/bullet/humanoid.py b/examples/pybullet/gym/envs/bullet/simpleHumanoid.py similarity index 99% rename from examples/pybullet/gym/envs/bullet/humanoid.py rename to examples/pybullet/gym/envs/bullet/simpleHumanoid.py index a883139b1..5cb69fd13 100644 --- a/examples/pybullet/gym/envs/bullet/humanoid.py +++ b/examples/pybullet/gym/envs/bullet/simpleHumanoid.py @@ -6,7 +6,7 @@ import time -class Humanoid: +class SimpleHumanoid: def __init__(self, urdfRootPath='', timeStep=0.01): self.urdfRootPath = urdfRootPath diff --git a/examples/pybullet/gym/envs/bullet/humanoidGymEnv.py b/examples/pybullet/gym/envs/bullet/simpleHumanoidGymEnv.py similarity index 93% rename from examples/pybullet/gym/envs/bullet/humanoidGymEnv.py rename to examples/pybullet/gym/envs/bullet/simpleHumanoidGymEnv.py index f46a05ce0..7c9743124 100644 --- a/examples/pybullet/gym/envs/bullet/humanoidGymEnv.py +++ b/examples/pybullet/gym/envs/bullet/simpleHumanoidGymEnv.py @@ -5,10 +5,10 @@ from gym.utils import seeding import numpy as np import time import pybullet as p -from . import humanoid +from . import simpleHumanoid import random -class HumanoidGymEnv(gym.Env): +class SimpleHumanoidGymEnv(gym.Env): metadata = { 'render.modes': ['human', 'rgb_array'], 'video.frames_per_second' : 50 @@ -57,7 +57,7 @@ class HumanoidGymEnv(gym.Env): ballz = 1 p.setGravity(0,0,-10) - self._humanoid = humanoid.Humanoid(urdfRootPath=self._urdfRoot, timeStep=self._timeStep) + self._humanoid = simpleHumanoid.SimpleHumanoid(urdfRootPath=self._urdfRoot, timeStep=self._timeStep) self._envStepCounter = 0 p.stepSimulation() self._observation = self.getExtendedObservation() diff --git a/examples/pybullet/gym/humanoidGymEnvTest.py b/examples/pybullet/gym/simpleHumanoidGymEnvTest.py similarity index 79% rename from examples/pybullet/gym/humanoidGymEnvTest.py rename to examples/pybullet/gym/simpleHumanoidGymEnvTest.py index 72004b7b9..b86b65081 100644 --- a/examples/pybullet/gym/humanoidGymEnvTest.py +++ b/examples/pybullet/gym/simpleHumanoidGymEnvTest.py @@ -1,7 +1,7 @@ -from envs.bullet.humanoidGymEnv import HumanoidGymEnv +from envs.bullet.simpleHumanoidGymEnv import SimpleHumanoidGymEnv print ("hello") -environment = HumanoidGymEnv(renders=True) +environment = SimpleHumanoidGymEnv(renders=True) environment._p.setGravity(0,0,0)