Revert "Bugfix for camera_adjust and move_and_look_at"

... To do a sanity check that my changes are what's causing the travis build to fail.

This reverts commit e5d1cb768c.
This commit is contained in:
sgillen 2020-04-24 19:50:23 -07:00
parent e5d1cb768c
commit a6e0f752b9
2 changed files with 4 additions and 5 deletions

View File

@ -26,7 +26,7 @@ class MJCFBaseBulletEnv(gym.Env):
self.scene = None
self.physicsClientId = -1
self.ownsPhysicsClient = 0
self.camera = Camera(self)
self.camera = Camera()
self.isRender = render
self.robot = robot
self.seed()
@ -160,12 +160,11 @@ class MJCFBaseBulletEnv(gym.Env):
class Camera:
def __init__(self, env):
self.env = env
def __init__(self):
pass
def move_and_look_at(self, i, j, k, x, y, z):
lookat = [x, y, z]
distance = 10
yaw = 10
self.env._p.resetDebugVisualizerCamera(distance, yaw, -20, lookat)
self._p.resetDebugVisualizerCamera(distance, yaw, -20, lookat)

View File

@ -125,7 +125,7 @@ class WalkerBaseBulletEnv(MJCFBaseBulletEnv):
return state, sum(self.rewards), bool(done), {}
def camera_adjust(self):
x, y, z = self.robot.body_xyz
x, y, z = self.body_xyz
self.camera_x = 0.98 * self.camera_x + (1 - 0.98) * x
self.camera.move_and_look_at(self.camera_x, y - 2.0, 1.4, x, y, 1.0)