Skip to content

Commit 68ac962

Browse files
committed
changed array types
1 parent 19c9592 commit 68ac962

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mujoco_viewer/mujoco_viewer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ def read_pixels(self, camid=None,depth=False):
297297

298298

299299
if depth:
300-
img = np.zeros((shape[1], shape[0], 3), dtype=np.float64)
301-
depth_img = np.zeros((shape[1], shape[0], 1), dtype=np.float64)
300+
img = np.zeros((shape[1], shape[0], 3), dtype=np.uint8)
301+
depth_img = np.zeros((shape[1], shape[0], 1), dtype=np.float32)
302302
mujoco.mjr_readPixels(img, None, self.viewport, self.ctx)
303303
mujoco.mjr_readPixels(None, depth_img, self.viewport, self.ctx)
304304
return np.dstack((np.flipud(img),np.flipud(depth_img)))

src/mujoco-python-viewer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 799a47a35ce38b1e9043f15e5b1441a149d1ad67
1+
Subproject commit 19c95924c3f36bfcc6a8977dcf3649281d321984

0 commit comments

Comments
 (0)