rr-learning / CausalWorld

CausalWorld: A Robotic Manipulation Benchmark for Causal Structure and Transfer Learning
https://sites.google.com/view/causal-world/home
MIT License
205 stars 25 forks source link

How to record higher quality videos? #99

Open ekarais opened 3 years ago

ekarais commented 3 years ago

I'm trying out the Model Predictive Control script provided in the docs. I notice that when setting enable_visualization=True when instantiating a CausalWorld environment, the real-time visualization of the CEM is very high resolution, which is great. However, the recording of the CEM obtained via gym.wrappers.monitoring.video_recorder.VideoRecorder has much poorer quality.

Is there a way to record the videos such that their resolution is as good as the real-time visualization, or at least better than what we currently obtain from the VideoRecorder?

I suspect that one would have to modify the render() function of CausalWorld to achieve this, but I don't know what exactly needs to be done.

michaelfeil commented 2 years ago

Have you tried to change the _setup_viewing_camera in the env.render method?

Particularly self._render_width = 320 and self._render_height = 240

https://github.com/rr-learning/CausalWorld/blob/548e66c36fba01125cf6290992dfd833ae42709b/causal_world/envs/causalworld.py#L550-L581