Is it possible to record videos of the simulation without opening the rendering screen. I was trying to use the gym monitor wrapper but was not able to get it working due to incompatibility between the render() method in gym and robosuite.
env = GymWrapper(
suite.make(
"PickPlaceMilk", # pickPLaceMilk task
robots="IIWA", # use IIWA robot
use_camera_obs=True, # do not use pixel observations
has_offscreen_renderer=True, # not needed since not using pixel obs
has_renderer=False, # make sure we can render to the screen
)
)
env.metadata = {'render.modes': ['human', 'rgb_array'], 'video.frames_per_second': 25}
env = gym.wrappers.Monitor(env, 'video/MilkPickPlace', force=True) # save video
The error
Traceback (most recent call last):
File "controllers/robosuitePickAndPlace.py", line 60, in <module>
observation = env.reset()
File "/Users/opt/miniconda3/envs/py36/lib/python3.6/site-packages/gym/wrappers/monitor.py", line 39, in reset
self._after_reset(observation)
File "/Users/opt/miniconda3/envs/py36/lib/python3.6/site-packages/gym/wrappers/monitor.py", line 185, in _after_reset
self.reset_video_recorder()
File "/Users/opt/miniconda3/envs/py36/lib/python3.6/site-packages/gym/wrappers/monitor.py", line 206, in reset_video_recorder
self.video_recorder.capture_frame()
File "/Users/opt/miniconda3/envs/py36/lib/python3.6/site-packages/gym/wrappers/monitoring/video_recorder.py", line 101, in capture_frame
frame = self.env.render(mode=render_mode)
File "/Users/opt/miniconda3/envs/py36/lib/python3.6/site-packages/robosuite/wrappers/wrapper.py", line 74, in render
return self.env.render(**kwargs)
TypeError: render() got an unexpected keyword argument 'mode'
Is it possible to record videos of the simulation without opening the rendering screen. I was trying to use the gym monitor wrapper but was not able to get it working due to incompatibility between the
render()
method in gym and robosuite.The error
Robosuite version: 1.0.1 gym version: 0.17.3 python version: 3.6.10