fix rendering ("rgb_array") for pendulums/pendula
This commit is contained in:
1 parent
1881f6679a
commit
f4b28dddce
2 files changed
+6
-2
No files matched your search
@@ -67,7 +67,11 @@ class MJCFBaseBulletEnv(gym.Env):
|
||||
self.isRender = True
|
||||
if mode != "rgb_array":
|
||||
return np.array([])
|
||||
base_pos = self.robot.body_xyz
|
||||
|
||||
base_pos=[0,0,0]
|
||||
if (hasattr(self,'robot')):
|
||||
if (hasattr(self.robot,'body_xyz')):
|
||||
base_pos = self.robot.body_xyz
|
||||
|
||||
view_matrix = p.computeViewMatrixFromYawPitchRoll(
|
||||
cameraTargetPosition=base_pos,
|
||||
|
||||
Reference in new issue
Block a user