Farama-Foundation / Metaworld

Collections of robotics environments geared towards benchmarking multi-task and meta reinforcement learning
https://metaworld.farama.org/
MIT License
1.28k stars 275 forks source link

Camera view? #455

Closed Hong753 closed 10 months ago

Hong753 commented 12 months ago

Does anyone know how to change the camera view when rendering? It seems there are several camera view modes (topview, corner, etc.), but i can't find a way to set the camera_name attribute, or make it work.

reginald-mclean commented 10 months ago

Hi @Hong753. I think there is an issue passing the selected camera from MW -> Gymnasium. I had to modify the Gymnasium mujoco_env.py render function to accept arguments then I was able to render from the desired camera.

varungupta31 commented 3 months ago

@reginald-mclean hey, can you please tell more about the change you mentioned? I tried to follow the code trail, but couldn't quite figure it out.

I found camera_id to be passed in some places, and though that would work, but that too didn't change the camera view.

Thanks,