Shimmy
Shimmy copied to clipboard
Reasoning for rendering FPS for dm_control environments
Hello Shimmy Contributors,
I just wanted to ask about the reason behind the metadata['render_fps']
setting for dm_control environments.
In dm_control_compatibility.py#81, it seems like the render_fps is set to the environment's control_timestep
converted to millisecond, but I think it is more natural to have it set to int(round((1/control_timestep))
? I'm more than happy to submit a PR for this.
Looking and thinking about it again.
The dm-control control_timestep docstring says that it is the interval in seconds between actions.
Therefore, 1/control_timesteps
correctly computes the frames per second equivalent to the environment's equivalent actions per second.
I'm not sure we want to include the int(round(X))
(1 // X
is equivalent as well), maybe, round(X, 3)
such that the value is rounded to a reasonable number without losing too much accuracy to the original env.