From c1322ad927c52233677b2f68adf7f69168ec850d Mon Sep 17 00:00:00 2001 From: Alexander Soare Date: Wed, 10 Apr 2024 12:17:16 +0100 Subject: [PATCH] Fix cursor position --- gym_pusht/envs/pusht.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gym_pusht/envs/pusht.py b/gym_pusht/envs/pusht.py index 23c1e61..66aa4fe 100644 --- a/gym_pusht/envs/pusht.py +++ b/gym_pusht/envs/pusht.py @@ -289,7 +289,7 @@ def _get_img(self, screen, width, height, render_action=False): render_size = min(width, height) if render_action and self._last_action is not None: action = np.array(self._last_action) - coord = (action / 512 * 96).astype(np.int32) + coord = (action / 512 * [height, width]).astype(np.int32) marker_size = int(8 / 96 * render_size) thickness = int(1 / 96 * render_size) cv2.drawMarker(