diff --git a/rlbench/gym/rlbench_env.py b/rlbench/gym/rlbench_env.py index 050537064..165453e8a 100644 --- a/rlbench/gym/rlbench_env.py +++ b/rlbench/gym/rlbench_env.py @@ -94,7 +94,9 @@ def render(self, mode='human') -> Union[None, np.ndarray]: 'You passed in mode %s, but expected %s.' % ( mode, self._render_mode)) if mode == 'rgb_array': - return self._gym_cam.capture_rgb() + frame = self._gym_cam.capture_rgb() + frame = np.clip((frame * 255.).astype(np.uint8), 0, 255) + return frame def reset(self) -> Dict[str, np.ndarray]: descriptions, obs = self.task.reset()