MCPcopy Create free account
hub / github.com/RoboVerseOrg/RoboVerse / hooked

Function hooked

tools/robotwin_integration/native_render.py:205–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203 orig_get_obs = env.get_obs
204
205 def hooked():
206 d = orig_get_obs()
207 try:
208 env.scene.update_render()
209 cam.take_picture()
210 rgb = cam.get_picture("Color") # HxWx4 float [0,1]
211 frames.append((np.clip(np.asarray(rgb)[..., :3], 0, 1) * 255).astype(np.uint8))
212 except Exception as e:
213 print(f"camera grab failed: {type(e).__name__}: {e}")
214 return d
215
216 def render_frame():
217 env.scene.update_render()

Callers

nothing calls this directly

Calls 1

printFunction · 0.85

Tested by

no test coverage detected