Update env.py
Browse files
env.py
CHANGED
|
@@ -121,6 +121,7 @@ class RoboCasaEnv(RoboCasaGymEnv):
|
|
| 121 |
self.unwrapped.sim._render_context_offscreen.gl_ctx.free()
|
| 122 |
observation, info = super().reset(seed, **kwargs)
|
| 123 |
self._task_description = self.env.get_ep_meta().get("lang", self.task)
|
|
|
|
| 124 |
return self._format_raw_obs(observation), info
|
| 125 |
|
| 126 |
def _format_raw_obs(self, raw_obs: dict):
|
|
@@ -155,7 +156,7 @@ class RoboCasaEnv(RoboCasaGymEnv):
|
|
| 155 |
return frame
|
| 156 |
import cv2
|
| 157 |
frame = frame.copy()
|
| 158 |
-
cv2.putText(frame, self.task, (10, 30), cv2.FONT_HERSHEY_SIMPLEX,
|
| 159 |
0.8, (255, 255, 255), 2, cv2.LINE_AA)
|
| 160 |
return frame
|
| 161 |
|
|
|
|
| 121 |
self.unwrapped.sim._render_context_offscreen.gl_ctx.free()
|
| 122 |
observation, info = super().reset(seed, **kwargs)
|
| 123 |
self._task_description = self.env.get_ep_meta().get("lang", self.task)
|
| 124 |
+
print(f"[RoboCasaEnv] task_description: {self._task_description!r}")
|
| 125 |
return self._format_raw_obs(observation), info
|
| 126 |
|
| 127 |
def _format_raw_obs(self, raw_obs: dict):
|
|
|
|
| 156 |
return frame
|
| 157 |
import cv2
|
| 158 |
frame = frame.copy()
|
| 159 |
+
cv2.putText(frame, self._task_description or self.task, (10, 30), cv2.FONT_HERSHEY_SIMPLEX,
|
| 160 |
0.8, (255, 255, 255), 2, cv2.LINE_AA)
|
| 161 |
return frame
|
| 162 |
|