调用env.render()总是在整个屏幕上渲染一个窗口。
env = gym.make('FetchPickAndPlace-v1')
env.reset()
for i in range(1000):
env.render()
答案 0 :(得分:0)
您可以尝试一下:
import matplotlib
is_ipython = 'inline' in matplotlib.get_backend()
if is_ipython: from IPython import display
env = gym.make('FetchPickAndPlace-v1')
a = env.render(mode='rgb_array')
plt.figure()
plt.imshow(a)
plt.show()
if is_ipython: display.clear_output(wait=True)