diff --git a/examples/pybullet/gym/pybullet_envs/gym_locomotion_envs.py b/examples/pybullet/gym/pybullet_envs/gym_locomotion_envs.py index 68b355a13..93cd8af33 100644 --- a/examples/pybullet/gym/pybullet_envs/gym_locomotion_envs.py +++ b/examples/pybullet/gym/pybullet_envs/gym_locomotion_envs.py @@ -64,7 +64,7 @@ class WalkerBaseBulletEnv(MJCFBaseBulletEnv): state = self.robot.calc_state() # also calculates self.joints_at_limit self._alive = float(self.robot.alive_bonus(state[0]+self.robot.initial_z, self.robot.body_rpy[1])) # state[0] is body height above ground, body_rpy[1] is pitch - done = self._isAlive() + done = self._isDone() if not np.isfinite(state).all(): print("~INF~", state) done = True