搭建完coopeliasim+pytorch+gym+visdom+
stable-baselines3都没啥问题,运行coppeliasim_cart_pole代码时出现“AssertionError: Your environment must inherit from
the gymnasium.Env class cf. https://gymnasium.farama.org/api/env/”
详细为“
runfile('C:/Users/86131/.spyder-py3/Hyy_programme/vrep_cartpole/examples/coppeliasim_cart_pole.py', wdir='C:/Users/86131/.spyder-py3/Hyy_programme/vrep_cartpole/examples')
Reloaded modules: visdom_utils, callbackFunctions, simConst, sim, CartPoleModel, CartPoleEnv
Connect to remote API server.
Connected to remote API server
get object joint 1 ok.
get object joint 2 ok.
Traceback (most recent call last):
File ~\.conda\envs\rl\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\users\86131\.spyder-py3\hyy_programme\vrep_cartpole\examples\coppeliasim_cart_pole.py:20
check_env(env)
File ~\.conda\envs\rl\lib\site-packages\stable_baselines3\common\env_checker.py:396 in check_env
assert isinstance(
AssertionError: Your environment must inherit from the gymnasium.Env class cf. https://gymnasium.farama.org/api/env/
”
第三方账号登入
QQ 微博 微信