Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix render arguments when using single tasks
The current implementation has an issue in that it only allows changing
render_mode
during renderingMetaworld/metaworld/envs/mujoco/env_dict.py
Line 182 in cca35cf
render_mode
with**render_kwargs
such that users can setwidth
height
andcamera_name
when initializing the environment.Modifications
metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_*.py
are modified. e.g.,Metaworld/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_assembly_peg_v2.py
Lines 20 to 22 in cca35cf
Metaworld/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_assembly_peg_v2.py
Lines 34 to 36 in cca35cf
**render_kwargs
.metaworld/envs/mujoco/sawyer_xyz/sawyer_xyz_env.py
is modified the same as above.metaworld/envs/mujoco/env_dict/py
is modified.render_mode
is replaced with**render_kwargs
inMetaworld/metaworld/envs/mujoco/env_dict.py
Line 182 in cca35cf
Metaworld/metaworld/envs/mujoco/env_dict.py
Line 191 in cca35cf
Additional dependencies
None
TODO:
Currently, for camera
corner
,corner2
andcorner3
, the rendered images incorrectly rotate 90 degrees. It might be because of using OpenGL vs. opencv as the rendering backbone.image[::-1]
can correct the images when using these camera views.