Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid render mode human can not render"human" and "rgb_array" #90

Open
xiezhipeng-git opened this issue Jan 23, 2023 · 1 comment
Open

Comments

@xiezhipeng-git
Copy link

xiezhipeng-git commented Jan 23, 2023

invalid render mode human
File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\Lib\site-packages\procgen\env.py", line 105, in init
raise Exception(f"invalid render mode {render_mode}")
File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\Lib\site-packages\procgen\env.py", line 246, in init
super().init(num, env_name, options, **kwargs)
File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\Lib\site-packages\procgen\env.py", line 265, in ProcgenEnv
return ToBaselinesVecEnv(ProcgenGym3Env(num=num_envs, env_name=env_name, **kwargs))

Name: procgen
Version: 0.10.7
Summary: Procedurally Generated Game-Like RL Environments
Home-page: https://github.com/openai/procgen
Author: OpenAI
Author-email:

Name: gym3
Version: 0.3.3
Summary: Vectorized Reinforcement Learning Environment Interface
Home-page: https://github.com/openai/gym3
Author: OpenAI
Name: gym
Version: 0.26.2
Summary: Gym: A universal API for reinforcement learning environments
Home-page: https://www.gymlibrary.dev/
Author: Gym Community
Author-email: [email protected]
License: MIT

use human it has error and use rgb_array it is no render
and self.env.render() two model also same

@kaixin96
Copy link

It seems the rendered image is pushed into the info dict.

if (render_human) {
struct libenv_tensortype s;
strcpy(s.name, "rgb");
s.scalar_type = LIBENV_SCALAR_TYPE_DISCRETE;
s.dtype = LIBENV_DTYPE_UINT8;
s.shape[0] = RENDER_RES;
s.shape[1] = RENDER_RES;
s.shape[2] = 3;
s.ndim = 3,
s.low.uint8 = 0;
s.high.uint8 = 255;
info_types.push_back(s);
}

So it can be accessed by env.get_info()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants