-
Notifications
You must be signed in to change notification settings - Fork 21
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
Broken dm_control.viewer #90
Comments
@elliottower Do you have any time to work on this? We should probably try to fix this and #15 |
I’ve been super busy so if you could look into it that would be great |
@Melanol I have experimented and tested most of the default shimmy environments and haven't found an issue with any of them. Looking at the other composer environment - https://github.com/deepmind/dm_control/blob/330c91f41a21eacadcf8316f0a071327e3f5c017/dm_control/locomotion/examples/basic_cmu_2019.py#L39 Can you render using just dm-control? If so, could you produce some example code? |
https://github.com/Melanol/dm_control_tripod_mini. Run tripod_mini_env.py to play with the 3D model, run render.py to make a video. |
Thanks, I have solved the issue, the default |
@pseudo-rnd-thoughts Have you tested this? Because nothing has changed on my side. I updated shimmy to 1.1.0, the code on my 1st message still gives me a frozen window, and the following code when executed in my repo (custom composer.Environment) gives dead animation: from shimmy.dm_control_compatibility import DmControlCompatibilityV0
from tripod_mini_env import env
env = DmControlCompatibilityV0(env, render_mode="human")
env.reset()
observation, info = env.reset(seed=42)
for _ in range(1000):
action = env.action_space.sample() # this is where you would insert your policy
observation, reward, terminated, truncated, info = env.step(action)
print(reward)
if terminated or truncated:
observation, info = env.reset()
env.close() Tried running tests on test_dm_control.py. I get 9 failed, 181 passed, and 29 ignored out of 219 tests. |
Reopening this until it’s fixed @pseudo-rnd-thoughts Weird thing is our CI should also catch this issue and all the tests pass so I’m thinking maybe your local environment has a package conflict and couldn’t actually upgrade to the newest version 1.1.0. Can’t think of why else it would happen. But maybe clone the most recent master then install with pip install -e . And then if you can figure out a way to fix things you can make a PR. |
@Melanol This is fixed for |
I'm going to add some tests for human rendering and the other possible rendering modes, for meltingpot for example I do test human rendering but others it is not done |
I tried cloning main and then Traceback (most recent call last):
File "/home/mel/PycharmProjects/Shimmy/venv/lib/python3.10/site-packages/gymnasium/wrappers/monitoring/video_recorder.py", line 181, in __del__
if not self._closed:
AttributeError: 'VideoRecorder' object has no attribute '_closed' |
I just pulled the most recent master and installed locally ( |
Also just FWIW, running the code in the original post here I got the same results of a frozen GUI, so I agree with Mark that it's most likely an issue with mujoco rendering. |
I think we are somehow getting different setups. |
Hi, I've encountered the same problem and I found the issue. I have opened a pull-request with the code to fix the problem: It may be possible to simplify the code further by updating 'model' and 'data' alone, instead of creating a new Viewer on each reset: but, while slightly faster, it may be a bit "hacky". |
When I try using shimmy with locomotion (uses composer.Environment) or a custom composer.Environment env, the dm_contorl.viewer starts but is either unresponsive (with default locomotion envs) or has no animation (for my custom env)
But the env is working, as you can see observations and rewards changing. No issues with suite envs (control.Environment).
The text was updated successfully, but these errors were encountered: