Skip to content

Commit e747ae8

Browse files
committed
push
1 parent 952fff7 commit e747ae8

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed
-4 Bytes
Binary file not shown.

envs/simple_biped_env.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def _check_termination(self):
106106
return base_pos[2] < 0.2 or base_pos[2] > 1.5 # fallen
107107

108108
def render(self):
109-
if self.render_mode == "human":
109+
if self.render_mode:
110110
if hasattr(self, 'robot_id'):
111111
base_pos = p.getBasePositionAndOrientation(self.robot_id)[0]
112112
p.resetDebugVisualizerCamera(
@@ -115,6 +115,8 @@ def render(self):
115115
cameraPitch=-30,
116116
cameraTargetPosition=base_pos
117117
)
118+
else:
119+
pass
118120

119121
def close(self):
120122
p.disconnect()

envs/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def train_PPO():
2525

2626
def train_DDPG():
2727
LOG_DIR = "./logs/"
28-
env = gym.make('simpleBiped-v0', render=True)
28+
env = gym.make('simpleBiped-v0', render_mode=True)
2929
model = DDPG("MlpPolicy", env, verbose=1, device="auto", tensorboard_log=LOG_DIR)
3030
model.learn(total_timesteps=10000000)
3131
model.save("../models/humanoid_ddpg")
251 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)