Open Yu-zx opened 6 months ago
For multi-robot warehouse (RWARE) environment, the version of gym is suggeted to be 0.21 according its the offcial instruction (https://github.com/semitable/robotic-warehouse/blob/master/setup.py)..
Hence, when you run this environment with XuanCe, you should downgrade the version of gym by typing
pip install gym==0.21
That will help you solve the problem.
Traceback (most recent call last): File "D:/code/DRL/xuance-master-1/examples/qmix/qmix_rware.py", line 311, in
runner = Runner(args)
File "D:/code/DRL/xuance-master-1/examples/qmix/qmix_rware.py", line 70, in init
self.envs = make_envs(args)
File "D:\code\DRL\xuance-master-1\xuance\environment__init.py", line 129, in make_envs
return REGISTRY_VEC_ENV[config.vectorize]([thunk for in range(config.parallels)])
File "D:\code\DRL\xuance-master-1\xuance\environment\robotic_warehouse\robotic_warehouse_vec_env.py", line 6, in init
super(DummyVecEnv_RoboticWarehouse, self).init(env_fns)
File "D:\code\DRL\xuance-master-1\xuance\environment\new_env_mas\new_vec_env_mas.py", line 147, in init__
self.envs = [fn() for fn in env_fns]
File "D:\code\DRL\xuance-master-1\xuance\environment\new_env_mas\new_vec_env_mas.py", line 147, in
self.envs = [fn() for fn in env_fns]
File "D:\code\DRL\xuance-master-1\xuance\environment__init.py", line 78, in _thunk
env = RoboticWarehouseEnv(config, render_mode=config.render_mode)
File "D:\code\DRL\xuance-master-1\xuance\environment\robotic_warehouse\robotic_warehouse_env.py", line 9, in init
self.env = gym.make(ENV_IDs[args.env_id])
File "D:\anaconda3\envs\xuance_env\lib\site-packages\gym\envs\registration.py", line 640, in make
env = env_creator(**_kwargs)
File "D:\anaconda3\envs\xuance_env\lib\site-packages\rware\warehouse.py", line 247, in init
self._use_slow_obs()
File "D:\anaconda3\envs\xuance_env\lib\site-packages\rware\warehouse.py", line 359, in _use_slowobs
for in range(self.n_agents)
File "D:\anaconda3\envs\xuanceenv\lib\site-packages\rware\warehouse.py", line 359, in
for in range(self.n_agents)
File "D:\anaconda3\envs\xuance_env\lib\site-packages\gym\spaces\multi_binary.py", line 44, in init__
assert (np.asarray(input_n) > 0).all() # n (counts) have to be positive
AssertionError