med-air / SurRoL

[IROS'21] SurRoL: An Open-source Reinforcement Learning Centered and dVRK Compatible Platform for Surgical Robot Learning
https://med-air.github.io/SurRoL/
MIT License
119 stars 19 forks source link

Error while running script #5

Closed datonefaridze closed 1 year ago

datonefaridze commented 1 year ago

Hi, how can i use step function correctly? when i wrote: `import gym import numpy as np from surrol.const import ROOT_DIR_PATH import surrol.gym

env = gym.make("NeedlePick-v0") env.reset() while True: obs = env.step(np.random.randn(5)) env.render()` it gave me an error:

Traceback (most recent call last): File "dato1.py", line 12, in <module> obs = env.step(np.random.randn(5)) File "/home/dato/src/my_projects/robotics/venv/lib/python3.8/site-packages/gym/wrappers/time_limit.py", line 50, in step observation, reward, terminated, truncated, info = self.env.step(action) ValueError: not enough values to unpack (expected 5, got 4) Destroy EGL OpenGL window. how can i fix this?

TaoHuang13 commented 1 year ago

Hi. This issue may relate to the gym version. You may try the gym version == 0.15.6.