Skip to content

Commit 19c9592

Browse files
committed
bug fix
1 parent 6ac404d commit 19c9592

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mujoco_viewer/mujoco_viewer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ def read_pixels(self, camid=None,depth=False):
299299
if depth:
300300
img = np.zeros((shape[1], shape[0], 3), dtype=np.float64)
301301
depth_img = np.zeros((shape[1], shape[0], 1), dtype=np.float64)
302-
mujoco.mjr_readPixels(img, depth_img, self.viewport, self.ctx)
302+
mujoco.mjr_readPixels(img, None, self.viewport, self.ctx)
303+
mujoco.mjr_readPixels(None, depth_img, self.viewport, self.ctx)
303304
return np.dstack((np.flipud(img),np.flipud(depth_img)))
304305
else:
305306
img = np.zeros((shape[1], shape[0], 3), dtype=np.uint8)

0 commit comments

Comments
 (0)