-
-
Notifications
You must be signed in to change notification settings - Fork 838
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
[Question] Collect multiple images from different cameras #1050
Comments
I made a wrapper to collect images from different cameras: class ImageCollection(gym.Wrapper, gym.utils.RecordConstructorArgs):
def __init__(self, env: gym.Env, camera_names: list):
gym.utils.RecordConstructorArgs.__init__(self, camera_names=camera_names)
gym.Wrapper.__init__(self, env)
assert env.render_mode == "rgb_array"
self.unwrapped_model = env.model
self.unwrapped_mujoco_renderer = env.mujoco_renderer
self.camera_names = camera_names
def render(self):
frames = []
for camera_name in self.camera_names:
frames.append(self.unwrapped_mujoco_renderer.render(render_mode=self.render_mode, camera_name=camera_name))
return frames I am not sure if the above is the best way to realize this. Please feel free to offer some suggestions. |
This solution looks like the best available currently |
Thanks for your time to check the above code snippet. |
The proper solution for MuJoCo Gymnasium would be to support multiple |
That would be great if this is implemented. |
@Kallinteris-Andreas The render api doesn't seem built to support as by default so would recommend that until this is a common feature wanted by many users, I wouldn't implement it within the codebase. |
Hi! @pseudo-rnd-thoughts @Kallinteris-Andreas Is there any elegant method to collect multiple images with the |
For taking |
Question
Hi!
Is it possible to require multiple images from different cameras using Gymnasium API?
The list of camera names cannot be passed during registration and only one camera string is feasible.
Is there any elegant way to realize this feature?
Thanks.
The text was updated successfully, but these errors were encountered: