ARISE-Initiative / robosuite

robosuite: A Modular Simulation Framework and Benchmark for Robot Learning
https://robosuite.ai
Other
1.23k stars 394 forks source link

Renderer not working in tutorial #17

Closed ghost closed 5 years ago

ghost commented 5 years ago

Following the README.md When I run $ python robosuite/demo.py, everything works fine however under the Quick Start section of your README.md when I run:

import numpy as np
import robosuite as suite

# create environment instance
env = suite.make("SawyerLift", has_renderer=True)

# reset the environment
env.reset()

for i in range(1000):
    action = np.random.randn(env.dof)  # sample random action
    obs, reward, done, info = env.step(action)  # take action in the environment
    env.render()  # render on display

I get a blank (black) window that appears for three seconds before vanishing. I don't see any images or animations. I find that strange since running the demo.py worked fine.

amandlek commented 5 years ago

That's pretty strange - your lines of code run fine on my machine. Could you try passing the same arguments to suite.make as in the demo? Most importantly, pass use_camera_obs=False and for good measure, has_offscreen_renderer=False as well.

ghost commented 5 years ago

Yes your amendments worked!